libnetconf2 icon indicating copy to clipboard operation
libnetconf2 copied to clipboard

Build fails with LTO

Open eli-schwartz opened this issue 1 year ago • 1 comments

I tried to build with the following *FLAGS to optimize the build: -flto=4 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing.

I got this error when building the testsuite binaries:

ninja: Entering directory `/var/tmp/portage/net-libs/libnetconf2-3.0.8/work/libnetconf2-3.0.8_build'
[1/3] Linking C executable tests/test_client_tls
FAILED: tests/test_client_tls 
: && /usr/bin/x86_64-pc-linux-gnu-gcc -march=native -fstack-protector-all -O2 -pipe -fdiagnostics-color=always -frecord-gcc-switches -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-clash-protection -flto=4 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing  -Wformat -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Werror=int-conversion -Werror=incompatible-pointer-types -Wall -Wextra -fvisibility=hidden -std=c99 -DNC_ENABLED_SSH_TLS -Wl,-O1 -Wl,--as-needed -flto=4 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing -Wl,--defsym=__gentoo_check_ldflags__=0    -Wl,--wrap=connect,--wrap=SSL_connect,--wrap=nc_send_hello_io,--wrap=nc_handshake_io,--wrap=nc_ctx_check_and_fill tests/CMakeFiles/testobj.dir/__/src/io.c.o tests/CMakeFiles/testobj.dir/__/src/log.c.o tests/CMakeFiles/testobj.dir/__/src/messages_client.c.o tests/CMakeFiles/testobj.dir/__/src/messages_server.c.o tests/CMakeFiles/testobj.dir/__/src/session.c.o tests/CMakeFiles/testobj.dir/__/src/session_client.c.o tests/CMakeFiles/testobj.dir/__/src/session_server.c.o tests/CMakeFiles/testobj.dir/__/src/server_config.c.o tests/CMakeFiles/testobj.dir/__/src/server_config_util.c.o tests/CMakeFiles/testobj.dir/__/src/session_client_ssh.c.o tests/CMakeFiles/testobj.dir/__/src/session_server_ssh.c.o tests/CMakeFiles/testobj.dir/__/src/server_config_util_ssh.c.o tests/CMakeFiles/testobj.dir/__/src/session_client_tls.c.o tests/CMakeFiles/testobj.dir/__/src/session_server_tls.c.o tests/CMakeFiles/testobj.dir/__/src/server_config_util_tls.c.o tests/CMakeFiles/testobj.dir/__/src/server_config_ks.c.o tests/CMakeFiles/testobj.dir/__/src/server_config_ts.c.o tests/CMakeFiles/testobj.dir/__/compat/compat.c.o tests/CMakeFiles/test_client_tls.dir/test_client_tls.c.o -o tests/test_client_tls  -Wl,-rpath,/var/tmp/portage/net-libs/libnetconf2-3.0.8/work/libnetconf2-3.0.8_build  /usr/lib64/libcmocka.so  /usr/lib64/libyang.so  libnetconf2.so.4.1.5  /usr/lib64/libssl.so  /usr/lib64/libcrypto.so  /usr/lib64/libssh.so  /usr/lib64/libcurl.so  -lcrypt  /usr/lib64/libpam.so  /usr/lib64/libyang.so && :
/var/tmp/portage/net-libs/libnetconf2-3.0.8/work/libnetconf2-3.0.8/src/session_server_ssh.c: In function ‘nc_session_ssh_msg’:
/var/tmp/portage/net-libs/libnetconf2-3.0.8/work/libnetconf2-3.0.8/src/session_server_ssh.c:1094:17: warning: ‘pubkey_count’ may be used uninitialized [-Wmaybe-uninitialized]
 1094 |     uint16_t i, pubkey_count;
      |                 ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: /tmp/ccGCkpH1.ltrans4.ltrans.o: in function `nc_connect_tls':
