Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 592466

Summary: dev-vcs/git with >=dev-libs/openssl-1.1.0 - imap-send.c:(.text+0x14ce): undefined reference to `SSL_library_init'
Product: Gentoo Linux Reporter: Lars Wendler (Polynomial-C) (RETIRED) <polynomial-c>
Component: Current packagesAssignee: Robin Johnson <robbat2>
Status: RESOLVED FIXED    
Severity: normal CC: candrews, chutzpah, erikdenstore+gbugs, gentoo_bugs_peep, herrtimson, quentin
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: http://www.spinics.net/lists/git/msg272675.html
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 592438, 669514    
Attachments: build.log
0001-imap-send.c-Avoid-deprecated-openssl-1.1.0-API.patch

Description Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2016-08-30 18:41:57 UTC
Created attachment 444478 [details]
build.log

x86_64-pc-linux-gnu-gcc -o http.o -c -MF ./.depend/http.o.d -MQ http.o -MMD -MP  -march=native -mtune=native -O2 -pipe -Wall -I. -DUSE_LIBPCRE -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND  -DHAVE_PATHS_H -DHAVE_DEV_TTY -DXDL_FAST_HASH -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM -DSHA1_HEADER='"block-sha1/sha1.h"'  -DNO_STRLCPY -DNO_MKSTEMPS -DSHELL_PATH='"/bin/sh"'  http.c
x86_64-pc-linux-gnu-gcc  -march=native -mtune=native -O2 -pipe -Wall -I. -DUSE_LIBPCRE -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND  -DHAVE_PATHS_H -DHAVE_DEV_TTY -DXDL_FAST_HASH -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM -DSHA1_HEADER='"block-sha1/sha1.h"'  -DNO_STRLCPY -DNO_MKSTEMPS -DSHELL_PATH='"/bin/sh"' -o git-imap-send -Wl,-O1 -Wl,--hash-style=gnu -Wl,--sort-common -Wl,--as-needed  imap-send.o http.o \
        libgit.a xdiff/lib.a  -lpcre -lz -lpthread -lrt  -lcurl  -lssl  -lcrypto
imap-send.o: In function `ssl_socket_connect':
imap-send.c:(.text+0x14ce): undefined reference to `SSL_library_init'
imap-send.c:(.text+0x14d5): undefined reference to `SSL_load_error_strings'
collect2: error: ld returned 1 exit status
make: *** [Makefile:2029: git-imap-send] Error 1
Comment 1 Craig Andrews gentoo-dev 2016-12-19 03:37:56 UTC
git 2.8.3 and later work with OpenSSL 1.1.0: https://public-inbox.org/git/xmqqh9duj5vi.fsf@gitster.mtv.corp.google.com/

This issue should be marked Resolved/Fixed.
Comment 2 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2016-12-19 07:40:55 UTC
Fixed since >=dev-vcs/git-2.8.3
Comment 3 eroen 2017-01-12 09:23:09 UTC
(In reply to Lars Wendler (Polynomial-C) from comment #2)
> Fixed since >=dev-vcs/git-2.8.3

No, it's not. dev-vcs/git-2.11.0 with dev-libs/openssl-1.1.0c still does this:

x86_64-pc-linux-gnu-gcc -o imap-send.o -c -MF ./.depend/imap-send.o.d -MQ imap-send.o -MMD -MP  -O0 -g -Wall -I. -DUSE_LIBPCRE -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_GETTEXT  -DHAVE_PATHS_H -DHAVE_DEV_TTY -DXDL_FAST_HASH -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM -DSHA1_HEADER='"block-sha1/sha1.h"'  -DNO_STRLCPY -DNO_MKSTEMPS -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"'  imap-send.c
imap-send.c: In function 'ssl_socket_connect':
imap-send.c:287:2: warning: implicit declaration of function 'SSL_library_init' [-Wimplicit-function-declaration]
  SSL_library_init();
  ^~~~~~~~~~~~~~~~
imap-send.c:288:2: warning: implicit declaration of function 'SSL_load_error_strings' [-Wimplicit-function-declaration]
  SSL_load_error_strings();
  ^~~~~~~~~~~~~~~~~~~~~~
x86_64-pc-linux-gnu-gcc -o http.o -c -MF ./.depend/http.o.d -MQ http.o -MMD -MP  -O0 -g -Wall -I. -DUSE_LIBPCRE -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_GETTEXT  -DHAVE_PATHS_H -DHAVE_DEV_TTY -DXDL_FAST_HASH -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM -DSHA1_HEADER='"block-sha1/sha1.h"'  -DNO_STRLCPY -DNO_MKSTEMPS -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"'  http.c
x86_64-pc-linux-gnu-gcc  -O0 -g -Wall -I. -DUSE_LIBPCRE -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_GETTEXT  -DHAVE_PATHS_H -DHAVE_DEV_TTY -DXDL_FAST_HASH -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM -DSHA1_HEADER='"block-sha1/sha1.h"'  -DNO_STRLCPY -DNO_MKSTEMPS -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' -o git-imap-send -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu  imap-send.o http.o common-main.o \
	libgit.a xdiff/lib.a  -lpcre -lz -lpthread -lrt  -lcurl  -lssl  -lcrypto
/usr/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: warning: libssl.so.1.0.0, needed by /usr/lib64/libssh2.so.1, may conflict with libssl.so.1.1
/usr/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: imap-send.o: undefined reference to symbol 'SSL_load_error_strings'
/usr/lib64/libssl.so.1.0.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make: *** [Makefile:2082: git-imap-send] Error 1
Comment 4 eroen 2017-01-12 14:37:13 UTC
Created attachment 459778 [details, diff]
0001-imap-send.c-Avoid-deprecated-openssl-1.1.0-API.patch

I submitted a patch[0] to upstream's mailing list. The modified file (imap-send.c) has not been modified between (at least) the 2.11.0 release and current stable/master/next head, so it should be possible to apply in ebuild.

0: http://www.spinics.net/lists/git/msg293532.html
Comment 5 Craig Andrews gentoo-dev 2018-04-13 18:08:24 UTC
imap-send.c still doesn't have this change as of git's current master.

Can someone please talk to the git project and get this patch in?
Comment 6 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2018-09-29 16:42:46 UTC
I cannot reproduce this issue with openssl-1.1* on any of my test systems. Closing this bug.