Bug 155315 - devel/libevent2: Bug in libevent*.pc on Libs part
Summary: devel/libevent2: Bug in libevent*.pc on Libs part
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Martin Matuska
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-06 16:50 UTC by Jeremy Messenger
Modified: 2011-03-06 20:31 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Messenger freebsd_committer freebsd_triage 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.

Fix: 

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

# 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
patch:

http://people.freebsd.org/~mezz/diff/libevent2.diff
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 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 service freebsd_committer freebsd_triage 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 
                          patch-libevent_openssl.pc.in 
                          patch-libevent_pthreads.pc.in 
  Log:
  - 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
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 3 Martin Matuska freebsd_committer freebsd_triage 2011-03-06 20:31:36 UTC
State Changed
From-To: open->closed

Committed. Thanks!