I tried to recursively (manually..) follow the errors and install the
dev packages and include the libraries with the "-lname" parameter to
my gcc line, but this is getting out of hand. It doesn't look like
I'll ever reach an end:

$ gcc sshtest.c -lssh -lcrypto -lz -lgss -lshishi -ltasn1 -lidn
-lgcrypt -o sshtest.x64 -static
(output see attached file)

there must be some better easier way? I'm more of a java developer and
there we have maven or other build systems to pull in requirements for
building - can I use cmake or something else to walk those dependency
paths for me instead of having to do this manually?

2017-09-21 23:11 GMT+02:00 Jeremy Cross <[email protected]>:
> Your output indicates that you are missing symbols during the linking. The 
> symbol names (like BN_new) are from OpenSSL, which would indicate that you 
> are not properly including OpenSSL libraries in your linking. Depending on 
> your configuration there may be other libraries you also need to be linking 
> in...
>
> -----Original Message-----
> From: Thomas Käfer [mailto:[email protected]]
> Sent: Thursday, September 21, 2017 1:25 PM
> To: [email protected]
> Subject: Re: static cross-compiling
>
> I'm sorry, I forgot to mention that I did read 
> http://api.libssh.org/master/libssh_linking.html and tried to put "#define 
> LIBSSH_STATIC 1" and "#define LIBSSH_STATIC" before my include libssh line 
> but it didn't seem to make a difference..?
>
> Ah. okey. I've found this link now:
> https://stackoverflow.com/questions/21083052/cross-compiling-for-arm-while-linking-to-libssh-libssh-so-file-not-recognized
>
> So if that's correct I need to cross-compile libssh and it's dependencies 
> openssl and zlib for arm first, and can then using those prepared arm lib 
> binaries compile a static build of my program. I will try to work on that 
> next. Or have a look "embedded Linux distros like Buildroot, OpenEmbedded or 
> Embedded Debian Project" to see if I find ready made arm binaries I can use?
>
> 2017-09-21 19:06 GMT+02:00 Thomas Käfer <[email protected]>:
>> Hello!
>>
>> I would like to write a program that I can cross-compile for Android
>> and OpenWRT devices, that uses libssh to first talk to ssh servers and
>> in a later development-stage to each other.
>>
>> Sadly, I'm not really too experienced in programming C / C++, so
>> please bear with me.
>>
>> I found this tutorial
>> http://jensd.be/800/linux/cross-compiling-for-arm-with-ubuntu-16-04-lt
>> s which with the additional install of the package "libc6-armel-cross"
>> enabled me to cross-compile a program that prints "hello world" in a
>> shell on my android device.
>>
>> Next step: After installing the package "libssh-dev" I was able to use
>> sample code from
>> http://api.libssh.org/master/libssh_tutor_guided_tour.html
>> to compile a dynamically linked program that works on my Linux laptop.
>>
>> Now the step I have been struggling with for the last few hours is to
>> compile this sample program that uses libssh in a static manner (and
>> once that is accomplished doing so using the "arm-linux-gnueabi-gcc"
>> cross-compiler)
>>
>> So I tried:
>> $ gcc sshtest.c -static -lssh
>> /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libssh.a(misc.c.o):
>> In function `ssh_path_expand_tilde':
>> (.text+0x87d): warning: Using 'getpwnam' in statically linked
>> applications requires at runtime the shared libraries from the glibc
>> version used for linking
>> /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libssh.a(misc.c.o):
>> In function `ssh_get_user_home_dir':
>> (.text+0x3a): warning: Using 'getpwuid_r' in statically linked
>> applications requires at runtime the shared libraries from the glibc
>> version used for linking ...
>> /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libssh.a(gssapi.c.o):
>> In function `ssh_packet_userauth_gssapi_token_client':
>> (.text+0x1b36): undefined reference to `gss_init_sec_context'
>> /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libssh.a(gssapi.c.o):
>> In function `ssh_packet_userauth_gssapi_token_client':
>> (.text+0x1c20): undefined reference to `gss_get_mic'
>> collect2: error: ld returned 1 exit status
>>
>> Then I downloaded the libssh source package and made a static build of
>> the library using the ccmake gui to set the static parameter to true.
>> With this I tried:
>> $ gcc sshtest.c libssh-0.7.5/build/src/libssh.a -lssh
>> libssh-0.7.5/build/src/libssh.a(curve25519.c.o): In function
>> `ssh_curve25519_build_k':
>> curve25519.c:(.text+0x13a): undefined reference to `BN_new'
>> curve25519.c:(.text+0x1e9): undefined reference to `BN_bin2bn'
>> libssh-0.7.5/build/src/libssh.a(dh.c.o): In function `ssh_get_random':
>> ...
>> libssh-0.7.5/build/src/libssh.a(bignum.c.o): In function `ssh_print_bignum':
>> bignum.c:(.text+0x175): undefined reference to `BN_bn2hex'
>> bignum.c:(.text+0x1dc): undefined reference to `CRYPTO_free'
>> collect2: error: ld returned 1 exit status
>>
>>
>> Now I'm out of ideas or in other words my googling skills are not
>> sufficient to find new ones ;) Please help..
>> Kind regards,
>> Thomas K.
>
kaefert@RID04689-N550JV ~/Development/cpp $ gcc sshtest.c -lssh -lcrypto -lz -lgss -lshishi -ltasn1 -lidn -lgcrypt -o sshtest.x64 -static
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libshishi.a(crc.o): In function `crc32':
(.text+0x60): multiple definition of `crc32'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libz.a(crc32.o):(.text+0x1f0): first defined here
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libssh.a(misc.c.o): In function `ssh_path_expand_tilde':
(.text+0x87d): warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libssh.a(misc.c.o): In function `ssh_get_user_home_dir':
(.text+0x3a): warning: Using 'getpwuid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libssh.a(connect.c.o): In function `getai':
(.text+0x86): warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcrypto.a(dso_dlfcn.o): In function `dlfcn_globallookup':
(.text+0x11): undefined reference to `dlopen'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcrypto.a(dso_dlfcn.o): In function `dlfcn_globallookup':
(.text+0x24): undefined reference to `dlsym'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcrypto.a(dso_dlfcn.o): In function `dlfcn_globallookup':
(.text+0x2f): undefined reference to `dlclose'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcrypto.a(dso_dlfcn.o): In function `dlfcn_bind_func':
(.text+0x334): undefined reference to `dlsym'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcrypto.a(dso_dlfcn.o): In function `dlfcn_bind_func':
(.text+0x3db): undefined reference to `dlerror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcrypto.a(dso_dlfcn.o): In function `dlfcn_bind_var':
(.text+0x454): undefined reference to `dlsym'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcrypto.a(dso_dlfcn.o): In function `dlfcn_bind_var':
(.text+0x4fb): undefined reference to `dlerror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcrypto.a(dso_dlfcn.o): In function `dlfcn_load':
(.text+0x569): undefined reference to `dlopen'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcrypto.a(dso_dlfcn.o): In function `dlfcn_load':
(.text+0x5cb): undefined reference to `dlclose'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcrypto.a(dso_dlfcn.o): In function `dlfcn_load':
(.text+0x603): undefined reference to `dlerror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcrypto.a(dso_dlfcn.o): In function `dlfcn_pathbyaddr':
(.text+0x69f): undefined reference to `dladdr'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcrypto.a(dso_dlfcn.o): In function `dlfcn_pathbyaddr':
(.text+0x709): undefined reference to `dlerror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcrypto.a(dso_dlfcn.o): In function `dlfcn_unload':
(.text+0x762): undefined reference to `dlclose'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libshishi.a(low-crypto.o): In function `libgcrypt_dencrypt.constprop.0':
(.text+0xa4): undefined reference to `gpg_strerror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libshishi.a(low-crypto.o): In function `shishi_des_cbc_mac':
(.text+0x508): undefined reference to `gpg_strerror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libshishi.a(starttls.o): In function `_shishi_tls_init':
(.text+0x5): undefined reference to `gnutls_global_init'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libshishi.a(starttls.o): In function `_shishi_tls_init':
(.text+0x12): undefined reference to `gnutls_strerror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libshishi.a(starttls.o): In function `_shishi_sendrecv_tls':
(.text+0x14b): undefined reference to `gnutls_init'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libshishi.a(starttls.o): In function `_shishi_sendrecv_tls':
(.text+0x15a): undefined reference to `gnutls_strerror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libshishi.a(starttls.o): In function `_shishi_sendrecv_tls':
(.text+0x18d): undefined reference to `gnutls_priority_set_direct'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libshishi.a(starttls.o): In function `_shishi_sendrecv_tls':
(.text+0x19c): undefined reference to `gnutls_strerror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libshishi.a(starttls.o): In function `_shishi_sendrecv_tls':
(.text+0x1c6): undefined reference to `gnutls_anon_allocate_client_credentials'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libshishi.a(starttls.o): In function `_shishi_sendrecv_tls':
(.text+0x1d5): undefined reference to `gnutls_strerror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libshishi.a(starttls.o): In function `_shishi_sendrecv_tls':
(.text+0x209): undefined reference to `gnutls_credentials_set'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libshishi.a(starttls.o): In function `_shishi_sendrecv_tls':
(.text+0x218): undefined reference to `gnutls_strerror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libshishi.a(starttls.o): In function `_shishi_sendrecv_tls':
(.text+0x242): undefined reference to `gnutls_certificate_allocate_credentials'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libshishi.a(starttls.o): In function `_shishi_sendrecv_tls':
(.text+0x251): undefined reference to `gnutls_strerror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libshishi.a(starttls.o): In function `_shishi_sendrecv_tls':
(.text+0x283): undefined reference to `gnutls_certificate_set_x509_trust_file'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libshishi.a(starttls.o): In function `_shishi_sendrecv_tls':
(.text+0x2b9): undefined reference to `gnutls_certificate_set_x509_key_file'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libshishi.a(starttls.o): In function `_shishi_sendrecv_tls':
(.text+0x2f0): undefined reference to `gnutls_credentials_set'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libshishi.a(starttls.o): In function `_shishi_sendrecv_tls':
(.text+0x2fe): undefined reference to `gnutls_strerror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libshishi.a(starttls.o): In function `_shishi_sendrecv_tls':
(.text+0x32a): undefined reference to `gnutls_strerror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libshishi.a(starttls.o): In function `_shishi_sendrecv_tls':
(.text+0x351): undefined reference to `gnutls_strerror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libshishi.a(starttls.o): In function `_shishi_sendrecv_tls':
(.text+0x3c2): undefined reference to `gnutls_deinit'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libshishi.a(starttls.o): In function `_shishi_sendrecv_tls':
(.text+0x3cc): undefined reference to `gnutls_anon_free_client_credentials'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libshishi.a(starttls.o): In function `_shishi_sendrecv_tls':
(.text+0x47d): undefined reference to `gnutls_transport_set_ptr'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libshishi.a(starttls.o): In function `_shishi_sendrecv_tls':
(.text+0x498): undefined reference to `gnutls_session_set_data'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libshishi.a(starttls.o): In function `_shishi_sendrecv_tls':
(.text+0x4a0): undefined reference to `gnutls_handshake'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libshishi.a(starttls.o): In function `_shishi_sendrecv_tls':
(.text+0x4b3): undefined reference to `gnutls_session_is_resumed'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libshishi.a(starttls.o): In function `_shishi_sendrecv_tls':
(.text+0x4ee): undefined reference to `gnutls_session_get_data'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libshishi.a(starttls.o): In function `_shishi_sendrecv_tls':
(.text+0x51c): undefined reference to `gnutls_session_get_data'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libshishi.a(starttls.o): In function `_shishi_sendrecv_tls':
(.text+0x55f): undefined reference to `gnutls_record_send'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libshishi.a(starttls.o): In function `_shishi_sendrecv_tls':
(.text+0x58f): undefined reference to `gnutls_certificate_verify_peers2'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libshishi.a(starttls.o): In function `_shishi_sendrecv_tls':
(.text+0x5d2): undefined reference to `gnutls_record_send'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libshishi.a(starttls.o): In function `_shishi_sendrecv_tls':
(.text+0x616): undefined reference to `gnutls_strerror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libshishi.a(starttls.o): In function `_shishi_sendrecv_tls':
(.text+0x63d): undefined reference to `gnutls_strerror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libshishi.a(starttls.o): In function `_shishi_sendrecv_tls':
(.text+0x664): undefined reference to `gnutls_strerror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libshishi.a(starttls.o): In function `_shishi_sendrecv_tls':
(.text+0x696): undefined reference to `gnutls_record_recv'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libshishi.a(starttls.o): In function `_shishi_sendrecv_tls':
(.text+0x6e3): undefined reference to `gnutls_record_recv'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libshishi.a(starttls.o): In function `_shishi_sendrecv_tls':
(.text+0x74c): undefined reference to `gnutls_bye'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libshishi.a(starttls.o): In function `_shishi_sendrecv_tls':
(.text+0x763): undefined reference to `gnutls_strerror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libshishi.a(starttls.o): In function `_shishi_sendrecv_tls':
(.text+0x7a8): undefined reference to `gnutls_strerror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libshishi.a(resolv.o): In function `shishi_resolv':
(.text+0xca): undefined reference to `__res_query'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libshishi.a(resolv.o): In function `shishi_resolv':
(.text+0x133): undefined reference to `__dn_expand'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libshishi.a(resolv.o): In function `shishi_resolv':
(.text+0x1cb): undefined reference to `__dn_expand'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libshishi.a(resolv.o): In function `shishi_resolv':
(.text+0x383): undefined reference to `__dn_expand'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(libgcrypt_la-visibility.o): In function `gcry_err_make_from_errno':
(.text+0x46): undefined reference to `gpg_err_code_from_errno'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(libgcrypt_la-visibility.o): In function `gcry_error_from_errno':
(.text+0x65): undefined reference to `gpg_err_code_from_errno'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(libgcrypt_la-visibility.o): In function `gcry_strerror':
(.text+0x1): undefined reference to `gpg_strerror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(libgcrypt_la-visibility.o): In function `gcry_strsource':
(.text+0x11): undefined reference to `gpg_strsource'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(libgcrypt_la-visibility.o): In function `gcry_err_code_from_errno':
(.text+0x21): undefined reference to `gpg_err_code_from_errno'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(libgcrypt_la-visibility.o): In function `gcry_err_code_to_errno':
(.text+0x31): undefined reference to `gpg_err_code_from_errno'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(libgcrypt_la-misc.o): In function `_gcry_fatal_error':
(.text+0xda): undefined reference to `gpg_strerror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(libgcrypt_la-misc.o): In function `_gcry_divide_by_zero':
(.text+0xe4a): undefined reference to `gpg_err_set_errno'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(libgcrypt_la-misc.o): In function `_gcry_divide_by_zero':
(.text+0xe56): undefined reference to `gpg_err_code_from_errno'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(libgcrypt_la-global.o): In function `global_init.part.0':
(.text+0x13c): undefined reference to `gpg_err_code_from_errno'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(libgcrypt_la-global.o): In function `do_malloc.constprop.5':
(.text+0x1f4): undefined reference to `gpg_err_set_errno'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(libgcrypt_la-global.o): In function `_gcry_realloc':
(.text+0x1239): undefined reference to `gpg_err_set_errno'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(libgcrypt_la-global.o): In function `_gcry_calloc':
(.text+0x1300): undefined reference to `gpg_err_set_errno'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(libgcrypt_la-global.o): In function `_gcry_calloc_secure':
(.text+0x1398): undefined reference to `gpg_err_set_errno'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(libgcrypt_la-global.o): In function `_gcry_xmalloc':
(.text+0x14d3): undefined reference to `gpg_err_code_from_errno'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(libgcrypt_la-global.o): In function `_gcry_xrealloc':
(.text+0x1552): undefined reference to `gpg_err_code_from_errno'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(libgcrypt_la-global.o): In function `_gcry_xmalloc_secure':
(.text+0x15f6): undefined reference to `gpg_err_code_from_errno'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(libgcrypt_la-global.o): In function `_gcry_xcalloc':
(.text+0x1657): undefined reference to `gpg_err_set_errno'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(libgcrypt_la-global.o): In function `_gcry_xcalloc':
(.text+0x1663): undefined reference to `gpg_err_code_from_errno'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(libgcrypt_la-global.o): In function `_gcry_xcalloc_secure':
(.text+0x16b7): undefined reference to `gpg_err_set_errno'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(libgcrypt_la-global.o): In function `_gcry_xcalloc_secure':
(.text+0x16c3): undefined reference to `gpg_err_code_from_errno'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(libgcrypt_la-global.o): In function `_gcry_xstrdup':
(.text+0x174a): undefined reference to `gpg_err_code_from_errno'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(libgcrypt_la-global.o): In function `do_malloc.constprop.5':
(.text+0x200): undefined reference to `gpg_err_code_from_errno'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(libgcrypt_la-global.o): In function `_gcry_free':
(.text+0x11c1): undefined reference to `gpg_err_set_errno'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(libgcrypt_la-sexp.o): In function `do_vsexp_sscan.part.3':
(.text+0x6ce): undefined reference to `gpg_err_code_from_errno'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(libgcrypt_la-sexp.o): In function `do_vsexp_sscan.part.3':
(.text+0x1a25): undefined reference to `gpg_err_code_from_errno'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(libgcrypt_la-sexp.o): In function `make_space':
(.text+0x2e1): undefined reference to `gpg_err_code_from_errno'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(libgcrypt_la-stdmem.o): In function `_gcry_private_malloc':
(.text+0xd6): undefined reference to `gpg_err_set_errno'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(libgcrypt_la-stdmem.o): In function `_gcry_private_malloc_secure':
(.text+0x156): undefined reference to `gpg_err_set_errno'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(libgcrypt_la-secmem.o): In function `_gcry_secmem_malloc_internal':
(.text+0x630): undefined reference to `gpg_err_set_errno'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(libgcrypt_la-fips.o): In function `_gcry_fips_run_selftests':
(.text+0x65b): undefined reference to `gpg_strerror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(libgcrypt_la-fips.o): In function `_gcry_fips_run_selftests':
(.text+0x6c7): undefined reference to `gpg_strerror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(libgcrypt_la-fips.o): In function `_gcry_fips_run_selftests':
(.text+0x6e9): undefined reference to `gpg_strerror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(libgcrypt_la-fips.o): In function `_gcry_fips_run_selftests':
(.text+0x793): undefined reference to `gpg_strerror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(libgcrypt_la-fips.o): In function `_gcry_fips_run_selftests':
(.text+0x7b6): undefined reference to `gpg_strerror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(cipher.o): In function `_gcry_cipher_open_internal':
(.text+0x71d): undefined reference to `gpg_err_code_from_syserror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(dsa.o): In function `run_selftests':
(.text+0x80): undefined reference to `gpg_strerror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(dsa.o): In function `run_selftests':
(.text+0xf3): undefined reference to `gpg_strerror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(dsa.o): In function `dsa_check_secret_key':
(.text+0x38b): undefined reference to `gpg_strerror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(dsa.o): In function `dsa_sign':
(.text+0x744): undefined reference to `gpg_strerror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(dsa.o): In function `dsa_verify':
(.text+0xda3): undefined reference to `gpg_strerror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(dsa.o): In function `dsa_generate':
(.text+0x1feb): undefined reference to `gpg_err_code_from_syserror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(dsa.o): In function `dsa_generate':
(.text+0x2008): undefined reference to `gpg_err_code_from_syserror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(ecc-curves.o): In function `scanval':
(.text+0x49): undefined reference to `gpg_strerror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(ecc-curves.o): In function `point_from_keyparam':
(.text+0x321): undefined reference to `gpg_err_code_from_syserror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(ecc-curves.o): In function `_gcry_mpi_ec_new':
(.text+0x1134): undefined reference to `gpg_err_code_from_syserror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(ecc-curves.o): In function `_gcry_ecc_update_curve_param':
(.text+0x8ef): undefined reference to `gpg_err_code_from_syserror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(ecc-eddsa.o): In function `eddsa_encode_x_y':
(.text+0xb1): undefined reference to `gpg_err_code_from_syserror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(ecc-eddsa.o): In function `scanval':
(.text+0x109): undefined reference to `gpg_strerror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(ecc-eddsa.o): In function `_gcry_ecc_eddsa_ensure_compact':
(.text+0x594): undefined reference to `gpg_err_code_from_syserror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(ecc-eddsa.o): In function `_gcry_ecc_eddsa_decodepoint':
(.text+0x8e8): undefined reference to `gpg_err_code_from_syserror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(ecc-eddsa.o): In function `_gcry_ecc_eddsa_compute_h_d':
(.text+0xb68): undefined reference to `gpg_err_code_from_syserror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(ecc-eddsa.o): In function `_gcry_ecc_eddsa_genkey':
(.text+0xe21): undefined reference to `gpg_err_code_from_syserror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(ecc-eddsa.o): In function `_gcry_ecc_eddsa_sign':
(.text+0x1593): undefined reference to `gpg_err_code_from_syserror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(ecc-misc.o): In function `_gcry_ecc_ec2os':
(.text+0x32d): undefined reference to `gpg_strerror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(ecc-misc.o): In function `_gcry_ecc_ec2os':
(.text+0x345): undefined reference to `gpg_strerror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(elgamal.o): In function `elg_check_secret_key':
(.text+0xfd): undefined reference to `gpg_strerror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(elgamal.o): In function `elg_sign':
(.text+0x681): undefined reference to `gpg_strerror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(elgamal.o): In function `elg_encrypt':
(.text+0x9ab): undefined reference to `gpg_strerror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(elgamal.o):(.text+0xe73): more undefined references to `gpg_strerror' follow
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(elgamal.o): In function `elg_generate':
(.text+0x1cb5): undefined reference to `gpg_err_code_from_syserror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(elgamal.o): In function `elg_generate':
(.text+0x1d19): undefined reference to `gpg_err_code_from_syserror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(kdf.o): In function `_gcry_kdf_pkdf2':
(.text+0x38e): undefined reference to `gpg_err_code_from_syserror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(mac.o): In function `_gcry_mac_open':
(.text+0x1d5): undefined reference to `gpg_err_code_from_syserror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(md.o): In function `md_open':
(.text+0x51d): undefined reference to `gpg_err_code_from_errno'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(md.o): In function `md_open':
(.text+0x5b5): undefined reference to `gpg_err_code_from_errno'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(md.o): In function `_gcry_md_copy':
(.text+0xce7): undefined reference to `gpg_err_code_from_errno'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(md.o): In function `_gcry_md_copy':
(.text+0xd68): undefined reference to `gpg_err_code_from_errno'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(md.o): In function `_gcry_md_copy':
(.text+0xd80): undefined reference to `gpg_err_code_from_errno'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(md.o): In function `_gcry_md_hash_buffer':
(.text+0x10fe): undefined reference to `gpg_strerror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(md.o): In function `md_enable.isra.0':
(.text+0x410): undefined reference to `gpg_err_code_from_errno'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(md.o): In function `prepare_macpads':
(.text+0x12ee): undefined reference to `gpg_err_code_from_errno'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(primegen.o): In function `prime_generate_internal':
(.text+0x17dd): undefined reference to `gpg_err_code_from_errno'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(primegen.o): In function `prime_generate_internal':
(.text+0x17f2): undefined reference to `gpg_err_code_from_errno'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(primegen.o): In function `prime_generate_internal':
(.text+0x1822): undefined reference to `gpg_err_code_from_errno'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(primegen.o):(.text+0x1e44): more undefined references to `gpg_err_code_from_errno' follow
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(primegen.o): In function `_gcry_generate_fips186_2_prime':
(.text+0x2d01): undefined reference to `gpg_err_code_from_syserror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(primegen.o): In function `_gcry_generate_fips186_3_prime':
(.text+0x347a): undefined reference to `gpg_err_code_from_syserror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(primegen.o): In function `_gcry_primegen_init':
(.text+0x1f47): undefined reference to `gpg_err_code_from_errno'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(pubkey-util.o): In function `_gcry_pk_util_preparse_encval':
(.text+0xc31): undefined reference to `gpg_err_code_from_syserror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(pubkey-util.o): In function `_gcry_pk_util_data_to_mpi':
(.text+0x1665): undefined reference to `gpg_err_code_from_syserror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(pubkey-util.o): In function `_gcry_pk_util_data_to_mpi':
(.text+0x171a): undefined reference to `gpg_err_code_from_syserror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(pubkey-util.o): In function `_gcry_pk_util_data_to_mpi':
(.text+0x1742): undefined reference to `gpg_err_code_from_syserror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(pubkey-util.o): In function `_gcry_pk_util_data_to_mpi':
(.text+0x1757): undefined reference to `gpg_err_code_from_syserror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(pubkey-util.o):(.text+0x17e1): more undefined references to `gpg_err_code_from_syserror' follow
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(rsa.o): In function `run_selftests':
(.text+0x12b): undefined reference to `gpg_strerror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(rsa.o): In function `run_selftests':
(.text+0x1a4): undefined reference to `gpg_strerror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(rsa.o): In function `rsa_check_secret_key':
(.text+0x69f): undefined reference to `gpg_strerror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(rsa.o): In function `rsa_verify':
(.text+0xa13): undefined reference to `gpg_strerror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(rsa.o): In function `rsa_encrypt':
(.text+0xb5f): undefined reference to `gpg_strerror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(rsa.o):(.text+0x10b7): more undefined references to `gpg_strerror' follow
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(scrypt.o): In function `_gcry_kdf_scrypt':
(.text+0x7e2): undefined reference to `gpg_err_code_from_syserror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(scrypt.o): In function `_gcry_kdf_scrypt':
(.text+0x7f1): undefined reference to `gpg_err_code_from_syserror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(scrypt.o): In function `_gcry_kdf_scrypt':
(.text+0x809): undefined reference to `gpg_err_code_from_syserror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(ec.o): In function `_gcry_mpi_ec_p_new':
(.text+0x6cc): undefined reference to `gpg_err_code_from_syserror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(mpicoder.o): In function `_gcry_mpi_print':
(.text+0xf71): undefined reference to `gpg_err_code_from_syserror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(mpicoder.o):(.text+0x1229): more undefined references to `gpg_err_code_from_syserror' follow
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(ecc.o): In function `ecc_verify':
(.text+0xb43): undefined reference to `gpg_strerror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(ecc.o): In function `ecc_sign':
(.text+0xf4a): undefined reference to `gpg_strerror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(ecc.o): In function `ecc_decrypt_raw':
(.text+0x14b9): undefined reference to `gpg_strerror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(ecc.o): In function `ecc_decrypt_raw':
(.text+0x1909): undefined reference to `gpg_err_code_from_syserror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(ecc.o): In function `ecc_encrypt_raw':
(.text+0x1b23): undefined reference to `gpg_strerror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(ecc.o): In function `ecc_check_secret_key':
(.text+0x2029): undefined reference to `gpg_strerror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(random-fips.o): In function `encrypt_aes.constprop.7':
(.text+0x423): undefined reference to `gpg_strerror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(random-fips.o): In function `x931_generate_key':
(.text+0xc66): undefined reference to `gpg_strerror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(random-fips.o): In function `x931_generate_key':
(.text+0xc83): undefined reference to `gpg_strerror'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgcrypt.a(random-fips.o): In function `_gcry_rngfips_init_external_test':
(.text+0x1284): undefined reference to `gpg_err_code_from_syserror'
collect2: error: ld returned 1 exit status

Reply via email to