ports/155315: devel/libevent2: Bug in libevent*.pc on Libs part

Jeremy Messenger mezz at FreeBSD.org
Sun Mar 6 16:50:01 UTC 2011


>Number:         155315
>Category:       ports
>Synopsis:       devel/libevent2: Bug in libevent*.pc on Libs part
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Mar 06 16:50:00 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Jeremy Messenger
>Release:        FreeBSD 8.1-STABLE i386
>Organization:
>Environment:
n/a

>Description:
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.

>How-To-Repeat:
	
>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
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list