[Gdal-dev] Make error "libtool: compile: unable to infer tagged configuration"

Mateusz Loskot mateusz at loskot.net
Sun Apr 1 06:36:05 EDT 2007


Frank Warmerdam wrote:
> Patton, Eric wrote:
>> Hi,
>>
>> I just upgraded my Ubuntu to 7.04 Beta, and I'm re-compiling
>> gdal-1.4.0. configure progresses cleanly with no obvious errors. At
>> the very beginning of make, however, I encounter this error:
>>
>> $ sudo make
>> (cd port; make)
>> make[1]: Entering directory `/usr/local/gdal-1.4.0/port'
>> /bin/sh /usr/local/gdal-1.4.0/libtool --mode=compile g++  
>> -DOGR_ENABLED -I/usr/local/gdal-1.4.0/port  -c -o cpl_conv.o cpl_conv.cpp
>> libtool: compile: unable to infer tagged configuration
>> libtool: compile: specify a tag with `--tag'
>> make[1]: *** [cpl_conv.o] Error 1
>> make[1]: Leaving directory `/usr/local/gdal-1.4.0/port'
>> make: *** [port-target] Error 2
>>
>> Any ideas on what this error means and how to correct it?
> 
> Eric,
> 
> I'm afraid I don't know what causes this.  I'd appreciate it if you could
> file a bug on this, and work with Mateusz to try and resolve it before the
> 1.4.1 release.

AFAIK, this error means that libtool is can not determine what compiler
is used exactly and libtool is confused.
May be with newer version of libtool, it's works in more strict mode.

As I remember, the solution is to explicitly distinct compiler
tags for C and C++ compilation and specify them in configure/makefiles

for C++ compilation it looks as:
--tag CXX

for C:
--tag CC


Eric,

Could you try following simple fix:

1. Open GDALmake.opt.in file
2. Go to line 19
3. Replace

CC  = $(LIBTOOL_COMPILE) @CC@
CXX = $(LIBTOOL_COMPILE) @CXX@

with

CC  = $(LIBTOOL_COMPILE) --tag CC @CC@
CXX = $(LIBTOOL_COMPILE) --tag CXX @CXX@

4. Run ./configure and see if it helps

Cheers
-- 
Mateusz Loskot
http://mateusz.loskot.net



More information about the Gdal-dev mailing list