Modify

Opened 6 years ago

Closed 6 years ago

Last modified 4 years ago

#10822 closed defect (fixed)

Hardcoded path in SDK prevents build

Reported by: steveayre@… Owned by: jow
Priority: normal Milestone: Barrier Breaker 14.07
Component: toolchain Version: 10.03.1
Keywords: backfire sdk cannot create executables ld.uclibc.so hardcoded path Cc:

Description

When trying to build any packages using the backfire (10.03.1) SDK for brcm47xx (linksys wrt54gl etc), configure fails with the error:
checking whether the C compiler works... no
configure: error: C compiler cannot create executables

When examining config.log the error is (paths removed for clarity):
.../mipsel-openwrt-linux-uclibc/bin/ld: warning: ld-uClibc.so.0, needed by .../staging_dir/.../usr/lib/libc.so, not found (try using -rpath or -rpath-link)
.../staging_dir/.../usr/lib/libc.so: undefined reference to `_dl_app_init_array'
.../staging_dir/.../usr/lib/libc.so: undefined reference to `_dl_loaded_modules'
.../staging_dir/.../usr/lib/libc.so: undefined reference to `_dl_app_fini_array'
collect2: ld returned 1 exit status

And with full paths:
/home/steve/openwrt/OpenWrt-SDK-brcm47xx-for-Linux-i686-gcc-4.3.3+cs_uClibc-0.9.30.1/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.30.1/usr/bin/../lib/gcc/mipsel-openwrt-linux-uclibc/4.3.3/../../../../mipsel-openwrt-linux-uclibc/bin/ld: warning: ld-uClibc.so.0, needed by /home/steve/openwrt/OpenWrt-SDK-brcm47xx-for-Linux-i686-gcc-4.3.3+cs_uClibc-0.9.30.1/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.30.1/usr/lib/libc.so, not found (try using -rpath or -rpath-link)
/home/steve/openwrt/OpenWrt-SDK-brcm47xx-for-Linux-i686-gcc-4.3.3+cs_uClibc-0.9.30.1/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.30.1/usr/lib/libc.so: undefined reference to `_dl_app_init_array'
/home/steve/openwrt/OpenWrt-SDK-brcm47xx-for-Linux-i686-gcc-4.3.3+cs_uClibc-0.9.30.1/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.30.1/usr/lib/libc.so: undefined reference to `_dl_loaded_modules'
/home/steve/openwrt/OpenWrt-SDK-brcm47xx-for-Linux-i686-gcc-4.3.3+cs_uClibc-0.9.30.1/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.30.1/usr/lib/libc.so: undefined reference to `_dl_app_fini_array'
collect2: ld returned 1 exit status

From config.log it is apparent that there is a hardcoded path for the SDK of /home/jow/devel/openwrt/10.03.1/brcm47xx (it shows that was where configure was originally done). If the SDK is either placed in the /home/jow/devel/openwrt/10.03.1/brcm47xx directory, or a symlink made from /home/jow/devel/openwrt/10.03.1/brcm47xx to the SDK's directory then the packages build without any error - so this is the cause of the error.

Creating this symlink is a workaround, but it doesn't seem like it should be a necessary step as on some systems users might not have the necessary rights to do this, and it certainly isn't a documented step for using the SDK. It's also apparent that the path will be different for each SDK.

Attachments (0)

Change History (3)

comment:1 Changed 6 years ago by jow

  • Owner changed from developers to jow
  • Status changed from new to accepted

This is a known issue and the "fix" for this is complex. I am in the middle of reworking various toolchain apsects in trunk to make it truly relocatable, patches for autotools are outstanding yet. Once the rework is done I hope to be able to backport it to the backfire branch for a 10.03.2 release. Until then I can only suggest a symlink workaround.

comment:2 Changed 6 years ago by jow

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

Should be fixed with r29924 and r29925.

comment:3 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

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.