Bug 55304 - libsanitizer can't be used with GCC autoconf
Summary: libsanitizer can't be used with GCC autoconf
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: other (show other bugs)
Version: 4.8.0
: P3 normal
Target Milestone: 4.8.0
Assignee: Not yet assigned to anyone
URL: http://gcc.gnu.org/ml/gcc-patches/201...
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-13 00:35 UTC by H.J. Lu
Modified: 2012-11-15 14:25 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2012-11-13 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description H.J. Lu 2012-11-13 00:35:11 UTC
GCC only requires autoconf 2.64 while configure.ac has

AC_PREREQ([2.68])
Comment 1 H.J. Lu 2012-11-13 07:12:06 UTC
libsanitizer doesn't use GCC autoconf.
Comment 2 Andrew Pinski 2012-11-13 07:15:16 UTC
Actually I think it should be the same version.  This is just like libffi.
Comment 3 H.J. Lu 2012-11-13 11:27:39 UTC
One problem is AM_PROG_LIBTOOL, which is the part of libtool.
GCC autoconf doesn't use libtool since we have in-tree
libtool.  To use GCC autoconf, we need also use the rest of
libtool support in GCC source tree. That means it will make
libsanitizer depends on GCC source tree.
Comment 4 H.J. Lu 2012-11-13 16:54:21 UTC
This patch

http://gcc.gnu.org/ml/gcc-patches/2012-11/msg01003.html

fixes it.
Comment 5 hjl@gcc.gnu.org 2012-11-14 00:02:16 UTC
Author: hjl
Date: Wed Nov 14 00:02:12 2012
New Revision: 193491

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=193491
Log:
Update configure.ac for GCC tree and remove unused files

	PR other/55304
	* acinclude.m4: New file.
	* Makefile.am (ACLOCAL_AMFLAGS): New.
	* configure.ac (AC_PREREQ): Set to 2.64.
	(AC_CONFIG_AUX_DIR): Set to "..".
	* Makefile.in: Regenerated.
	* aclocal.m4: Likewise.
	* configure: Likewise.
	* asan/Makefile.in: Likewise.
	* interception/Makefile.in: Likewise.
	* sanitizer_common/Makefile.in: Likewise.

	* config.guess: Removed.
	* config.sub: Likewise.
	* depcomp: Likewise.
	* install-sh: Likewise.
	* ltmain.sh: Likewise.
	* missing: Likewise.

Added:
    trunk/libsanitizer/acinclude.m4
Removed:
    trunk/libsanitizer/config.guess
    trunk/libsanitizer/config.sub
    trunk/libsanitizer/depcomp
    trunk/libsanitizer/install-sh
    trunk/libsanitizer/ltmain.sh
    trunk/libsanitizer/missing
Modified:
    trunk/libsanitizer/ChangeLog.asan
    trunk/libsanitizer/Makefile.am
    trunk/libsanitizer/Makefile.in
    trunk/libsanitizer/aclocal.m4
    trunk/libsanitizer/asan/Makefile.in
    trunk/libsanitizer/configure
    trunk/libsanitizer/configure.ac
    trunk/libsanitizer/interception/Makefile.in
    trunk/libsanitizer/sanitizer_common/Makefile.in
Comment 6 H.J. Lu 2012-11-14 00:02:55 UTC
Fixed.
Comment 7 Igor Zamyatin 2012-11-15 14:09:09 UTC
That's strange but on x86 I see 

CDPATH="${ZSH_VERSION+.}:" && cd ../../../libsanitizer && /bin/sh /export/users/izamyati/tmp_gcc/missing --run aclocal-1.11 -I .. -I ../config
configure.ac:5: error: Please use exactly Autoconf 2.64 instead of 2.68.
../config/override.m4:12: _GCC_AUTOCONF_VERSION_CHECK is expanded from...
configure.ac:5: the top level
autom4te: m4 failed with exit status: 1
aclocal-1.11: autom4te failed with exit status: 1
make[2]: *** [../../../libsanitizer/aclocal.m4] Error 1

during build for following configuration

../configure --disable-bootstrap --enable-clocale=gnu --with-system-zlib --enable-shared --with-demangler-in-ld --with-fpmath=sse --enable-languages=c,c++,fortran 

My head is at r193515.

Did I miss anything?
Comment 8 H.J. Lu 2012-11-15 14:11:54 UTC
(In reply to comment #7)
> That's strange but on x86 I see 
> 
> CDPATH="${ZSH_VERSION+.}:" && cd ../../../libsanitizer && /bin/sh
> /export/users/izamyati/tmp_gcc/missing --run aclocal-1.11 -I .. -I ../config
> configure.ac:5: error: Please use exactly Autoconf 2.64 instead of 2.68.
> ../config/override.m4:12: _GCC_AUTOCONF_VERSION_CHECK is expanded from...
> configure.ac:5: the top level
> autom4te: m4 failed with exit status: 1
> aclocal-1.11: autom4te failed with exit status: 1
> make[2]: *** [../../../libsanitizer/aclocal.m4] Error 1
> 
> during build for following configuration
> 
> ../configure --disable-bootstrap --enable-clocale=gnu --with-system-zlib
> --enable-shared --with-demangler-in-ld --with-fpmath=sse
> --enable-languages=c,c++,fortran 
> 
> My head is at r193515.
> 
> Did I miss anything?

You must run

# ./contrib/gcc_update --touch
Comment 9 Igor Zamyatin 2012-11-15 14:25:42 UTC
Thanks, this helped