Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )



Advanced DNS Management
New ZoneEdit. New Managment.

FREE DNS Is Back

Sign Up Now
 
Reply to this topicStart new topic
> Cross compilation help needed, building zlib.a for mipsel-linux with mipsel-toolchain
Derf79
post Oct 3 2008, 01:54 PM
Post #1


Whats this Lie-nix Thing?
*

Group: Members
Posts: 1
Joined: 3-October 08
Member No.: 13,694



Hi,

I have a cross compilation problem I'd like some help with. I've read a few guides online, and they do provide specific examples, and from that I haven't had any luck figuring this out.

I am running Ubuntu 8.04 Hardy heron on my laptop (x86), and I'd like to compile Dropbear for my NMT, a popcorn hour, which needs to be compiled for mipsel-linux.

I got the toolchain for the NMT, downloaded it to ~/popcorn/smp/, configured it with $./configure, compiled it with $make, and it created a toolchain-path.env file. I did not do $make-install. I made the .env file executable, and ran it in my terminal window, so that it would load the $PATH into my session for mipsel-linux. The output of the .env looks like this:
$ cat toolchain-path.env
# source this script to put your new compiler in the PATH.

PATH=/home/fred/popcorn/smp/smp86xx_toolchain.20080505/build_mipsel_nofpu/staging_dir/usr/bin:/home/fred/popcorn/smp/smp86xx_toolchain.20080505/build_mipsel_nofpu/staging_dir/bin:$PATH
SMP86XX_TOOLCHAIN_PATH=/home/fred/popcorn/smp/smp86xx_toolchain.20080505/build_mipsel_nofpu/staging_dir
export SMP86XX_TOOLCHAIN_PATH
CCACHE_DIR=/home/fred/.ccache
export CCACHE_DIR

I then want to compile dropbear, but to enable zlib, I have to compile zlib.a myself. So I got the latest zlib from openwrt.
I put it in ~/popcorn/zlib
But when I try to do
$ CC=mipsel-linux-gcc ./configure

I end up with many error messages:
Building static library libz.a version 1.2.3 with mipsel-linux-gcc.
Checking for unistd.h... No.
Checking whether to use vs[n]printf() or s[n]printf()... using s[n]printf()
Checking for snprintf() in stdio.h... No.
WARNING: snprintf() not found, falling back to sprintf(). zlib
can build but will be open to possible buffer-overflow security
vulnerabilities.
Checking for return value of sprintf()... No.
WARNING: apparently sprintf() does not return a value. zlib
can build but will be open to possible string-format security
vulnerabilities.
Checking for errno.h... No.
Checking for mmap support... No.

I believe it is not seeing the mipsel-linux gcc, because when I just do ./configure it finds unistd.h and the other files.

How do I get zlib.a to compile using the mipsel-linux gcc I made?
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 17th December 2017 - 02:25 PM