[Clfs-support] CLFS for ppc on LFS 6.3 host
Anthony Drake
agmotorsvc at verizon.net
Wed Jul 9 08:29:47 PDT 2008
Ken, Joe,
Good news: hello world program compiled with CLFS cross compiler runs on one of the targets that has a 2.6 kernel installed.
It will only run when compiled with the -static switch to gcc, and it's 2.5M in size:
v4 at v4-130: [~]#ls -al
drwx------ 2 v4 users 1024 Jul 9 14:33 .
drwxr-xr-x 3 root root 1024 May 22 16:55 ..
-rw------- 1 v4 users 88 Jul 9 14:26 .bash_history
-rwxr-xr-x 1 v4 users 2600205 Jul 10 2008 hello
-rwxr-xr-x 1 v4 users 3022 Jul 10 2008 helloworld
-rwxr-xr-x 1 v4 users 12143 Jul 10 2008 hw
hello is linked with -static:
v4 at v4-130 [~]# ./hello
Hello world
hw is linked without -static:
v4 at v4-130 [~]# ./hw
-bash: ./hw: No such file or directory
libc.so.6 is a link:
v4 at v4-130 [v4]# ls -l /opt/ppc/powerpc-linux/lib/libc.so.6
lrwxrwxrwx 1 root root 13 May 22 16:55 /opt/ppc/powerpc-linux/lib/libc.so.6 -> libc-2.2.5.so
libc-2.2.5.so will not run (I was trying to see it's version at cmd line):
v4 at v4-130 [v4]# /opt/ppc/powerpc-linux/lib/libc-2.2.5.so
bash: /opt/ppc/powerpc-linux/lib/libc-2.2.5.so: No such file or directory
This behavior of library functions emitting this "No such file or directory" print statement is so wierd. I'm just a little over my head when delving into glibc: I've written applications on linux/unix/xenix systems since the mid 80's, and embedded systems since the late 80's, but never learned the nuances of linux/glibc/gcc, but I'm learning, no small thanks to CLFS.
My next step is to try to compile passwd. Anyway, thanks for your help. I'm certainly encouraged that the cross compiler built executable will run on the target. If there's anything obvious here please let me know.
Regards, Anthony.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.clfs.org/pipermail/clfs-support-clfs.org/attachments/20080709/2d25dd93/attachment-0001.htm>
More information about the Clfs-support
mailing list