Gentoo Archives: gentoo-user

From: Jack <ostroffjh@×××××××××××××××××.net>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] C compiler cannot create executables
Date: Sat, 10 Sep 2022 18:51:40
Message-Id: 6908e403-6d8b-c0f0-4ef7-f1f08ef9a7b7@users.sourceforge.net
In Reply to: Re: [gentoo-user] C compiler cannot create executables by Dale
1 On 9/10/22 14:49, Dale wrote:
2 > Jack wrote:
3 >> I now get this error trying to emerge two different packages:
4 >> libofx-0.10.7 and gnupg (both 2.2.39 and 2.3.6).  It might also be the
5 >> same problem for a few bugs on b.g.o found by searching on "cannot
6 >> 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 >> Thread model: posix
20 >> Supported LTO compression algorithms: zlib
21 >> gcc version 11.3.0 (Gentoo 11.3.0 p4)
22 >> configure:2952: $? = 0
23 >> configure:2941: x86_64-pc-linux-gnu-gcc -V >&5
24 >> x86_64-pc-linux-gnu-gcc: error: unrecognized command-line option '-V'
25 >> x86_64-pc-linux-gnu-gcc: fatal error: no input files
26 >> compilation terminated.
27 >> configure:2952: $? = 1
28 >> configure:2941: x86_64-pc-linux-gnu-gcc -qversion >&5
29 >> x86_64-pc-linux-gnu-gcc: error: unrecognized command-line option
30 >> '-qversion'; did you mean '--version'?
31 >> x86_64-pc-linux-gnu-gcc: fatal error: no input files
32 >> compilation terminated.
33 >> configure:2952: $? = 1
34 >> configure:2972: checking whether the C compiler works
35 >> configure:2994: x86_64-pc-linux-gnu-gcc -march=native -O2 -pipe -og
36 >> -ggdb  -Wl,-O1 -Wl,--as-needed conftest.c  >&5
37 >> configure:2998: $? = 0
38 >> configure:3036: result: no
39 >> configure: failed program was:
40 >> | /* confdefs.h */
41 >> | #define PACKAGE_NAME "libofx"
42 >> | #define PACKAGE_TARNAME "libofx"
43 >> | #define PACKAGE_VERSION "0.10.7"
44 >> | #define PACKAGE_STRING "libofx 0.10.7"
45 >> | #define PACKAGE_BUGREPORT ""
46 >> | #define PACKAGE_URL ""
47 >> | /* end confdefs.h.  */
48 >> |
49 >> | int
50 >> | main ()
51 >> | {
52 >> |
53 >> |   ;
54 >> |   return 0;
55 >> | }
56 >> configure:3041: error: in
57 >> `/var/tmp/portage/dev-libs/libofx-0.10.7/work/libofx-0.10.7':
58 >> configure:3043: error: C compiler cannot create executables
59 >> See `config.log' for more details
60 >>
61 >> The thing I find curious is that it appears to me that the output of
62 >> the test compile is a file called "g" which I don't recall ever
63 >> seeing, and so I wonder if the problem is that something has changed
64 >> with gcc defaults and configure does not yet recognize that change.  I
65 >> also don't know the  significance of the two "fatal error: no input
66 >> files".
67 >>
68 >> The fact that this happens with two unrelated packages suggests that
69 >> it's  not specific to either of them, but something in my system or
70 >> configuration.
71 >>
72 >> Any thoughts or suggestions?
73 >>
74 >> Jack
75 >>
76 >>
77 >>
78 >
79 > I ran into this ages ago.  I think the fix was to reset which compiler
80 > it is set to use.  I used to keep two installed, in case one would fail
81 > or some package couldn't build with a newer version yet.  If I recall
82 > correctly, I would list the available options with gcc-config -l and
83 > then if two are available, set to older one and then change back or if
84 > only one is installed, just set it to the one you have.  It's been a
85 > good while and it could be that the cause of the problem has changed but
86 > I don't think it will hurt anything to try this.  I think some settings
87 > gets messed up and resetting it fixes it.
88 >
89 > Hope that helps.  If not, clueless.  :/
90
91 Thanks Dale, but I only have one version of gcc installed and both
92 gcc-config and binutils-config show only one option.
93
94 I do believe that David Haller pegged the problem, and I'll respond to
95 his post after confirming.
96
97 Jack

Replies

Subject Author
Re: [gentoo-user] C compiler cannot create executables Dale <rdalek1967@×××××.com>