Bug 155315 - devel/libevent2: Bug in libevent*.pc on Libs part
devel/libevent2: Bug in libevent*.pc on Libs part
Status: Closed FIXED
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s)
Any Any
: Normal Affects Only Me
Assigned To: Martin Matuska
Depends on:
  Show dependency treegraph
Reported: 2011-03-06 16:50 UTC by mezz
Modified: 2011-03-06 20:31 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description mezz freebsd_committer 2011-03-06 16:50:00 UTC
When you have libevent and libevent2 installed then try to build
transmission* and other ports that depend on libevent2. Those ports will
get build failure because of incorrect in the libevent*.pc when build
ran like this:

# pkg-config --libs libevent
-L/usr/local/lib/event2 -levent
# pkg-config --libs libevent_openssl
-L/usr/local/lib/event2 -levent_openssl -levent
# pkg-config --libs libevent_pthreads
-L/usr/local/lib/event2 -levent_pthreads -levent

It will pick up libevent-1.4 library instead of libevent-2.0.


The fix is to patch in those libevent*.pc by add '-2.0' in the front of those

# ldconfig -r | grep libevent
	606:-levent-2.0.5 => /usr/local/lib/event2/libevent-2.0.so.5
	607:-levent_core-2.0.5 => /usr/local/lib/event2/libevent_core-2.0.so.5
	608:-levent_extra-2.0.5 => /usr/local/lib/event2/libevent_extra-2.0.so.5
	609:-levent_pthreads-2.0.5 => /usr/local/lib/event2/libevent_pthreads-2.0.so.5

# pkg-config --libs libevent
-L/usr/local/lib/event2 -levent-2.0
# pkg-config --libs libevent_openssl
-L/usr/local/lib/event2 -levent_openssl-2.0 -levent-2.0
 pkg-config --libs libevent_pthreads
-L/usr/local/lib/event2 -levent_pthreads-2.0 -levent-2.0

With that, those ports are able to build while have devel/libevent and
devel/libevent2 installed in the system with no problem. Oh yeah, here's

Comment 1 Edwin Groothuis freebsd_committer 2011-03-06 16:50:13 UTC
Responsible Changed
From-To: freebsd-ports-bugs->mm

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 dfilter freebsd_committer 2011-03-06 20:25:52 UTC
mm          2011-03-06 20:25:39 UTC

  FreeBSD ports repository

  Modified files:
    devel/libevent2      Makefile 
  Added files:
    devel/libevent2/files patch-libevent.pc.in 
  - Fix library linking in libevent.pc [1]
  - Add compatibility include to libevent.pc [2]
  PR:             ports/155315 [1], ports/155293 [2]
  Submitted by:   Jeremy Messenger <mezz@FreeBSD.org> [1]
  Suggested by:   swell.k@gmail.com [2]
  Revision  Changes    Path
  1.3       +1 -0      ports/devel/libevent2/Makefile
  1.1       +12 -0     ports/devel/libevent2/files/patch-libevent.pc.in (new)
  1.1       +12 -0     ports/devel/libevent2/files/patch-libevent_openssl.pc.in (new)
  1.1       +12 -0     ports/devel/libevent2/files/patch-libevent_pthreads.pc.in (new)
cvs-all@freebsd.org mailing list
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 3 Martin Matuska freebsd_committer 2011-03-06 20:31:36 UTC
State Changed
From-To: open->closed

Committed. Thanks!