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.


Sign Up Now
> Cross compilation help needed, building zlib.a for mipsel-linux with mipsel-toolchain
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


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.


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
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
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

Posts in this topic
- Derf79   Cross compilation help needed   Oct 3 2008, 01:54 PM

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: 22nd July 2018 - 04:55 PM