reindeer icon indicating copy to clipboard operation
reindeer copied to clipboard

SSL linking problems when building

Open gl-yziquel opened this issue 1 year ago • 2 comments

Hi.

I just tried to build reindeer as I wish to use ocamlrep. I got linking problems when trying to build it out of the box on ubuntu 23.04.

  = note: /usr/bin/ld: /home/mini-me/home/cellar/reindeer/target/debug/deps/liblibgit2_sys-18f7effd1c8d5dbd.rlib(openssl.o): in function `openssl_init':                                                                                      
          /home/mini-me/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libgit2-sys-0.13.4+1.4.2/libgit2/src/libgit2/streams/openssl.c:145: undefined reference to `SSL_CTX_ctrl'                                                        
          /usr/bin/ld: /home/yziquel/home/cellar/reindeer/target/debug/deps/liblibgit2_sys-18f7effd1c8d5dbd.rlib(openssl.o): in function `verify_server_cert':                                                                                
          /home/mini-me/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libgit2-sys-0.13.4+1.4.2/libgit2/src/libgit2/streams/openssl.c:401: undefined reference to `SSL_get1_peer_certificate'                                           
          /usr/bin/ld: /home/yziquel/home/cellar/reindeer/target/debug/deps/liblibgit2_sys-18f7effd1c8d5dbd.rlib(openssl.o): in function `openssl_connect':                                                                                   
          /home/mini-me/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libgit2-sys-0.13.4+1.4.2/libgit2/src/libgit2/streams/openssl.c:531: undefined reference to `SSL_ctrl'                                                            
          /usr/bin/ld: /home/yziquel/home/cellar/reindeer/target/debug/deps/liblibgit2_sys-18f7effd1c8d5dbd.rlib(openssl.o): in function `openssl_certificate':                                                                               
          /home/mini-me/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libgit2-sys-0.13.4+1.4.2/libgit2/src/libgit2/streams/openssl.c:545: undefined reference to `SSL_get1_peer_certificate'                                           
          /usr/bin/ld: /home/mini-me/home/cellar/reindeer/target/debug/deps/liblibssh2_sys-6611c950b2ef2b16.rlib(openssl.o): in function `_libssh2_ed25519_new_private_frommemory':                                                           
          /home/mini-me/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libssh2-sys-0.2.23/libssh2/src/openssl.c:1835: undefined reference to `EVP_PKEY_get_id'                                                                          
          /usr/bin/ld: /home/mini-me/home/cellar/reindeer/target/debug/deps/liblibssh2_sys-6611c950b2ef2b16.rlib(openssl.o): in function `_libssh2_pub_priv_keyfile':                                                                         
          /home/mini-me/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libssh2-sys-0.2.23/libssh2/src/openssl.c:3001: undefined reference to `EVP_PKEY_get_id'                                                                          
          /usr/bin/ld: /home/mini-me/home/cellar/reindeer/target/debug/deps/liblibssh2_sys-6611c950b2ef2b16.rlib(openssl.o): in function `_libssh2_pub_priv_keyfilememory':                                                                   
          /home/mini-me/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libssh2-sys-0.2.23/libssh2/src/openssl.c:3211: undefined reference to `EVP_PKEY_get_id'                                                                          
          /usr/bin/ld: /home/mini-me/home/cellar/reindeer/target/debug/deps/liblibssh2_sys-6611c950b2ef2b16.rlib(mac.o): in function `mac_method_hmac_ripemd160_hash':                                                                        
          /home/mini-me/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libssh2-sys-0.2.23/libssh2/src/mac.c:354: undefined reference to `EVP_ripemd160'                                                                                 
          /usr/bin/ld: /home/mini-me/home/cellar/reindeer/target/debug/deps/liblibssh2_sys-6611c950b2ef2b16.rlib(crypt.o):(.data.rel.ro.libssh2_crypt_method_blowfish_cbc+0x40): undefined reference to `EVP_bf_cbc'                          
          /usr/bin/ld: /home/mini-me/home/cellar/reindeer/target/debug/deps/liblibssh2_sys-6611c950b2ef2b16.rlib(crypt.o):(.data.rel.ro.libssh2_crypt_method_cast128_cbc+0x40): undefined reference to `EVP_cast5_cbc'                        
          collect2: error: ld returned 1 exit status                                                                                                                                                                   

gl-yziquel avatar Jan 08 '24 10:01 gl-yziquel

thanks for taking the time to file this issue!

unfortunately, it doesn't appear to be reindeer specific or actionable though. it would more likely be better raised on the git2-rs issue tracker (and/or potentially on the rust-openssl issue tracker).

shayne-fletcher avatar Jan 11 '24 18:01 shayne-fletcher

Hmmmmh.... I indeed experience some failures building git2-rs from git source: it claims it cannot find the libgit2 native library, even though it is installed on my system via ubuntu packages.

I unfortunately do not have the time to multitask back to this at the moment. Which is a shame.

gl-yziquel avatar Jan 12 '24 11:01 gl-yziquel