bug-autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AC_LINK_IFELSE unexpectedly fails on Ubuntu 12.04


From: Russ Allbery
Subject: Re: AC_LINK_IFELSE unexpectedly fails on Ubuntu 12.04
Date: Fri, 25 Oct 2013 14:55:21 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux)

David Pointon <address@hidden> writes:

> The above confirms that the freetype headers have, but interestingly not 
> the libraries have not, been found. Inspection of the build log reveals 
> the following command to have been run:

> configure:34201:  /usr/bin/g++-4.6 -o conftest -I/usr/include/freetype2 
> -I/usr/include -L/usr/lib/i386-linux-gnu -lfreetype conftest.cpp >&5

The contents of $FREETYPE_LIBS are being put on the compilation command
line before the program to be compiled instead of afterwards.  This has
never been guaranteed to work.  Some linkers dynamically reorder the link
line and cause this to work, but you can't rely on that behavior, and it
stopped working in the versions of the toolchain currently in Ubuntu.

I suspect somewhere in the configure machinery for this package, something
is adding $FREETYPE_LIBS to $LDFLAGS.  This is wrong.  $LDFLAGS and $LIBS
are intentionally separate, and $LIBS flags cannot go into $LDFLAGS for
exactly this reason.

Compilers and linkers are generally more forgiving about the location of
the -L flags, so putting $LDFLAGS flags into $LIBS will usually work if
there's no way to get properly separated $LDFLAGS and $LIBS variables,
which may be the case here.

Short version: If I'm right, find where the configure script is throwing
$FREETYPE_LIBS into $LDFLAGS and change it to add those flags to $LIBS
instead.

-- 
Russ Allbery (address@hidden)             <http://www.eyrie.org/~eagle/>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]