On (18/11/13 10:59), Lukas Slebodnik wrote:
On (18/11/13 10:41), Lukas Slebodnik wrote:
>ehlo,
>
>Static library libsss_test_common calls tevent functions directly (in module
>common_tev.c), but it was not linked with tevent library.
>
>Compilation will fail if sssd is linked with "-Wl,--as-needed"
> CCLD test_utils
>/usr/bin/ld: ./.libs/libsss_test_common.a(common_tev.o): undefined reference to symbol
'tevent_context_init@(a)TEVENT_0.9.9'
>/usr/bin/ld: note: 'tevent_context_init@(a)TEVENT_0.9.9' is defined in DSO
/usr/lib/gcc/x86_64-redhat-linux/4.8.2/../../../../lib64/libtevent.so so try adding it to
the linker command line
>/usr/lib/gcc/x86_64-redhat-linux/4.8.2/../../../../lib64/libtevent.so: could not read
symbols: Invalid operation
>clang: error: linker command failed with exit code 1 (use -v to see invocation)
>
>nm ./libsss_test_common.a | grep tevent
> U tevent_context_init
> U _tevent_loop_once
> U _tevent_req_create
> U _tevent_req_done
> U _tevent_req_error
> U tevent_req_is_error
> U tevent_req_post
>
>Simple patch is attached.
One more time :-)
LS
The same problem is also in sssd-1-11 after pushing patch
"DP: Provide separate dp_copy_defaults function"
CCLD dp_opt_tests
/usr/bin/ld: ./.libs/libsss_test_common.a(common_tev.o): undefined reference to symbol
'_tevent_loop_once@(a)TEVENT_0.9.9'
/usr/bin/ld: note: '_tevent_loop_once@(a)TEVENT_0.9.9' is defined in DSO
/lib64/libtevent.so.0 so try adding it to the linker command line
/lib64/libtevent.so.0: could not read symbols: Invalid operation
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [dp_opt_tests] Error 1
LS