[lttng-dev] Problem cross compiling Lttng tools
Graham Perkins
GrahamPerkins at vocality.com
Thu Sep 5 11:09:04 EDT 2013
Hi,
I am attempting to cross compile Lttng tools for my arm target. The build fails with these errors:
Making all in lttng-consumerd
make[3]: Entering directory `/home/software/LTTng/lttng-tools-2.3.0/src/bin/lttng-consumerd'
CC lttng-consumerd.o
CCLD lttng-consumerd
/home/software/arago-project/linux-davinci/lib/liburcu-bp.a(urcu-bp.o): In function `update_counter_and_wait':
urcu-bp.c:(.text+0x5ec): multiple definition of `update_counter_and_wait'
/home/software/arago-project/linux-davinci/lib/liburcu.a(urcu.o):urcu.c:(.text+0x6f4): first defined here
/home/software/arago-project/linux-davinci/lib/liburcu-bp.a(urcu-bp.o):(.data+0xc): multiple definition of `call_rcu_data_list'
/home/software/arago-project/linux-davinci/lib/liburcu.a(urcu.o):(.data+0xc): first defined here
/home/software/arago-project/linux-davinci/lib/liburcu-bp.a(urcu-bp.o): In function `call_rcu_data_free':
urcu-bp.c:(.text+0x1fc8): multiple definition of `call_rcu_data_free'
/home/software/arago-project/linux-davinci/lib/liburcu.a(urcu.o):urcu.c:(.text+0x1a44): first defined here
/home/software/arago-project/linux-davinci/lib/liburcu-bp.a(urcu-bp.o): In function `call_rcu_before_fork':
urcu-bp.c:(.text+0x2340): multiple definition of `call_rcu_before_fork'
/home/software/arago-project/linux-davinci/lib/liburcu.a(urcu.o):urcu.c:(.text+0x1dbc): first defined here
/home/software/arago-project/linux-davinci/lib/liburcu-bp.a(urcu-bp.o): In function `call_rcu_after_fork_parent':
urcu-bp.c:(.text+0x2444): multiple definition of `call_rcu_after_fork_parent'
/home/software/arago-project/linux-davinci/lib/liburcu.a(urcu.o):urcu.c:(.text+0x1ec0): first defined here
/home/software/arago-project/linux-davinci/lib/liburcu-bp.a(urcu-bp.o): In function `call_rcu_after_fork_child':
urcu-bp.c:(.text+0x24dc): multiple definition of `call_rcu_after_fork_child'
/home/software/arago-project/linux-davinci/lib/liburcu.a(urcu.o):urcu.c:(.text+0x1f58): first defined here
/home/software/arago-project/linux-davinci/lib/liburcu-bp.a(urcu-bp.o): In function `_defer_rcu':
urcu-bp.c:(.text+0x2bc8): multiple definition of `_defer_rcu'
/home/software/arago-project/linux-davinci/lib/liburcu.a(urcu.o):urcu.c:(.text+0x2644): first defined here
/home/software/arago-project/linux-davinci/lib/liburcu-bp.a(urcu-bp.o): In function `thr_defer':
urcu-bp.c:(.text+0x2ec4): multiple definition of `thr_defer'
/home/software/arago-project/linux-davinci/lib/liburcu.a(urcu.o):urcu.c:(.text+0x2940): first defined here
/home/software/arago-project/linux-davinci/lib/liburcu-bp.a(urcu-bp.o): In function `rcu_defer_exit':
urcu-bp.c:(.text+0x3260): multiple definition of `rcu_defer_exit'
/home/software/arago-project/linux-davinci/lib/liburcu.a(urcu.o):urcu.c:(.text+0x2cdc): first defined here
collect2: ld returned 1 exit status
make[3]: *** [lttng-consumerd] Error 1
make[3]: Leaving directory `/home/software/LTTng/lttng-tools-2.3.0/src/bin/lttng-consumerd'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/software/LTTng/lttng-tools-2.3.0/src/bin'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/software/LTTng/lttng-tools-2.3.0/src'
make: *** [all-recursive] Error 1
My configuration script is:
export HOST="arm-none-linux-gnueabi"
# Make sure your cross-compiler can be found in your $PATH
export SYSROOT="/home/software/arago-project/linux-davinci"
export CC="arm-linux-gnueabi-gcc"
export CXX="arm-linux-gnueabi-g++"
export LD="arm-linux-gnueabi-gcc"
export CFLAGS="--sysroot=$SYSROOT -march=armv5 -marm -mlittle-endian"
export CPPFLAGS="-I$SYSROOT/include"
export CXXFLAGS=$CFLAGS
export LDFLAGS="--sysroot=$SYSROOT -L$SYSROOT/usr/lib -L$SYSROOT/lib"
# Fix RPL_MALLOC issue. See [Autoconf and RPL_MALLOC][3] for more details.
export ac_cv_func_malloc_0_nonnull=yes
# Cross compile userspace-rcu. You can also use a source tarball.
cd userspace-rcu-0.7.7
./configure --prefix=$SYSROOT --host=$HOST --disable-static
make clean
make
make install
cd ..
# Cross compile lttng-ust. You can also use a source tarball.
cd lttng-ust-2.3.0
./configure --prefix=$SYSROOT --host=$HOST --disable-static
make clean
make
make install
cd ..
# Cross compile lttng-tools. You can also use a source tarball.
cd lttng-tools-2.3.0
./configure --prefix=$SYSROOT --host=$HOST --disable-static
make clean
make
#make install
cd ..
Both liburcu.a and liburcu-bp.a are being included by the linker. Am I correct in assuming only one of these should be included and how do I fix this?
Many thanks,
Graham Perkins.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lttng.org/pipermail/lttng-dev/attachments/20130905/a0a60153/attachment.html>
More information about the lttng-dev
mailing list