Bug 223170 - devel/libevent: Respect $OPENSSLLIB
Summary: devel/libevent: Respect $OPENSSLLIB
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Martin Matuska
URL:
Keywords:
Depends on:
Blocks: 223171
  Show dependency treegraph
 
Reported: 2017-10-22 16:27 UTC by Thierry Thomas
Modified: 2019-03-18 23:50 UTC (History)
1 user (show)

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


Attachments
Using pkg-config to detect openssl.pc (569 bytes, patch)
2017-10-22 16:27 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 2017-10-22 16:27:52 UTC
Created attachment 187371 [details]
Using pkg-config to detect openssl.pc

When built in a clean environment (e.g. poudriere, like on the packages cluster), libevent is linked against libcrypto provided by the base system:

ldd /usr/local/lib/libevent-2.1.so.6
/usr/local/lib/libevent-2.1.so.6:
        libcrypto.so.8 => /lib/libcrypto.so.8 (0x801400000)
        libthr.so.3 => /lib/libthr.so.3 (0x801869000)
        libc.so.7 => /lib/libc.so.7 (0x800825000)

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

/usr/bin/ld: warning: libcrypto.so.8, needed by /usr/local/lib/libevent-2.1.so.6, may conflict with libcrypto.so.9

and actually this might cause hard to debug problems.

Just adding pkg-config to detect openssl.pc solves the problem.
(Warning: the problem exists if the package has been built in poudriere, but when built from a port on a machine where pkg-config is installed, configure is smart enough to detect it)

After this fix:
ldd /usr/local/lib/libevent_openssl-2.1.so.6
/usr/local/lib/libevent_openssl-2.1.so.6:
        libssl.so.9 => /usr/local/lib/libssl.so.9 (0x801206000)
        libcrypto.so.9 => /usr/local/lib/libcrypto.so.9 (0x801600000)
        libthr.so.3 => /lib/libthr.so.3 (0x801a75000)
        libc.so.7 => /lib/libc.so.7 (0x800825000)
Comment 1 Walter Schwarzenfeld freebsd_triage 2018-02-11 02:25:12 UTC
Feedback please!
Comment 2 commit-hook freebsd_committer 2019-03-18 23:50:14 UTC
A commit references this bug:

Author: mm
Date: Mon Mar 18 23:49:32 UTC 2019
New revision: 496227
URL: https://svnweb.freebsd.org/changeset/ports/496227

Log:
  devel/libevent: add pkgconfig to USES=

  PR:		223170
  Submitted by:	Thierry Thomas <thierry@FreeBSD.org>

Changes:
  head/devel/libevent/Makefile