OpenWrt Forum Archive

Topic: about Use external toolchain problems

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

hi all,
     I have a question about external toolchain compiled for (verison :OpenWrt 14.07 for MT7620a).
     I compiled successfully without external toolchain.But when I config the following:
          --- Use external toolchain                           
     [ ]   Use host's toolchain                           
     (mipsel-openwrt-linux-uclibc) Target name           
     (mipsel-openwrt-linux-uclibc-) Toolchain prefix     
     (/opt/mips_7620_toolchain/toolchain/) Toolchain root
     (uclibc) Toolchain libc                             
     (./usr/bin ./bin) Toolchain program path             
     (./usr/include ./include) Toolchain include path     
     (./usr/lib ./lib) Toolchain library path             
                                                           
   
     
    something error is happened for dmesg about the following :
     
     
  make[6]: Entering directory `/disk2/openwrt/build_dir/target-mipsel-openwrt-linux-uclibc/util-linux-2.24.1'
/bin/bash ./libtool  --tag=CC   --mode=link mipsel-openwrt-linux-uclibc-gcc -fsigned-char -fno-common -Wall -Werror=sequence-point -Wextra -Wmissing-declarations -Wmissing-parameter-type -Wmissing-prototypes -Wno-missing-field-initializers -Wredundant-decls -Wsign-compare -Wtype-limits -Wuninitialized -Wunused-but-set-parameter -Wunused-but-set-variable -Wunused-parameter -Wunused-result -Wunused-variable -Wnested-externs -Wpointer-arith -Wstrict-prototypes -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kec -mdsp -fno-caller-saves -msoft-float -fpic   -L/disk2/openwrt/staging_dir/target-mipsel-openwrt-linux-uclibc/usr/lib -L/disk2/openwrt/staging_dir/target-mipsel-openwrt-linux-uclibc/lib -L/opt/mips_7620_toolchain/toolchain//usr/lib -L/opt/mips_7620_toolchain/toolchain//lib  -o dmesg sys-utils/dmesg.o  libcommon.la -lrt
OpenWrt-libtool: link: mipsel-openwrt-linux-uclibc-gcc -fsigned-char -fno-common -Wall -Werror=sequence-point -Wextra -Wmissing-declarations -Wmissing-parameter-type -Wmissing-prototypes -Wno-missing-field-initializers -Wredundant-decls -Wsign-compare -Wtype-limits -Wuninitialized -Wunused-but-set-parameter -Wunused-but-set-variable -Wunused-parameter -Wunused-result -Wunused-variable -Wnested-externs -Wpointer-arith -Wstrict-prototypes -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kec -mdsp -fno-caller-saves -msoft-float -fpic -o dmesg sys-utils/dmesg.o  -L/disk2/openwrt/staging_dir/target-mipsel-openwrt-linux-uclibc/usr/lib -L/disk2/openwrt/staging_dir/target-mipsel-openwrt-linux-uclibc/lib -L/opt/mips_7620_toolchain/toolchain//usr/lib -L/opt/mips_7620_toolchain/toolchain//lib ./.libs/libcommon.a -lrt
/disk2/mips_7620_toolchain/toolchain/bin/../lib/gcc/mipsel-openwrt-linux-uclibc/4.8.3/../../../../mipsel-openwrt-linux-uclibc/bin/ld: warning: libdl.so.0, needed by /opt/mips_7620_toolchain/toolchain//lib/librt.so, not found (try using -rpath or -rpath-link)
/disk2/mips_7620_toolchain/toolchain/bin/../lib/gcc/mipsel-openwrt-linux-uclibc/4.8.3/../../../../mipsel-openwrt-linux-uclibc/bin/ld: warning: libpthread.so.0, needed by /opt/mips_7620_toolchain/toolchain//lib/librt.so, not found (try using -rpath or -rpath-link)
/opt/mips_7620_toolchain/toolchain//lib/librt.so: undefined reference to `pthread_create'
/opt/mips_7620_toolchain/toolchain//lib/librt.so: undefined reference to `pthread_cancel'
/opt/mips_7620_toolchain/toolchain//lib/librt.so: undefined reference to `pthread_detach'
/opt/mips_7620_toolchain/toolchain//lib/librt.so: undefined reference to `pthread_once'
/opt/mips_7620_toolchain/toolchain//lib/librt.so: undefined reference to `pthread_attr_setstacksize'
/opt/mips_7620_toolchain/toolchain//lib/librt.so: undefined reference to `dlopen'
/opt/mips_7620_toolchain/toolchain//lib/librt.so: undefined reference to `pthread_sigmask'
/opt/mips_7620_toolchain/toolchain//lib/librt.so: undefined reference to `dlsym'
/opt/mips_7620_toolchain/toolchain//lib/librt.so: undefined reference to `__pthread_unwind'
/opt/mips_7620_toolchain/toolchain//lib/librt.so: undefined reference to `pthread_barrier_init'
/opt/mips_7620_toolchain/toolchain//lib/librt.so: undefined reference to `pthread_barrier_wait'
collect2: error: ld returned 1 exit status
make[6]: *** [dmesg] Error 1   

ls -la /opt/mips_7620_toolchain/toolchain//lib/lib*
/opt/mips_7620_toolchain/toolchain//lib/libpthread.so.0 -> libpthread-0.9.33.2.so
/opt/mips_7620_toolchain/toolchain//lib/librt.so -> librt.so.0
/opt/mips_7620_toolchain/toolchain//lib/libdl.so.0 -> libdl-0.9.33.2.so
....




BR

(Last edited by suzaichuan on 9 Oct 2016, 03:59)

The discussion might have continued from here.