openssl3下编译git报错

报错内容:

    LINK git-imap-send
imap-send.o: In function `verify_hostname':
/opt/tmp/git-2.37.0/imap-send.c:242: undefined reference to `OPENSSL_sk_num'
/opt/tmp/git-2.37.0/imap-send.c:244: undefined reference to `OPENSSL_sk_value'
/opt/tmp/git-2.37.0/imap-send.c:250: undefined reference to `OPENSSL_sk_pop_free'
/opt/tmp/git-2.37.0/imap-send.c:250: undefined reference to `OPENSSL_sk_pop_free'
imap-send.o: In function `ssl_socket_connect':
/opt/tmp/git-2.37.0/imap-send.c:277: undefined reference to `OPENSSL_init_ssl'
/opt/tmp/git-2.37.0/imap-send.c:278: undefined reference to `OPENSSL_init_ssl'
/opt/tmp/git-2.37.0/imap-send.c:280: undefined reference to `TLS_method'
/opt/tmp/git-2.37.0/imap-send.c:335: undefined reference to `SSL_get1_peer_certificate'
/opt/tmp/git-2.37.0/imap-send.c:293: undefined reference to `SSL_CTX_set_options'
collect2: error: ld returned 1 exit status
make: *** [git-imap-send] Error 1

openssl编译安装过程:Centos7 升级openssl 3.0.2

编译前需要添加openssl LIB的目录

export LDFLAGS=-L/usr/local/lib64/

后面正常执行

./configure
make 
make install

https://stackoverflow.com/questions/72865669/compile-error-in-git-imap-send-o-in-function-verify-hostname

你可能感兴趣的:(openssl3下编译git报错)