Bug 227734 - net/openldap24-sasl-client 2.4.46 undefined BIO_ references with libressl
Summary: net/openldap24-sasl-client 2.4.46 undefined BIO_ references with libressl
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Many People
Assignee: Xin LI
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-24 04:56 UTC by dewayne
Modified: 2018-04-24 18:02 UTC (History)
4 users (show)

See Also:
bugzilla: maintainer-feedback? (delphij)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dewayne 2018-04-24 04:56:29 UTC
In an amd64 jail using libressl

Result of 
# make __MAKE_CONF=/dev/null -C /usr/ports/net/openldap24-sasl-client -DBATCH -DMAKE_JOBS_UNSAFE  clean package
...
/bin/sh ../../libtool --mode=link  cc  -O2 -pipe  -fstack-protector -fno-strict-aliasing  -Wl,-rpath,/usr/local/lib -fstack-protector   -o apitest apitest.o libldap.la ../../libraries/liblber/liblber.la ../../libraries/liblutil/liblutil.a -lsasl2  -lssl -lcrypto   -L/usr/local/lib
cc -O2 -pipe -fstack-protector -fno-strict-aliasing -Wl,-rpath -Wl,/usr/local/lib -fstack-protector -o .libs/apitest apitest.o  ./.libs/libldap.so ../../libraries/liblber/.libs/liblber.so ../../libraries/liblutil/liblutil.a /usr/local/lib/libsasl2.so -L/usr/local/lib -lssl -lcrypto -Wl,--rpath -Wl,/usr/local/lib
./.libs/libldap.so: undefined reference to `BIO_meth_set_gets'
./.libs/libldap.so: undefined reference to `BIO_meth_set_puts'
./.libs/libldap.so: undefined reference to `BIO_meth_free'
./.libs/libldap.so: undefined reference to `BIO_meth_set_destroy'
./.libs/libldap.so: undefined reference to `BIO_meth_set_write'
./.libs/libldap.so: undefined reference to `BIO_meth_set_read'
./.libs/libldap.so: undefined reference to `BIO_meth_new'
./.libs/libldap.so: undefined reference to `BIO_meth_set_create'
./.libs/libldap.so: undefined reference to `BIO_meth_set_ctrl'
cc: error: linker command failed with exit code 1 (use -v to see invocation)
*** Error code 1

Environment is:
# openssl version ; echo ; cc -v ; echo ; ld -v; echo; uname -pvKU
LibreSSL 2.6.4

FreeBSD clang version 6.0.0 (tags/RELEASE_600/final 326565) (based on LLVM 6.0.0)
Target: x86_64-unknown-freebsd11.2
Thread model: posix
InstalledDir: /usr/bin

GNU ld (GNU Binutils) 2.30

FreeBSD 11.2-PRERELEASE  r332843M  amd64 1101515 1101515

So I reverted the jail's userland to an earlier version 
FreeBSD 11.2-PRERELEASE  r332843M   amd64 1101515 1101509
to replace clang 6 with clang 5.0.1; as I thought there may be some issues with clang6 on amd64 as there is with i386.  The problem remains when built with clang 5.0.1.
---
In an i386 jail using openssl:
# make -C /usr/ports/net/openldap24-sasl-client -DBATCH -DMAKE_JOBS_UNSAFE clean package
Successful

# openssl version ; echo ; cc -v ; echo ; ld -v ; echo ; uname -pvKU
OpenSSL 1.0.2o  27 Mar 2018

FreeBSD clang version 5.0.1 (tags/RELEASE_501/final 320880) (based on LLVM 5.0.1)
Target: i386-unknown-freebsd11.1
Thread model: posix
InstalledDir: /usr/bin

GNU ld (GNU Binutils) 2.30

FreeBSD 11.2-PRERELEASE  r332843M  i386 1101515 1101509

In all cases
# svnlite info /usr/ports
...
Repository Root: https://svn.freebsd.org/ports
Revision: 468164
Last Changed Rev: 468163
Last Changed Date: 2018-04-24 10:26:05 +1000 (Tue, 24 Apr 2018)

PS I'm sure you're aware that the __MAKE_CONF=/dev/null removes /etc/make.conf influence; and there are no option files :)
Comment 1 Peter TKATCHENKO 2018-04-24 08:34:02 UTC
Same problem in 11.1-RELEASE-p9 amd64 jail.
clang version 4.0.0.

Please, fix it.
Comment 2 Peter TKATCHENKO 2018-04-24 13:42:59 UTC
LibreSSL too:

$ cat /etc/make.conf
...
DEFAULT_VERSIONS=ssl=libressl
...
Comment 3 Bernard Spil freebsd_committer freebsd_triage 2018-04-24 13:52:20 UTC
Working on this. Misses an ifdef change for OpenSSL < 0x101

Got a working patch now. Running poudriere builds now to verify on vanilla FreeBSD.
Comment 4 commit-hook freebsd_committer freebsd_triage 2018-04-24 17:11:00 UTC
A commit references this bug:

Author: brnrd
Date: Tue Apr 24 17:10:05 UTC 2018
New revision: 468222
URL: https://svnweb.freebsd.org/changeset/ports/468222

Log:
  net/openldap24-server: Fix regression with LibreSSL 2.6

  PR:		227734
  Reported by:	dewayne heuristicsystems com.au
  Approved by:	maintainer (delphij)

Changes:
  head/net/openldap24-server/files/patch-libressl