<artificial>:(.text+0xb649): undefined reference to `__wrap_SSL_connect'
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: /tmp/ccGCkpH1.ltrans1.ltrans.o: in function `nc_accept_callhome':
<artificial>:(.text+0x7e3c): undefined reference to `__wrap_SSL_connect'
collect2: error: ld returned 1 exit status
[2/3] Linking C executable tests/test_client_ssh
FAILED: tests/test_client_ssh 
: && /usr/bin/x86_64-pc-linux-gnu-gcc -march=native -fstack-protector-all -O2 -pipe -fdiagnostics-color=always -frecord-gcc-switches -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-clash-protection -flto=4 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing  -Wformat -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Werror=int-conversion -Werror=incompatible-pointer-types -Wall -Wextra -fvisibility=hidden -std=c99 -DNC_ENABLED_SSH_TLS -Wl,-O1 -Wl,--as-needed -flto=4 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing -Wl,--defsym=__gentoo_check_ldflags__=0    -Wl,--wrap=connect,--wrap=ssh_connect,--wrap=ssh_userauth_none,--wrap=ssh_userauth_kbdint,--wrap=ssh_is_connected,--wrap=ssh_channel_open_session,--wrap=ssh_channel_request_subsystem,--wrap=ssh_channel_is_close,--wrap=ssh_channel_write,--wrap=ssh_channel_poll_timeout,--wrap=ssh_userauth_password,--wrap=nc_handshake_io,--wrap=nc_ctx_check_and_fill,--wrap=ssh_userauth_try_publickey,--wrap=ssh_userauth_publickey,--wrap=nc_sock_listen_inet,--wrap=nc_sock_accept_binds,--wrap=nc_accept_callhome_ssh_sock tests/CMakeFiles/testobj.dir/__/src/io.c.o tests/CMakeFiles/testobj.dir/__/src/log.c.o tests/CMakeFiles/testobj.dir/__/src/messages_client.c.o tests/CMakeFiles/testobj.dir/__/src/messages_server.c.o tests/CMakeFiles/testobj.dir/__/src/session.c.o tests/CMakeFiles/testobj.dir/__/src/session_client.c.o tests/CMakeFiles/testobj.dir/__/src/session_server.c.o tests/CMakeFiles/testobj.dir/__/src/server_config.c.o tests/CMakeFiles/testobj.dir/__/src/server_config_util.c.o tests/CMakeFiles/testobj.dir/__/src/session_client_ssh.c.o tests/CMakeFiles/testobj.dir/__/src/session_server_ssh.c.o tests/CMakeFiles/testobj.dir/__/src/server_config_util_ssh.c.o tests/CMakeFiles/testobj.dir/__/src/session_client_tls.c.o tests/CMakeFiles/testobj.dir/__/src/session_server_tls.c.o tests/CMakeFiles/testobj.dir/__/src/server_config_util_tls.c.o tests/CMakeFiles/testobj.dir/__/src/server_config_ks.c.o tests/CMakeFiles/testobj.dir/__/src/server_config_ts.c.o tests/CMakeFiles/testobj.dir/__/compat/compat.c.o tests/CMakeFiles/test_client_ssh.dir/test_client_ssh.c.o -o tests/test_client_ssh  -Wl,-rpath,/var/tmp/portage/net-libs/libnetconf2-3.0.8/work/libnetconf2-3.0.8_build  /usr/lib64/libcmocka.so  /usr/lib64/libyang.so  libnetconf2.so.4.1.5  /usr/lib64/libssl.so  /usr/lib64/libcrypto.so  /usr/lib64/libssh.so  /usr/lib64/libcurl.so  -lcrypt  /usr/lib64/libpam.so  /usr/lib64/libyang.so && :
/var/tmp/portage/net-libs/libnetconf2-3.0.8/work/libnetconf2-3.0.8/src/session_server_ssh.c: In function ‘nc_session_ssh_msg’:
/var/tmp/portage/net-libs/libnetconf2-3.0.8/work/libnetconf2-3.0.8/src/session_server_ssh.c:1094:17: warning: ‘pubkey_count’ may be used uninitialized [-Wmaybe-uninitialized]
 1094 |     uint16_t i, pubkey_count;
      |                 ^
/var/tmp/portage/net-libs/libnetconf2-3.0.8/work/libnetconf2-3.0.8/tests/test_client_ssh.c: In function ‘test_nc_client_ssh_adding_keypair’:
/var/tmp/portage/net-libs/libnetconf2-3.0.8/work/libnetconf2-3.0.8/tests/test_client_ssh.c:393:5: warning: ‘pubkey2’ may be used uninitialized [-Wmaybe-uninitialized]
  393 |     assert_string_equal(pubkey2, "key_priv");
      |     ^
/var/tmp/portage/net-libs/libnetconf2-3.0.8/work/libnetconf2-3.0.8/tests/test_client_ssh.c:373:27: note: ‘pubkey2’ was declared here
  373 |     const char *pubkey1, *pubkey2;
      |                           ^
/var/tmp/portage/net-libs/libnetconf2-3.0.8/work/libnetconf2-3.0.8/tests/test_client_ssh.c:392:5: warning: ‘pubkey1’ may be used uninitialized [-Wmaybe-uninitialized]
  392 |     assert_string_equal(pubkey1, "key_pub");
      |     ^
/var/tmp/portage/net-libs/libnetconf2-3.0.8/work/libnetconf2-3.0.8/tests/test_client_ssh.c:373:17: note: ‘pubkey1’ was declared here
  373 |     const char *pubkey1, *pubkey2;
      |                 ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: /tmp/ccp8ai56.ltrans4.ltrans.o: in function `connect_ssh_session.constprop.0':
