It seems that www/nginx builds nicely against OpenSSL 1.1.1 in Poudriere environment, but then linker uses /usr/lib for libcrypto.so and libssl.so: /usr/local/sbin/nginx: libthr.so.3 => /lib/libthr.so.3 (0x28122000) libcrypt.so.5 => /lib/libcrypt.so.5 (0x28145000) libpcre.so.1 => /usr/local/lib/libpcre.so.1 (0x28164000) libssl.so => /usr/lib/libssl.so (0x281f2000) libcrypto.so => /usr/lib/libcrypto.so (0x2824b000) libz.so.6 => /lib/libz.so.6 (0x283dc000) libc.so.7 => /lib/libc.so.7 (0x283f2000) service nginx restart Performing sanity check on nginx configuration: /usr/local/sbin/nginx: Undefined symbol "OPENSSL_init_ssl" When I do: root@xxx:/usr/lib # rm libssl.so root@xxx:/usr/lib # rm libcrypto.so root@xxx:/usr/lib # ln -s /usr/local/lib lib/ libdata/ libexec/ root@xxx:/usr/lib # ln -s /usr/local/lib/libcrypto.so.11 libcrypto.so root@xxx:/usr/lib # ln -s /usr/local/lib/libssl.so.11 libssl.so root@xxx:/usr/lib # service nginx restart Performing sanity check on nginx configuration: nginx: the configuration file /usr/local/etc/nginx/nginx.conf syntax is ok nginx: configuration file /usr/local/etc/nginx/nginx.conf test is successful Stopping nginx. Performing sanity check on nginx configuration: nginx: the configuration file /usr/local/etc/nginx/nginx.conf syntax is ok nginx: configuration file /usr/local/etc/nginx/nginx.conf test is successful Starting nginx. root@xxx:/usr/lib # Nginx starts as expected. My make.conf for poudriere jail is: DEFAULT_VERSIONS += ssl=openssl111 python=3.6 python2=2.7 python3=3.6 perl5=5.26 OPTIONS_UNSET += GSSAPI_BASE OPTIONS_SET += GSSAPI_NONE OPTIONS_UNSET += X11 MYSQL GNOME NIS DEBUG HELP GNUTLS NLS DBUS SOUND \ ALSA PULSEAUDIO DOCBOOK CUPS TESTS HTMLDOCS BONJOUR GSSAPI APIDOCS WITH_PKG=yes and src.conf: WITHOUT_UNBOUND=yes WITHOUT_APM=yes WITHOUT_ATM=yes WITHOUT_BLUETOOTH=yes WITHOUT_CDDL=yes WITHOUT_FLOPPY=yes WITHOUT_FORTRAN=yes WITHOUT_GSSAPI=yes WITHOUT_I4B=yes WITH_IDEA=yes WITHOUT_INFO=yes WITHOUT_IPFILTER=yes WITHOUT_IPFW=yes WITHOUT_IPX=yes WITHOUT_KERBEROS=yes WITHOUT_LDNS=yes WITHOUT_NIS=yes WITHOUT_PROFILE=yes WITHOUT_RCMDS=yes WITHOUT_SENDMAIL=yes WITHOUT_WPA_SUPPLICANT_EAPOL=yes WITHOUT_WIRELESS=yes WITHOUT_ZFS=yes WITHOUT_NTP=YES WITHOUT_NIS=YES
This happens on FreeBSD 11.2-p4 i386 (both poudriere jail and run environment), not on FBSD 12.x which i reckon uses OpenSSL111 as default
Sorry for being noisy and giving information little at a time. "pkg info nginx" gives: Shared Libs required: libpcre.so.1 Annotations : FreeBSD_version: 1102000 cpe : cpe:2.3:a:nginx:nginx:1.14.1:::::freebsd11:x86 repo_type : binary repository : poudriere Flat size : 1.06MiB
Created attachment 199308 [details] svn diff for www/nginx Hi Reko, Sounds like an issue with runtime directory search for libs. Can you try the attached patch and post the result here? Cheers, Bernard
Thank you very much Bernard! Nginx is behaving now as expected, please see the "evidence" below. -Reko root@xxx:/usr/local/www/nginx-dist/packages # ldd /usr/local/sbin/nginx /usr/local/sbin/nginx: libthr.so.3 => /lib/libthr.so.3 (0x2810d000) libcrypt.so.5 => /lib/libcrypt.so.5 (0x28130000) libpcre.so.1 => /usr/local/lib/libpcre.so.1 (0x2814f000) libssl.so => /usr/local/lib/libssl.so (0x281dd000) libcrypto.so => /usr/local/lib/libcrypto.so (0x28252000) libz.so.6 => /lib/libz.so.6 (0x2844e000) libc.so.7 => /lib/libc.so.7 (0x28464000) root@xxx:/usr/local/www/nginx-dist/packages # service nginx restart Performing sanity check on nginx configuration: nginx: the configuration file /usr/local/etc/nginx/nginx.conf syntax is ok nginx: configuration file /usr/local/etc/nginx/nginx.conf test is successful Stopping nginx. Performing sanity check on nginx configuration: nginx: the configuration file /usr/local/etc/nginx/nginx.conf syntax is ok nginx: configuration file /usr/local/etc/nginx/nginx.conf test is successful Starting nginx. root@xxx:/usr/local/www/nginx-dist/packages #
A commit references this bug: Author: joneum Date: Mon Nov 26 13:58:10 UTC 2018 New revision: 485941 URL: https://svnweb.freebsd.org/changeset/ports/485941 Log: Fix for build OpenSSL, set the correct library path PR: 233243 Submitted by: brnrd Reported by: reko.turja@liukuma.net Sponsored by: Netzkommune GmbH Changes: head/www/nginx/Makefile