[Samba] Building smbclient 4.3.3 issues with lttng-ust

Tompkins, Michael Michael.Tompkins at xerox.com
Tue Mar 15 15:13:55 UTC 2016

We are building smbclient 4.3.3 for Intel, which was working fine. We got a toolchain update, which added the lttng-ust libraries(previously missing in our toolchain), but not lttng/tracef.h and now we get an error in the config.log:

Checking for lttng-ust
pkg-config --errors-to-stdout --print-errors --cflags --libs lttng-ust
Package lttng-ust was not found in the pkg-config search path.
Perhaps you should add the directory containing `lttng-ust.pc'
to the PKG_CONFIG_PATH environment variable
No package 'lttng-ust' found
not found

Checking for header lttng/tracef.h
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <stdlib.h>
#include <stddef.h>
#include <memory.h>
#include <string.h>
#include <strings.h>
#include <inttypes.h>
#include <stdint.h>
#include <unistd.h>
#include <ctype.h>
#include <stdbool.h>
#include <stdarg.h>
#include <lttng/tracef.h>

int main(void) { return 0; }
[1/1] Compiling test.c
../test.c:15:26: fatal error: lttng/tracef.h: No such file or directory
#include <lttng/tracef.h>
compilation terminated.
['/opt/windriver/6.0/2016.048/i686/compiler/bin/gcc', '-MD', '-I/opt/windriver/6.0/2016.048/i686/sysroots/i686-wrs-linux/usr/lib/../include', '-D_SAMBA_BUILD_=4', '-DHAVE_CONFIG_H=1', '-D_GNU_SOURCE=1', '-D_XOPEN_SOURCE_EXTENDED=1', '../test.c', '-c', '-o', 'default/test_1.o']
command returned 'Build failed:  -> task failed (err #1): \n\t{task: cc test.c -> test_1.o}'no

Checking for library lttng-ust

int foo()
    int v = 2;
    return v*2;

[1/2] Compiling test.c
['/opt/windriver/6.0/2016.048/i686/compiler/bin/gcc', '-MD', '-fPIC', '-DPIC', '-I/opt/windriver/6.0/2016.048/i686/sysroots/i686-wrs-linux/usr/lib/../include', '-D_SAMBA_BUILD_=4', '-DHAVE_CONFIG_H=1', '-D_GNU_SOURCE=1', '-D_XOPEN_SOURCE_EXTENDED=1', '../test.c', '-c', '-o', 'default/test_1.o']
[2/2] Linking default/libtestprog.so
['/opt/windriver/6.0/2016.048/i686/compiler/bin/gcc', 'default/test_1.o', '-o', '/opt/workspace/WS/Team_Razor_D3.6/_artifacts_/x86-wr6-0/system/xad/nc/toolkits/src/samba/samba-4.3.3/obj/bin/.conf_check_0/testbuild/default/libtestprog.so', '-lpthread', '-Wl,-no-undefined', '-shared', '-Wl,-Bdynamic', '-llttng-ust']

and displayed to terminal:

Checking for lttng-ust                                                                          : not found
Checking for header lttng/tracef.h                                                              : no
Checking for library lttng-ust                                                                  : yes
ERROR: Target 'lttng-ust' in directory /opt/workspace/WS/Team_Razor_D3.6/_artifacts_/x86-wr6-0/system/xad/nc/toolkits/src/samba/samba-4.3.3/obj/lib/util re-defined as EMPTY - was SYSLIB

I know this is partially our issue, in that lttng/tracef.h does not exist, but the library does. But this doesn't happen if the library doesn't exist !?!? Looking at the logic below, I'm not quite sure why. Could someone please explain this.

I also noticed in lib/util/wscript_configure:

if Options.options.enable_lttng != False:
    conf.check_cfg(package='lttng-ust', args='--cflags --libs',
                   msg='Checking for lttng-ust', uselib_store="LTTNG-UST")
    conf.CHECK_HEADERS('lttng/tracef.h', lib='lttng-st')
    conf.CHECK_LIB('lttng-ust', shlib=True)

    conf.env['HAVE_LTTNG_TRACEF'] = True
    conf.SET_TARGET_TYPE('lttng-ust', 'EMPTY')

And was wondering if line conf.CHECK_HEADERS('lttng/tracef.h', lib='lttng-st') should have been conf.CHECK_HEADERS('lttng/tracef.h', lib='lttng-ust'). Is this related and is it correct ?

How important is this new functionality with lttng-ust library support, for the smbclient ?

Thank you in advance,
Mike Tompkins

More information about the samba mailing list