Gentoo Archives: gentoo-amd64

From: Duncan <1i5t5.duncan@×××.net>
To: gentoo-amd64@l.g.o
Subject: [gentoo-amd64] Re: what causes this?
Date: Tue, 17 Oct 2006 09:32:11
Message-Id: eh27pg$n19$2@sea.gmane.org
In Reply to: Re: [gentoo-amd64] what causes this? by Neil Bothwick
1 Neil Bothwick <neil@××××××××××.uk> posted
2 20061017084723.500c31ca@××××××××××××××××××.uk, excerpted below, on Tue,
3 17 Oct 2006 08:47:23 +0100:
4
5 > On Mon, 16 Oct 2006 23:33:06 -0700 (PDT), Steve Herber wrote:
6 >
7 >> configure: error: There is something wrong. Please check config.log for
8 >> more information.
9 >>
10 >> !!! ERROR: dev-lang/php-5.1.6-r6 failed.
11 >
12 >> Some of my major packages get this error and I wonder what causes it?
13 >> I am not interested in a solution for php, but a guideline to help me
14 >> fix any package with this problem.
15 >
16 > The lines before the error should give some clues. The config.log it
17 > mentions can be found in $PORT_TMPDIR/dev-lang/php-5.1.6/work in this
18 > instance, that should give a more detailed error message.
19 >
20 > This isn't necessarily a single problem for all the affected packages; the
21 > configure script carries out a large number of tests, any one of which
22 > could have failed.
23
24 Additionally, note that with some tests, any warnings (even if they are
25 harmless) can cause the test to fail. A common example would be
26 unsupported CFLAGS -- CFLAGS that your currently configured version of GCC
27 doesn't recognize and so ignores, but spits a warning about. Maybe you
28 setup your CFLAGS with a different version of GCC that recognized
29 different flags, or whatever you followed suggesting those CFLAGS was
30 based on a different GCC version. Particularly if whatever they are
31 testing is only a gcc-warning as well, guess what, they usually fail on
32 any warning. As it happens, the Gentoo/amd64 arch team had enough problems
33 reported due to this that they instituted a filter in their profiles that
34 removes most flags the currently configured version of gcc doesn't
35 recognize, so the problem happens less frequently than it did, but the
36 unrecognized CFLAG warning isn't the only one gcc has by far, and if one
37 of the others pops up in a test, it could trigger a test failure and
38 ultimately a configure error as well.
39
40 In ordered to properly troubleshoot the general problem (a configure error
41 as reported in config.log), one really needs to know bash (well sh, which
42 on Gentoo is normally bash) scripting, since that's what the configure
43 script is written in. The config.log file references line numbers in the
44 actual configure script, and if it's not immediately apparent from
45 config.log what the problem is, the next step is to open the configure
46 script to that line and figure out what it's doing, duplicating the
47 process by hand or adding echo debugs to the configure script where
48 necessary to see what's going on. With a decent grasp of bash and at
49 least a vague idea of what all those tests in the configure script are all
50 about (note, knowing C/C++ is generally NOT necessary), one can usually
51 figure out what's going on and why, either correcting the problem (such as
52 CFLAGS that are choking the test in question) or bugging either with
53 Gentoo or very occasionally upstream, as appropriate.
54
55 --
56 Duncan - List replies preferred. No HTML msgs.
57 "Every nonfree program has a lord, a master --
58 and if you use the program, he is your master." Richard Stallman
59
60 --
61 gentoo-amd64@g.o mailing list