Bug 242988 - irc/eggdrop: Fails to link with libressl (any non-Base OpenSSL)
Summary: irc/eggdrop: Fails to link with libressl (any non-Base OpenSSL)
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Danilo G. Baio
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-12-30 18:37 UTC by wcarson.bugzilla
Modified: 2020-01-04 19:43 UTC (History)
2 users (show)

See Also:
dbaio: maintainer-feedback+
dbaio: merge-quarterly+


Attachments
Patch to support other versions of OpenSSL/LibreSSL (483 bytes, patch)
2019-12-31 07:24 UTC, wcarson.bugzilla
wcarson.bugzilla: maintainer-approval?
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description wcarson.bugzilla 2019-12-30 18:37:18 UTC
Using FreeBSD 12.1-RELEASE-p1, I was getting linker errors with DEFAULT_VERSIONS+=ssl=libressl set when trying to build either irc/eggdrop or irc/eggdrop-devel. I noticed in the config summary it detected OpenSSL and not LibreSSL:

"SSL/TLS Support: yes (OpenSSL 1.1.1d-freebsd  10 Sep 2019)"

Here is the specific log: 

    ---------- Yeah! That's the compiling, now the linking! ----------

    Linking eggdrop (standard build).

    cc -O2 -pipe  -fstack-protector-strong -fno-strict-aliasing  -pipe -Wall -I.. -I.. -I/usr/local/include/openssl -DHAVE_CONFIG_H  -o ../eggdrop bg.o botcmd.o botmsg.o botnet.o chanprog.o cmds.o dcc.o  dccutil.o dns.o flags.o language.o match.o main.o mem.o misc.o misc_file.o  modules.o net.o rfc1459.o tcl.o tcldcc.o tclhash.o tclmisc.o tcluser.o  tls.o userent.o userrec.o users.o  -L/usr/local/lib -L/usr/local/lib -ltcl86 -lm -lpthread -lz -lssl -lcrypto md5/md5c.o compat/*.o `cat mod/mod.xlibs`
    ld: error: undefined symbol: SSL_is_init_finished
    >>> referenced by net.c
    >>>               net.o:(sockread)

    ld: error: undefined symbol: SSL_is_init_finished
    >>> referenced by net.c
    >>>               net.o:(sockread)

    ld: error: undefined symbol: OPENSSL_hexstr2buf
    >>> referenced by tls.c
    >>>               tls.o:(ssl_fpconv)

    ld: error: undefined symbol: OPENSSL_buf2hexstr
    >>> referenced by tls.c
    >>>               tls.o:(ssl_fpconv)

    ld: error: undefined symbol: OPENSSL_buf2hexstr
    >>> referenced by tls.c
    >>>               tls.o:(ssl_getfp)

    ld: error: undefined symbol: OPENSSL_sk_pop
    >>> referenced by tls.c
    >>>               tls.o:(ssl_verify)

    ld: error: undefined symbol: OPENSSL_sk_free
    >>> referenced by tls.c
    >>>               tls.o:(ssl_verify)

    ld: error: undefined symbol: OPENSSL_buf2hexstr
    >>> referenced by tls.c
    >>>               tls.o:(ssl_info)

    ld: error: undefined symbol: OPENSSL_buf2hexstr
    >>> referenced by tls.c
    >>>               tls.o:(ssl_info)
    cc: error: linker command failed with exit code 1 (use -v to see invocation)
    *** Error code 1

    Stop.
    make[3]: stopped in /wrkdirs/usr/ports/irc/eggdrop/work/eggdrop-1.8.4/src
    *** Error code 1

    Stop.
    make[2]: stopped in /wrkdirs/usr/ports/irc/eggdrop/work/eggdrop-1.8.4/src
    *** Error code 1

    Stop.
    make[1]: stopped in /wrkdirs/usr/ports/irc/eggdrop/work/eggdrop-1.8.4
    *** Error code 1

    Stop.
    make: stopped in /usr/ports/irc/eggdrop

I fixed this with a simple update to the Makefile:

    --- Makefile    2019-12-30 12:29:49.917497000 -0600
    +++ Makefile.new        2019-12-30 12:30:10.378109000 -0600
    @@ -19,7 +19,9 @@
    
     GNU_CONFIGURE= yes
     CONFIGURE_ARGS+=--with-tcllib=${LOCALBASE}/lib/libtcl${TCL_SHLIB_VER}.so \
    -               --with-tclinc=${LOCALBASE}/include/tcl${TCL_VER}/tcl.h
    +               --with-tclinc=${LOCALBASE}/include/tcl${TCL_VER}/tcl.h \
    +               --with-sslinc=${OPENSSLINC} \
    +               --with-ssllib=${OPENSSLLIB}
    
     MAKE_JOBS_UNSAFE=      yes
     LLD_UNSAFE=    yes
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2019-12-31 02:27:16 UTC
Thank you for the report and patch. Could you please include your patch from comment 1 as an attachment please
Comment 2 wcarson.bugzilla 2019-12-31 07:24:24 UTC
Created attachment 210348 [details]
Patch to support other versions of OpenSSL/LibreSSL
Comment 3 commit-hook freebsd_committer freebsd_triage 2020-01-04 19:30:00 UTC
A commit references this bug:

Author: dbaio
Date: Sat Jan  4 19:29:52 UTC 2020
New revision: 522048
URL: https://svnweb.freebsd.org/changeset/ports/522048

Log:
  irc/eggdrop[-devel]: Fix build with ssl other than base

  PR:		242988
  Submitted by:	wcarson.bugzilla@disillusion.net

Changes:
  head/irc/eggdrop/Makefile
  head/irc/eggdrop-devel/Makefile
Comment 4 Danilo G. Baio freebsd_committer freebsd_triage 2020-01-04 19:32:00 UTC
Committed, thank you!
Comment 5 commit-hook freebsd_committer freebsd_triage 2020-01-04 19:42:02 UTC
A commit references this bug:

Author: dbaio
Date: Sat Jan  4 19:41:43 UTC 2020
New revision: 522049
URL: https://svnweb.freebsd.org/changeset/ports/522049

Log:
  MFH: r522048

  irc/eggdrop[-devel]: Fix build with ssl other than base

  PR:		242988
  Submitted by:	wcarson.bugzilla@disillusion.net

  Approved by:	portmgr (build fix blanket)

Changes:
_U  branches/2020Q1/
  branches/2020Q1/irc/eggdrop/Makefile
  branches/2020Q1/irc/eggdrop-devel/Makefile