[lttng-dev] Compilation error with openwrt and uclibc 0.9.31

Arthur LAMBERT arthur.lambert at sagemcom.com
Thu Sep 26 11:58:22 EDT 2013


Hi again,

I was able now to build lttng-ust but I have still some problems with 
lttng-tools...

My current story is ( Could be usefull for the next guy which want to 
try to compile the tool with a toolchain from Jurassic time) :

* shm_open issue
   -> patch for toolchain uClibc-0.9.30.1 : 
http://lists.uclibc.org/pipermail/uclibc/2009-February/041886.html

* epoll_create1 and EPOLLRDHUP issue
   -> patch for toolchain uClibc-0.9.30.1 : 
http://uclibc.10924.n7.nabble.com/PATCH-Implement-epoll-create1-and-epoll-pwait-system-calls-td268.html

* be32toh issue
   -> patch for toolchain uClibc-0.9.30.1 : 
http://lists.uclibc.org/pipermail/uclibc/2010-June/044107.html

* pthread-condattr issue
    -> patch for toolchain uClibc-0.9.30.1 : 
http://www.mail-archive.com/uclibc@uclibc.org/msg01909.html

My last issue :

/openwrt/staging_dir/toolchain-mips_gcc-4.4.2_uClibc-0.9.30.1/lib/gcc/mips-openwrt-linux-uclibc/4.4.2/../../../../mips-openwrt-linux-uclibc/bin/ld: 
warning: liburcu-common.so.1, needed by 
/openwrt/staging_dir/target-mips_uClibc-0.9.30.1/usr/lib/liburcu-bp.so, 
not found (try using -rpath or -rpath-link)
/openwrt/staging_dir/toolchain-mips_gcc-4.4.2_uClibc-0.9.30.1/lib/gcc/mips-openwrt-linux-uclibc/4.4.2/../../../../mips-openwrt-linux-uclibc/bin/ld: 
warning: liblttng-ust-tracepoint.so.0, needed by 
/openwrt/staging_dir/target-mips_uClibc-0.9.30.1/usr/lib/liblttng-ust.so, not 
found (try using -rpath or -rpath-link)
/openwrt/staging_dir/toolchain-mips_gcc-4.4.2_uClibc-0.9.30.1/lib/gcc/mips-openwrt-linux-uclibc/4.4.2/../../../../mips-openwrt-linux-uclibc/bin/ld: 
warning: libuuid.so.1, needed by 
/openwrt/staging_dir/target-mips_uClibc-0.9.30.1/usr/lib/liblttng-ust.so, not 
found (try using -rpath or -rpath-link)
/openwrt/staging_dir/toolchain-mips_gcc-4.4.2_uClibc-0.9.30.1/lib/gcc/mips-openwrt-linux-uclibc/4.4.2/../../../../mips-openwrt-linux-uclibc/bin/ld: 
warning: liburcu-cds.so.1, needed by 
/openwrt/staging_dir/target-mips_uClibc-0.9.30.1/usr/lib/liblttng-ust.so, not 
found (try using -rpath or -rpath-link)
XXXXXX/openwrt/staging_dir/target-mips_uClibc-0.9.30.1/usr/lib/liblttng-ust.so: 
undefined reference to `__tracepoint_probe_unregister'
XXXXXX/openwrt/staging_dir/target-mips_uClibc-0.9.30.1/usr/lib/liblttng-ust.so: 
undefined reference to `_cds_lfht_new'
XXXXXX/openwrt/staging_dir/target-mips_uClibc-0.9.30.1/usr/lib/liblttng-ust.so: 
undefined reference to `cds_lfht_lookup'
XXXXXX/openwrt/staging_dir/target-mips_uClibc-0.9.30.1/usr/lib/liblttng-ust.so: 
undefined reference to `init_tracepoint'
XXXXXX/openwrt/staging_dir/target-mips_uClibc-0.9.30.1/usr/lib/liblttng-ust.so: 
undefined reference to `cds_lfht_del'
XXXXXX/openwrt/staging_dir/target-mips_uClibc-0.9.30.1/usr/lib/liblttng-ust.so: 
undefined reference to `uuid_generate'
XXXXXX/openwrt/staging_dir/target-mips_uClibc-0.9.30.1/usr/lib/liblttng-ust.so: 
undefined reference to `exit_tracepoint'
XXXXXX/openwrt/staging_dir/target-mips_uClibc-0.9.30.1/usr/lib/liblttng-ust.so: 
undefined reference to `cds_lfht_destroy'
XXXXXX/openwrt/staging_dir/target-mips_uClibc-0.9.30.1/usr/lib/liblttng-ust.so: 
undefined reference to `cds_lfht_first'
XXXXXX/openwrt/staging_dir/target-mips_uClibc-0.9.30.1/usr/lib/liblttng-ust.so: 
undefined reference to `cds_lfht_add_unique'
XXXXXX/openwrt/staging_dir/target-mips_uClibc-0.9.30.1/usr/lib/liblttng-ust.so: 
undefined reference to `cds_lfht_next'
XXXXXX/openwrt/staging_dir/target-mips_uClibc-0.9.30.1/usr/lib/liblttng-ust.so: 
undefined reference to `__tracepoint_probe_register'

