Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 416697 - cross-x86_64-pc-linux-gnu/binutils-2.22-r1 - configure:4060: i686-pc-linux-gnu-gcc -O2 -march=pentium4 ... // conftest.c:1:0: error: CPU you selected does not support x86-64 instruction set
Summary: cross-x86_64-pc-linux-gnu/binutils-2.22-r1 - configure:4060: i686-pc-linux-gn...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
: 431524 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-05-20 09:17 UTC by Vu Tran Kien
Modified: 2017-06-22 21:16 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
crossdev info (cross-x86_64-pc-linux-gnu-info.log,13.84 KB, text/plain)
2012-05-21 08:33 UTC, Vu Tran Kien
Details
crossdev binutils build log (build.log,4.83 KB, text/plain)
2012-05-21 08:35 UTC, Vu Tran Kien
Details
binutils config.log (binutils-config.logs.tar.xz,4.87 KB, application/x-xz)
2012-05-21 08:37 UTC, Vu Tran Kien
Details
cross-binutil environment file (binutil-environment,119.05 KB, text/plain)
2012-05-25 06:16 UTC, Vu Tran Kien
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vu Tran Kien 2012-05-20 09:17:37 UTC
I'm on a x86 machine and want to set up toolchain for amd64 with crossdev. So I called: crossdev -t x86_64-pc-linux-gnu, but the command failed with: C compiler cannot create executable.
Further investigation I figured out that crossdev is using the wrong abi for x86 machine: amd64, so I have to provide crossdev with: --abis i686
So if I was correct then please set the default abi for crossdev on x86 to i686 so it won't confuse newbies like me!
Thanks!!

Step to reproduce:
1. Sit on a  x86 machine
2. fireup: crossdev -t x86_64-pc-linux-gnu

last lines of the log (of failed build) :
[...]
checking whether ln -s works... yes
checking for a sed that does not truncate output... /bin/sed
checking for gawk... gawk
checking for i686-pc-linux-gnu-gcc... i686-pc-linux-gnu-gcc
checking for C compiler default output file name... 
configure: error: in `/var/tmp/portage/cross-x86_64-pc-linux-gnu/binutils-2.22-r
1/work/build':
configure: error: C compiler cannot create executables
See `config.log' for more details.
 * ERROR: cross-x86_64-pc-linux-gnu/binutils-2.22-r1 failed (compile phase):
 *   (no error message)
 * 
 * Call stack:
 *     ebuild.sh, line   85:  Called src_compile
 *   environment, line 2773:  Called toolchain-binutils_src_
[...]
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2012-05-21 03:55:41 UTC
1) Please attach to this bug report all files that the crossdev output mentions.
Comment 2 Vu Tran Kien 2012-05-21 08:33:22 UTC
Created attachment 312473 [details]
crossdev info
Comment 3 Vu Tran Kien 2012-05-21 08:35:05 UTC
Created attachment 312475 [details]
crossdev binutils build log
Comment 4 Vu Tran Kien 2012-05-21 08:37:18 UTC
Created attachment 312477 [details]
binutils config.log
Comment 5 Vu Tran Kien 2012-05-21 08:38:30 UTC
Sorry I've forgot. Here you are!
Comment 6 Jeroen Roovers (RETIRED) gentoo-dev 2012-05-23 13:42:48 UTC
configure: error: in `/var/tmp/portage/cross-x86_64-pc-linux-gnu/binutils-2.22-r1/work/build':
configure: error: C compiler cannot create executables
See `config.log' for more details.
Comment 7 Jeroen Roovers (RETIRED) gentoo-dev 2012-05-23 13:46:17 UTC
Now, should crossdev filter these out or should the toolchain ebuilds handle it themselves?
Comment 8 SpanKY gentoo-dev 2012-05-25 05:33:43 UTC
i686 is not a valid ABI

the error you posted makes no sense.  what do you see if you run:
$ echo 'main(){}' > test.c
$ i686-pc-linux-gnu-gcc -O2 -march=pentium4 -mtune=pentium4  -Wl,-O1 \
  -Wl,--as-needed test.c
Comment 9 Vu Tran Kien 2012-05-25 06:01:27 UTC
the two command exitted successfully.
file ./a.out gives: 
./a.out: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped
Comment 10 Vu Tran Kien 2012-05-25 06:16:56 UTC
Created attachment 313023 [details]
cross-binutil environment file

May be the environment file will help
Comment 11 SpanKY gentoo-dev 2012-08-15 15:02:56 UTC
*** Bug 431524 has been marked as a duplicate of this bug. ***
Comment 12 Andreas K. Hüttel archtester gentoo-dev 2017-06-22 21:16:06 UTC
binutils-2.22-r1 is long gone.