Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Jul 2012 06:16:33 -1100
From:      Jan Beich <jbeich@tormail.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/170184: [patch] devel/libevent2: correct include order in pkg-config
Message-ID:  <1Su5DG-0008r0-0f@internal.tormail.org>
Resent-Message-ID: <201207260600.q6Q60NAT054761@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         170184
>Category:       ports
>Synopsis:       [patch] devel/libevent2: correct include order in pkg-config
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jul 26 06:00:22 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Jan Beich
>Release:        FreeBSD 10.0-CURRENT amd64
>Organization:
>Environment:
freebsd-gecko repo
>Description:
When using cflags from pkg-config /compat directory is placed later.
If devel/libevent is also installed an app using such flags may
accidentally pick up event.h from libevent14. As both libraries
are only API compatible the app may crash due to ABI difference.
>How-To-Repeat:
$ echo '#include <event.h>' |
  env -i gcc -E - $(pkg-config libevent --cflags) |
  fgrep include/event.h
# 1 "/usr/local/include/event.h" 1
# 162 "/usr/local/include/event.h"
[...]
>Fix:
--- include_order.diff begins here ---
Index: devel/libevent2/files/patch-libevent.pc.in
===================================================================
--- devel/libevent2/files/patch-libevent.pc.in	(revision 301267)
+++ devel/libevent2/files/patch-libevent.pc.in	(working copy)
@@ -8,5 +8,5 @@
 +Libs: -L${libdir} -levent-2.0
  Libs.private: @LIBS@
 -Cflags: -I${includedir}
-+Cflags: -I${includedir} -I${includedir}/event2/compat
++Cflags: -I${includedir}/event2/compat -I${includedir}
  
--- include_order.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1Su5DG-0008r0-0f>