From owner-freebsd-questions@FreeBSD.ORG Sun Jun 26 00:46:11 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 42B98106566B for ; Sun, 26 Jun 2011 00:46:11 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from email2.allantgroup.com (email2.emsphone.com [199.67.51.116]) by mx1.freebsd.org (Postfix) with ESMTP id E0F2B8FC1A for ; Sun, 26 Jun 2011 00:46:10 +0000 (UTC) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by email2.allantgroup.com (8.14.4/8.14.4) with ESMTP id p5Q0Kv1W048578 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sat, 25 Jun 2011 19:20:58 -0500 (CDT) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (smmsp@localhost [127.0.0.1]) by dan.emsphone.com (8.14.5/8.14.5) with ESMTP id p5Q0KrtW080585 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sat, 25 Jun 2011 19:20:53 -0500 (CDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.14.5/8.14.5/Submit) id p5Q0KqAc080576; Sat, 25 Jun 2011 19:20:52 -0500 (CDT) (envelope-from dan) Date: Sat, 25 Jun 2011 19:20:52 -0500 From: Dan Nelson To: Matthias Apitz Message-ID: <20110626002051.GA44024@dan.emsphone.com> References: <20110625045740.GA3383@tinyCurrent> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="UHN/qo2QbUvPLonB" Content-Disposition: inline In-Reply-To: <20110625045740.GA3383@tinyCurrent> X-OS: FreeBSD 8.2-STABLE User-Agent: Mutt/1.5.21 (2010-09-15) X-Virus-Scanned: clamav-milter 0.97 at email2.allantgroup.com X-Virus-Status: Clean X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.6 (email2.allantgroup.com [199.67.51.78]); Sat, 25 Jun 2011 19:20:58 -0500 (CDT) X-Scanned-By: MIMEDefang 2.68 on 199.67.51.78 Cc: freebsd-questions@freebsd.org Subject: Re: pkg-config --cflags glib-2.0 gives wrong -I dir X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Jun 2011 00:46:11 -0000 --UHN/qo2QbUvPLonB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In the last episode (Jun 25), Matthias Apitz said: > Why gives > > $ pkg-config --cflags glib-2.0 > -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include > > $ ls -ld /usr/local/include/glib-2.0 /usr/local/lib/glib-2.0/include > ls: /usr/local/lib/glib-2.0/include: No such file or directory > drwxr-xr-x 5 root wheel 512 May 28 19:01 /usr/local/include/glib-2.0 > > a non existing -I directory? This concrete example is with a 9-CURRENT > and glib-2.0 from the ports as glib-2.26.1_1, but I see this as well in > some older 8.x systems; Checking Solaris and SUSE Linux, I see a similar pair of directories: solaris$ pkg-config --cflags glib-2.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include linux$ pkg-config --cflags glib-2.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include The /usr/lib* directory on each system contains a single file: glibconfig.h. On FreeBSD, this file is in /usr/local/include/glib-2.0/ along with all the other headers (headers don't belong in /lib/ anyway). Try putting the attached patch into the files directory of the glib20 port. -- Dan Nelson dnelson@allantgroup.com --UHN/qo2QbUvPLonB Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="patch-glib-2.0.pc.in" No headers are installed into ${libdir}/glib-2.0/include, so remove it from CFLAGS --- glib-2.26.1/glib-2.0.pc.in 2009-03-31 18:04:20.000000000 -0500 +++ glib-2.26.1/glib-2.0.pc.in 2011-06-25 19:14:23.580424986 -0500 @@ -12,4 +12,4 @@ Version: @VERSION@ Libs: -L${libdir} -lglib-2.0 @INTLLIBS@ Libs.private: @ICONV_LIBS@ -Cflags: -I${includedir}/glib-2.0 -I${libdir}/glib-2.0/include @GLIB_EXTRA_CFLAGS@ +Cflags: -I${includedir}/glib-2.0 @GLIB_EXTRA_CFLAGS@ --UHN/qo2QbUvPLonB--