OpenWrt Forum Archive

Topic: error while loading shared libraries when using external toolchain

The content of this topic has been archived on 31 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

make[5]: Entering directory `/home/banglang/work/project/openwrt/stable_test/openwrt_aa2/build_dir/linux-bcm53xx/linux-2.6.36.4'
scripts/kconfig/conf --silentoldconfig arch/arm/Kconfig
#
# configuration written to .config
#
make[5]: Leaving directory `/home/banglang/work/project/openwrt/stable_test/openwrt_aa2/build_dir/linux-bcm53xx/linux-2.6.36.4'
make[5]: Entering directory `/home/banglang/work/project/openwrt/stable_test/openwrt_aa2/build_dir/linux-bcm53xx/linux-2.6.36.4'
  CHK     include/linux/version.h
  CHK     include/generated/utsrelease.h
make[6]: `include/generated/mach-types.h' is up to date.
  CC      kernel/bounds.s
/opt/hndtools-arm-linux-2.6.36-uclibc-4.5.3/bin/../libexec/gcc/arm-brcm-linux-uclibcgnueabi/4.5.3/cc1: error while loading shared libraries: libmpc.so.2: cannot open shared object file: No such file or directory
make[6]: *** [kernel/bounds.s] Error 1
make[5]: *** [prepare0] Error 2
make[5]: Leaving directory `/home/banglang/work/project/openwrt/stable_test/openwrt_aa2/build_dir/linux-bcm53xx/linux-2.6.36.4'
make[4]: *** [/home/banglang/work/project/openwrt/stable_test/openwrt_aa2/build_dir/linux-bcm53xx/linux-2.6.36.4/.modules] Error 2
make[4]: Leaving directory `/home/banglang/work/project/openwrt/stable_test/openwrt_aa2/target/linux/bcm53xx'
make[3]: *** [compile] Error 2
make[3]: Leaving directory `/home/banglang/work/project/openwrt/stable_test/openwrt_aa2/target/linux'
make[2]: *** [target/linux/compile] Error 2
make[2]: Leaving directory `/home/banglang/work/project/openwrt/stable_test/openwrt_aa2'
make[1]: *** [/home/banglang/work/project/openwrt/stable_test/openwrt_aa2/staging_dir/target-arm-brcm-linux/stamp/.target_compile] Error 2
make[1]: Leaving directory `/home/banglang/work/project/openwrt/stable_test/openwrt_aa2'
make: *** [world] Error 2



I used external toolchain on openwrt1209 but failed with above issue, then I found that there is not so files under staging_dir/toolchain-xxx/lib directory,
also had tried to copy the so file to stagind_dir/toolchain-xxx/lib but useless,

(Last edited by banglang.huang on 16 Apr 2015, 08:40)

banglang.huang wrote:

make[5]: Entering directory `/home/banglang/work/project/openwrt/stable_test/openwrt_aa2/build_dir/linux-bcm53xx/linux-2.6.36.4'
scripts/kconfig/conf --silentoldconfig arch/arm/Kconfig
#
# configuration written to .config
#
make[5]: Leaving directory `/home/banglang/work/project/openwrt/stable_test/openwrt_aa2/build_dir/linux-bcm53xx/linux-2.6.36.4'
make[5]: Entering directory `/home/banglang/work/project/openwrt/stable_test/openwrt_aa2/build_dir/linux-bcm53xx/linux-2.6.36.4'
  CHK     include/linux/version.h
  CHK     include/generated/utsrelease.h
make[6]: `include/generated/mach-types.h' is up to date.
  CC      kernel/bounds.s
/opt/hndtools-arm-linux-2.6.36-uclibc-4.5.3/bin/../libexec/gcc/arm-brcm-linux-uclibcgnueabi/4.5.3/cc1: error while loading shared libraries: libmpc.so.2: cannot open shared object file: No such file or directory
make[6]: *** [kernel/bounds.s] Error 1
make[5]: *** [prepare0] Error 2
make[5]: Leaving directory `/home/banglang/work/project/openwrt/stable_test/openwrt_aa2/build_dir/linux-bcm53xx/linux-2.6.36.4'
make[4]: *** [/home/banglang/work/project/openwrt/stable_test/openwrt_aa2/build_dir/linux-bcm53xx/linux-2.6.36.4/.modules] Error 2
make[4]: Leaving directory `/home/banglang/work/project/openwrt/stable_test/openwrt_aa2/target/linux/bcm53xx'
make[3]: *** [compile] Error 2
make[3]: Leaving directory `/home/banglang/work/project/openwrt/stable_test/openwrt_aa2/target/linux'
make[2]: *** [target/linux/compile] Error 2
make[2]: Leaving directory `/home/banglang/work/project/openwrt/stable_test/openwrt_aa2'
make[1]: *** [/home/banglang/work/project/openwrt/stable_test/openwrt_aa2/staging_dir/target-arm-brcm-linux/stamp/.target_compile] Error 2
make[1]: Leaving directory `/home/banglang/work/project/openwrt/stable_test/openwrt_aa2'
make: *** [world] Error 2



I used external toolchain on openwrt1209 but failed with above issue, then I found that there is not so files under staging_dir/toolchain-xxx/lib directory,
also had tried to copy the so file to stagind_dir/toolchain-xxx/lib but useless,


Fixed this issue with setting LD_LIBRARY_PATH in ~/.bashrc file
just set the LD_LIBRARY_PATH as the external_root/lib


however there comes another problem, the cc1 does not seems to work fine.
Many compilation error arise.

The discussion might have continued from here.