Bug 231599 - net/mpd5: Fails to build with OpenSSL 1.1.1
Summary: net/mpd5: Fails to build with OpenSSL 1.1.1
Status: Closed Works As Intended
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Eugene Grosbein
URL:
Keywords:
: 231622 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-09-22 18:41 UTC by hunreal
Modified: 2018-09-23 09:52 UTC (History)
1 user (show)

See Also:
eugen: maintainer-feedback+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description hunreal 2018-09-22 18:41:16 UTC
net/mpd5 fails to build with security/openssl111

http_server.o: In function `http_server_start':
/usr/ports/net/mpd5/work/mpd-5.8/src/contrib/libpdel/http/http_server.c:200: undefined reference to `TLS_server_method'
http_ssl.o: In function `http_ssl_do_init':
/usr/ports/net/mpd5/work/mpd-5.8/src/contrib/libpdel/http/http_ssl.c:68: undefined reference to `OPENSSL_init_ssl'
/usr/ports/net/mpd5/work/mpd-5.8/src/contrib/libpdel/http/http_ssl.c:69: undefined reference to `OPENSSL_init_ssl'
cc: error: linker command failed with exit code 1 (use -v to see invocation)
Comment 1 commit-hook freebsd_committer freebsd_triage 2018-09-22 23:19:49 UTC
A commit references this bug:

Author: eugen
Date: Sat Sep 22 23:19:41 UTC 2018
New revision: 480436
URL: https://svnweb.freebsd.org/changeset/ports/480436

Log:
  net/mpd5: mark broken with openssl111 for a moment

  mpd5 successfully compiles with openssl-devel or openssl111
  but cannot be linked because it links with base system libfetch(3)
  that currently links with /usr/lib/libssl.so.8 (openssl 1.0.2p-freebsd).

  So, one should not attempt to build mpd5 with newer openssl version
  until it's imported to base system so mpd5 won't link with two distinct
  openssl versions.

  PR:		231599

Changes:
  head/net/mpd5/Makefile
Comment 2 Eugene Grosbein freebsd_committer freebsd_triage 2018-09-22 23:21:45 UTC
Added BROKEN_SSL=openssl111 and BROKEN_SSL_REASON_openssl111.
Thanks for the report!
Comment 3 hunreal 2018-09-23 04:29:15 UTC
Why not force mpd5 use base header?

--- src/Makefile.orig   2018-09-23 12:23:20.092305000 +0800
+++ src/Makefile        2018-09-23 12:23:30.335158000 +0800
@@ -136,7 +136,7 @@
                -Wpointer-arith \
                -Wwrite-strings \
                -pthread \
-               -I${PREFIX}/include
+               -I/usr/include
 
 .if defined ( MPD_VENDOR )
 COPTS+=                -DMPD_VENDOR='"${MPD_VENDOR}"'
Comment 4 Eugene Grosbein freebsd_committer freebsd_triage 2018-09-23 09:03:02 UTC
(In reply to hunreal from comment #3)

It would be wrong to compile with headers of old openssl version and link with newer one.
Comment 5 hunreal 2018-09-23 09:05:28 UTC
# ldd /usr/local/sbin/mpd5
/usr/local/sbin/mpd5:
        libwrap.so.6 => /usr/lib/libwrap.so.6 (0x8008c7000)
        libpam.so.6 => /usr/lib/libpam.so.6 (0x800ad0000)
        libcrypt.so.5 => /lib/libcrypt.so.5 (0x800cdd000)
        libnetgraph.so.4 => /usr/lib/libnetgraph.so.4 (0x800efc000)
        libutil.so.9 => /lib/libutil.so.9 (0x801100000)
        libradius.so.4 => /usr/lib/libradius.so.4 (0x801314000)
        libssl.so.8 => /usr/lib/libssl.so.8 (0x80151b000)
        libpcap.so.8 => /lib/libpcap.so.8 (0x80178e000)
        libfetch.so.6 => /usr/lib/libfetch.so.6 (0x8019ea000)
        libcrypto.so.8 => /lib/libcrypto.so.8 (0x801c00000)
        libexecinfo.so.1 => /usr/lib/libexecinfo.so.1 (0x80206f000)
        libthr.so.3 => /lib/libthr.so.3 (0x802272000)
        libc.so.7 => /lib/libc.so.7 (0x80249a000)
        libelf.so.2 => /lib/libelf.so.2 (0x802856000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x802a6d000)
Comment 6 Eugene Grosbein freebsd_committer freebsd_triage 2018-09-23 09:11:34 UTC
(In reply to hunreal from comment #5)

You see, it is really linked with /usr/lib/libssl.so.8 that is base system openssl 1.0.2p-freebsd, and not newer one.

It is possible to link it with /usr/local/lib/libssl.so forcebly, but then it will link with both of them same time because /usr/lib/libfetch.so.6 requires /usr/lib/libssl.so.8

And linking same time with two version of openssl is wrong.
Comment 7 hunreal 2018-09-23 09:15:57 UTC
I think it can be force mpd5 to build with base system headers, also link with base system openssl 1.0.2p library. Don't check openssl version in ports.
Comment 8 Eugene Grosbein freebsd_committer freebsd_triage 2018-09-23 09:25:00 UTC
(In reply to hunreal from comment #7)

It compiles and links with base system openssl includes and libraries by default.
Comment 9 Eugene Grosbein freebsd_committer freebsd_triage 2018-09-23 09:52:31 UTC
*** Bug 231622 has been marked as a duplicate of this bug. ***