I found a bug here which seems related to my issue : 
https://bugs.lttng.org/issues/321
This bug talk about a fix in configure.ac : 
https://bugs.lttng.org/projects/lttng-ust/repository/revisions/faebb41808b9deda5ef5dfea0c035077407e7f9f/diff

Problem is that I seems to have already this fix in my lttng-ust 
version. I am not very confortable with autotools. Do I have to add a 
"libtool-linkdep-fixup" flag somewhere to be able to enable the fix 
during my compile process ?

Thanks,
Arthur.


On 25/09/2013 18:17, Jérémie Galarneau wrote:
> On Wed, Sep 25, 2013 at 7:06 AM, Arthur LAMBERT
> <arthur.lambert at sagemcom.com> wrote:
>> Hi,
>>
>> I am using backfire version of Openwrt and would like to try to use
>> profiling features bring by tools like lttng. I found some Makefile packages
>> on openwrt website to build lttng-tools and lttng-ust with recent version of
>> openwrt version but I am not able to compile lttng without error. with
>> mine..
>>
>> Environment :
>>
>> Openwrt Backfire
>> UCLIBC 0.9.31
>> Linux kernel 2.6.28
> Please note that kernel tracing is only available on kernels >= 2.6.38
> (or 2.6.32 if patched appropriately).
> I'm not an openwrt user, but it seems Makefiles are only provided for
> LTTng 2.1.0. Can you confirm whether or not the build succeeds for
> that version?
>
>> ARCH mips32
>> lttng version : 2.3.0
>> librcu version : 0.8
>>
>> First problem was related to lttng-ust-2.3.0/libringbuffer/getcpu.h. I get
>> an undefined reference to c variable in lttng_ust_get_cpu function. After
>> some research I was not able to find a solution about this point even if I
>> seem to be up to date since I found some patch related to issue with old
>> version of uclibc than 0.9.32. This patch seems to be already integrated in
>> my lttng ust version. Anyway, I found a workaround to check that the next
>> step on the compilation is find... but it is not...
>>
> Could you clarify what was the error and what is the workaround?
>
>> Compilation result :
>>
>> make package/lttng-tools/compile V=99
>>
>> make[1]: Entering directory
>> `XXXXXX/openwrt'
>> make[2]: Entering directory
>> `XXXXXX/openwrt/feeds/tools/libs/liburcu'
>> make[2]: Leaving directory
>> `XXXXXX/openwrt/feeds/tools/libs/liburcu'
>> make[2]: Entering directory
>> `XXXXXX/openwrt/package/e2fsprogs'
>> WARNING: skipping e2fsprogs -- package not selected
>> WARNING: skipping uuidgen -- package not selected
>> WARNING: skipping libext2fs -- package not selected
>> WARNING: skipping tune2fs -- package not selected
>> WARNING: skipping resize2fs -- package not selected
>> WARNING: skipping badblocks -- package not selected
>> WARNING: skipping blkid -- package not selected
>> make[2]: Leaving directory
>> `XXXXXX/openwrt/package/e2fsprogs'
>> make[2]: Entering directory
>> `XXXXXX/openwrt/feeds/tools/devel/lttng-ust'
>> CFLAGS="-Os -pipe -mabi=32 -mtune=mips32 -fno-strict-aliasing -g3
>> -fhonour-copts -msoft-float
>> -IXXXXXX/openwrt/staging_dir/target-mips_uClibc-0.9.30.1/usr/include
>> -IXXXXXX/openwrt/staging_dir/target-mips_uClibc-0.9.30.1/include
>> -IXXXXXX/openwrt/staging_dir/toolchain-mips_gcc-4.4.2_uClibc-0.9.30.1/usr/include
>> -IXXXXXX/openwrt/staging_dir/toolchain-mips_gcc-4.4.2_uClibc-0.9.30.1/include
>> " CXXFLAGS="-Os -pipe -mabi=32 -mtune=mips32 -fno-strict-aliasing -g3
>> -fhonour-copts -msoft-float
>> -IXXXXXX/openwrt/staging_dir/target-mips_uClibc-0.9.30.1/usr/include
>> -IXXXXXX/openwrt/staging_dir/target-mips_uClibc-0.9.30.1/include
>> -IXXXXXX/openwrt/staging_dir/toolchain-mips_gcc-4.4.2_uClibc-0.9.30.1/usr/include
>> -IXXXXXX/openwrt/staging_dir/toolchain-mips_gcc-4.4.2_uClibc-0.9.30.1/include
>> "
>> LDFLAGS="-LXXXXXX/openwrt/staging_dir/target-mips_uClibc-0.9.30.1/usr/lib
>> -LXXXXXX/openwrt/staging_dir/target-mips_uClibc-0.9.30.1/lib
>> -LXXXXXX/openwrt/staging_dir/toolchain-mips_gcc-4.4.2_uClibc-0.9.30.1/usr/lib
>> -LXXXXXX/openwrt/staging_dir/toolchain-mips_gcc-4.4.2_uClibc-0.9.30.1/lib
>> " make  -j2 -C
>> XXXXXX/openwrt/build_dir/target-mips_uClibc-0.9.30.1/lttng-ust-2.3.0/.
>> AR=mips-openwrt-linux-uclibc-ar AS="mips-openwrt-linux-uclibc-gcc -c -Os
>> -pipe -mabi=32 -mtune=mips32 -fno-strict-aliasing -g3 -fhonour-copts
>> -msoft-float" LD=mips-openwrt-linux-uclibc-ld
>> NM=mips-openwrt-linux-uclibc-nm CC="mips-openwrt-linux-uclibc-gcc"
>> GCC="mips-openwrt-linux-uclibc-gcc" CXX="mips-openwrt-linux-uclibc-g++"
>> RANLIB=mips-openwrt-linux-uclibc-ranlib
>> STRIP=mips-openwrt-linux-uclibc-strip
>> OBJCOPY=mips-openwrt-linux-uclibc-objcopy
>> OBJDUMP=mips-openwrt-linux-uclibc-objdump
>> SIZE=mips-openwrt-linux-uclibc-size CROSS="mips-openwrt-linux-uclibc-"
>> ARCH="mips" ;
>> make[3]: Entering directory
>> `XXXXXX/openwrt/build_dir/target-mips_uClibc-0.9.30.1/lttng-ust-2.3.0'
>> make  all-recursive
>> make[4]: Entering directory
>> `XXXXXX/openwrt/build_dir/target-mips_uClibc-0.9.30.1/lttng-ust-2.3.0'
>> Making all in .
>> make[5]: Entering directory
>> `XXXXXX/openwrt/build_dir/target-mips_uClibc-0.9.30.1/lttng-ust-2.3.0'
>> make[5]: Nothing to be done for `all-am'.
>> make[5]: Leaving directory
>> `XXXXXX/openwrt/build_dir/target-mips_uClibc-0.9.30.1/lttng-ust-2.3.0'
>> Making all in include
>> make[5]: Entering directory
>> `XXXXXX/openwrt/build_dir/target-mips_uClibc-0.9.30.1/lttng-ust-2.3.0/include'
>> make[5]: Nothing to be done for `all'.
>> make[5]: Leaving directory
>> `XXXXXX/openwrt/build_dir/target-mips_uClibc-0.9.30.1/lttng-ust-2.3.0/include'
>> Making all in snprintf
>> make[5]: Entering directory
>> `XXXXXX/openwrt/build_dir/target-mips_uClibc-0.9.30.1/lttng-ust-2.3.0/snprintf'
>> make[5]: Nothing to be done for `all'.
>> make[5]: Leaving directory
>> `XXXXXX/openwrt/build_dir/target-mips_uClibc-0.9.30.1/lttng-ust-2.3.0/snprintf'
>> Making all in libringbuffer
>> make[5]: Entering directory
>> `XXXXXX/openwrt/build_dir/target-mips_uClibc-0.9.30.1/lttng-ust-2.3.0/libringbuffer'
>> make[5]: Nothing to be done for `all'.
>> make[5]: Leaving directory
>> `XXXXXX/openwrt/build_dir/target-mips_uClibc-0.9.30.1/lttng-ust-2.3.0/libringbuffer'
>> Making all in liblttng-ust-comm
>> make[5]: Entering directory
>> `XXXXXX/openwrt/build_dir/target-mips_uClibc-0.9.30.1/lttng-ust-2.3.0/liblttng-ust-comm'
>> make[5]: Nothing to be done for `all'.
>> make[5]: Leaving directory
>> `XXXXXX/openwrt/build_dir/target-mips_uClibc-0.9.30.1/lttng-ust-2.3.0/liblttng-ust-comm'
>> Making all in liblttng-ust
>> make[5]: Entering directory
>> `XXXXXX/openwrt/build_dir/target-mips_uClibc-0.9.30.1/lttng-ust-2.3.0/liblttng-ust'
>> make[5]: Nothing to be done for `all'.
>> make[5]: Leaving directory
>> `XXXXXX/openwrt/build_dir/target-mips_uClibc-0.9.30.1/lttng-ust-2.3.0/liblttng-ust'
>> Making all in liblttng-ust-ctl
>> make[5]: Entering directory
>> `XXXXXX/openwrt/build_dir/target-mips_uClibc-0.9.30.1/lttng-ust-2.3.0/liblttng-ust-ctl'
>> make[5]: Nothing to be done for `all'.
>> make[5]: Leaving directory
>> `XXXXXX/openwrt/build_dir/target-mips_uClibc-0.9.30.1/lttng-ust-2.3.0/liblttng-ust-ctl'
>> Making all in liblttng-ust-fork
>> make[5]: Entering directory
>> `XXXXXX/openwrt/build_dir/target-mips_uClibc-0.9.30.1/lttng-ust-2.3.0/liblttng-ust-fork'
>> make[5]: Nothing to be done for `all'.
>> make[5]: Leaving directory
>> `XXXXXX/openwrt/build_dir/target-mips_uClibc-0.9.30.1/lttng-ust-2.3.0/liblttng-ust-fork'
>> Making all in liblttng-ust-libc-wrapper
>> make[5]: Entering directory
>> `XXXXXX/openwrt/build_dir/target-mips_uClibc-0.9.30.1/lttng-ust-2.3.0/liblttng-ust-libc-wrapper'
>> make[5]: Nothing to be done for `all'.
>> make[5]: Leaving directory
>> `XXXXXX/openwrt/build_dir/target-mips_uClibc-0.9.30.1/lttng-ust-2.3.0/liblttng-ust-libc-wrapper'
>> Making all in liblttng-ust-cyg-profile
>> make[5]: Entering directory
>> `XXXXXX/openwrt/build_dir/target-mips_uClibc-0.9.30.1/lttng-ust-2.3.0/liblttng-ust-cyg-profile'
>> make[5]: Nothing to be done for `all'.
>> make[5]: Leaving directory
>> `XXXXXX/openwrt/build_dir/target-mips_uClibc-0.9.30.1/lttng-ust-2.3.0/liblttng-ust-cyg-profile'
>> Making all in tools
>> make[5]: Entering directory
>> `XXXXXX/openwrt/build_dir/target-mips_uClibc-0.9.30.1/lttng-ust-2.3.0/tools'
>> make[5]: Nothing to be done for `all'.
>> make[5]: Leaving directory
>> `XXXXXX/openwrt/build_dir/target-mips_uClibc-0.9.30.1/lttng-ust-2.3.0/tools'
>> Making all in tests
>> make[5]: Entering directory
>> `XXXXXX/openwrt/build_dir/target-mips_uClibc-0.9.30.1/lttng-ust-2.3.0/tests'
>> Making all in utils
>> make[6]: Entering directory
>> `XXXXXX/openwrt/build_dir/target-mips_uClibc-0.9.30.1/lttng-ust-2.3.0/tests/utils'
>> make[6]: Nothing to be done for `all'.
>> make[6]: Leaving directory
>> `XXXXXX/openwrt/build_dir/target-mips_uClibc-0.9.30.1/lttng-ust-2.3.0/tests/utils'
>> Making all in hello
>> make[6]: Entering directory
>> `XXXXXX/openwrt/build_dir/target-mips_uClibc-0.9.30.1/lttng-ust-2.3.0/tests/hello'
>> /bin/bash ../../libtool  --tag=CC   --mode=link
>> mips-openwrt-linux-uclibc-gcc -Werror=old-style-definition -Wall -Os -pipe
>> -mabi=32 -mtune=mips32 -fno-strict-aliasing -g3 -fhonour-copts -msoft-float
>> -LXXXXXX/openwrt/staging_dir/target-mips_uClibc-0.9.30.1/usr/lib
>> -LXXXXXX/openwrt/staging_dir/target-mips_uClibc-0.9.30.1/lib
>> -LXXXXXX/openwrt/staging_dir/toolchain-mips_gcc-4.4.2_uClibc-0.9.30.1/usr/lib
>> -LXXXXXX/openwrt/staging_dir/toolchain-mips_gcc-4.4.2_uClibc-0.9.30.1/lib
>> -o hello hello-hello.o hello-tp.o ../../liblttng-ust/liblttng-ust.la -ldl
>> -lurcu-bp -lurcu-bp -lurcu-cds -lpthread
>> libtool: link: mips-openwrt-linux-uclibc-gcc -Werror=old-style-definition
>> -Wall -Os -pipe -mabi=32 -mtune=mips32 -fno-strict-aliasing -g3
>> -fhonour-copts -msoft-float -o .libs/hello hello-hello.o hello-tp.o
>> -LXXXXXX/openwrt/staging_dir/target-mips_uClibc-0.9.30.1/usr/lib
>> -LXXXXXX/openwrt/staging_dir/target-mips_uClibc-0.9.30.1/lib
>> -LXXXXXX/openwrt/staging_dir/toolchain-mips_gcc-4.4.2_uClibc-0.9.30.1/usr/lib
>> -LXXXXXX/openwrt/staging_dir/toolchain-mips_gcc-4.4.2_uClibc-0.9.30.1/lib
>> ../../liblttng-ust/.libs/liblttng-ust.so
>> XXXXXX/openwrt/build_dir/target-mips_uClibc-0.9.30.1/lttng-ust-2.3.0/liblttng-ust/.libs/liblttng-ust-tracepoint.so
>> -lrt -ldl -lurcu-bp -lurcu-cds -lpthread
>> ../../liblttng-ust/.libs/liblttng-ust.so: warning: the use of `mktemp' is
>> dangerous, better use `mkstemp'
>> XXXXXX/openwrt/staging_dir/toolchain-mips_gcc-4.4.2_uClibc-0.9.30.1/lib/gcc/mips-openwrt-linux-uclibc/4.4.2/../../../../mips-openwrt-linux-uclibc/bin/ld:
>> warning: liburcu-common.so.2, needed by
>> XXXXXX/openwrt/staging_dir/target-mips_uClibc-0.9.30.1/usr/lib/liburcu-bp.so,
>> not found (try using -rpath or -rpath-link)
>> ../../liblttng-ust/.libs/liblttng-ust.so: undefined reference to `shm_open'
>> ../../liblttng-ust/.libs/liblttng-ust.so: undefined reference to
>> `shm_unlink'
>> collect2: ld returned 1 exit status
>> make[6]: *** [hello] Error 1
>> make[6]: Leaving directory
>> `XXXXXX/openwrt/build_dir/target-mips_uClibc-0.9.30.1/lttng-ust-2.3.0/tests/hello'
>> make[5]: *** [all-recursive] Error 1
>> make[5]: Leaving directory
>> `XXXXXX/openwrt/build_dir/target-mips_uClibc-0.9.30.1/lttng-ust-2.3.0/tests'
>> make[4]: *** [all-recursive] Error 1
>> make[4]: Leaving directory
>> `XXXXXX/openwrt/build_dir/target-mips_uClibc-0.9.30.1/lttng-ust-2.3.0'
>> make[3]: *** [all] Error 2
>> make[3]: Leaving directory
>> `XXXXXX/openwrt/build_dir/target-mips_uClibc-0.9.30.1/lttng-ust-2.3.0'
>> make[2]: ***
>> [XXXXXX/openwrt/build_dir/target-mips_uClibc-0.9.30.1/lttng-ust-2.3.0/.built]
>> Error 2
>> make[2]: Leaving directory
>> `XXXXXX/openwrt/feeds/tools/devel/lttng-ust'
>> make[1]: *** [package/feeds/tools/lttng-ust/compile] Error 2
>> make[1]: Leaving directory
>> `XXXXXX/openwrt'
>> make: *** [package/lttng-ust/compile] Erreur 2
>>
>> I am not very confortable with autotools but I am not able to understand
>> this error. Is it relared to the missing liburcu-common.so.2 library ? shm
>> functions are define by uclibc ? missing include ?
>>
>> Thanks,
>> Arthur.
>>
>>
>> #
>> " Ce courriel et les documents qui lui sont joints peuvent contenir des
>> informations confidentielles ou ayant un caractè privéS'ils ne vous sont
>> pas destiné nous vous signalons qu'il est strictement interdit de les
>> divulguer, de les reproduire ou d'en utiliser de quelque maniè que ce
>> soit le contenu. Si ce message vous a é transmis par erreur, merci d'en
>> informer l'expéteur et de supprimer imméatement de votre systè
>> informatique ce courriel ainsi que tous les documents qui y sont attaché"
>>
>>
>>                                ******
>>
>> " This e-mail and any attached documents may contain confidential or
>> proprietary information. If you are not the intended recipient, you are
>> notified that any dissemination, copying of this e-mail and any attachments
>> thereto or use of their contents by any means whatsoever is strictly
>> prohibited. If you have received this e-mail in error, please advise the
>> sender immediately and delete this e-mail and all attached documents
>> from your computer system."
>> #
>>
>>
>> _______________________________________________
>> lttng-dev mailing list
>> lttng-dev at lists.lttng.org
>> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
>
>


#
" Ce courriel et les documents qui lui sont joints peuvent contenir des
informations confidentielles ou ayant un caractè privéS'ils ne vous sont
pas destiné nous vous signalons qu'il est strictement interdit de les
divulguer, de les reproduire ou d'en utiliser de quelque maniè que ce
soit le contenu. Si ce message vous a é transmis par erreur, merci d'en
informer l'expéteur et de supprimer imméatement de votre systè
informatique ce courriel ainsi que tous les documents qui y sont attaché"


                               ******

" This e-mail and any attached documents may contain confidential or
proprietary information. If you are not the intended recipient, you are
notified that any dissemination, copying of this e-mail and any attachments
thereto or use of their contents by any means whatsoever is strictly
prohibited. If you have received this e-mail in error, please advise the
sender immediately and delete this e-mail and all attached documents
from your computer system."
#

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lttng.org/pipermail/lttng-dev/attachments/20130926/662c3981/attachment-0001.html>


More information about the lttng-dev mailing list