Modify

Opened 8 years ago

Closed 7 years ago

#7378 closed defect (fixed)

mipsel-openwrt-linux-uclibc/bin/ld: cannot find -lgcc_s_pic

Reported by: simakin@… Owned by: developers
Priority: normal Milestone: Backfire 10.03.1
Component: base system Version: Trunk
Keywords: Cc:

Description

Error compile with STRIP in TRUNK

Attachments (1)

.config (102.9 KB) - added by anonymous 8 years ago.

Download all attachments as: .zip

Change History (9)

Changed 8 years ago by anonymous

comment:1 Changed 8 years ago by simakin@…

make[3]: Entering directory `/home/r00t/backfire/package/wireless-tools'
IPKG_TMP=/home/r00t/backfire/tmp/ipkg IPKG_INSTROOT=/home/r00t/backfire/build_dir/target-mipsel_uClibc-0.9.30.1/root-brcm-2.4 IPKG_CONF_DIR=/home/r00t/backfire/staging_dir/target-mipsel_uClibc-0.9.30.1/etc IPKG_OFFLINE_ROOT=/home/r00t/backfire/build_dir/target-mipsel_uClibc-0.9.30.1/root-brcm-2.4 /home/r00t/backfire/scripts/ipkg -force-defaults -force-depends install /home/r00t/backfire/bin/brcm-2.4/packages/wireless-tools_29-4_brcm-2.4.ipk
Unpacking wireless-tools...Done.
Configuring wireless-tools...Done.
make[3]: Leaving directory `/home/r00t/backfire/package/wireless-tools'
make[2]: Leaving directory `/home/r00t/backfire'
make[2]: Entering directory `/home/r00t/backfire'
make[3]: Entering directory `/home/r00t/backfire'
( \

echo "uci set 'network.lan.dns='"; \
echo "uci set 'network.lan.proto=static'"; \
echo "uci set 'network.lan.gateway='"; \
echo "uci set 'network.lan.netmask=255.255.255.0'"; \
echo "uci set 'network.lan.ipaddr=192.168.1.1'"; \

\

) > /home/r00t/backfire/build_dir/target-mipsel_uClibc-0.9.30.1/root-brcm-2.4/etc/uci-defaults/base-files

( \

echo "uci set 'luci.main.lang='"; \

\

) > /home/r00t/backfire/build_dir/target-mipsel_uClibc-0.9.30.1/root-brcm-2.4/etc/uci-defaults/luci-web

make[3]: Leaving directory `/home/r00t/backfire'
rm -rf /home/r00t/backfire/build_dir/target-mipsel_uClibc-0.9.30.1/root-brcm-2.4/usr/lib/opkg
rm -rf /home/r00t/backfire/tmp/mklibs-progs /home/r00t/backfire/tmp/mklibs-out
# first find all programs and add them to the mklibs list
find /home/r00t/backfire/staging_dir/target-mipsel_uClibc-0.9.30.1/root-brcm-2.4 -type f -perm +100 -exec file -r -N -F {} + | awk ' /executable.*dynamically/ { print $1 }' > /home/r00t/backfire/tmp/mklibs-progs
# find all loadable objects that are not regular libraries and add them to the list as well
find /home/r00t/backfire/staging_dir/target-mipsel_uClibc-0.9.30.1/root-brcm-2.4 -type f -name \*.so\* -exec file -r -N -F
{} + | awk ' /shared object/ { print $1 }' >> /home/r00t/backfire/tmp/mklibs-progs
mkdir -p /home/r00t/backfire/tmp/mklibs-out
/home/r00t/backfire/staging_dir/host/bin/mklibs.py -D -d /home/r00t/backfire/tmp/mklibs-out --sysroot /home/r00t/backfire/staging_dir/target-mipsel_uClibc-0.9.30.1/root-brcm-2.4 -L /lib -L /usr/lib -L /usr/lib/ebtables --ldlib /lib/ld-uClibc.so.0 --target mipsel-openwrt-linux-uclibc cat /home/r00t/backfire/tmp/mklibs-progs 2>&1
I: Using /home/r00t/backfire/staging_dir/target-mipsel_uClibc-0.9.30.1/root-brcm-2.4/lib/ld-uClibc.so.0 as dynamic linker.
I: library reduction pass 1
597 symbols, 6 unresolved
/home/r00t/backfire/staging_dir/toolchain-mipsel_gcc-3.4.6_uClibc-0.9.30.1/usr/lib/gcc/mipsel-openwrt-linux-uclibc/3.4.6/../../../../mipsel-openwrt-linux-uclibc/bin/ld: cannot find -lgcc_s_pic
collect2: ld returned 1 exit status
Command failed with status 1 : mipsel-openwrt-linux-uclibc-gcc -nostdlib -nostartfiles -shared -Wl,--gc-sections -Wl,-soname=libc.so.0 -umkdir -uenviron -uqsort -uwrite -usettimeofday -uclntudp_create -uasprintf -uputs -ustrlen -ugetgrouplist -uuClibc_init -ugettimeofday -ugetlogin -uunlockpt -uadddf3 -ugrantpt -ubind -ugedf2 -usetmntent -ustrrchr -udprintf -usetuid -uctype_b -uexecve -uunlink -umemrchr -uexecvp -ustrcpy -upmap_getmaps -uendmntent -ugetopt_long -ugetservbyport -ulseek -uether_ntoa -umemcpy -umemcmp -uerror -ugetsockname -uenviron -utcsetattr -uvasprintf -ugethostname -uwcrtomb -uread -umemset -urealpath -utcsetpgrp -uopenlog -ustrstr -usendmsg -urename -uusleep -ufprintf -usrand -upread -ugetpgrp -uif_nametoindex -uuClibc_main -ugetutent -utcflush -uisatty -uctype_tolower -uvfprintf -ugetpriority -uexecv -ustrsep -uclosedir -ultdf2 -uprctl -ustrnlen -uatol -uselect -urealloc -ufnmatch -uauthunix_create_default -ustat -usocket -uclose -usigfillset -ugetusershell -udup2 -usystem -ucfsetospeed -ufgetc -ugetcwd -ufclose -umemchr -ustrncat -usemop -uaccept -uclnt_sperror -uftruncate -ueqdf2 -ugetpagesize -ugetpeername -uin6addr_any -ulstat64 -uinet_ntop -uvprintf -ucapset -uputenv -ustrtof -ushmdt -uttyname_r -umunmap -uferror -uxdr_array -usetegid -ufgetwc -ulchown -uwait3 -ugetservbyname -uvsyslog -usync -usetsockopt -ustrtod -utzset -ulongjmp -usendto -ustrtok_r -ugetspnam -uvfork -ufputs -ufwrite -ureboot -usiglongjmp -ufseeko64 -uexeclp -upwrite -ukill -umkstemp64 -uswapon -ucfgetospeed -uxdr_bytes -uraise -ugetaddrinfo -usetpgid -ustrcat -ugetpwnam -uungetc -uflock -umalloc -ugetppid -uclearenv -uchmod -uisspace -udifftime -uswapoff -usetitimer -ugetmntent -ugetpid -upthread_mutex_unlock -ugetnetbyaddr -usetbuf -ustrtoull -ugetsid -ustdin -uether_aton -ustrtok -ustrspn -ulstat -uclearerr -ugetitimer -ugetrlimit64 -ulocaltime_r -ucapget -ufdopen -usetenv -ufileno -ufgets -ugetopt_long_only -ufopen64 -ufcntl -ubsearch -uif_indextoname -ustrerror -upmap_getport -usrand48 -ulocaltime -uopendir -ufixunsdfsi -ucreate_module -usetvbuf -uprintf -uxpg_basename -usigdelset -uumount -utoupper -urmdir -ubindresvport -ufscanf -udup -upututline -ustrtoul -ustrcasestr -urecvfrom -usetpriority -ufchmod -usysinfo -ulockf64 -uh_errno_location -uoptarg -uinet_ntoa -ufstat64 -uhstrerror -ulink -uuname -uinet_addr -usubdf3 -uoptopt -umallopt -ugetnetbyname -uunsetenv -ustrcasecmp -ufreopen64 -ummap -usetlinebuf -usetlogmask -umknod -ugetuid -uregerror -ufputc -uposix_openpt -umsync -udivdf3 -utime -uptsname_r -usetutent -ucreat64 -ustdout -uuClibc_fini -ushutdown -ustrcspn -usysconf -ustat64 -uklogctl -uoptind -ustrlcpy -uchown -ufcntl64 -ufstat -usetrlimit64 -ufread -ufgetc_unlocked -uerrno_location -uvsnprintf -unanosleep -uumask -uglobfree -ufsync -uinet_aton -uquery_module -uconnect -unedf2 -upivot_root -uextendsfdf2 -usprintf -ushmctl -ufreeaddrinfo -uendutent -urecvmsg -umkdtemp -udaemon -uutmpname -upoll -ustrncasecmp -usetusershell -ugetpwuid -upclose -usyscall -ugetgrnam -uunpack_f -ugetsockopt -urewind -uxdr_opaque -ufopen -urand -uopterr -uxdr_string -uxdr_u_int -upthread_mutex_lock -ushmat -ustrncpy -umuldf3 -uendusershell -ustrchr -ugethostid -udaylight -usemget -ustrcmp -usigaction -upopen -ugetmntent_r -ustime -ustdin -ustatfs64 -ugetgroups -ustdout -uchdir -uexit -uopen -uftell -ureaddir -ufseek -uinet_pton -usigprocmask -uglobfree64 -uwcsncmp -umount -ustrchrnul -udrand48 -uclnttcp_create -udirfd -ugetopt -uisdigit -umkfifo -usigsuspend -uperror -ucfsetispeed -usetsid -u_exit -ufchown -ugetenv -ukillpg -usnprintf -ustrncmp -uinit_module -uglob64 -ugetegid -uwaitpid -ugethostbyname -ustrdup -urecv -ugetpass -umrand48 -udelete_module -uxdr_int -uvsprintf -usymlink -uutimes -uregexec -ufflush -utimes -uexecl -usscanf -ugetgid -ugeteuid -u_res -uabort -usetgid -ugetprotobynumber -uinitgroups -uttyname -uendpwent -ucmsg_nxthdr -umktime -ubasename -uregfree -usigaddset -ustrtoll -ualarm -ustrtol -uunpack_d -ustrftime -usend -ufchdir -ureaddir64 -upack_f -ufeof -ugmtime_r -uassert -uclnt_spcreateerror -uumount2 -ustrptime -ufree -ucfmakeraw -ufputc_unlocked -utcgetattr -ures_init -utruncdfsf2 -uutime -ufork -ucxa_finalize -ulseek64 -ufixdfsi -uwarn -usignal -uctime -usetpgrp -ureadlink -useteuid -usemctl -usetgroups -utcgetpgrp -ushmget -ugai_strerror -usigemptyset -ufpcmp_parts_d -usigsetjmp -uupdwtmp -umempcpy -umemmove -ugetprotobyname -uatoi -uftruncate64 -utimezone -udirname -ustrlcat -uopen64 -upipe -uaccess -uchroot -uxdr_enum -ugethostbyaddr -ugetnameinfo -ucalloc -usyslog -uendgrent -ulisten -ustderr -ufloatsidf -ustrpbrk -uioctl -ustatvfs -uregcomp -ucloselog -ugetutline -u_setjmp -uglob -ugetgrgid -uputchar -usleep -uatexit -ustrsignal -uwait -o /home/r00t/backfire/tmp/mklibs-out/libc.so.0-so /home/r00t/backfire/staging_dir/target-mipsel_uClibc-0.9.30.1/root-brcm-2.4/lib/libc.a -Wl,-init,uClibc_init -lgcc_s_pic -L/home/r00t/backfire/tmp/mklibs-out -L/home/r00t/backfire/staging_dir/target-mipsel_uClibc-0.9.30.1/root-brcm-2.4/lib -L/home/r00t/backfire/staging_dir/target-mipsel_uClibc-0.9.30.1/root-brcm-2.4/usr/lib -L/home/r00t/backfire/staging_dir/target-mipsel_uClibc-0.9.30.1/root-brcm-2.4/usr/lib/ebtables /home/r00t/backfire/staging_dir/target-mipsel_uClibc-0.9.30.1/root-brcm-2.4/lib/ld-uClibc.so.0
With output:
make[2]: * [package/rootfs-prepare] Error 1
make[2]: Leaving directory `/home/r00t/backfire'
make[1]:
* /home/r00t/backfire/staging_dir/target-mipsel_uClibc-0.9.30.1/stamp/.package_rootfs-prepare Error 2
make[1]: Leaving directory `/home/r00t/backfire'