<artificial>:(.text+0x7b38): undefined reference to `__wrap_ssh_connect'
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: <artificial>:(.text+0x7e50): undefined reference to `__wrap_ssh_userauth_none'
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: <artificial>:(.text+0x7fac): undefined reference to `__wrap_ssh_userauth_kbdint'
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: <artificial>:(.text+0x8165): undefined reference to `__wrap_ssh_userauth_password'
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: <artificial>:(.text+0x85f5): undefined reference to `__wrap_ssh_userauth_try_publickey'
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: <artificial>:(.text+0x8695): undefined reference to `__wrap_ssh_userauth_publickey'
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: /tmp/ccp8ai56.ltrans4.ltrans.o: in function `open_netconf_channel.constprop.0':
<artificial>:(.text+0x8a35): undefined reference to `__wrap_ssh_is_connected'
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: <artificial>:(.text+0x8a75): undefined reference to `__wrap_ssh_channel_open_session'
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: <artificial>:(.text+0x8ae8): undefined reference to `__wrap_ssh_channel_request_subsystem'
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: /tmp/ccp8ai56.ltrans4.ltrans.o: in function `_nc_connect_libssh.constprop.0':
<artificial>:(.text+0x9f1f): undefined reference to `__wrap_ssh_is_connected'
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: /tmp/ccp8ai56.ltrans0.ltrans.o: in function `nc_read_poll':
<artificial>:(.text+0x7b9): undefined reference to `__wrap_ssh_channel_poll_timeout'
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: /tmp/ccp8ai56.ltrans0.ltrans.o: in function `nc_write':
<artificial>:(.text+0xb81): undefined reference to `__wrap_ssh_channel_write'
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: /tmp/ccp8ai56.ltrans0.ltrans.o: in function `nc_session_is_connected':
<artificial>:(.text+0x9dd): undefined reference to `__wrap_ssh_is_connected'
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: /tmp/ccp8ai56.ltrans1.ltrans.o: in function `nc_ps_poll':
<artificial>:(.text+0xcd40): undefined reference to `__wrap_ssh_channel_poll_timeout'
collect2: error: ld returned 1 exit status
[3/3] Linking C executable tests/test_pam
FAILED: tests/test_pam 
: && /usr/bin/x86_64-pc-linux-gnu-gcc -march=native -fstack-protector-all -O2 -pipe -fdiagnostics-color=always -frecord-gcc-switches -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-clash-protection -flto=4 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing  -Wformat -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Werror=int-conversion -Werror=incompatible-pointer-types -Wall -Wextra -fvisibility=hidden -std=c99 -DNC_ENABLED_SSH_TLS -Wl,-O1 -Wl,--as-needed -flto=4 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing -Wl,--defsym=__gentoo_check_ldflags__=0    -Wl,--wrap=pam_start tests/CMakeFiles/testobj.dir/__/src/io.c.o tests/CMakeFiles/testobj.dir/__/src/log.c.o tests/CMakeFiles/testobj.dir/__/src/messages_client.c.o tests/CMakeFiles/testobj.dir/__/src/messages_server.c.o tests/CMakeFiles/testobj.dir/__/src/session.c.o tests/CMakeFiles/testobj.dir/__/src/session_client.c.o tests/CMakeFiles/testobj.dir/__/src/session_server.c.o tests/CMakeFiles/testobj.dir/__/src/server_config.c.o tests/CMakeFiles/testobj.dir/__/src/server_config_util.c.o tests/CMakeFiles/testobj.dir/__/src/session_client_ssh.c.o tests/CMakeFiles/testobj.dir/__/src/session_server_ssh.c.o tests/CMakeFiles/testobj.dir/__/src/server_config_util_ssh.c.o tests/CMakeFiles/testobj.dir/__/src/session_client_tls.c.o tests/CMakeFiles/testobj.dir/__/src/session_server_tls.c.o tests/CMakeFiles/testobj.dir/__/src/server_config_util_tls.c.o tests/CMakeFiles/testobj.dir/__/src/server_config_ks.c.o tests/CMakeFiles/testobj.dir/__/src/server_config_ts.c.o tests/CMakeFiles/testobj.dir/__/compat/compat.c.o tests/CMakeFiles/test_pam.dir/test_pam.c.o -o tests/test_pam  -Wl,-rpath,/var/tmp/portage/net-libs/libnetconf2-3.0.8/work/libnetconf2-3.0.8_build  /usr/lib64/libcmocka.so  /usr/lib64/libyang.so  libnetconf2.so.4.1.5  /usr/lib64/libssl.so  /usr/lib64/libcrypto.so  /usr/lib64/libssh.so  /usr/lib64/libcurl.so  -lcrypt  /usr/lib64/libpam.so  /usr/lib64/libyang.so && :
/var/tmp/portage/net-libs/libnetconf2-3.0.8/work/libnetconf2-3.0.8/src/session_server_ssh.c: In function ‘nc_session_ssh_msg’:
/var/tmp/portage/net-libs/libnetconf2-3.0.8/work/libnetconf2-3.0.8/src/session_server_ssh.c:1094:17: warning: ‘pubkey_count’ may be used uninitialized [-Wmaybe-uninitialized]
 1094 |     uint16_t i, pubkey_count;
      |                 ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: /tmp/ccW36UwY.ltrans3.ltrans.o: in function `nc_session_ssh_msg':
<artificial>:(.text+0x7d38): undefined reference to `__wrap_pam_start'
collect2: error: ld returned 1 exit status
ninja: build stopped: cannot make progress due to previous errors.

