public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] C compiler cannot create executables
@ 2005-11-24  4:49 Michael Sullivan
  2005-11-24  5:35 ` W.Kenworthy
                   ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Michael Sullivan @ 2005-11-24  4:49 UTC (permalink / raw
  To: gentoo-user

I think I've somehow managed to screw gcc up.  Whenever I try to emerge
anything I get this message:

checking for C compiler default output... configure: error: C compiler
cannot create executables

It also says "See config.log for details", but I can't find config.log -
it doesn't give a full path.  Is there a way to repair this without
having to completely reinstall Gentoo?

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [gentoo-user] C compiler cannot create executables
  2005-11-24  4:49 Michael Sullivan
@ 2005-11-24  5:35 ` W.Kenworthy
  2005-11-24  6:39 ` Spider (D.m.D. Lj.)
  2005-11-24 12:05 ` Matthias Langer
  2 siblings, 0 replies; 18+ messages in thread
From: W.Kenworthy @ 2005-11-24  5:35 UTC (permalink / raw
  To: gentoo-user

Search forums: many posts exist.

Try using gcc-config and fix_libtool.sh as a starter.

BillK

On Wed, 2005-11-23 at 22:49 -0600, Michael Sullivan wrote:
> I think I've somehow managed to screw gcc up.  Whenever I try to emerge
> anything I get this message:
> 
> checking for C compiler default output... configure: error: C compiler
> cannot create executables
> 
> It also says "See config.log for details", but I can't find config.log -
> it doesn't give a full path.  Is there a way to repair this without
> having to completely reinstall Gentoo?
> 
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [gentoo-user] C compiler cannot create executables
  2005-11-24  4:49 Michael Sullivan
  2005-11-24  5:35 ` W.Kenworthy
@ 2005-11-24  6:39 ` Spider (D.m.D. Lj.)
  2005-11-24 12:05 ` Matthias Langer
  2 siblings, 0 replies; 18+ messages in thread
From: Spider (D.m.D. Lj.) @ 2005-11-24  6:39 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 734 bytes --]

On Wed, 2005-11-23 at 22:49 -0600, Michael Sullivan wrote:
> I think I've somehow managed to screw gcc up.  Whenever I try to emerge
> anything I get this message:
> 
> checking for C compiler default output... configure: error: C compiler
> cannot create executables
> 
> It also says "See config.log for details", but I can't find config.log -
> it doesn't give a full path.  Is there a way to repair this without
> having to completely reinstall Gentoo?


Did you change your CFLAGS?  if you change CFLAGS to something invalid ,
like a zero instead of an oh, you get this message.

//Spider

-- 
begin  .signature
Tortured users / Laughing in pain
See Microsoft KB Article Q265230 for more information.
end


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [gentoo-user] C compiler cannot create executables
  2005-11-24  4:49 Michael Sullivan
  2005-11-24  5:35 ` W.Kenworthy
  2005-11-24  6:39 ` Spider (D.m.D. Lj.)
@ 2005-11-24 12:05 ` Matthias Langer
  2005-11-24 12:18   ` Holly Bostick
  2005-11-24 16:09   ` Michael Sullivan
  2 siblings, 2 replies; 18+ messages in thread
From: Matthias Langer @ 2005-11-24 12:05 UTC (permalink / raw
  To: gentoo-user

On Wed, 2005-11-23 at 22:49 -0600, Michael Sullivan wrote:
> I think I've somehow managed to screw gcc up.  Whenever I try to emerge
> anything I get this message:
> 
> checking for C compiler default output... configure: error: C compiler
> cannot create executables
> 
> It also says "See config.log for details", but I can't find config.log -
> it doesn't give a full path.  Is there a way to repair this without
> having to completely reinstall Gentoo?
> 

I've had this problem too some time ago - however, i'm not sure how i
solved it - but i think it was something with fix-libtool.sh or
gcc-config. Try to compile a simple c-program by hand - maybe this will
give you some hints about the source of your problem.

Matthias

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [gentoo-user] C compiler cannot create executables
  2005-11-24 12:05 ` Matthias Langer
@ 2005-11-24 12:18   ` Holly Bostick
  2005-11-24 16:09   ` Michael Sullivan
  1 sibling, 0 replies; 18+ messages in thread
From: Holly Bostick @ 2005-11-24 12:18 UTC (permalink / raw
  To: gentoo-user

Matthias Langer schreef:
>> 
>> It also says "See config.log for details", but I can't find
>> config.log - it doesn't give a full path.

The config.log referred to can be found in the temporary working
directory of the package being compiled:

/var/tmp/portage/package-name.and.version/work (or something like that).

You generally get enough output to get the full path, if you've made it
past configure, even if the compile ultimately fails; example from an
emerge of krusader:

Good - your configure finished. Start make now

make  all-recursive
==> make[1]: Entering directory
`/var/tmp/portage/krusader-cvs-1-r4/work/krusader_kde3'

But once you know generally where the compile is happening
(/var/tmp/portage/blablabla/) you can find the path even if you don't
make it to make.

HTH,
Holly


-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [gentoo-user] C compiler cannot create executables
  2005-11-24 12:05 ` Matthias Langer
  2005-11-24 12:18   ` Holly Bostick
@ 2005-11-24 16:09   ` Michael Sullivan
  2005-11-24 16:16     ` Michael Sullivan
  2005-11-24 17:20     ` Michael Sullivan
  1 sibling, 2 replies; 18+ messages in thread
From: Michael Sullivan @ 2005-11-24 16:09 UTC (permalink / raw
  To: gentoo-user

On Thu, 2005-11-24 at 13:05 +0100, Matthias Langer wrote:
> On Wed, 2005-11-23 at 22:49 -0600, Michael Sullivan wrote:
> > I think I've somehow managed to screw gcc up.  Whenever I try to emerge
> > anything I get this message:
> > 
> > checking for C compiler default output... configure: error: C compiler
> > cannot create executables
> > 
> > It also says "See config.log for details", but I can't find config.log -
> > it doesn't give a full path.  Is there a way to repair this without
> > having to completely reinstall Gentoo?
> > 
> 
> I've had this problem too some time ago - however, i'm not sure how i
> solved it - but i think it was something with fix-libtool.sh or
> gcc-config. Try to compile a simple c-program by hand - maybe this will
> give you some hints about the source of your problem.
> 
> Matthias


I created a simple "Hello World" program in C and tried to compile it
using gcc:

camille ~ # gcc hello.c
gcc: installation problem, cannot exec `as': No such file or directory


-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [gentoo-user] C compiler cannot create executables
  2005-11-24 16:09   ` Michael Sullivan
@ 2005-11-24 16:16     ` Michael Sullivan
  2005-11-24 17:20     ` Michael Sullivan
  1 sibling, 0 replies; 18+ messages in thread
From: Michael Sullivan @ 2005-11-24 16:16 UTC (permalink / raw
  To: gentoo-user

On Thu, 2005-11-24 at 10:09 -0600, Michael Sullivan wrote:
> On Thu, 2005-11-24 at 13:05 +0100, Matthias Langer wrote:
> > On Wed, 2005-11-23 at 22:49 -0600, Michael Sullivan wrote:
> > > I think I've somehow managed to screw gcc up.  Whenever I try to emerge
> > > anything I get this message:
> > > 
> > > checking for C compiler default output... configure: error: C compiler
> > > cannot create executables
> > > 
> > > It also says "See config.log for details", but I can't find config.log -
> > > it doesn't give a full path.  Is there a way to repair this without
> > > having to completely reinstall Gentoo?
> > > 
> > 
> > I've had this problem too some time ago - however, i'm not sure how i
> > solved it - but i think it was something with fix-libtool.sh or
> > gcc-config. Try to compile a simple c-program by hand - maybe this will
> > give you some hints about the source of your problem.
> > 
> > Matthias
> 
> 
> I created a simple "Hello World" program in C and tried to compile it
> using gcc:
> 
> camille ~ # gcc hello.c
> gcc: installation problem, cannot exec `as': No such file or directory
> 

I forgot to mention that before I wrote my Hello World C program I ran
gcc-config -O (which claimed to be setting my gcc profile back to i686)
and I ran fix_libtool_files.sh for i686...

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [gentoo-user] C compiler cannot create executables
  2005-11-24 16:09   ` Michael Sullivan
  2005-11-24 16:16     ` Michael Sullivan
@ 2005-11-24 17:20     ` Michael Sullivan
  2005-11-24 17:27       ` Michael Sullivan
  1 sibling, 1 reply; 18+ messages in thread
From: Michael Sullivan @ 2005-11-24 17:20 UTC (permalink / raw
  To: gentoo-user

On Thu, 2005-11-24 at 10:09 -0600, Michael Sullivan wrote:
> On Thu, 2005-11-24 at 13:05 +0100, Matthias Langer wrote:
> > On Wed, 2005-11-23 at 22:49 -0600, Michael Sullivan wrote:
> > > I think I've somehow managed to screw gcc up.  Whenever I try to emerge
> > > anything I get this message:
> > > 
> > > checking for C compiler default output... configure: error: C compiler
> > > cannot create executables
> > > 
> > > It also says "See config.log for details", but I can't find config.log -
> > > it doesn't give a full path.  Is there a way to repair this without
> > > having to completely reinstall Gentoo?
> > > 
> > 
> > I've had this problem too some time ago - however, i'm not sure how i
> > solved it - but i think it was something with fix-libtool.sh or
> > gcc-config. Try to compile a simple c-program by hand - maybe this will
> > give you some hints about the source of your problem.
> > 
> > Matthias
> 
> 
> I created a simple "Hello World" program in C and tried to compile it
> using gcc:
> 
> camille ~ # gcc hello.c
> gcc: installation problem, cannot exec `as': No such file or directory

I ran "equery belongs as" and one of the packages that contains that
program was binutils.  I checked the location the the program and it
indeed did not exist which supports my theory.  Is there a way to
rebuild binutils without using gcc?

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [gentoo-user] C compiler cannot create executables
  2005-11-24 17:20     ` Michael Sullivan
@ 2005-11-24 17:27       ` Michael Sullivan
  0 siblings, 0 replies; 18+ messages in thread
From: Michael Sullivan @ 2005-11-24 17:27 UTC (permalink / raw
  To: gentoo-user

On Thu, 2005-11-24 at 11:21 -0600, Michael Sullivan wrote:
> On Thu, 2005-11-24 at 10:09 -0600, Michael Sullivan wrote:
> > On Thu, 2005-11-24 at 13:05 +0100, Matthias Langer wrote:
> > > On Wed, 2005-11-23 at 22:49 -0600, Michael Sullivan wrote:
> > > > I think I've somehow managed to screw gcc up.  Whenever I try to emerge
> > > > anything I get this message:
> > > > 
> > > > checking for C compiler default output... configure: error: C compiler
> > > > cannot create executables
> > > > 
> > > > It also says "See config.log for details", but I can't find config.log -
> > > > it doesn't give a full path.  Is there a way to repair this without
> > > > having to completely reinstall Gentoo?
> > > > 
> > > 
> > > I've had this problem too some time ago - however, i'm not sure how i
> > > solved it - but i think it was something with fix-libtool.sh or
> > > gcc-config. Try to compile a simple c-program by hand - maybe this will
> > > give you some hints about the source of your problem.
> > > 
> > > Matthias
> > 
> > 
> > I created a simple "Hello World" program in C and tried to compile it
> > using gcc:
> > 
> > camille ~ # gcc hello.c
> > gcc: installation problem, cannot exec `as': No such file or directory
> 
> I ran "equery belongs as" and one of the packages that contains that
> program was binutils.  I checked the location the the program and it
> indeed did not exist which supports my theory.  Is there a way to
> rebuild binutils without using gcc?

OR would it help if I restored my backup of /etc from before the problem
started?

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 18+ messages in thread

* [gentoo-user] C compiler cannot create executables
@ 2022-09-10 15:24 Jack
  2022-09-10 15:42 ` Arve Barsnes
                   ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Jack @ 2022-09-10 15:24 UTC (permalink / raw
  To: Gentoo Users List

I now get this error trying to emerge two different packages: 
libofx-0.10.7 and gnupg (both 2.2.39 and 2.3.6).  It might also be the 
same problem for a few bugs on b.g.o found by searching on "cannot 
create exectuables."

The relevant lines from build.log are

checking for x86_64-pc-linux-gnu-gcc... x86_64-pc-linux-gnu-gcc
checking whether the C compiler works... no
configure: error: in 
`/var/tmp/portage/dev-libs/libofx-0.10.7/work/libofx-0.10.7':
configure: error: C compiler cannot create executables
See `config.log' for more details

and from config.log:

Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 11.3.0 (Gentoo 11.3.0 p4)
configure:2952: $? = 0
configure:2941: x86_64-pc-linux-gnu-gcc -V >&5
x86_64-pc-linux-gnu-gcc: error: unrecognized command-line option '-V'
x86_64-pc-linux-gnu-gcc: fatal error: no input files
compilation terminated.
configure:2952: $? = 1
configure:2941: x86_64-pc-linux-gnu-gcc -qversion >&5
x86_64-pc-linux-gnu-gcc: error: unrecognized command-line option 
'-qversion'; did you mean '--version'?
x86_64-pc-linux-gnu-gcc: fatal error: no input files
compilation terminated.
configure:2952: $? = 1
configure:2972: checking whether the C compiler works
configure:2994: x86_64-pc-linux-gnu-gcc -march=native -O2 -pipe -og 
-ggdb  -Wl,-O1 -Wl,--as-needed conftest.c  >&5
configure:2998: $? = 0
configure:3036: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "libofx"
| #define PACKAGE_TARNAME "libofx"
| #define PACKAGE_VERSION "0.10.7"
| #define PACKAGE_STRING "libofx 0.10.7"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| /* end confdefs.h.  */
|
| int
| main ()
| {
|
|   ;
|   return 0;
| }
configure:3041: error: in 
`/var/tmp/portage/dev-libs/libofx-0.10.7/work/libofx-0.10.7':
configure:3043: error: C compiler cannot create executables
See `config.log' for more details

The thing I find curious is that it appears to me that the output of the 
test compile is a file called "g" which I don't recall ever seeing, and 
so I wonder if the problem is that something has changed with gcc 
defaults and configure does not yet recognize that change.  I also don't 
know the  significance of the two "fatal error: no input files".

The fact that this happens with two unrelated packages suggests that 
it's  not specific to either of them, but something in my system or 
configuration.

Any thoughts or suggestions?

Jack



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [gentoo-user] C compiler cannot create executables
  2022-09-10 15:42 ` Arve Barsnes
@ 2022-09-10 15:41   ` Jack
  2022-09-10 17:27   ` Jack
  1 sibling, 0 replies; 18+ messages in thread
From: Jack @ 2022-09-10 15:41 UTC (permalink / raw
  To: gentoo-user

On 9/10/22 11:42, Arve Barsnes wrote:
> On Sat, 10 Sept 2022 at 17:28, Jack <ostroffjh@users.sourceforge.net> wrote:
>> Any thoughts or suggestions?
> I feel like this is an error that tends to pop up when your toolchain
> is broken. Are you able to re-emerge gcc?

Reasonable thought.  I've just kicked of a re-emerge of gcc. I'll post 
back when it's done - likely an hour or two.

What's odd is that I've done plenty of other successful emerges since I 
first got this error, although I certainly realize that different 
packages use very different subsets of the total tool chain.



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [gentoo-user] C compiler cannot create executables
  2022-09-10 15:24 [gentoo-user] C compiler cannot create executables Jack
@ 2022-09-10 15:42 ` Arve Barsnes
  2022-09-10 15:41   ` Jack
  2022-09-10 17:27   ` Jack
  2022-09-10 17:56 ` David Haller
  2022-09-10 18:49 ` Dale
  2 siblings, 2 replies; 18+ messages in thread
From: Arve Barsnes @ 2022-09-10 15:42 UTC (permalink / raw
  To: gentoo-user

On Sat, 10 Sept 2022 at 17:28, Jack <ostroffjh@users.sourceforge.net> wrote:
> Any thoughts or suggestions?

I feel like this is an error that tends to pop up when your toolchain
is broken. Are you able to re-emerge gcc?

Regards,
Arve


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [gentoo-user] C compiler cannot create executables
  2022-09-10 15:42 ` Arve Barsnes
  2022-09-10 15:41   ` Jack
@ 2022-09-10 17:27   ` Jack
  1 sibling, 0 replies; 18+ messages in thread
From: Jack @ 2022-09-10 17:27 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 1009 bytes --]

On 9/10/22 11:42, Arve Barsnes wrote:
> On Sat, 10 Sept 2022 at 17:28, Jack<ostroffjh@users.sourceforge.net>  wrote:
>> Any thoughts or suggestions?
> I feel like this is an error that tends to pop up when your toolchain
> is broken. Are you able to re-emerge gcc?

gcc11.3.0 re-emerge with no errors, bug the problem remains.

I note that in configure, line 2977 is 'ac_files="a.out conftest.exe 
conftest a.exe a_out.exe b.out conftest.*"' but the test compilation 
creates the output file "g" so configure seems to think that the compile 
didn't produce any executable.  Using the same compile line but 
switching x86_64-pc-linux-gnu-gcc to gcc produces a.out.  Further 
searching makes me wonder if the configure itself for these two packages 
is just based on some starting point too old for gcc11, but  that line 
is the same in every package I currently still have present in 
/var/tmp/portage.

This leaves me wondering why gcc and x86_64-pc-linux-gnu-gcc use 
different default output file names.

[-- Attachment #2: Type: text/html, Size: 2210 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [gentoo-user] C compiler cannot create executables
  2022-09-10 15:24 [gentoo-user] C compiler cannot create executables Jack
  2022-09-10 15:42 ` Arve Barsnes
@ 2022-09-10 17:56 ` David Haller
  2022-09-10 19:44   ` Jack
  2022-09-10 18:49 ` Dale
  2 siblings, 1 reply; 18+ messages in thread
From: David Haller @ 2022-09-10 17:56 UTC (permalink / raw
  To: gentoo-user

Hello,

On Sat, 10 Sep 2022, Jack wrote:
>I now get this error trying to emerge two different packages: libofx-0.10.7
>and gnupg (both 2.2.39 and 2.3.6).  It might also be the same problem for a
>few bugs on b.g.o found by searching on "cannot create exectuables."
>
>The relevant lines from build.log are
>
>checking for x86_64-pc-linux-gnu-gcc... x86_64-pc-linux-gnu-gcc
>checking whether the C compiler works... no
>configure: error: in
>`/var/tmp/portage/dev-libs/libofx-0.10.7/work/libofx-0.10.7':
>configure: error: C compiler cannot create executables
>See `config.log' for more details
>
>and from config.log:
>
>configure:2941: x86_64-pc-linux-gnu-gcc -V >&5
>x86_64-pc-linux-gnu-gcc: error: unrecognized command-line option '-V'
>x86_64-pc-linux-gnu-gcc: fatal error: no input files
>compilation terminated.
>configure:2952: $? = 1
>configure:2941: x86_64-pc-linux-gnu-gcc -qversion >&5
>x86_64-pc-linux-gnu-gcc: error: unrecognized command-line option '-qversion';
>did you mean '--version'?
>x86_64-pc-linux-gnu-gcc: fatal error: no input files
>compilation terminated.
>configure:2952: $? = 1

These tests are normal fails with gcc, they are version checks for
other compilers.

>configure:2972: checking whether the C compiler works
>configure:2994: x86_64-pc-linux-gnu-gcc -march=native -O2 -pipe -og -ggdb 
>-Wl,-O1 -Wl,--as-needed conftest.c  >&5
>configure:2998: $? = 0
>configure:3036: result: no
>configure: failed program was:
[..boilerplate..]
>configure:3041: error: in
>`/var/tmp/portage/dev-libs/libofx-0.10.7/work/libofx-0.10.7':
>configure:3043: error: C compiler cannot create executables
>See `config.log' for more details
>
>The thing I find curious is that it appears to me that the output of the test
>compile is a file called "g" which I don't recall ever seeing, and so I
>wonder if the problem is that something has changed with gcc defaults and
>configure does not yet recognize that change.  I also don't know the 
>significance of the two "fatal error: no input files".
>
>The fact that this happens with two unrelated packages suggests that it's 
>not specific to either of them, but something in my system or configuration.

And it's a standard autoconf macro, namely AC_PROG_CC that results in
the error and the stuff before that is also standard. And as no
autoreconf is called, autotools versions should not matter.

>Any thoughts or suggestions?

I use gcc 11.3.0 here as well, and have no problem. Check for the
variables CC, CFLAGS, CPPFLAGS, LDFLAGS and LIBS in
/var/tmp/portage/dev-libs/libofx-0.10.7/temp/environment.

Somehow, that '-og' must have crept in there.

HTH,
-dnh

-- 
printk("%s: Boo!\n", dev->name);
	linux-2.6.19/drivers/net/depca.c


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [gentoo-user] C compiler cannot create executables
  2022-09-10 18:49 ` Dale
@ 2022-09-10 18:47   ` Jack
  2022-09-10 18:55     ` Dale
  0 siblings, 1 reply; 18+ messages in thread
From: Jack @ 2022-09-10 18:47 UTC (permalink / raw
  To: gentoo-user

On 9/10/22 14:49, Dale wrote:
> Jack wrote:
>> I now get this error trying to emerge two different packages:
>> libofx-0.10.7 and gnupg (both 2.2.39 and 2.3.6).  It might also be the
>> same problem for a few bugs on b.g.o found by searching on "cannot
>> create exectuables."
>>
>> The relevant lines from build.log are
>>
>> checking for x86_64-pc-linux-gnu-gcc... x86_64-pc-linux-gnu-gcc
>> checking whether the C compiler works... no
>> configure: error: in
>> `/var/tmp/portage/dev-libs/libofx-0.10.7/work/libofx-0.10.7':
>> configure: error: C compiler cannot create executables
>> See `config.log' for more details
>>
>> and from config.log:
>>
>> Thread model: posix
>> Supported LTO compression algorithms: zlib
>> gcc version 11.3.0 (Gentoo 11.3.0 p4)
>> configure:2952: $? = 0
>> configure:2941: x86_64-pc-linux-gnu-gcc -V >&5
>> x86_64-pc-linux-gnu-gcc: error: unrecognized command-line option '-V'
>> x86_64-pc-linux-gnu-gcc: fatal error: no input files
>> compilation terminated.
>> configure:2952: $? = 1
>> configure:2941: x86_64-pc-linux-gnu-gcc -qversion >&5
>> x86_64-pc-linux-gnu-gcc: error: unrecognized command-line option
>> '-qversion'; did you mean '--version'?
>> x86_64-pc-linux-gnu-gcc: fatal error: no input files
>> compilation terminated.
>> configure:2952: $? = 1
>> configure:2972: checking whether the C compiler works
>> configure:2994: x86_64-pc-linux-gnu-gcc -march=native -O2 -pipe -og
>> -ggdb  -Wl,-O1 -Wl,--as-needed conftest.c  >&5
>> configure:2998: $? = 0
>> configure:3036: result: no
>> configure: failed program was:
>> | /* confdefs.h */
>> | #define PACKAGE_NAME "libofx"
>> | #define PACKAGE_TARNAME "libofx"
>> | #define PACKAGE_VERSION "0.10.7"
>> | #define PACKAGE_STRING "libofx 0.10.7"
>> | #define PACKAGE_BUGREPORT ""
>> | #define PACKAGE_URL ""
>> | /* end confdefs.h.  */
>> |
>> | int
>> | main ()
>> | {
>> |
>> |   ;
>> |   return 0;
>> | }
>> configure:3041: error: in
>> `/var/tmp/portage/dev-libs/libofx-0.10.7/work/libofx-0.10.7':
>> configure:3043: error: C compiler cannot create executables
>> See `config.log' for more details
>>
>> The thing I find curious is that it appears to me that the output of
>> the test compile is a file called "g" which I don't recall ever
>> seeing, and so I wonder if the problem is that something has changed
>> with gcc defaults and configure does not yet recognize that change.  I
>> also don't know the  significance of the two "fatal error: no input
>> files".
>>
>> The fact that this happens with two unrelated packages suggests that
>> it's  not specific to either of them, but something in my system or
>> configuration.
>>
>> Any thoughts or suggestions?
>>
>> Jack
>>
>>
>>
>
> I ran into this ages ago.  I think the fix was to reset which compiler
> it is set to use.  I used to keep two installed, in case one would fail
> or some package couldn't build with a newer version yet.  If I recall
> correctly, I would list the available options with gcc-config -l and
> then if two are available, set to older one and then change back or if
> only one is installed, just set it to the one you have.  It's been a
> good while and it could be that the cause of the problem has changed but
> I don't think it will hurt anything to try this.  I think some settings
> gets messed up and resetting it fixes it.
>
> Hope that helps.  If not, clueless.  :/

Thanks Dale, but I only have one version of gcc installed and both 
gcc-config and binutils-config show only one option.

I do believe that David Haller pegged the problem, and I'll respond to 
his post after confirming.

Jack



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [gentoo-user] C compiler cannot create executables
  2022-09-10 15:24 [gentoo-user] C compiler cannot create executables Jack
  2022-09-10 15:42 ` Arve Barsnes
  2022-09-10 17:56 ` David Haller
@ 2022-09-10 18:49 ` Dale
  2022-09-10 18:47   ` Jack
  2 siblings, 1 reply; 18+ messages in thread
From: Dale @ 2022-09-10 18:49 UTC (permalink / raw
  To: gentoo-user

Jack wrote:
> I now get this error trying to emerge two different packages:
> libofx-0.10.7 and gnupg (both 2.2.39 and 2.3.6).  It might also be the
> same problem for a few bugs on b.g.o found by searching on "cannot
> create exectuables."
>
> The relevant lines from build.log are
>
> checking for x86_64-pc-linux-gnu-gcc... x86_64-pc-linux-gnu-gcc
> checking whether the C compiler works... no
> configure: error: in
> `/var/tmp/portage/dev-libs/libofx-0.10.7/work/libofx-0.10.7':
> configure: error: C compiler cannot create executables
> See `config.log' for more details
>
> and from config.log:
>
> Thread model: posix
> Supported LTO compression algorithms: zlib
> gcc version 11.3.0 (Gentoo 11.3.0 p4)
> configure:2952: $? = 0
> configure:2941: x86_64-pc-linux-gnu-gcc -V >&5
> x86_64-pc-linux-gnu-gcc: error: unrecognized command-line option '-V'
> x86_64-pc-linux-gnu-gcc: fatal error: no input files
> compilation terminated.
> configure:2952: $? = 1
> configure:2941: x86_64-pc-linux-gnu-gcc -qversion >&5
> x86_64-pc-linux-gnu-gcc: error: unrecognized command-line option
> '-qversion'; did you mean '--version'?
> x86_64-pc-linux-gnu-gcc: fatal error: no input files
> compilation terminated.
> configure:2952: $? = 1
> configure:2972: checking whether the C compiler works
> configure:2994: x86_64-pc-linux-gnu-gcc -march=native -O2 -pipe -og
> -ggdb  -Wl,-O1 -Wl,--as-needed conftest.c  >&5
> configure:2998: $? = 0
> configure:3036: result: no
> configure: failed program was:
> | /* confdefs.h */
> | #define PACKAGE_NAME "libofx"
> | #define PACKAGE_TARNAME "libofx"
> | #define PACKAGE_VERSION "0.10.7"
> | #define PACKAGE_STRING "libofx 0.10.7"
> | #define PACKAGE_BUGREPORT ""
> | #define PACKAGE_URL ""
> | /* end confdefs.h.  */
> |
> | int
> | main ()
> | {
> |
> |   ;
> |   return 0;
> | }
> configure:3041: error: in
> `/var/tmp/portage/dev-libs/libofx-0.10.7/work/libofx-0.10.7':
> configure:3043: error: C compiler cannot create executables
> See `config.log' for more details
>
> The thing I find curious is that it appears to me that the output of
> the test compile is a file called "g" which I don't recall ever
> seeing, and so I wonder if the problem is that something has changed
> with gcc defaults and configure does not yet recognize that change.  I
> also don't know the  significance of the two "fatal error: no input
> files".
>
> The fact that this happens with two unrelated packages suggests that
> it's  not specific to either of them, but something in my system or
> configuration.
>
> Any thoughts or suggestions?
>
> Jack
>
>
>


I ran into this ages ago.  I think the fix was to reset which compiler
it is set to use.  I used to keep two installed, in case one would fail
or some package couldn't build with a newer version yet.  If I recall
correctly, I would list the available options with gcc-config -l and
then if two are available, set to older one and then change back or if
only one is installed, just set it to the one you have.  It's been a
good while and it could be that the cause of the problem has changed but
I don't think it will hurt anything to try this.  I think some settings
gets messed up and resetting it fixes it. 

Hope that helps.  If not, clueless.  :/

Dale

:-)  :-) 


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [gentoo-user] C compiler cannot create executables
  2022-09-10 18:47   ` Jack
@ 2022-09-10 18:55     ` Dale
  0 siblings, 0 replies; 18+ messages in thread
From: Dale @ 2022-09-10 18:55 UTC (permalink / raw
  To: gentoo-user

Jack wrote:
> On 9/10/22 14:49, Dale wrote:
>> Jack wrote:
>>> I now get this error trying to emerge two different packages:
>>> libofx-0.10.7 and gnupg (both 2.2.39 and 2.3.6).  It might also be the
>>> same problem for a few bugs on b.g.o found by searching on "cannot
>>> create exectuables."
>>>
>>> The relevant lines from build.log are
>>>
>>> checking for x86_64-pc-linux-gnu-gcc... x86_64-pc-linux-gnu-gcc
>>> checking whether the C compiler works... no
>>> configure: error: in
>>> `/var/tmp/portage/dev-libs/libofx-0.10.7/work/libofx-0.10.7':
>>> configure: error: C compiler cannot create executables
>>> See `config.log' for more details
>>>
>>> and from config.log:
>>>
>>> Thread model: posix
>>> Supported LTO compression algorithms: zlib
>>> gcc version 11.3.0 (Gentoo 11.3.0 p4)
>>> configure:2952: $? = 0
>>> configure:2941: x86_64-pc-linux-gnu-gcc -V >&5
>>> x86_64-pc-linux-gnu-gcc: error: unrecognized command-line option '-V'
>>> x86_64-pc-linux-gnu-gcc: fatal error: no input files
>>> compilation terminated.
>>> configure:2952: $? = 1
>>> configure:2941: x86_64-pc-linux-gnu-gcc -qversion >&5
>>> x86_64-pc-linux-gnu-gcc: error: unrecognized command-line option
>>> '-qversion'; did you mean '--version'?
>>> x86_64-pc-linux-gnu-gcc: fatal error: no input files
>>> compilation terminated.
>>> configure:2952: $? = 1
>>> configure:2972: checking whether the C compiler works
>>> configure:2994: x86_64-pc-linux-gnu-gcc -march=native -O2 -pipe -og
>>> -ggdb  -Wl,-O1 -Wl,--as-needed conftest.c  >&5
>>> configure:2998: $? = 0
>>> configure:3036: result: no
>>> configure: failed program was:
>>> | /* confdefs.h */
>>> | #define PACKAGE_NAME "libofx"
>>> | #define PACKAGE_TARNAME "libofx"
>>> | #define PACKAGE_VERSION "0.10.7"
>>> | #define PACKAGE_STRING "libofx 0.10.7"
>>> | #define PACKAGE_BUGREPORT ""
>>> | #define PACKAGE_URL ""
>>> | /* end confdefs.h.  */
>>> |
>>> | int
>>> | main ()
>>> | {
>>> |
>>> |   ;
>>> |   return 0;
>>> | }
>>> configure:3041: error: in
>>> `/var/tmp/portage/dev-libs/libofx-0.10.7/work/libofx-0.10.7':
>>> configure:3043: error: C compiler cannot create executables
>>> See `config.log' for more details
>>>
>>> The thing I find curious is that it appears to me that the output of
>>> the test compile is a file called "g" which I don't recall ever
>>> seeing, and so I wonder if the problem is that something has changed
>>> with gcc defaults and configure does not yet recognize that change.  I
>>> also don't know the  significance of the two "fatal error: no input
>>> files".
>>>
>>> The fact that this happens with two unrelated packages suggests that
>>> it's  not specific to either of them, but something in my system or
>>> configuration.
>>>
>>> Any thoughts or suggestions?
>>>
>>> Jack
>>>
>>>
>>>
>>
>> I ran into this ages ago.  I think the fix was to reset which compiler
>> it is set to use.  I used to keep two installed, in case one would fail
>> or some package couldn't build with a newer version yet.  If I recall
>> correctly, I would list the available options with gcc-config -l and
>> then if two are available, set to older one and then change back or if
>> only one is installed, just set it to the one you have.  It's been a
>> good while and it could be that the cause of the problem has changed but
>> I don't think it will hurt anything to try this.  I think some settings
>> gets messed up and resetting it fixes it.
>>
>> Hope that helps.  If not, clueless.  :/
>
> Thanks Dale, but I only have one version of gcc installed and both
> gcc-config and binutils-config show only one option.
>
> I do believe that David Haller pegged the problem, and I'll respond to
> his post after confirming.
>
> Jack
>
>
>


If your other option fails, just gcc-config 1 and see if it helps.  If
you have only one installed, it still resets when you do it.  This is
what it looks like on mine just now. 


root@fireball / # gcc-config -l
 [1] x86_64-pc-linux-gnu-11.3.0 *
root@fireball / # gcc-config 1
 * Switching native-compiler to x86_64-pc-linux-gnu-11.3.0 ...
 * Backing up '//usr/lib/gcc/x86_64-pc-linux-gnu/11.3.0/libgcc_s.so.1'
to '/lib64                                                             
[ ok ]
root@fireball / #

Just another option.  May help, may not.  :-D  I meant to include before
where I did it but forgot.  I remembered this time.  lol

Dale

:-)  :-) 


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [gentoo-user] C compiler cannot create executables
  2022-09-10 17:56 ` David Haller
@ 2022-09-10 19:44   ` Jack
  0 siblings, 0 replies; 18+ messages in thread
From: Jack @ 2022-09-10 19:44 UTC (permalink / raw
  To: gentoo-user

On 2022.09.10 13:56, David Haller wrote:
> Hello,
> 
> On Sat, 10 Sep 2022, Jack wrote:
> >I now get this error trying to emerge two different packages:  
> libofx-0.10.7
> >and gnupg (both 2.2.39 and 2.3.6).  It might also be the same  
> problem for a
> >few bugs on b.g.o found by searching on "cannot create exectuables."
> >
> >The relevant lines from build.log are
> >
> >checking for x86_64-pc-linux-gnu-gcc... x86_64-pc-linux-gnu-gcc
> >checking whether the C compiler works... no
> >configure: error: in
> >`/var/tmp/portage/dev-libs/libofx-0.10.7/work/libofx-0.10.7':
> >configure: error: C compiler cannot create executables
> >See `config.log' for more details
> >
> >and from config.log:
> >
> >configure:2941: x86_64-pc-linux-gnu-gcc -V >&5
> >x86_64-pc-linux-gnu-gcc: error: unrecognized command-line option '-V'
> >x86_64-pc-linux-gnu-gcc: fatal error: no input files
> >compilation terminated.
> >configure:2952: $? = 1
> >configure:2941: x86_64-pc-linux-gnu-gcc -qversion >&5
> >x86_64-pc-linux-gnu-gcc: error: unrecognized command-line option  
> '-qversion';
> >did you mean '--version'?
> >x86_64-pc-linux-gnu-gcc: fatal error: no input files
> >compilation terminated.
> >configure:2952: $? = 1
> 
> These tests are normal fails with gcc, they are version checks for
> other compilers.
> 
> >configure:2972: checking whether the C compiler works
> >configure:2994: x86_64-pc-linux-gnu-gcc -march=native -O2 -pipe -og  
> -ggdb 
> >-Wl,-O1 -Wl,--as-needed conftest.c  >&5
> >configure:2998: $? = 0
> >configure:3036: result: no
> >configure: failed program was:
> [..boilerplate..]
> >configure:3041: error: in
> >`/var/tmp/portage/dev-libs/libofx-0.10.7/work/libofx-0.10.7':
> >configure:3043: error: C compiler cannot create executables
> >See `config.log' for more details
> >
> >The thing I find curious is that it appears to me that the output of  
> the test
> >compile is a file called "g" which I don't recall ever seeing, and  
> so I
> >wonder if the problem is that something has changed with gcc  
> defaults and
> >configure does not yet recognize that change.  I also don't know the 
> >significance of the two "fatal error: no input files".
> >
> >The fact that this happens with two unrelated packages suggests that  
> it's 
> >not specific to either of them, but something in my system or  
> configuration.
> 
> And it's a standard autoconf macro, namely AC_PROG_CC that results in
> the error and the stuff before that is also standard. And as no
> autoreconf is called, autotools versions should not matter.
> 
> >Any thoughts or suggestions?
> 
> I use gcc 11.3.0 here as well, and have no problem. Check for the
> variables CC, CFLAGS, CPPFLAGS, LDFLAGS and LIBS in
> /var/tmp/portage/dev-libs/libofx-0.10.7/temp/environment.
> 
> Somehow, that '-og' must have crept in there.
David - thank you, thank you, thank you.

No wonder my recent debugging wasn't doing what I expected.  That stray  
"-og" was supposed to be "-Og" (upper instead of lower case) and it is  
in /etc/portage/env/debug.conf, which is referenced in  
/etc/portage/package.env for those packages I wish to compile with  
various debugging related compiler settings, as well as not deleting  
the build dir, even on success.

It shows what a fresh pair of eyes can do.  When looking at the various  
error related files, I really just saw -Og, and when you pointed that  
out, my first thought was why any debugging setting would possible  
cause this type of failure.  Of course in hindsight, it now all makes  
sense.

Thanks again to the list for all sorts of ongoing assistance.

Jack


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2022-09-10 19:44 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-10 15:24 [gentoo-user] C compiler cannot create executables Jack
2022-09-10 15:42 ` Arve Barsnes
2022-09-10 15:41   ` Jack
2022-09-10 17:27   ` Jack
2022-09-10 17:56 ` David Haller
2022-09-10 19:44   ` Jack
2022-09-10 18:49 ` Dale
2022-09-10 18:47   ` Jack
2022-09-10 18:55     ` Dale
  -- strict thread matches above, loose matches on Subject: below --
2005-11-24  4:49 Michael Sullivan
2005-11-24  5:35 ` W.Kenworthy
2005-11-24  6:39 ` Spider (D.m.D. Lj.)
2005-11-24 12:05 ` Matthias Langer
2005-11-24 12:18   ` Holly Bostick
2005-11-24 16:09   ` Michael Sullivan
2005-11-24 16:16     ` Michael Sullivan
2005-11-24 17:20     ` Michael Sullivan
2005-11-24 17:27       ` Michael Sullivan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox