net/liveMedia does not build on 11-STABLE in presence of security/openssl

Scott Allendorf scott-allendorf at uiowa.edu
Tue Jul 14 03:54:19 UTC 2020


TL;DR: The net/liveMedia port does not appear to pick up the proper 
includes when building on 11-STABLE when security/openssl is installed.

I have an 11-STABLE system where security/openssl has been made the 
default (now required by QT) via the following in /etc/make.conf:

	DEFAULT_VERSIONS+=      ssl=openssl

When attempting to build net/liveMedia, it fails with:

========================================================================
env MAKE_JOBS_UNSAFE=yes make all

...

c++ -otestMP3Streamer -L.  -Wl,-rpath,/usr/local/lib 
-fstack-protector-strong  testMP3Streamer.o 
../liveMedia/libliveMedia.so.16.0.1 ../groupsock/libgroupsock.so.1.0.1 
../BasicUsageEnvironment/libBasicUsageEnvironment.so.0.0.1 
../UsageEnvironment/libUsageEnvironment.so.1.0.0 -L/usr/local/lib -lssl 
-lcrypto
../liveMedia/libliveMedia.so.16.0.1: undefined reference to 
`SSLv23_client_method'
../liveMedia/libliveMedia.so.16.0.1: undefined reference to 
`SSL_library_init'
../liveMedia/libliveMedia.so.16.0.1: undefined reference to 
`EVP_MD_CTX_destroy'
../liveMedia/libliveMedia.so.16.0.1: undefined reference to 
`EVP_MD_CTX_create'
c++: error: linker command failed with exit code 1 (use -v to see 
invocation)
gmake[2]: *** [Makefile:133: testMP3Streamer] Error 1
gmake[2]: Leaving directory '/usr/ports/net/liveMedia/work/live/testProgs'
gmake[1]: *** [Makefile:67: all] Error 2
gmake[1]: Leaving directory '/usr/ports/net/liveMedia/work/live'
*** Error code 1

Stop.
make: stopped in /usr/ports/net/liveMedia
========================================================================

It is correctly attempting to link against the openssl port libraries, 
but does not appear to have used the port headers while compiling. 
Those four references have been deprecated by modern versions of openssl 
and the port header files #define these functions to their modern 
equivalents:

========================================================================
root at sallendorf:/usr/ports/net/liveMedia # egrep 
'SSLv23_client_method|SSL_library_init|EVP_MD_CTX_destroy|EVP_MD_CTX_create' 
/usr/local/include/openssl/*
/usr/local/include/openssl/evp.h:# define EVP_MD_CTX_create() 
EVP_MD_CTX_new()
/usr/local/include/openssl/evp.h:# define EVP_MD_CTX_destroy(ctx) 
EVP_MD_CTX_free((ctx))

...

/usr/local/include/openssl/ssl.h:#define SSLv23_client_method 
TLS_client_method
/usr/local/include/openssl/ssl.h:#  define SSL_library_init() 
OPENSSL_init_ssl(0, NULL)
========================================================================

If I coerce the build to use the headers from the port, the build 
succeeds.  My workaround was to add the following into /etc/make.conf:

========================================================================
.if ${.CURDIR:M*/net/liveMedia*}
         CFLAGS+=        -I${OPENSSLINC}
.endif
========================================================================

Please let me know if I can provide any additional information and thank 
you for all of your efforts with FreeBSD.

Cheers,

Scott

-- 
Scott C. Allendorf                     Email:  scott-allendorf at uiowa.edu
Senior Systems Administrator           Office:         303A MacLean Hall
CLAS Linux Group                       Voice:             (319) 335-0003
The University of Iowa                 FAX:               (319) 335-3668
Iowa City, Iowa  52242-1419            ICBM:  41 39 37.8 N  91 32 11.5 W

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4015 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.freebsd.org/pipermail/freebsd-multimedia/attachments/20200713/d2a3e2db/attachment.bin>


More information about the freebsd-multimedia mailing list