ports/126397: graphics/libgeotiff fails to build

Tom Russo tvrusso at sandia.gov
Thu Aug 14 16:10:05 UTC 2008


The following reply was made to PR ports/126397; it has been noted by GNATS.

From: "Tom Russo" <tvrusso at sandia.gov>
To: bug-followup at 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.  
 
 
 



More information about the freebsd-ports-bugs mailing list