Bug 23823

Summary: [Gtk] Running automake fails with current automake/libtool
Product: WebKit Reporter: Calvin Walton <calvin.walton>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Linux   
Attachments:
Description Flags
Patch adding AC_PROG_CXX macro to configure.ac zecke: review+

Description Calvin Walton 2009-02-07 08:36:17 PST
With current versions of autotools, creating the build system fails with the following messages:

autoreconf-2.63: running: automake --add-missing --copy --no-force
/usr/share/automake-1.10/am/depend2.am: am__fastdepCXX does not appear in AM_CONDITIONAL
/usr/share/automake-1.10/am/depend2.am:   The usual way to define `am__fastdepCXX' is to add `AC_PROG_CXX'
/usr/share/automake-1.10/am/depend2.am:   to `configure.ac' and run `aclocal' and `autoconf' again.
GNUmakefile.am: C++ source seen but `CXX' is undefined
GNUmakefile.am:   The usual way to define `CXX' is to add `AC_PROG_CXX'
GNUmakefile.am:   to `configure.ac' and run `autoconf' again.
autoreconf-2.63: automake failed with exit status: 1

(autoconf 2.63, automake 1.10.2, libtool 2.2.6)

The fix is quite simple, as suggested by the error - simply use the AC_PROG_CXX macro in configure.ac.
(This will not affect older autotools versions, as the macro has been around for a long time - it is simply no longer automatically included).
Comment 1 Calvin Walton 2009-02-07 08:43:37 PST
Created attachment 27450 [details]
Patch adding AC_PROG_CXX macro to configure.ac

I've created a patch adding a check for AC_PROG_CXX to the configure.ac file.

I've tried to follow the committing guidelines as close as possible, please let me know if I got anything wrong!
Comment 2 Holger Freyther 2009-02-08 11:57:43 PST
Please use the prepare-ChaneLog utility and upload a new patch.
Comment 3 Holger Freyther 2009-02-09 12:34:54 PST
Comment on attachment 27450 [details]
Patch adding AC_PROG_CXX macro to configure.ac

Please see http://webkit.org/coding/contributing.html for future patches. Your manual creation of the ChangeLog is creating more work for me.
Comment 4 Holger Freyther 2009-02-09 12:49:11 PST
Landed in r40790.
Comment 5 Calvin Walton 2009-02-09 19:50:54 PST
Ah, sorry about that; I was about to redo the patch using the proper tools, but it seems you beat me to it.
Comment 6 Gustavo Noronha (kov) 2009-02-12 17:20:08 PST
This change is bogus, I believe. WebKit's configure.ac already calls the AC_PROG_CXX macro through WEBKIT_INIT, which is defined in its webkit.m4, and protects the call so that CXXFLAGS is not modified incorrectly. With this change debugging symbols are being added because the first AC_PROG_CXX is not protected to not allow CXXFLAGS modification. This caused: https://bugs.webkit.org/show_bug.cgi?id=23939

We need a better way to shut up automake1.10, although my (Debian) automake 1.10 did not complain about AC_PROG_CXX missing when I removed the call added by this change.

Comment 7 Calvin Walton 2009-02-12 20:55:17 PST
Hmm. I investigated a little more, and found that this only happened on one of my two computers (both of which are supposed to have the same build system tool versions).
I suspect deeper problems with the one computer specifically now, and it looks like the original code was correct - the comment on bug #23939 says that this macro is already called, with debug compiler flag protection.
It would probably be best to revert this change, fixing bug #23939 at the same time.
Sorry about that :/