[uClibc]cross compiling for mipsel-linux, part 2
Mark and Janice Juszczec
juszczec at hotmail.com
Sat Feb 1 00:19:23 UTC 2003
Hi folks
Still not having any luck. Can anyone suggest the next the to try?
I thought I'd fool with the settings in .config and see if these fixed my
problems.
I turned off "Support global constructors and destructors"
"Large File Support"
"Dynamic atexit() Support"
"Shadow Password Support"
In Rules.mak I tried
CROSS=/opt/tvt/bin/mipsel-linux-, and when that didn't work
CROSS=mipsel-linux- (and set PATH=/opt/tvt/bin:$PATH)
Both gave me:
/opt/tvt/bin/mipsel-linux-gcc -Wall -Wstrict-prototypes -Wno-trigraphs
-fno-strict-aliasing -O0 -fno-builtin -nostdinc -D_LIBC
-I../../../../include -I. -g
-I/opt/tvt/lib/gcc-lib/mipsel-linux/2.95.2/include -DNDEBUG -fPIC -c
xstatconv.c -o xstatconv.o
In file included from xstatconv.c:33:
xstatconv.h:29: warning: `struct stat64' declared inside parameter list
xstatconv.h:29: warning: its scope is only this definition or declaration,
which is probably not what you want.
This went away when I re-enabled LFS support. I don't want LFS support, my
file system is nowhere near 2Gb. But I'll deal with this later.
Then I got the same undeclared __NR_getdents64 error as in my last post. I
fixed it the same way, by uncommenting it in
libc/sysdeps/linux/common/syscalls.c
Next I got:
Finding missing symbols in libc.a ...
partial linking...
Symbol _fini needed by libc.a but not found in libgcc.a
Symbol _init needed by libc.a but not found in libgcc.a
Symbol fcntl64 needed by libc.a but not found in libgcc.a
same as yesterday.
The mailing list archives suggested enabling ctors/dtors. I did it and the
_fini, _init problem went away.
I found the fcntl64 definition it in libc/sysdeps/linux/common/syscalls.c
in an ifdef. Its defined if __NR_fcntl64 is defined. The __NR_fcntl64 was
commented out, so I uncommented it.
And I got a clean compile!
Does any of this make sense for compiling under mipsel-linux?
I compiled BusyBox and when it tries to run init I get an "Invalid ELF
header" error.
The mailing list suggested:
[markj at mjolnir busybox]$ mipsel-uclibc-ldd busybox
libc.so.0 => /home/markj/myboot/uclibc-dev/lib/libc.so.0
(0x00000000)
/lib/ld-uClibc.so.0 => /lib/ld-uClibc.so.0 (0x00000000)
[markj at mjolnir busybox]$ file busybox
busybox: ELF 32-bit LSB mips-1 executable, MIPS R3000_LE [bfd bug], version
1 (SYSV), dynamically linked (uses shared libs), stripped
The (0x00000000) are troubling. Do they indicate a problem?
I noticed .config said SYSTEM_LDSO="/lib/ld-linux.so.2". It wasn't created
when I built uClibc. I created it and ld-linux.so.1, because I figured they
go together ;-) , as links to ld-uClibc-0.9.17.so
It didn't do any good ;-(
Would stripping ld-uClibc-0.9.17.so and libuClibc-0.9.17.so cause any
problems like this?
Then I tried removing Compile native shared library loader from .config.
This didn't do any good either.
Packing it in for the evening
Mark
_________________________________________________________________
Tired of spam? Get advanced junk mail protection with MSN 8.
http://join.msn.com/?page=features/junkmail
More information about the uClibc
mailing list