Bug 223171 - dns/unbound: Respect $OPENSSLBASE
Summary: dns/unbound: Respect $OPENSSLBASE
Status: Closed Works As Intended
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Thierry Thomas
URL:
Keywords:
Depends on: 223170
Blocks:
  Show dependency treegraph
 
Reported: 2017-10-22 16:28 UTC by Thierry Thomas
Modified: 2017-10-25 19:14 UTC (History)
1 user (show)

See Also:
jaap: maintainer-feedback+


Attachments
Link with ssl in $OPENSSLBASE (1.24 KB, patch)
2017-10-22 16:28 UTC, Thierry Thomas
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thierry Thomas freebsd_committer freebsd_triage 2017-10-22 16:28:00 UTC
Created attachment 187372 [details]
Link with ssl in $OPENSSLBASE

USES=ssl is set correctly in Makefile, but configure ignore it, and libunbound.so is always linked against libssl.so provided by the base SSL:

ldd /usr/local/lib/libunbound.so
/usr/local/lib/libunbound.so:
        libssl.so.8 => /usr/lib/libssl.so.8 (0x8012bf000)
        libutil.so.9 => /lib/libutil.so.9 (0x801531000)
        libevent-2.1.so.6 => /usr/local/lib/libevent-2.1.so.6 (0x801745000)
        libcrypto.so.8 => /lib/libcrypto.so.8 (0x801a00000)
        libthr.so.3 => /lib/libthr.so.3 (0x801e69000)
        libc.so.7 => /lib/libc.so.7 (0x800825000)

When you link it from another port, you get this warning:

/usr/bin/ld: warning: libssl.so.8, needed by /usr/local/lib/libunbound.so, may conflict with libssl.so.9
/usr/bin/ld: warning: libcrypto.so.8, needed by /usr/local/lib/libunbound.so, may conflict with libcrypto.so.9

and actually this might cause hard to debug problems.

The proposed patch fixes the problem. After this fix:

ldd /usr/local/lib/libunbound.so
/usr/local/lib/libunbound.so:
        libssl.so.9 => /usr/local/lib/libssl.so.9 (0x8012c0000)
        libutil.so.9 => /lib/libutil.so.9 (0x801535000)
        libevent-2.1.so.6 => /usr/local/lib/libevent-2.1.so.6 (0x801749000)
        libcrypto.so.9 => /usr/local/lib/libcrypto.so.9 (0x801a00000)
        libthr.so.3 => /lib/libthr.so.3 (0x801e75000)
        libc.so.7 => /lib/libc.so.7 (0x800825000)
Comment 1 Thierry Thomas freebsd_committer freebsd_triage 2017-10-22 16:30:10 UTC
libevent should be fixed too: please see PR 223170
Comment 2 Jaap Akkerhuis 2017-10-24 14:53:00 UTC
Are you sure you have set in /etc/make.conf

DEFAULT_VERSIONS+=ssl=openssl

That is needed when using openssl from the ports
Comment 3 Thierry Thomas freebsd_committer freebsd_triage 2017-10-24 16:33:55 UTC
(In reply to jaap from comment #2)

Yes, I do:
$ cd /usr/ports/dns/unbound
$ make -V DEFAULT_VERSIONS
ssl=openssl

And this is taken into account:

$ make -V OPENSSLBASE
/usr/local
Comment 4 Jaap Akkerhuis 2017-10-24 17:06:59 UTC
That is odd. I cannot reproduce the problem. Ca yiu sent me the log of a fresh built?
Comment 5 Thierry Thomas freebsd_committer freebsd_triage 2017-10-25 19:14:45 UTC
You're right.

I reset everything and rebuilt unbound without my patch, and now it's OK. That's strange, probably something was misconfigured on my side, but I don't see what...

Sorry for the false alert.