Page MenuHomeFreeBSD

security/xmlsec1: fix build with LibreSSL 2.7
ClosedPublic

Authored by vishwin on Mar 26 2018, 6:28 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Nov 25, 12:36 AM
Unknown Object (File)
Fri, Nov 8, 11:44 AM
Unknown Object (File)
Fri, Nov 8, 11:43 AM
Unknown Object (File)
Fri, Nov 8, 11:34 AM
Unknown Object (File)
Fri, Nov 8, 11:34 AM
Unknown Object (File)
Fri, Nov 8, 11:34 AM
Unknown Object (File)
Fri, Nov 8, 11:16 AM
Unknown Object (File)
Oct 22 2024, 8:11 AM
Subscribers

Details

Summary

See PR 226933. These patches have also been submitted upstream.

openssl_compat.h obtained from OpenBSD Ports collection

Test Plan

testport succeeds with all supported values of ssl= in DEFAULT_VERSIONS.

Diff Detail

Repository
rP FreeBSD ports repository
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 16254
Build 16203: arc lint + arc unit

Event Timeline

Build fails during linking for me

/bin/sh ../../libtool  --tag=CC   --mode=link cc  -O2 -fno-strict-aliasing -pipe -march=native  -fstack-protector -isystem /usr/local/include -version-info 3:25:2  -Wl,-rpath,/usr/local/lib -fstack-protector -o libxmlsec1-openssl.la -rpath /usr/local/lib libxmlsec1_openssl_la-app.lo libxmlsec1_openssl_la-bn.lo libxmlsec1_openssl_la-ciphers.lo libxmlsec1_openssl_la-crypto.lo libxmlsec1_openssl_la-digests.lo libxmlsec1_openssl_la-evp.lo libxmlsec1_openssl_la-evp_signatures.lo libxmlsec1_openssl_la-hmac.lo libxmlsec1_openssl_la-kw_aes.lo libxmlsec1_openssl_la-kw_des.lo libxmlsec1_openssl_la-kt_rsa.lo libxmlsec1_openssl_la-signatures.lo libxmlsec1_openssl_la-symkeys.lo libxmlsec1_openssl_la-x509.lo libxmlsec1_openssl_la-x509vfy.lo  -L/usr/local/lib -lcrypto -ldl -L/usr/local/lib -lxslt -lz -llzma -lm -lxml2  -L/usr/local/lib -lxml2  ../libxmlsec1.la  -L/usr/local/lib
libtool: link: cc -shared  -fPIC -DPIC  .libs/libxmlsec1_openssl_la-app.o .libs/libxmlsec1_openssl_la-bn.o .libs/libxmlsec1_openssl_la-ciphers.o .libs/libxmlsec1_openssl_la-crypto.o .libs/libxmlsec1_openssl_la-digests.o .libs/libxmlsec1_openssl_la-evp.o .libs/libxmlsec1_openssl_la-evp_signatures.o .libs/libxmlsec1_openssl_la-hmac.o .libs/libxmlsec1_openssl_la-kw_aes.o .libs/libxmlsec1_openssl_la-kw_des.o .libs/libxmlsec1_openssl_la-kt_rsa.o .libs/libxmlsec1_openssl_la-signatures.o .libs/libxmlsec1_openssl_la-symkeys.o .libs/libxmlsec1_openssl_la-x509.o .libs/libxmlsec1_openssl_la-x509vfy.o   -Wl,-rpath -Wl,/wrkdirs/usr/ports/security/xmlsec1/work/xmlsec1-1.2.25/src/.libs -Wl,-rpath -Wl,/usr/local/lib -Wl,-rpath -Wl,/usr/local/lib -L/usr/local/lib -lcrypto -ldl ../.libs/libxmlsec1.so -lxslt -lz -llzma -lm -lxml2 /usr/local/lib/libltdl.so  -O2 -march=native -fstack-protector -Wl,-rpath -Wl,/usr/local/lib -fstack-protector   -Wl,-soname -Wl,libxmlsec1-openssl.so.1 -o .libs/libxmlsec1-openssl.so.1.2.25
/usr/bin/ld: cannot find -ldl
cc: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[4]: *** [Makefile:566: libxmlsec1-openssl.la] Error 1

Looks like there's a -L/usr/lib missing.

If a -L/usr/lib was missing, then linking would have also failed at -lz and a few other spots. This is without regard to whether this patch exists or not.

Upon further inspection of my own build logs, from 12-CURRENT and 11.1-RELEASE, show absolutely no finds of -ldl anywhere. You probably have a stray reference to libdl in your own LDFLAGS or similar.

Opened another pull-request upstream implementing the maintainers comments.
I found 3 more missing methods, added to openssl_compat.h

Fix runtime error

  • Add 3 missing methods to OpenSSL compat
  • Implement upstream comments

Fix runtime error

  • Add 3 missing methods to OpenSSL compat
  • Implement upstream comments

Upstream pull-request
Notified OpenBSD re. missing methods too

Merge back one missing LibreSSL 2.7 detection

This revision was not accepted when it landed; it landed in state Needs Review.Apr 23 2018, 6:24 PM
This revision was automatically updated to reflect the committed changes.