thanks for the reply jeremy!

Yes I've found this option and was able to generate a libssh.a file.
but how do I use this?

$ gcc sshtest.c libssh.a -o sshtest.x64 -static
doesn't look very promising (see attached log)


2017-09-22 22:33 GMT+02:00 Jeremy Cross <[email protected]>:
> Sure, there's a WITH_STATIC_LIB option on the cmake.
>
> Try something like:
> cmake -DWITH_EXAMPLES=OFF -DBUILD_SHARED_LIBS=OFF -DWITH_STATIC_LIB=ON 
> -DOPENSSL_ROOT_DIR="<your path here>"
>
> -----Original Message-----
> From: Thomas Käfer [mailto:[email protected]]
> Sent: Friday, September 22, 2017 1:27 PM
> To: [email protected]
> Subject: Re: static cross-compiling
>
> 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-w
>> hile-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-l
>>> t 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 libssh.a -o sshtest.x64 -static
libssh.a(misc.c.o): In function `ssh_path_expand_tilde':
misc.c:(.text+0xb00): warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
libssh.a(misc.c.o): In function `ssh_get_user_home_dir':
misc.c:(.text+0x4d): warning: Using 'getpwuid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
libssh.a(connect.c.o): In function `getai':
connect.c:(.text+0x100): warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
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.a(dh.c.o): In function `ssh_get_random':
dh.c:(.text+0x44): undefined reference to `RAND_bytes'
dh.c:(.text+0x57): undefined reference to `RAND_pseudo_bytes'
libssh.a(dh.c.o): In function `ssh_crypto_init':
dh.c:(.text+0x70): undefined reference to `BN_new'
dh.c:(.text+0xa6): undefined reference to `BN_set_word'
dh.c:(.text+0xab): undefined reference to `BN_new'
dh.c:(.text+0xcd): undefined reference to `BN_clear_free'
dh.c:(.text+0xfd): undefined reference to `BN_bin2bn'
dh.c:(.text+0x102): undefined reference to `BN_new'
dh.c:(.text+0x124): undefined reference to `BN_clear_free'
dh.c:(.text+0x133): undefined reference to `BN_clear_free'
dh.c:(.text+0x16b): undefined reference to `BN_bin2bn'
dh.c:(.text+0x170): undefined reference to `OPENSSL_add_all_algorithms_noconf'
libssh.a(dh.c.o): In function `ssh_crypto_finalize':
dh.c:(.text+0x19e): undefined reference to `BN_clear_free'
dh.c:(.text+0x1b8): undefined reference to `BN_clear_free'
dh.c:(.text+0x1d2): undefined reference to `BN_clear_free'
dh.c:(.text+0x1e2): undefined reference to `EVP_cleanup'
dh.c:(.text+0x1e7): undefined reference to `CRYPTO_cleanup_all_ex_data'
libssh.a(dh.c.o): In function `dh_generate_x':
dh.c:(.text+0x237): undefined reference to `BN_new'
dh.c:(.text+0x27a): undefined reference to `BN_rand'
libssh.a(dh.c.o): In function `dh_generate_y':
dh.c:(.text+0x2c9): undefined reference to `BN_new'
dh.c:(.text+0x30c): undefined reference to `BN_rand'
libssh.a(dh.c.o): In function `dh_generate_e':
dh.c:(.text+0x32a): undefined reference to `BN_CTX_new'
dh.c:(.text+0x34f): undefined reference to `BN_new'
dh.c:(.text+0x371): undefined reference to `BN_CTX_free'
dh.c:(.text+0x3c9): undefined reference to `BN_mod_exp'
dh.c:(.text+0x3d5): undefined reference to `BN_CTX_free'
libssh.a(dh.c.o): In function `dh_generate_f':
dh.c:(.text+0x3f3): undefined reference to `BN_CTX_new'
dh.c:(.text+0x418): undefined reference to `BN_new'
dh.c:(.text+0x43c): undefined reference to `BN_CTX_free'
dh.c:(.text+0x495): undefined reference to `BN_mod_exp'
dh.c:(.text+0x4a1): undefined reference to `BN_CTX_free'
libssh.a(dh.c.o): In function `dh_build_k':
dh.c:(.text+0x5d1): undefined reference to `BN_CTX_new'
dh.c:(.text+0x5f6): undefined reference to `BN_new'
dh.c:(.text+0x61a): undefined reference to `BN_CTX_free'
dh.c:(.text+0x68c): undefined reference to `BN_mod_exp'
dh.c:(.text+0x6e7): undefined reference to `BN_mod_exp'
dh.c:(.text+0x6f3): undefined reference to `BN_CTX_free'
libssh.a(ecdh.c.o): In function `ssh_client_ecdh_init':
ecdh.c:(.text+0xe): undefined reference to `BN_CTX_new'
ecdh.c:(.text+0x3f): undefined reference to `BN_CTX_free'
ecdh.c:(.text+0x53): undefined reference to `EC_KEY_new_by_curve_name'
ecdh.c:(.text+0x6a): undefined reference to `BN_CTX_free'
ecdh.c:(.text+0x80): undefined reference to `EC_KEY_get0_group'
ecdh.c:(.text+0x90): undefined reference to `EC_KEY_generate_key'
ecdh.c:(.text+0x9c): undefined reference to `EC_KEY_get0_public_key'
ecdh.c:(.text+0xc7): undefined reference to `EC_POINT_point2oct'
ecdh.c:(.text+0xee): undefined reference to `BN_CTX_free'
ecdh.c:(.text+0xfa): undefined reference to `EC_KEY_free'
ecdh.c:(.text+0x138): undefined reference to `EC_POINT_point2oct'
ecdh.c:(.text+0x144): undefined reference to `BN_CTX_free'
ecdh.c:(.text+0x173): undefined reference to `EC_KEY_free'
libssh.a(ecdh.c.o): In function `ecdh_build_k':
ecdh.c:(.text+0x20e): undefined reference to `EC_KEY_get0_group'
ecdh.c:(.text+0x21e): undefined reference to `EC_GROUP_get_degree'
ecdh.c:(.text+0x234): undefined reference to `BN_CTX_new'
ecdh.c:(.text+0x259): undefined reference to `BN_new'
ecdh.c:(.text+0x27d): undefined reference to `BN_CTX_free'
ecdh.c:(.text+0x293): undefined reference to `EC_POINT_new'
ecdh.c:(.text+0x2aa): undefined reference to `BN_CTX_free'
ecdh.c:(.text+0x313): undefined reference to `EC_POINT_oct2point'
ecdh.c:(.text+0x369): undefined reference to `EC_POINT_oct2point'
ecdh.c:(.text+0x378): undefined reference to `BN_CTX_free'
ecdh.c:(.text+0x38a): undefined reference to `EC_POINT_clear_free'
ecdh.c:(.text+0x3b8): undefined reference to `EC_POINT_clear_free'
ecdh.c:(.text+0x3ed): undefined reference to `ECDH_compute_key'
ecdh.c:(.text+0x3fc): undefined reference to `EC_POINT_clear_free'
ecdh.c:(.text+0x435): undefined reference to `BN_bin2bn'
ecdh.c:(.text+0x458): undefined reference to `EC_KEY_free'
libssh.a(ecdh.c.o): In function `ssh_server_ecdh_init':
ecdh.c:(.text+0x6a4): undefined reference to `BN_CTX_new'
ecdh.c:(.text+0x6b2): undefined reference to `EC_KEY_new_by_curve_name'
ecdh.c:(.text+0x6dc): undefined reference to `BN_CTX_free'
ecdh.c:(.text+0x6f2): undefined reference to `EC_KEY_get0_group'
ecdh.c:(.text+0x702): undefined reference to `EC_KEY_generate_key'
ecdh.c:(.text+0x70e): undefined reference to `EC_KEY_get0_public_key'
ecdh.c:(.text+0x739): undefined reference to `EC_POINT_point2oct'
ecdh.c:(.text+0x760): undefined reference to `EC_KEY_free'
ecdh.c:(.text+0x76c): undefined reference to `BN_CTX_free'
ecdh.c:(.text+0x7aa): undefined reference to `EC_POINT_point2oct'
ecdh.c:(.text+0x7b6): undefined reference to `BN_CTX_free'
libssh.a(known_hosts.c.o): In function `check_public_key':
known_hosts.c:(.text+0x48b): undefined reference to `BN_dec2bn'
known_hosts.c:(.text+0x4b6): undefined reference to `BN_num_bits'
known_hosts.c:(.text+0x4fa): undefined reference to `BN_clear_free'
known_hosts.c:(.text+0x534): undefined reference to `BN_bn2bin'
known_hosts.c:(.text+0x540): undefined reference to `BN_clear_free'
known_hosts.c:(.text+0x57b): undefined reference to `BN_clear_free'
libssh.a(libcrypto.c.o): In function `ssh_reseed':
libcrypto.c:(.text+0x6d): undefined reference to `RAND_add'
libssh.a(libcrypto.c.o): In function `sha1_init':
libcrypto.c:(.text+0xa0): undefined reference to `SHA1_Init'
libssh.a(libcrypto.c.o): In function `sha1_update':
libcrypto.c:(.text+0xd1): undefined reference to `SHA1_Update'
libssh.a(libcrypto.c.o): In function `sha1_final':
libcrypto.c:(.text+0xf7): undefined reference to `SHA1_Final'
libssh.a(libcrypto.c.o): In function `sha1':
libcrypto.c:(.text+0x141): undefined reference to `SHA1'
libssh.a(libcrypto.c.o): In function `nid_to_evpmd':
libcrypto.c:(.text+0x16c): undefined reference to `EVP_sha256'
libcrypto.c:(.text+0x173): undefined reference to `EVP_sha384'
libcrypto.c:(.text+0x17a): undefined reference to `EVP_sha512'
libssh.a(libcrypto.c.o): In function `evp':
libcrypto.c:(.text+0x1be): undefined reference to `EVP_DigestInit'
libcrypto.c:(.text+0x1d7): undefined reference to `EVP_DigestUpdate'
libcrypto.c:(.text+0x1ee): undefined reference to `EVP_DigestFinal'
libssh.a(libcrypto.c.o): In function `evp_init':
libcrypto.c:(.text+0x239): undefined reference to `EVP_DigestInit'
libssh.a(libcrypto.c.o): In function `evp_update':
libcrypto.c:(.text+0x26a): undefined reference to `EVP_DigestUpdate'
libssh.a(libcrypto.c.o): In function `evp_final':
libcrypto.c:(.text+0x298): undefined reference to `EVP_DigestFinal'
libssh.a(libcrypto.c.o): In function `sha256_init':
libcrypto.c:(.text+0x2cb): undefined reference to `SHA256_Init'
libssh.a(libcrypto.c.o): In function `sha256_update':
libcrypto.c:(.text+0x2fc): undefined reference to `SHA256_Update'
libssh.a(libcrypto.c.o): In function `sha256_final':
libcrypto.c:(.text+0x322): undefined reference to `SHA256_Final'
libssh.a(libcrypto.c.o): In function `sha256':
libcrypto.c:(.text+0x36c): undefined reference to `SHA256'
libssh.a(libcrypto.c.o): In function `sha384_init':
libcrypto.c:(.text+0x39f): undefined reference to `SHA384_Init'
libssh.a(libcrypto.c.o): In function `sha384_update':
libcrypto.c:(.text+0x3d0): undefined reference to `SHA384_Update'
libssh.a(libcrypto.c.o): In function `sha384_final':
libcrypto.c:(.text+0x3f6): undefined reference to `SHA384_Final'
libssh.a(libcrypto.c.o): In function `sha384':
libcrypto.c:(.text+0x440): undefined reference to `SHA384'
libssh.a(libcrypto.c.o): In function `sha512_init':
libcrypto.c:(.text+0x473): undefined reference to `SHA512_Init'
libssh.a(libcrypto.c.o): In function `sha512_update':
libcrypto.c:(.text+0x4a4): undefined reference to `SHA512_Update'
libssh.a(libcrypto.c.o): In function `sha512_final':
libcrypto.c:(.text+0x4ca): undefined reference to `SHA512_Final'
libssh.a(libcrypto.c.o): In function `sha512':
libcrypto.c:(.text+0x514): undefined reference to `SHA512'
libssh.a(libcrypto.c.o): In function `md5_init':
libcrypto.c:(.text+0x547): undefined reference to `MD5_Init'
libssh.a(libcrypto.c.o): In function `md5_update':
libcrypto.c:(.text+0x578): undefined reference to `MD5_Update'
libssh.a(libcrypto.c.o): In function `md5_final':
libcrypto.c:(.text+0x59e): undefined reference to `MD5_Final'
libssh.a(libcrypto.c.o): In function `hmac_init':
libcrypto.c:(.text+0x82f): undefined reference to `HMAC_CTX_init'
libcrypto.c:(.text+0x862): undefined reference to `EVP_sha1'
libcrypto.c:(.text+0x878): undefined reference to `HMAC_Init'
libcrypto.c:(.text+0x882): undefined reference to `EVP_sha256'
libcrypto.c:(.text+0x898): undefined reference to `HMAC_Init'
libcrypto.c:(.text+0x89f): undefined reference to `EVP_sha384'
libcrypto.c:(.text+0x8b5): undefined reference to `HMAC_Init'
libcrypto.c:(.text+0x8bc): undefined reference to `EVP_sha512'
libcrypto.c:(.text+0x8d2): undefined reference to `HMAC_Init'
libcrypto.c:(.text+0x8d9): undefined reference to `EVP_md5'
libcrypto.c:(.text+0x8ef): undefined reference to `HMAC_Init'
libssh.a(libcrypto.c.o): In function `hmac_update':
libcrypto.c:(.text+0x945): undefined reference to `HMAC_Update'
libssh.a(libcrypto.c.o): In function `hmac_final':
libcrypto.c:(.text+0x973): undefined reference to `HMAC_Final'
libcrypto.c:(.text+0x97f): undefined reference to `HMAC_CTX_cleanup'
libssh.a(libcrypto.c.o): In function `blowfish_set_key':
libcrypto.c:(.text+0x9ee): undefined reference to `BF_set_key'
libssh.a(libcrypto.c.o): In function `blowfish_encrypt':
libcrypto.c:(.text+0xa46): undefined reference to `BF_cbc_encrypt'
libssh.a(libcrypto.c.o): In function `blowfish_decrypt':
libcrypto.c:(.text+0xa8e): undefined reference to `BF_cbc_encrypt'
libssh.a(libcrypto.c.o): In function `aes_set_encrypt_key':
libcrypto.c:(.text+0xae8): undefined reference to `AES_set_encrypt_key'
libssh.a(libcrypto.c.o): In function `aes_set_decrypt_key':
libcrypto.c:(.text+0xb86): undefined reference to `AES_set_decrypt_key'
libssh.a(libcrypto.c.o): In function `aes_encrypt':
libcrypto.c:(.text+0xc12): undefined reference to `AES_cbc_encrypt'
libssh.a(libcrypto.c.o): In function `aes_decrypt':
libcrypto.c:(.text+0xc5a): undefined reference to `AES_cbc_encrypt'
libssh.a(libcrypto.c.o): In function `aes_ctr128_encrypt':
libcrypto.c:(.text+0xcbc): undefined reference to `AES_ctr128_encrypt'
libssh.a(libcrypto.c.o): In function `des3_set_key':
libcrypto.c:(.text+0xd22): undefined reference to `DES_set_odd_parity'
libcrypto.c:(.text+0xd32): undefined reference to `DES_set_odd_parity'
libcrypto.c:(.text+0xd42): undefined reference to `DES_set_odd_parity'
libcrypto.c:(.text+0xd59): undefined reference to `DES_set_key_unchecked'
libcrypto.c:(.text+0xd7b): undefined reference to `DES_set_key_unchecked'
libcrypto.c:(.text+0xd9d): undefined reference to `DES_set_key_unchecked'
libssh.a(libcrypto.c.o): In function `des3_encrypt':
libcrypto.c:(.text+0xe0d): undefined reference to `DES_ede3_cbc_encrypt'
libssh.a(libcrypto.c.o): In function `des3_decrypt':
libcrypto.c:(.text+0xe71): undefined reference to `DES_ede3_cbc_encrypt'
libssh.a(libcrypto.c.o): In function `des3_1_encrypt':
libcrypto.c:(.text+0xebd): undefined reference to `DES_ncbc_encrypt'
libcrypto.c:(.text+0xef5): undefined reference to `DES_ncbc_encrypt'
libcrypto.c:(.text+0xf2d): undefined reference to `DES_ncbc_encrypt'
libssh.a(libcrypto.c.o): In function `des3_1_decrypt':
libcrypto.c:(.text+0xf7c): undefined reference to `DES_ncbc_encrypt'
libcrypto.c:(.text+0xfb4): undefined reference to `DES_ncbc_encrypt'
libssh.a(libcrypto.c.o):libcrypto.c:(.text+0xfe5): more undefined references to `DES_ncbc_encrypt' follow
libssh.a(libcrypto.c.o): In function `des1_set_key':
libcrypto.c:(.text+0x102c): undefined reference to `DES_set_odd_parity'
libcrypto.c:(.text+0x1043): undefined reference to `DES_set_key_unchecked'
libssh.a(libcrypto.c.o): In function `des1_1_encrypt':
libcrypto.c:(.text+0x109b): undefined reference to `DES_ncbc_encrypt'
libssh.a(libcrypto.c.o): In function `des1_1_decrypt':
libcrypto.c:(.text+0x10e3): undefined reference to `DES_ncbc_encrypt'
libssh.a(pki.c.o): In function `ssh_key_clean':
pki.c:(.text+0x196): undefined reference to `DSA_free'
pki.c:(.text+0x1b3): undefined reference to `RSA_free'
pki.c:(.text+0x1d0): undefined reference to `EC_KEY_free'
libssh.a(pki.c.o): In function `ssh_signature_free':
pki.c:(.text+0x6b7): undefined reference to `DSA_SIG_free'
pki.c:(.text+0x6f4): undefined reference to `ECDSA_SIG_free'
libssh.a(threads.c.o): In function `libcrypto_thread_init':
threads.c:(.text+0x9c): undefined reference to `CRYPTO_num_locks'
threads.c:(.text+0x133): undefined reference to `CRYPTO_set_id_callback'
threads.c:(.text+0x13f): undefined reference to `CRYPTO_set_locking_callback'
libssh.a(threads.c.o): In function `libcrypto_thread_finalize':
threads.c:(.text+0x153): undefined reference to `CRYPTO_num_locks'
libssh.a(wrapper.c.o): In function `crypto_free':
wrapper.c:(.text+0x2a4): undefined reference to `BN_clear_free'
wrapper.c:(.text+0x2b4): undefined reference to `BN_clear_free'
wrapper.c:(.text+0x2c4): undefined reference to `BN_clear_free'
wrapper.c:(.text+0x2d4): undefined reference to `BN_clear_free'
wrapper.c:(.text+0x2e4): undefined reference to `BN_clear_free'
wrapper.c:(.text+0x353): undefined reference to `EC_KEY_free'
wrapper.c:(.text+0x44c): undefined reference to `deflateEnd'
wrapper.c:(.text+0x463): undefined reference to `inflateEnd'
wrapper.c:(.text+0x4b8): undefined reference to `deflateEnd'
wrapper.c:(.text+0x4cf): undefined reference to `inflateEnd'
libssh.a(pki_crypto.c.o): In function `pki_key_ecdsa_to_nid':
pki_crypto.c:(.text+0xac): undefined reference to `EC_KEY_get0_group'
pki_crypto.c:(.text+0xbc): undefined reference to `EC_GROUP_get_curve_name'
libssh.a(pki_crypto.c.o): In function `make_ecpoint_string':
pki_crypto.c:(.text+0x1fd): undefined reference to `EC_POINT_point2oct'
pki_crypto.c:(.text+0x26f): undefined reference to `EC_POINT_point2oct'
libssh.a(pki_crypto.c.o): In function `pki_pubkey_build_ecdsa':
pki_crypto.c:(.text+0x2e4): undefined reference to `EC_KEY_new_by_curve_name'
pki_crypto.c:(.text+0x316): undefined reference to `EC_KEY_get0_group'
pki_crypto.c:(.text+0x326): undefined reference to `EC_POINT_new'
pki_crypto.c:(.text+0x372): undefined reference to `EC_POINT_oct2point'
pki_crypto.c:(.text+0x387): undefined reference to `EC_POINT_free'
pki_crypto.c:(.text+0x3a5): undefined reference to `EC_KEY_set_public_key'
pki_crypto.c:(.text+0x3b4): undefined reference to `EC_POINT_free'
libssh.a(pki_crypto.c.o): In function `pki_key_dup':
pki_crypto.c:(.text+0x46b): undefined reference to `DSA_new'
pki_crypto.c:(.text+0x4a3): undefined reference to `BN_dup'
pki_crypto.c:(.text+0x4d8): undefined reference to `BN_dup'
pki_crypto.c:(.text+0x50d): undefined reference to `BN_dup'
pki_crypto.c:(.text+0x542): undefined reference to `BN_dup'
pki_crypto.c:(.text+0x593): undefined reference to `BN_dup'
pki_crypto.c:(.text+0x5b6): undefined reference to `RSA_new'
pki_crypto.c:(.text+0x5ee): undefined reference to `BN_dup'
pki_crypto.c:(.text+0x623): undefined reference to `BN_dup'
pki_crypto.c:(.text+0x674): undefined reference to `BN_dup'
pki_crypto.c:(.text+0x6ba): undefined reference to `BN_dup'
pki_crypto.c:(.text+0x700): undefined reference to `BN_dup'
libssh.a(pki_crypto.c.o):pki_crypto.c:(.text+0x746): more undefined references to `BN_dup' follow
libssh.a(pki_crypto.c.o): In function `pki_key_dup':
pki_crypto.c:(.text+0x826): undefined reference to `EC_KEY_new_by_curve_name'
pki_crypto.c:(.text+0x852): undefined reference to `EC_KEY_get0_public_key'
pki_crypto.c:(.text+0x878): undefined reference to `EC_KEY_set_public_key'
pki_crypto.c:(.text+0x896): undefined reference to `EC_KEY_dup'
libssh.a(pki_crypto.c.o): In function `pki_key_generate_rsa':
pki_crypto.c:(.text+0x93b): undefined reference to `BN_new'
pki_crypto.c:(.text+0x944): undefined reference to `RSA_new'
pki_crypto.c:(.text+0x960): undefined reference to `BN_set_word'
pki_crypto.c:(.text+0x97c): undefined reference to `RSA_generate_key_ex'
pki_crypto.c:(.text+0x98b): undefined reference to `BN_free'
libssh.a(pki_crypto.c.o): In function `pki_key_generate_dss':
pki_crypto.c:(.text+0x9e6): undefined reference to `DSA_generate_parameters'
pki_crypto.c:(.text+0xa19): undefined reference to `DSA_generate_key'
pki_crypto.c:(.text+0xa32): undefined reference to `DSA_free'
libssh.a(pki_crypto.c.o): In function `pki_key_generate_ecdsa':
pki_crypto.c:(.text+0xaba): undefined reference to `EC_KEY_new_by_curve_name'
pki_crypto.c:(.text+0xae9): undefined reference to `EC_KEY_generate_key'
pki_crypto.c:(.text+0xb02): undefined reference to `EC_KEY_free'
pki_crypto.c:(.text+0xb1e): undefined reference to `EC_KEY_set_asn1_flag'
libssh.a(pki_crypto.c.o): In function `pki_key_compare':
pki_crypto.c:(.text+0xb75): undefined reference to `DSA_size'
pki_crypto.c:(.text+0xb87): undefined reference to `DSA_size'
pki_crypto.c:(.text+0xbb8): undefined reference to `BN_cmp'
pki_crypto.c:(.text+0xbe9): undefined reference to `BN_cmp'
pki_crypto.c:(.text+0xc1a): undefined reference to `BN_cmp'
pki_crypto.c:(.text+0xc4b): undefined reference to `BN_cmp'
pki_crypto.c:(.text+0xc86): undefined reference to `BN_cmp'
pki_crypto.c:(.text+0xca8): undefined reference to `RSA_size'
pki_crypto.c:(.text+0xcba): undefined reference to `RSA_size'
pki_crypto.c:(.text+0xceb): undefined reference to `BN_cmp'
pki_crypto.c:(.text+0xd1c): undefined reference to `BN_cmp'
pki_crypto.c:(.text+0xd57): undefined reference to `BN_cmp'
pki_crypto.c:(.text+0xd88): undefined reference to `BN_cmp'
pki_crypto.c:(.text+0xdaa): undefined reference to `EC_KEY_get0_public_key'
pki_crypto.c:(.text+0xdbe): undefined reference to `EC_KEY_get0_public_key'
pki_crypto.c:(.text+0xdd2): undefined reference to `EC_KEY_get0_group'
pki_crypto.c:(.text+0xde6): undefined reference to `EC_KEY_get0_group'
pki_crypto.c:(.text+0xe1a): undefined reference to `EC_GROUP_cmp'
pki_crypto.c:(.text+0xe3e): undefined reference to `EC_POINT_cmp'
pki_crypto.c:(.text+0xe5f): undefined reference to `EC_KEY_get0_private_key'
pki_crypto.c:(.text+0xe72): undefined reference to `EC_KEY_get0_private_key'
pki_crypto.c:(.text+0xe7d): undefined reference to `BN_cmp'
libssh.a(pki_crypto.c.o): In function `pki_private_key_to_pem':
pki_crypto.c:(.text+0xed2): undefined reference to `BIO_s_mem'
pki_crypto.c:(.text+0xeda): undefined reference to `BIO_new'
pki_crypto.c:(.text+0xf6c): undefined reference to `PEM_write_bio_DSAPrivateKey'
pki_crypto.c:(.text+0xfa6): undefined reference to `PEM_write_bio_DSAPrivateKey'
pki_crypto.c:(.text+0x1007): undefined reference to `PEM_write_bio_RSAPrivateKey'
pki_crypto.c:(.text+0x1041): undefined reference to `PEM_write_bio_RSAPrivateKey'
pki_crypto.c:(.text+0x10a2): undefined reference to `PEM_write_bio_ECPrivateKey'
pki_crypto.c:(.text+0x10dc): undefined reference to `PEM_write_bio_ECPrivateKey'
pki_crypto.c:(.text+0x10fa): undefined reference to `BIO_free'
pki_crypto.c:(.text+0x112d): undefined reference to `BIO_free'
pki_crypto.c:(.text+0x1180): undefined reference to `BIO_ctrl'
pki_crypto.c:(.text+0x11c4): undefined reference to `BIO_free'
pki_crypto.c:(.text+0x11d7): undefined reference to `BIO_free'
libssh.a(pki_crypto.c.o): In function `pki_private_key_from_base64':
pki_crypto.c:(.text+0x127e): undefined reference to `BIO_new_mem_buf'
pki_crypto.c:(.text+0x12ed): undefined reference to `PEM_read_bio_DSAPrivateKey'
pki_crypto.c:(.text+0x130e): undefined reference to `PEM_read_bio_DSAPrivateKey'
pki_crypto.c:(.text+0x1331): undefined reference to `PEM_read_bio_DSAPrivateKey'
pki_crypto.c:(.text+0x1341): undefined reference to `BIO_free'
pki_crypto.c:(.text+0x1351): undefined reference to `ERR_get_error'
pki_crypto.c:(.text+0x135e): undefined reference to `ERR_error_string'
pki_crypto.c:(.text+0x13c5): undefined reference to `PEM_read_bio_RSAPrivateKey'
pki_crypto.c:(.text+0x13e6): undefined reference to `PEM_read_bio_RSAPrivateKey'
pki_crypto.c:(.text+0x1409): undefined reference to `PEM_read_bio_RSAPrivateKey'
pki_crypto.c:(.text+0x1419): undefined reference to `BIO_free'
pki_crypto.c:(.text+0x1429): undefined reference to `ERR_get_error'
pki_crypto.c:(.text+0x1436): undefined reference to `ERR_error_string'
pki_crypto.c:(.text+0x149d): undefined reference to `PEM_read_bio_ECPrivateKey'
pki_crypto.c:(.text+0x14be): undefined reference to `PEM_read_bio_ECPrivateKey'
pki_crypto.c:(.text+0x14e1): undefined reference to `PEM_read_bio_ECPrivateKey'
pki_crypto.c:(.text+0x14f1): undefined reference to `BIO_free'
pki_crypto.c:(.text+0x14fd): undefined reference to `ERR_get_error'
pki_crypto.c:(.text+0x150a): undefined reference to `ERR_error_string'
pki_crypto.c:(.text+0x1540): undefined reference to `BIO_free'
pki_crypto.c:(.text+0x163c): undefined reference to `DSA_free'
pki_crypto.c:(.text+0x1648): undefined reference to `RSA_free'
pki_crypto.c:(.text+0x1654): undefined reference to `EC_KEY_free'
libssh.a(pki_crypto.c.o): In function `pki_pubkey_build_dss':
pki_crypto.c:(.text+0x167d): undefined reference to `DSA_new'
pki_crypto.c:(.text+0x1753): undefined reference to `DSA_free'
libssh.a(pki_crypto.c.o): In function `pki_pubkey_build_rsa':
pki_crypto.c:(.text+0x1780): undefined reference to `RSA_new'
pki_crypto.c:(.text+0x1801): undefined reference to `RSA_free'
libssh.a(pki_crypto.c.o): In function `pki_publickey_to_blob':
pki_crypto.c:(.text+0x1c6f): undefined reference to `EC_KEY_get0_public_key'
pki_crypto.c:(.text+0x1c82): undefined reference to `EC_KEY_get0_group'
libssh.a(pki_crypto.c.o): In function `pki_export_pubkey_rsa1':
pki_crypto.c:(.text+0x1e80): undefined reference to `RSA_size'
pki_crypto.c:(.text+0x1e97): undefined reference to `BN_bn2dec'
pki_crypto.c:(.text+0x1ec0): undefined reference to `BN_bn2dec'
pki_crypto.c:(.text+0x1ed7): undefined reference to `CRYPTO_free'
pki_crypto.c:(.text+0x1f2c): undefined reference to `CRYPTO_free'
pki_crypto.c:(.text+0x1f38): undefined reference to `CRYPTO_free'
libssh.a(pki_crypto.c.o): In function `_RSA_do_sign':
pki_crypto.c:(.text+0x1f5e): undefined reference to `RSA_size'
pki_crypto.c:(.text+0x1fa3): undefined reference to `RSA_sign'
libssh.a(pki_crypto.c.o): In function `pki_signature_from_rsa_blob':
pki_crypto.c:(.text+0x2508): undefined reference to `RSA_size'
libssh.a(pki_crypto.c.o): In function `pki_signature_from_blob':
pki_crypto.c:(.text+0x2716): undefined reference to `DSA_SIG_new'
pki_crypto.c:(.text+0x289e): undefined reference to `ECDSA_SIG_new'
libssh.a(pki_crypto.c.o): In function `pki_signature_verify':
pki_crypto.c:(.text+0x2bae): undefined reference to `DSA_do_verify'
pki_crypto.c:(.text+0x2bc0): undefined reference to `ERR_get_error'
pki_crypto.c:(.text+0x2bcd): undefined reference to `ERR_error_string'
pki_crypto.c:(.text+0x2c4c): undefined reference to `RSA_verify'
pki_crypto.c:(.text+0x2c5e): undefined reference to `ERR_get_error'
pki_crypto.c:(.text+0x2c6b): undefined reference to `ERR_error_string'
pki_crypto.c:(.text+0x2d14): undefined reference to `ECDSA_do_verify'
pki_crypto.c:(.text+0x2d22): undefined reference to `ERR_get_error'
pki_crypto.c:(.text+0x2d2f): undefined reference to `ERR_error_string'
libssh.a(pki_crypto.c.o): In function `pki_do_sign':
pki_crypto.c:(.text+0x2e3b): undefined reference to `DSA_do_sign'
pki_crypto.c:(.text+0x2ee4): undefined reference to `ECDSA_do_sign'
libssh.a(pki_crypto.c.o): In function `pki_do_sign_sessionid':
pki_crypto.c:(.text+0x2ff1): undefined reference to `DSA_do_sign'
pki_crypto.c:(.text+0x3086): undefined reference to `ECDSA_do_sign'
libssh.a(gzip.c.o): In function `initcompress':
gzip.c:(.text+0x63): undefined reference to `deflateInit_'
libssh.a(gzip.c.o): In function `gzip_compress':
gzip.c:(.text+0x232): undefined reference to `deflate'
libssh.a(gzip.c.o): In function `initdecompress':
gzip.c:(.text+0x458): undefined reference to `inflateInit_'
libssh.a(gzip.c.o): In function `gzip_decompress':
gzip.c:(.text+0x620): undefined reference to `inflate'
libssh.a(bignum.c.o): In function `make_bignum_string':
bignum.c:(.text+0x23): undefined reference to `BN_num_bits'
bignum.c:(.text+0x40): undefined reference to `BN_num_bits'
bignum.c:(.text+0x70): undefined reference to `BN_is_bit_set'
bignum.c:(.text+0xc9): undefined reference to `BN_bn2bin'
libssh.a(bignum.c.o): In function `make_string_bn':
bignum.c:(.text+0x10c): undefined reference to `BN_bin2bn'
libssh.a(bignum.c.o): In function `make_string_bn_inplace':
bignum.c:(.text+0x14e): undefined reference to `BN_bin2bn'
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

Reply via email to