Gentoo Archives: gentoo-user

From: David Haller <gentoo@×××××××.de>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] C compiler cannot create executables
Date: Sat, 10 Sep 2022 17:57:57
Message-Id: 20220910175625.65wwro3jsfabatk4@grusum.dhaller.de
In Reply to: [gentoo-user] C compiler cannot create executables by Jack
1 Hello,
2
3 On Sat, 10 Sep 2022, Jack wrote:
4 >I now get this error trying to emerge two different packages: libofx-0.10.7
5 >and gnupg (both 2.2.39 and 2.3.6).  It might also be the same problem for a
6 >few bugs on b.g.o found by searching on "cannot create exectuables."
7 >
8 >The relevant lines from build.log are
9 >
10 >checking for x86_64-pc-linux-gnu-gcc... x86_64-pc-linux-gnu-gcc
11 >checking whether the C compiler works... no
12 >configure: error: in
13 >`/var/tmp/portage/dev-libs/libofx-0.10.7/work/libofx-0.10.7':
14 >configure: error: C compiler cannot create executables
15 >See `config.log' for more details
16 >
17 >and from config.log:
18 >
19 >configure:2941: x86_64-pc-linux-gnu-gcc -V >&5
20 >x86_64-pc-linux-gnu-gcc: error: unrecognized command-line option '-V'
21 >x86_64-pc-linux-gnu-gcc: fatal error: no input files
22 >compilation terminated.
23 >configure:2952: $? = 1
24 >configure:2941: x86_64-pc-linux-gnu-gcc -qversion >&5
25 >x86_64-pc-linux-gnu-gcc: error: unrecognized command-line option '-qversion';
26 >did you mean '--version'?
27 >x86_64-pc-linux-gnu-gcc: fatal error: no input files
28 >compilation terminated.
29 >configure:2952: $? = 1
30
31 These tests are normal fails with gcc, they are version checks for
32 other compilers.
33
34 >configure:2972: checking whether the C compiler works
35 >configure:2994: x86_64-pc-linux-gnu-gcc -march=native -O2 -pipe -og -ggdb 
36 >-Wl,-O1 -Wl,--as-needed conftest.c  >&5
37 >configure:2998: $? = 0
38 >configure:3036: result: no
39 >configure: failed program was:
40 [..boilerplate..]
41 >configure:3041: error: in
42 >`/var/tmp/portage/dev-libs/libofx-0.10.7/work/libofx-0.10.7':
43 >configure:3043: error: C compiler cannot create executables
44 >See `config.log' for more details
45 >
46 >The thing I find curious is that it appears to me that the output of the test
47 >compile is a file called "g" which I don't recall ever seeing, and so I
48 >wonder if the problem is that something has changed with gcc defaults and
49 >configure does not yet recognize that change.  I also don't know the 
50 >significance of the two "fatal error: no input files".
51 >
52 >The fact that this happens with two unrelated packages suggests that it's 
53 >not specific to either of them, but something in my system or configuration.
54
55 And it's a standard autoconf macro, namely AC_PROG_CC that results in
56 the error and the stuff before that is also standard. And as no
57 autoreconf is called, autotools versions should not matter.
58
59 >Any thoughts or suggestions?
60
61 I use gcc 11.3.0 here as well, and have no problem. Check for the
62 variables CC, CFLAGS, CPPFLAGS, LDFLAGS and LIBS in
63 /var/tmp/portage/dev-libs/libofx-0.10.7/temp/environment.
64
65 Somehow, that '-og' must have crept in there.
66
67 HTH,
68 -dnh
69
70 --
71 printk("%s: Boo!\n", dev->name);
72 linux-2.6.19/drivers/net/depca.c

Replies

Subject Author
Re: [gentoo-user] C compiler cannot create executables Jack <ostroffjh@×××××××××××××××××.net>