From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Aug 14 16:10:05 2008 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 433FA1065681 for ; Thu, 14 Aug 2008 16:10:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 3A0638FC08 for ; Thu, 14 Aug 2008 16:10:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m7EGA5hR022353 for ; Thu, 14 Aug 2008 16:10:05 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m7EGA4vb022352; Thu, 14 Aug 2008 16:10:04 GMT (envelope-from gnats) Date: Thu, 14 Aug 2008 16:10:04 GMT Message-Id: <200808141610.m7EGA4vb022352@freefall.freebsd.org> To: freebsd-ports-bugs@FreeBSD.org From: "Tom Russo" Cc: Subject: Re: ports/126397: graphics/libgeotiff fails to build X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Tom Russo List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Aug 2008 16:10:05 -0000 The following reply was made to PR ports/126397; it has been noted by GNATS. From: "Tom Russo" To: bug-followup@FreeBSD.org Cc: Subject: Re: ports/126397: graphics/libgeotiff fails to build Date: Thu, 14 Aug 2008 09:48:19 -0600 I, too, found libgeotif 1.2.4 failed to upgrade to 1.2.5 with an error on FreeBSD-6-STABLE. The error message was slightly different here: In file included from listgeo.c:12: ../geo_simpletags.h:38: error: syntax error before '*' token listgeo.c: In function `main': listgeo.c:92: warning: implicit declaration of function `GTIFNewSimpleTags' listgeo.c:92: warning: assignment makes pointer from integer without a cast but this is clearly the same problem. The issue is that listgeo.h does not include "geo_tiffp.h" before including "geo_simpletags.hf". This leads to TIFFMethod not being defined before it is used as a type in line 38 of geo_simpletags.h Adding #include "geo_tiffp.h" on the line prior to the one that includes geo_simpletags.h in bin/listgeo.c gets one past the compilation error. On my system, however, this then leads to a link failure because the link line includes a -L/usr/local/lib that it shouldn't: cc -O2 -fno-strict-aliasing -pipe -L/usr/local/lib -I/usr/local/include -Wall listgeo.o -L/lib -L.. -lgeotiff -L/usr/local/lib -lproj -L/usr/local/lib -ltiff -lz -lm -L/usr/local -ljpeg -o listgeo listgeo.o(.text+0x37d): In function `main': : undefined reference to `ST_Create' listgeo.o(.text+0x3be): In function `main': : undefined reference to `ST_SetKey' listgeo.o(.text+0x42e): In function `main': : undefined reference to `ST_SetKey' listgeo.o(.text+0x44c): In function `main': : undefined reference to `ST_SetKey' listgeo.o(.text+0x47a): In function `main': : undefined reference to `ST_SetKey' listgeo.o(.text+0x48f): In function `main': : undefined reference to `GTIFNewSimpleTags' listgeo.o(.text+0x4f4): In function `main': : undefined reference to `ST_Destroy' The problem *here* is the first "-L/usr/local/lib" on the link line, which causes the linker to use my previously installed libgeotiff.a (which doesn't contain the new "simpletags" stuff introduced in this release of libgeotiff). The reason *that's* happening is that -L/usr/local/lib is being placed into CFLAGS by configure for some reason. That's just plain wrong, because linker flags don't belong in CFLAGS. This is an issue with how the libgeotiff configure script is set up. This is all stuff that should probably be fed upstream to the libgeotiff authors.