bug-libtool
[Top][All Lists]
Advanced

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

Second libtool bug (was: Re: libtool-1.4.2 (finished analysis), autoconf


From: Carlo Wood
Subject: Second libtool bug (was: Re: libtool-1.4.2 (finished analysis), autoconf-2.53 (bug))
Date: Tue, 30 Jul 2002 01:33:37 +0200
User-agent: Mutt/1.2.5i

> | The reason that this normally not occuring is because
> | normally compiler_c_o is not set to 'yes', and here
> | we see a bug of autoconf.  I have:
> | 
> | configure:5584: checking if gcc supports -c -o file.o
> | configure:5606: g++ -c -g  -pipe  conftest.cc >&5
> | Assembler messages:
> | FATAL: can't create conftest.o: Permission denied
> | configure:5628: result: no
> | 
> | Where the test is:
> | 
> | # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
> | # that will create temporary files in the current directory regardless of
> | # the output directory.  Thus, making CWD read-only will cause this test
> | # to fail, enabling locking or at least warning the user not to do parallel
> | # builds.
> | chmod -w .
> | save_CFLAGS="$CFLAGS"
> | CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
> | compiler_c_o=no
> | if { (eval echo configure:5606: \"$ac_compile\") 1>&5; (eval $ac_compile) 
> 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
> | ...etc
> | 
> | The problem here is that autoconf sets CFLAGS while 'ac_compile'
> | is using g++ (the C++ compiler), which ignores CFLAGS and uses CXXFLAGS.
> | Hence this test fails...
> | 
> | The 'work around' that I was looking for is thus
> | to temporarily set AC_LANG_C prior to this test.

On Mon, Jul 29, 2002 at 02:10:37PM +0200, Akim Demaille wrote:
> I don't know what test you are referring to, Autoconf (CVS) has this:
> 
> # AC_PROG_CC_C_O
> # --------------
> AC_DEFUN([AC_PROG_CC_C_O],
> [AC_REQUIRE([AC_PROG_CC])dnl
> if test "x$CC" != xcc; then
>   AC_MSG_CHECKING([whether $CC and cc understand -c and -o together])
> else
>   AC_MSG_CHECKING([whether cc understands -c and -o together])
> fi
[...different test for "whether cc understands -c and -o together" delete...]

> Autoconf *never* violates the user space with things like
> save_CFLAGS.  This code is not ours.

I stand corrected, this is ALSO a bug of libtool
The offending test is part of /usr/share/aclocal/libtool.m4
on my machine (which is part of libtool-1.4.2).

This part of libtool.m4 looks like:

## FIXME: this should be a separate macro
##
# Check to see if options -o and -c are simultaneously supported by compiler
AC_MSG_CHECKING([if $compiler supports -c -o file.$ac_objext])
AC_CACHE_VAL([lt_cv_compiler_c_o], [
$rm -r conftest 2>/dev/null
mkdir conftest
cd conftest
echo "int some_variable = 0;" > conftest.$ac_ext
mkdir out
# According to Tom Tromey, Ian Lance Taylor reported there are C compilers
# that will create temporary files in the current directory regardless of
# the output directory.  Thus, making CWD read-only will cause this test
# to fail, enabling locking or at least warning the user not to do parallel
# builds.
chmod -w .
[...etc...]

Apparently libtool should be using AC_PROG_CC_C_O here.

-- 
Carlo Wood <address@hidden>

PS I sent 6 mails to address@hidden and got 0 replies.
   It seems that libtool is not being maintained.
   As far as I know, this mail will be ignored too therefore :/




reply via email to

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