I originally found this while investigating downstream bug report https://bugs.gentoo.org/877449

In that other bug, building libnetconf 2.1.31 succeeded but running the tests failed:

12/13 Testing: test_client_ssh
12/13 Test: test_client_ssh
Command: "/var/tmp/portage/net-libs/libnetconf2-2.1.31/work/libnetconf2-2.1.31_build/tests/test_client_ssh"
Directory: /var/tmp/portage/net-libs/libnetconf2-2.1.31/work/libnetconf2-2.1.31_build/tests
"test_client_ssh" start time: Mar 25 11:15 EDT
Output:
----------------------------------------------------------
[==========] Running 16 test(s).
[ RUN      ] test_nc_client_ssh_setting_auth_pref
[       OK ] test_nc_client_ssh_setting_auth_pref
[ RUN      ] test_nc_client_ssh_setting_auth_hostkey_check_clb
[       OK ] test_nc_client_ssh_setting_auth_hostkey_check_clb
[ RUN      ] test_nc_client_ssh_setting_auth_password_clb
[       OK ] test_nc_client_ssh_setting_auth_password_clb
[ RUN      ] test_nc_client_ssh_setting_auth_interactive_clb
[       OK ] test_nc_client_ssh_setting_auth_interactive_clb
[ RUN      ] test_nc_client_ssh_setting_auth_privkey_passphrase_clb
[       OK ] test_nc_client_ssh_setting_auth_privkey_passphrase_clb
[ RUN      ] test_nc_client_ssh_adding_keypair
[ERR]: _nc_client_ssh_get_keypair: invalid argument (idx).
[ERR]: SSH key pair already set.
[ERR]: _nc_client_ssh_del_keypair: invalid argument (idx).
[       OK ] test_nc_client_ssh_adding_keypair
[ RUN      ] test_nc_client_ssh_setting_username
[       OK ] test_nc_client_ssh_setting_username
[ RUN      ] test_nc_connect_ssh_interactive_succesfull
[INF]: Trying to connect via IPv4 to 127.0.0.1:8080.
[INF]: Successfully connected to 127.0.0.1:8080 over IPv4.
[INF]: Password SSH authentication method was disabled.
[INF]: Publickey SSH authentication method was disabled.
[INF]: Keyboard-interactive authentication.
[INF]: Authentication successful.
libyang[2]: Searching for "ietf-inet-types" in "/var/tmp/portage/net-libs/libnetconf2-2.1.31/work/libnetconf2-2.1.31_build/tests".
libyang[2]: Newer revision than "ietf-inet-types@2013-07-15" not found, using this as the latest revision.
libyang[2]: Searching for "ietf-yang-types" in "/var/tmp/portage/net-libs/libnetconf2-2.1.31/work/libnetconf2-2.1.31_build/tests".
libyang[2]: Newer revision than "ietf-yang-types@2013-07-15" not found, using this as the latest revision.
[WRN]: Missing ietf-netconf module in context, unable to send <close-session>.
[       OK ] test_nc_connect_ssh_interactive_succesfull
[ RUN      ] test_nc_connect_ssh_password_succesfull
[INF]: Trying to connect via IPv4 to 127.0.0.1:8080.
[INF]: Successfully connected to 127.0.0.1:8080 over IPv4.
[INF]: Interactive SSH authentication method was disabled.
[INF]: Publickey SSH authentication method was disabled.
[INF]: Password authentication (host "127.0.0.1", user "username").
[INF]: Authentication successful.
libyang[2]: Searching for "ietf-inet-types" in "/var/tmp/portage/net-libs/libnetconf2-2.1.31/work/libnetconf2-2.1.31_build/tests".
libyang[2]: Newer revision than "ietf-inet-types@2013-07-15" not found, using this as the latest revision.
libyang[2]: Searching for "ietf-yang-types" in "/var/tmp/portage/net-libs/libnetconf2-2.1.31/work/libnetconf2-2.1.31_build/tests".
libyang[2]: Newer revision than "ietf-yang-types@2013-07-15" not found, using this as the latest revision.
[WRN]: Missing ietf-netconf module in context, unable to send <close-session>.
[       OK ] test_nc_connect_ssh_password_succesfull
[ RUN      ] test_nc_connect_ssh_pubkey_succesfull
[INF]: Trying to connect via IPv4 to 127.0.0.1:8080.
[INF]: Successfully connected to 127.0.0.1:8080 over IPv4.
[INF]: Interactive SSH authentication method was disabled.
[INF]: Password SSH authentication method was disabled.
[INF]: Publickey athentication.
[INF]: Trying to authenticate using pair "/var/tmp/portage/net-libs/libnetconf2-2.1.31/work/libnetconf2-2.1.31/tests/data/key_ecdsa" "/var/tmp/portage/net-libs/libnetconf2-2.1.31/work/libnetconf2-2.1.31/tests/data/key_ecdsa.pub".
[INF]: Authentication successful.
libyang[2]: Searching for "ietf-inet-types" in "/var/tmp/portage/net-libs/libnetconf2-2.1.31/work/libnetconf2-2.1.31_build/tests".
libyang[2]: Newer revision than "ietf-inet-types@2013-07-15" not found, using this as the latest revision.
libyang[2]: Searching for "ietf-yang-types" in "/var/tmp/portage/net-libs/libnetconf2-2.1.31/work/libnetconf2-2.1.31_build/tests".
libyang[2]: Newer revision than "ietf-yang-types@2013-07-15" not found, using this as the latest revision.
[WRN]: Missing ietf-netconf module in context, unable to send <close-session>.
[       OK ] test_nc_connect_ssh_pubkey_succesfull
[ RUN      ] test_nc_connect_connection_failed
[INF]: Trying to connect via IPv4 to 127.0.0.1:8080.
[ERR]: connect() failed (Connection refused).
[ERR]: Unable to connect to 127.0.0.1:8080 (Connection refused).
[       OK ] test_nc_connect_connection_failed
[ RUN      ] test_nc_connect_ssh_bad_hello
[INF]: Trying to connect via IPv4 to 127.0.0.1:8080.
[INF]: Successfully connected to 127.0.0.1:8080 over IPv4.
[INF]: Password SSH authentication method was disabled.
[INF]: Keyboard-interactive authentication.
[INF]: Authentication successful.
libyang[2]: Searching for "ietf-inet-types" in "/var/tmp/portage/net-libs/libnetconf2-2.1.31/work/libnetconf2-2.1.31_build/tests".
libyang[2]: Newer revision than "ietf-inet-types@2013-07-15" not found, using this as the latest revision.
libyang[2]: Searching for "ietf-yang-types" in "/var/tmp/portage/net-libs/libnetconf2-2.1.31/work/libnetconf2-2.1.31_build/tests".
libyang[2]: Newer revision than "ietf-yang-types@2013-07-15" not found, using this as the latest revision.
[       OK ] test_nc_connect_ssh_bad_hello
[ RUN      ] test_nc_client_ssh_ch_setting_username
[       OK ] test_nc_client_ssh_ch_setting_username
[ RUN      ] test_nc_client_ssh_ch_add_bind_listen
[ERR]: nc_client_ch_add_bind_listen: invalid argument (address).
[ERR]: nc_client_ch_add_bind_listen: invalid argument (port).
[  ERROR   ] --- 0 != 0xffffffffffffffff
[   LINE   ] --- /var/tmp/portage/net-libs/libnetconf2-2.1.31/work/libnetconf2-2.1.31/tests/client/test_client_ssh.c:716: error: Failure!
[  FAILED  ] test_nc_client_ssh_ch_add_bind_listen
[ RUN      ] test_nc_accept_callhome
[ERR]: nc_accept_callhome: invalid argument (session).
[  ERROR   ] --- 0 != 0xffffffffffffffff
[   LINE   ] --- /var/tmp/portage/net-libs/libnetconf2-2.1.31/work/libnetconf2-2.1.31/tests/client/test_client_ssh.c:742: error: Failure!
[  FAILED  ] test_nc_accept_callhome
[ RUN      ] test_nc_client_ssh_callhome_successful
[ERR]: Could not bind "127.0.0.1" port 4334 (Address already in use).
[  ERROR   ] --- 0xffffffffffffffff != 0
[   LINE   ] --- /var/tmp/portage/net-libs/libnetconf2-2.1.31/work/libnetconf2-2.1.31/tests/client/test_client_ssh.c:794: error: Failure!
[  FAILED  ] test_nc_client_ssh_callhome_successful
[==========] 16 test(s) run.
[  PASSED  ] 13 test(s).
[  FAILED  ] 3 test(s), listed below:
[  FAILED  ] test_nc_client_ssh_ch_add_bind_listen
[  FAILED  ] test_nc_accept_callhome
[  FAILED  ] test_nc_client_ssh_callhome_successful

 3 FAILED TEST(S)
<end of output>
Test time =   0.02 sec
----------------------------------------------------------
Test Failed.
"test_client_ssh" end time: Mar 25 11:15 EDT
"test_client_ssh" time elapsed: 00:00:00
----------------------------------------------------------

However I cannot tell whether the tests fail on the newer version as I cannot build it. :D

eli-schwartz avatar Mar 25 '24 15:03 eli-schwartz

I have tried compiling the current libnetconf2 in devel (requires libyang devel) with the flags you posted and it worked fine. So please post the exact commands to reproduce this, otherwise I cannot help.

michalvasko avatar Mar 28 '24 07:03 michalvasko