Project

General

Profile

Actions

Bug #368

closed

Cross-compile build fails for tile

Added by Simon Marchi over 11 years ago. Updated over 11 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
10/10/2012
Due date:
% Done:

0%

Estimated time:

Description

Linking in my cross-compile environment for the tile arch fails.

$ ./bootstrap
+ [ ! -e config ]
+ autoreconf -i

$ ac_cv_func_malloc_0_nonnull=yes ./configure --host=tile --prefix=/opt/tilera/TileraMDE-4.0.1.142750/tilegx/tile/usr/local
checking build system type... x86_64-unknown-linux-gnu
checking host system type... tile-unknown-linux-gnu
checking target system type... tile-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install c
checking whether build environment is sane... yes
checking for tile-strip... tile-strip
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for style of include used by make... GNU
checking for tile-gcc... tile-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... yes
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether tile-gcc accepts -g... yes
checking for tile-gcc option to accept ISO C89... none needed
checking dependency style of tile-gcc... gcc3
checking for thread local storage (TLS) class... __thread
checking for tile-gcc... (cached) tile-gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether tile-gcc accepts -g... (cached) yes
checking for tile-gcc option to accept ISO C89... (cached) none needed
checking dependency style of tile-gcc... (cached) gcc3
checking whether make sets $(MAKE)... (cached) yes
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by tile-gcc... /opt/tilera/TileraMDE-4.0.1.142750/tilegx/lib/gcc/tilegx-unknown-linux-gnu/bin/ld
checking if the linker (/opt/tilera/TileraMDE-4.0.1.142750/tilegx/lib/gcc/tilegx-unknown-linux-gnu/bin/ld) is GNU ld... yes
checking for BSD
or MS-compatible name lister (nm)... /opt/tilera/TileraMDE-4.0.1.142750/tilegx/bin/tile-nm -B
checking the name lister (/opt/tilera/TileraMDE-4.0.1.142750/tilegx/bin/tile-nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to tile-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /opt/tilera/TileraMDE-4.0.1.142750/tilegx/lib/gcc/tilegx-unknown-linux-gnu/bin/ld option to reload object files... -r
checking for tile-objdump... tile-objdump
checking how to recognize dependent libraries... pass_all
checking for tile-dlltool... no
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for tile-ar... tile-ar
checking for archiver FILE support...
checking for tile-strip... (cached) tile-strip
checking for tile-ranlib... tile-ranlib
checking command to parse /opt/tilera/TileraMDE-4.0.1.142750/tilegx/bin/tile-nm -B output from tile-gcc object... ok
checking for sysroot... no
checking for tile-mt... no
checking for mt... mt
configure: WARNING: using cross tools not prefixed with host triplet
checking if mt is a manifest tool... no
checking how to run the C preprocessor... tile-gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if tile-gcc supports -fno-rtti -fno-exceptions... no
checking for tile-gcc option to produce PIC... -fPIC -DPIC
checking if tile-gcc PIC flag -fPIC -DPIC works... yes
checking if tile-gcc static flag -static works... yes
checking if tile-gcc supports -c -o file.o... yes
checking if tile-gcc supports -c -o file.o... (cached) yes
checking whether the tile-gcc linker (/opt/tilera/TileraMDE-4.0.1.142750/tilegx/lib/gcc/tilegx-unknown-linux-gnu/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for inline... inline
checking for pid_t... yes
checking for size_t... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... (cached) yes
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for sys/param.h... yes
checking for getpagesize... yes
checking for working mmap... no
checking for bzero... yes
checking for gettimeofday... yes
checking for munmap... yes
checking for sched_getcpu... yes
checking for strtoul... yes
checking for sysconf... yes
checking for sys_futex()... yes
checking for sched_setaffinity... yes
checking for cpu_set_t... yes
checking whether CPU_ZERO works... yes
checking how many arguments sched_setaffinity takes... 3
configure: creating ./config.status
config.status: creating Makefile
config.status: creating doc/Makefile
config.status: creating tests/Makefile
config.status: creating liburcu.pc
config.status: creating liburcu-bp.pc
config.status: creating liburcu-cds.pc
config.status: creating liburcu-qsbr.pc
config.status: creating liburcu-mb.pc
config.status: creating liburcu-signal.pc
config.status: creating config.h
config.status: config.h is unchanged
config.status: creating urcu/config.h
config.status: urcu/config.h is unchanged
config.status: linking urcu/arch/gcc.h to urcu/arch.h
config.status: linking urcu/uatomic/gcc.h to urcu/uatomic.h
config.status: executing depfiles commands
config.status: executing libtool commands
SMP support enabled.

$ make
make all-recursive
make1: Entering directory `/home/simark/src/userspace-rcu'
Making all in .
make2: Entering directory `/home/simark/src/userspace-rcu'
CC wfqueue.lo
CC wfcqueue.lo
CC wfstack.lo
CCLD liburcu-common.la
CC urcu.lo
CC urcu-pointer.lo
CCLD liburcu.la
CC urcu-qsbr.lo
CCLD liburcu-qsbr.la
CC liburcu_mb_la-urcu.lo
CC liburcu_mb_la-urcu-pointer.lo
CCLD liburcu-mb.la
CC liburcu_signal_la-urcu.lo
CC liburcu_signal_la-urcu-pointer.lo
CCLD liburcu-signal.la
CC urcu-bp.lo
CCLD liburcu-bp.la
CC rculfqueue.lo
CC rculfstack.lo
CC rculfhash.lo
CC rculfhash-mm-order.lo
CC rculfhash-mm-chunk.lo
CC rculfhash-mm-mmap.lo
CCLD liburcu-cds.la
make2: Leaving directory `/home/simark/src/userspace-rcu'
Making all in doc
make2: Entering directory `/home/simark/src/userspace-rcu/doc'
make2: Nothing to be done for `all'.
make2: Leaving directory `/home/simark/src/userspace-rcu/doc'
Making all in tests
make2: Entering directory `/home/simark/src/userspace-rcu/tests'
CC test_urcu.o
CC urcu.o
CC urcu-pointer.o
CC wfcqueue.o
CCLD test_urcu
CC test_urcu_dynamic_link-test_urcu.o
CC test_urcu_dynamic_link-urcu.o
CC test_urcu_dynamic_link-urcu-pointer.o
CC test_urcu_dynamic_link-wfcqueue.o
CCLD test_urcu_dynamic_link
CC test_urcu_timing.o
CCLD test_urcu_timing
CC test_urcu_signal-test_urcu.o
CC test_urcu_signal-urcu.o
CC test_urcu_signal-urcu-pointer.o
CC test_urcu_signal-wfcqueue.o
CCLD test_urcu_signal
CC test_urcu_signal_dynamic_link-test_urcu.o
CC test_urcu_signal_dynamic_link-urcu.o
CC test_urcu_signal_dynamic_link-urcu-pointer.o
CC test_urcu_signal_dynamic_link-wfcqueue.o
CCLD test_urcu_signal_dynamic_link
CC test_urcu_signal_timing-test_urcu_timing.o
CC test_urcu_signal_timing-urcu.o
CC test_urcu_signal_timing-urcu-pointer.o
CC test_urcu_signal_timing-wfcqueue.o
CCLD test_urcu_signal_timing
CC test_rwlock_timing.o
CCLD test_rwlock_timing
CC test_rwlock.o
CCLD test_rwlock
CC test_perthreadlock_timing.o
CCLD test_perthreadlock_timing
CC test_perthreadlock.o
CCLD test_perthreadlock
CC test_urcu_yield-test_urcu.o
CC test_urcu_yield-urcu.o
CC test_urcu_yield-urcu-pointer.o
CC test_urcu_yield-wfcqueue.o
CCLD test_urcu_yield
CC test_urcu_signal_yield-test_urcu.o
CC test_urcu_signal_yield-urcu.o
CC test_urcu_signal_yield-urcu-pointer.o
CC test_urcu_signal_yield-wfcqueue.o
CCLD test_urcu_signal_yield
CC test_urcu_mb-test_urcu.o
CC test_urcu_mb-urcu.o
CC test_urcu_mb-urcu-pointer.o
CC test_urcu_mb-wfcqueue.o
CCLD test_urcu_mb
CC test_urcu_qsbr_timing.o
CC urcu-qsbr.o
CCLD test_urcu_qsbr_timing
CC test_urcu_qsbr.o
CCLD test_urcu_qsbr
CC rcutorture_urcu-urcutorture.o
CCLD rcutorture_urcu
CC rcutorture_urcu_signal-urcutorture.o
CCLD rcutorture_urcu_signal
/opt/tilera/TileraMDE-4.0.1.142750/tilegx/lib/gcc/bin/../lib/gcc/tilegx-unknown-linux-gnu/4.4.6/../../../../tilegx-unknown-linux-gnu/bin/ld: warning: liburcu-common.so.1, needed by ../.libs/liburcu-signal.so, not found (try using -rpath or -rpath-link)
../.libs/liburcu-signal.so: undefined reference to `__cds_wfcq_first_blocking'
../.libs/liburcu-signal.so: undefined reference to `cds_wfcq_empty'
../.libs/liburcu-signal.so: undefined reference to `cds_wfcq_node_init'
../.libs/liburcu-signal.so: undefined reference to `__cds_wfcq_next_blocking'
../.libs/liburcu-signal.so: undefined reference to `cds_wfcq_init'
../.libs/liburcu-signal.so: undefined reference to `cds_wfcq_enqueue'
../.libs/liburcu-signal.so: undefined reference to `__cds_wfcq_splice_blocking'
collect2: ld returned 1 exit status
make2: * [rcutorture_urcu_signal] Error 1
make2: Leaving directory `/home/simark/src/userspace-rcu/tests'
make1:
[all-recursive] Error 1
make1: Leaving directory `/home/simark/src/userspace-rcu'
make: *
* [all] Error 2

Actions #1

Updated by Mathieu Desnoyers over 11 years ago

  • Status changed from New to Resolved

Fixed by commit:

commit d73fb81f74a79aa1e4987d16179f8489b955c812
Author: Mathieu Desnoyers <>
Date: Thu Oct 11 12:44:10 2012 -0400

Fix: urcu-bp, urcu, urcu-qsbr should include wfcqueue
Those are still including wfqueue.h, but need to move to wfcqueue.h,
since this is now needed by call_rcu. It was still working, because call
rcu headers include wfcqueue.h, but they were doing so after #undef
_LGPL_SOURCE was issued, which made wfcqueue.h depend on
liburcu-common.so to find the wfcqueue symbols. This was in turn adding
a transitive dependency that was not present before, and thus causing
build failure in cross-build environments, especially those on Debian
systems, due to special handling of transitive dependencies on Debian
autotools.
Reported-by: Simon Marchi &lt;&gt;
Signed-off-by: Mathieu Desnoyers &lt;&gt;
Actions

Also available in: Atom PDF