Skip to contentSkip to conversation

lttng-tools build failure with uClibc due to dlmopen()

DISCUSSION Thomas Petazzoni 2 participants 3 messages Apr 29, 2017 – May 5, 2017 3 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Hello,

Quoted 12 lines · Thomas Petazzoni

First of all, thanks for having fixed the dlmopen issue with musl in lttng-ust. Now, there is another dlmopen issue, this time in lttng-tools, and this time with uClibc:

CC prog.o
prog.c: In function 'main':
prog.c:24:7: warning: implicit declaration of function 'dlmopen' [-Wimplicit-function-declaration]

  h1 = dlmopen(LM_ID_BASE, "libfoo.so", RTLD_LAZY);
       ^
prog.c:24:15: error: 'LM_ID_BASE' undeclared (first use in this function)
  h1 = dlmopen(LM_ID_BASE, "libfoo.so", RTLD_LAZY);
               ^
Quoted 8 lines

prog.c:24:15: note: each undeclared identifier is reported only once for each function it appears in

See
http://autobuild.buildroot.net/results/c07/c07b5bac6146d83c3224de147da3798d3e7b527f/build-end.log
for the full build log.

So, the ust regression test case in lttng-tools doesn't test if dlmopen() is provided by the C library before using it.

Any feedback on this issue? We're still seeing it in Buildroot when building lttng-tools against uClibc.

Thanks,

Thomas

Signature · 7 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
_______________________________________________
lttng-dev mailing list
[email protected]
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw

Hi Thomas,

This patch is available:
https://github.com/alpinelinux/aports/blob/master/testing/lttng-tools/musl-has-no-dlmopen.patch

However, I won't merge it as-is since it disables all dlmopen tests outright. I'd rather disable them only when it is not available.

Regards,
Jérémie

Quoted 39 lines · Thomas Petazzoni

Hello,

Quoted 12 lines · Thomas Petazzoni

First of all, thanks for having fixed the dlmopen issue with musl in lttng-ust. Now, there is another dlmopen issue, this time in lttng-tools, and this time with uClibc:

CC prog.o
prog.c: In function 'main':
prog.c:24:7: warning: implicit declaration of function 'dlmopen' [-Wimplicit-function-declaration]

  h1 = dlmopen(LM_ID_BASE, "libfoo.so", RTLD_LAZY);
       ^
prog.c:24:15: error: 'LM_ID_BASE' undeclared (first use in this function)
  h1 = dlmopen(LM_ID_BASE, "libfoo.so", RTLD_LAZY);
               ^
Quoted 8 lines

prog.c:24:15: note: each undeclared identifier is reported only once for each function it appears in

See
http://autobuild.buildroot.net/results/c07/c07b5bac6146d83c3224de147da3798d3e7b527f/build-end.log
for the full build log.

So, the ust regression test case in lttng-tools doesn't test if dlmopen() is provided by the C library before using it.

Any feedback on this issue? We're still seeing it in Buildroot when building lttng-tools against uClibc.

Thanks,

Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
_______________________________________________
lttng-dev mailing list
[email protected]
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

Signature · 7 lines
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com
_______________________________________________
lttng-dev mailing list
[email protected]
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

A message that is not in the archive (sent off-list or not yet received): CA+jJMxuXm+UEUiMXKrjBWvj7zTP81FzW9diFWiueu3CCaWypbg@mail.gmail.com

#5 lore raw

Hello,

Thanks for your feedback!

Quoted 5 lines · Jérémie Galarneau

This patch is available:
https://github.com/alpinelinux/aports/blob/master/testing/lttng-tools/musl-has-no-dlmopen.patch

However, I won't merge it as-is since it disables all dlmopen tests outright. I'd rather disable them only when it is not available.

Since AlpineLinux is using musl only, they often use solutions that work fine for musl, but are not necessarily applicable in a more general way.

Buildroot provides support for glibc, uclibc and musl, so AlpineLinux's solution is not suitable as-is.

For now, we have simply disabled lttng-tools for uclibc and musl toolchains in Buildroot.

Best regards,

Thomas

Signature · 7 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
_______________________________________________
lttng-dev mailing list
[email protected]
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev