graydon/rust — Issue #1218: Cannot build on Fedora: wrong CPUTYPE?
Author: Dubhead
Created: 2011-11-24 05:31:39+00:00
State: open

make fails like this:

compile: rt/i686-unknown-linux-gnu/sync/timer.o
In file included from /usr/include/features.h:387:0,
from /usr/include/stdlib.h:25,
from ../src/rt/sync/../globals.h:11,
from ../src/rt/sync/timer.cpp:1:
/usr/include/gnu/stubs.h:7:27: fatal error: gnu/stubs-32.h: No such file or directory
compilation terminated.
make: *** [rt/i686-unknown-linux-gnu/sync/timer.o] Error 1

The host is Fedora 16 x86_64; there is /usr/include/gnu/stubs-64.h but not stubs-32.h.
The last part of configure's output is:

configure: writing configuration
configure:
configure: CFG_SRC_DIR := ../
configure: CFG_BUILD_DIR := /home/miura/Rust/build
configure: CFG_OSTYPE := unknown-linux-gnu
configure: CFG_CPUTYPE := i686
configure: CFG_CONFIGURE_ARGS :=
configure: CFG_HOST_TRIPLE := i686-unknown-linux-gnu
configure: CFG_TARGET_TRIPLES := i686-unknown-linux-gnu
configure: CFG_C_COMPILER := gcc
configure: CFG_PREFIX := /usr/local
configure: CFG_LLVM_ROOT :=
configure: CFG_LLVM_SRC_DIR := ../src/llvm
configure: CFG_LLVM_BUILD_DIR_i686_unknown_linux_gnu := /home/miura/Rust/build/llvm/i686-un ...
configure: CFG_LLVM_INST_DIR_i686_unknown_linux_gnu := /home/miura/Rust/build/llvm/i686-un ...
configure:
configure: cp ../Makefile.in ./Makefile
configure:
configure: complete
configure:

So it looks like configure wrongly detects the CPUTYPE as i686.

% cat /etc/fedora-release
Fedora release 16 (Verne)
% uname -a
Linux miura-pc2 3.1.1-2.fc16.x86_64 #1 SMP Mon Nov 14 15:46:10 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux