-
Notifications
You must be signed in to change notification settings - Fork 51
Description
Check for wsman_create_doc() in -lwsman... fails even though the library is present in LIBARY_PATH and LD_LIBRARY_PATH with " undefined reference to `facility'"
Content of mkmf.log:
have_library: checking for wsman_create_doc() in -lwsman... -------------------- no
LD_LIBRARY_PATH=.:/usr/lib64:/builddir/build/BUILD/openwsman-2.8.1-build/openwsman-2.8.1/build/src/lib/ ASAN_OPTIONS=detect_leaks=0 "gcc -o conftest -I/usr/include -I/usr/include/ruby/backward -I/usr/include -I. -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wno-complain-wrong-lang -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer conftest.c -L. -L/usr/lib64 -Wl,-z,relro -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -specs=/usr/lib/rpm/redhat/redhat-package-notes -m64 -lruby -lm -lpthread -lc"
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main(int argc, char *argv)
4: {
5: return !!argv[argc];
6: }
/ end */
LD_LIBRARY_PATH=.:/usr/lib64:/builddir/build/BUILD/openwsman-2.8.1-build/openwsman-2.8.1/build/src/lib/ ASAN_OPTIONS=detect_leaks=0 "gcc -o conftest -I/usr/include -I/usr/include/ruby/backward -I/usr/include -I. -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wno-complain-wrong-lang -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer conftest.c -L. -L/usr/lib64 -Wl,-z,relro -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -specs=/usr/lib/rpm/redhat/redhat-package-notes -m64 -lruby -lwsman -lm -lpthread -lc"
conftest.c: In function ‘t’:
conftest.c:14:57: error: ‘wsman_create_doc’ undeclared (first use in this function)
14 | int t(void) { void ((volatile p)()); p = (void (()()))wsman_create_doc; return !p; }
| ^~~~~~~~~~~~~~~~
conftest.c:14:57: note: each undeclared identifier is reported only once for each function it appears in
checked program was:
/* begin /
1: #include "ruby.h"
2:
3: /top/
4: extern int t(void);
5: int main(int argc, char *argv)
6: {
7: if (argc > 1000000) {
8: int ( volatile tp)(void)=(int ()(void))&t;
9: printf("%d", (tp)());
10: }
11:
12: return !!argv[argc];
13: }
14: int t(void) { void ((volatile p)()); p = (void (()()))wsman_create_doc; return !p; }
/ end */
LD_LIBRARY_PATH=.:/usr/lib64:/builddir/build/BUILD/openwsman-2.8.1-build/openwsman-2.8.1/build/src/lib/ ASAN_OPTIONS=detect_leaks=0 "gcc -o conftest -I/usr/include -I/usr/include/ruby/backward -I/usr/include -I. -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wno-complain-wrong-lang -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer conftest.c -L. -L/usr/lib64 -Wl,-z,relro -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -specs=/usr/lib/rpm/redhat/redhat-package-notes -m64 -lruby -lwsman -lm -lpthread -lc"
/usr/bin/ld: /builddir/build/BUILD/openwsman-2.8.1-build/openwsman-2.8.1/build/src/lib/libwsman.so: undefined reference to `facility'
collect2: error: ld returned 1 exit status
checked program was:
/* begin /
1: #include "ruby.h"
2:
3: /top/
4: extern int t(void);
5: int main(int argc, char *argv)
6: {
7: if (argc > 1000000) {
8: int ( volatile tp)(void)=(int ()(void))&t;
9: printf("%d", (tp)());
10: }
11:
12: return !!argv[argc];
13: }
14: extern void wsman_create_doc();
15: int t(void) { wsman_create_doc(); return 0; }
/ end */