comment:2 Changed 8 years ago by Simakin@…

I'm find in revision 18438 path
root/trunk/tools/mklibs/patches/009-uclibc_libgcc_link.patch
in this patch add ' libgcc_link = "-lgcc" '
this truble with ALL Uclibc version

comment:3 Changed 8 years ago by anonymous

this trouble solved need rebuild toolchain

comment:4 Changed 8 years ago by thepeople

  • Resolution set to fixed
  • Status changed from new to closed

comment:5 follow-up: Changed 8 years ago by simakin@…

  • Resolution fixed deleted
  • Status changed from closed to reopened

Hmm, this problem solved after comment in staging_dir/host/bin/mklibs.py
Line 579
libgcc_link = "-lgcc_s_pic"
and rebuile toolchain.
Mayabe it's wrong?
Thanks

comment:6 in reply to: ↑ 5 Changed 8 years ago by anonymous

Replying to simakin@…:

Hmm, this problem solved after comment in staging_dir/host/bin/mklibs.py
Line 579
libgcc_link = "-lgcc_s_pic"
and rebuile toolchain.
Mayabe it's wrong?
Thanks

Does anyone know what's the purpose of that ld flag? is it needed? I did the same thing and openwrt built successfully.

comment:7 Changed 7 years ago by simakin@…

If use strip library func then:
I: Using /tmp/backfire_1/staging_dir/target-mipsel_uClibc-0.9.30.1/root-brcm-2.4/lib/ld-uClibc.so.0 as dynamic linker.
I: library reduction pass 1
692 symbols, 6 unresolved
/tmp/backfire_1/staging_dir/toolchain-mipsel_gcc-3.4.6_uClibc-0.9.30.1/usr/lib/gcc/mipsel-openwrt-linux-uclibc/3.4.6/../../../../mipsel-openwrt-linux-ucbc/bin/ld: cannot find -lgcc_s_pic
collect2: ld returned 1 exit status

If not use this features all Ok.

comment:8 Changed 7 years ago by nbd

  • Resolution set to fixed
  • Status changed from reopened to closed

fixed in newer versions in trunk

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.