Anonymous | Login | Signup for a new account | 11-10-2008 11:44 PST |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | |||||||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | |||||||
0002414 | [uClibc] Posix Threads | major | always | 03-03-08 14:52 | 10-14-08 00:24 | |||||||
Reporter | pqa | View Status | public | |||||||||
Assigned To | uClibc | |||||||||||
Priority | normal | Resolution | open | |||||||||
Status | feedback | Product Version | ||||||||||
Summary | 0002414: Order of linking libraries can causes application not to run | |||||||||||
Description |
Using uClibc version 0.9.29, linking with -nodefaultlibs -lc -lpthreads causes the application to consume 100% CPU time indefinitely, before main() is called. Linking with -nodefaultlibs -lpthreads -lc allows the application to run. Application is cross compiled to run on bcrm47xx mipsel processor, using gcc 4.1.2 and is using libpthreads.old. I can provide further information if needed, but I am not sure what other information would be helpful. Attached file builds example application in form that works and form that doesn't. |
|||||||||||
Additional Information | ||||||||||||
Attached Files |
pthread.proc [^] (631 bytes) 03-03-08 14:52 ld-uClibc.so.0.elf [^] (1,166 bytes) 10-12-08 00:55 libc.so.0.elf [^] (1,157 bytes) 10-12-08 00:56 libpthread.so.0.elf [^] (1,273 bytes) 10-12-08 00:56 pqa-pfirst.elf [^] (1,260 bytes) 10-12-08 00:56 pqa-plast.elf [^] (1,260 bytes) 10-12-08 00:56 |
|||||||||||
|
Notes | |
(0006084) xi 03-26-08 14:49 edited on: 03-26-08 14:56 |
This is very similar to what I encountered with our MIPS toolchain and NPTL. 0002264 might be the same problem too. I found one potential cause: - Once libpthread is linked, standard loader is used instead of uClibc loader Here is a console log showing this problem with ldd: $ /opt/toolchains/uclibc-crosstools-gcc-4.2.1-7/usr/bin/mips-linux-uclibc-gcc -o test testc.o /opt/toolchains/uclibc-crosstools-gcc-4.2.1-7/usr/bin/mips-linux-uclibc-ldd test checking sub-depends for 'not found' libc.so.0 => not found (0x00000000) /lib/ld-uClibc.so.0 => /lib/ld-uClibc.so.0 (0x00000000) /opt/toolchains/uclibc-crosstools-gcc-4.2.1-7/usr/bin/mips-linux-uclibc-gcc -o test testc.o –lpthread $ /opt/toolchains/uclibc-crosstools-gcc-4.2.1-7/usr/bin/mips-linux-uclibc-ldd test checking sub-depends for '/lib/libpthread.so.0' checking sub-depends for 'not found' checking sub-depends for '/lib/libc.so.6' libpthread.so.0 => /lib/libpthread.so.0 (0x00000000) libc.so.0 => not found (0x00000000) libc.so.6 => /lib/libc.so.6 (0x00000000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x00000000) $ |
(0013314) carmelo73 10-11-08 23:49 |
The fact that there is a dependencies on /lib/libc.so.6, means that some libraries are not correclty built. Wrong compiler configuration ? wrong libraries used ? Please post the output of the command 'readelf -d' executed over your test and linked libraries to check which is the offending one. |
(0013354) pqa 10-12-08 00:58 |
Output of readelf -d uploaded for libraries and programs. As a reminder, pqa-plast has the problem, pqa-pfirst works Ok. |
(0013384) bernhardf 10-12-08 13:54 |
Can you please verify that this problem can still be observed with: - uClibc-trunk - gcc-4.3.2 (i.e. the current, stable gcc, just in case) - binutils >= 2.18 (preferably 2.18.50.0.9) If this fails, please double-check against the uClibc-nptl branch. TIA, |
(0013514) pqa 10-13-08 17:06 |
Hi Bernhard, I am happy to try as you suggest with the latest versions of uClibc, gcc and binutils, but some suggestions as to how best to do that would be appreciated. I currently use OpenWRT, and so have been using the toolchain provided in that, and am not familiar with how to change the toolchain or the components in it. I have also noted that the svn repository on uclibc.org for buildroot doesn't support gcc 4.3.2 and the latest binutils is 2.18.50.0.1, so I assume I am looking in the wrong place there. |
(0013544) bernhardf 10-14-08 00:24 |
My repo is here: http://repo.or.cz/w/buildroot.git/ [^] but try to use uClibc trunk first with your existing toolchain. Also, which pthreads do you use, linuxthreads.old or the (new) linuxthreads? Try to use the other one. |
Copyright © 2000 - 2006 Mantis Group |