Skip to content

Rust-0.8 : compilation fails #9610

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
eliovir opened this issue Sep 29, 2013 · 25 comments
Closed

Rust-0.8 : compilation fails #9610

eliovir opened this issue Sep 29, 2013 · 25 comments

Comments

@eliovir
Copy link
Contributor

eliovir commented Sep 29, 2013

Hi,

Whereas I installed Rust-0.7 few days ago without problem, I can't install (./configure; make) the last 0.8 version.

This is where the make process fails:

[..]
...
llvm[3]: Compiling WinCOFFStreamer.cpp for Release+Asserts build
llvm[3]: Building Release+Asserts Archive Library libLLVMMC.a
make[3] : on quitte le répertoire « /var/tmp/portage/dev-lang/rust-0.8/work/rust-0.8/x86_64-unknown-linux-gnu/llvm/lib/MC »
make[2] : on quitte le répertoire « /var/tmp/portage/dev-lang/rust-0.8/work/rust-0.8/x86_64-unknown-linux-gnu/llvm/lib »
make[2] : on entre dans le répertoire « /var/tmp/portage/dev-lang/rust-0.8/work/rust-0.8/x86_64-unknown-linux-gnu/llvm/tools/llvm-config »
llvm[2]: Constructing LLVMBuild project information.
Usage: llvm-build [options]

llvm-build: error: invalid native target: 'x86_64' (not in project)
llvm[2]: Building llvm-config BuildVariables.inc file.
llvm[2]: Compiling llvm-config.cpp for Release+Asserts build
/var/tmp/portage/dev-lang/rust-0.8/work/rust-0.8/src/llvm/tools/llvm-config/llvm-config.cpp:45:35: erreur fatale: LibraryDependencies.inc : Aucun fichier ou dossier de ce type
compilation terminée.
/bin/rm: impossible de supprimer « /var/tmp/portage/dev-lang/rust-0.8/work/rust-0.8/x86_64-unknown-linux-gnu/llvm/tools/llvm-config/Release+Asserts/llvm-config.d.tmp »: Aucun fichier ou dossier de ce type

This message llvm-build: error: invalid native target: 'x86_64' (not in project) is strange.

I tried with GCC-4.6.3 and GCC-4.7.3, with the same result.

I remove Rust-0.7, tried to compile Rust-0.8 : same result.

Finally, I built again Rust-0.7, with success.

@alexcrichton
Copy link
Member

Would you mind gisting an entire transcript of the make/configure logs?

@cnd
Copy link
Contributor

cnd commented Sep 30, 2013

This bug on overlay with some additional info: https://github.com/Heather/gentoo-rust/issues/3

@eliovir
Copy link
Contributor Author

eliovir commented Sep 30, 2013

I've just tried to build (with the Gentoo emerge tool) rust-0.8 on an fresh updated system (and faster xeon machine instead of amd64x2). Same result.

This is the build.log : https://gist.github.com/eliovir/6760286

Thanks for your help.

@alexcrichton
Copy link
Member

That's interesting... I've seen problems like that when updating an already used rust workspace, but never with a fresh one. It also looks like it's using emake instead of make, and I'm not entirely sure what the difference between the two are.

Do you know if this is building with -jN for some N > 1?

@cnd
Copy link
Contributor

cnd commented Sep 30, 2013

@eliovir trying with -j1 could also be helpful. also if you build with clang then try to build without it... Seems like we just currently have no idea what is happening there for now :S

@eliovir
Copy link
Contributor Author

eliovir commented Oct 1, 2013

I've tried typing

tar zxvf /usr/portage/distfiles/rust-0.8.tar.gz;
cd rust-0.8/;
mkdir dl/;
ln -s /usr/portage/distfiles/rust-stage0-2013-09-23-348d844-linux-x86_64-47906010eb676cbf9e0caa0773d9ef2dce89e9f8.tar.bz2 dl/;
./configure;
make -j1

, the result still is the same.

cfg: build triple x86_64-unknown-linux-gnu
cfg: host triples x86_64-unknown-linux-gnu
cfg: target triples x86_64-unknown-linux-gnu
cfg: enabling more debugging (CFG_ENABLE_DEBUG)
cfg: host for x86_64-unknown-linux-gnu is x86_64
cfg: os for x86_64-unknown-linux-gnu is unknown-linux-gnu
cfg: using gcc
cfg: no pandoc found, omitting docs
cfg: no node found, omitting docs
cfg: no llnextgen found, omitting grammar-verification
cfg: no pandoc found, omitting library doc build
fetch: x86_64-unknown-linux-gnu/stage0/bin/rustc
determined most recent snapshot: rust-stage0-2013-09-23-348d844-linux-x86_64-47906010eb676cbf9e0caa0773d9ef2dce89e9f8.tar.bz2
got download with ok hash
opening snapshot dl/rust-stage0-2013-09-23-348d844-linux-x86_64-47906010eb676cbf9e0caa0773d9ef2dce89e9f8.tar.bz2
extracting rust-stage0/bin/rustc
extracting rust-stage0/lib/libstd-6c65cf4b443341b1-0.8.so
extracting rust-stage0/lib/libextra-a7c050cfd46b2c9a-0.8.so
extracting rust-stage0/lib/librustc-d3cb8c2ccd84a7a7-0.8.so
extracting rust-stage0/lib/libsyntax-64629f7f0c6a9bc-0.8.so
extracting rust-stage0/lib/librustrt.so
extracting rust-stage0/lib/librustllvm.so
compile: x86_64-unknown-linux-gnu/rt/stage0/sync/lock_and_signal.o
compile: x86_64-unknown-linux-gnu/rt/stage0/sync/rust_thread.o
compile: x86_64-unknown-linux-gnu/rt/stage0/rust_builtin.o
compile: x86_64-unknown-linux-gnu/rt/stage0/rust_rng.o
compile: x86_64-unknown-linux-gnu/rt/stage0/rust_upcall.o
compile: x86_64-unknown-linux-gnu/rt/stage0/rust_uv.o
compile: x86_64-unknown-linux-gnu/rt/stage0/miniz.o
compile: x86_64-unknown-linux-gnu/rt/stage0/memory_region.o
compile: x86_64-unknown-linux-gnu/rt/stage0/boxed_region.o
compile: x86_64-unknown-linux-gnu/rt/stage0/arch/x86_64/context.o
compile: x86_64-unknown-linux-gnu/rt/stage0/arch/x86_64/gpr.o
compile: x86_64-unknown-linux-gnu/rt/stage0/rust_android_dummy.o
compile: x86_64-unknown-linux-gnu/rt/stage0/rust_test_helpers.o
compile: x86_64-unknown-linux-gnu/rt/stage0/linenoise/linenoise.o
compile: x86_64-unknown-linux-gnu/rt/stage0/linenoise/utf8.o
compile: x86_64-unknown-linux-gnu/rt/stage0/sundown/src/autolink.o
compile: x86_64-unknown-linux-gnu/rt/stage0/sundown/src/buffer.o
compile: x86_64-unknown-linux-gnu/rt/stage0/sundown/src/stack.o
compile: x86_64-unknown-linux-gnu/rt/stage0/sundown/src/markdown.o
compile: x86_64-unknown-linux-gnu/rt/stage0/sundown/html/houdini_href_e.o
compile: x86_64-unknown-linux-gnu/rt/stage0/sundown/html/houdini_html_e.o
compile: x86_64-unknown-linux-gnu/rt/stage0/sundown/html/html_smartypants.o
compile: x86_64-unknown-linux-gnu/rt/stage0/sundown/html/html.o
cfg: build triple x86_64-unknown-linux-gnu
cfg: host triples x86_64-unknown-linux-gnu
cfg: target triples x86_64-unknown-linux-gnu
cfg: enabling more debugging (CFG_ENABLE_DEBUG)
cfg: host for x86_64-unknown-linux-gnu is x86_64
cfg: os for x86_64-unknown-linux-gnu is unknown-linux-gnu
cfg: using gcc
cfg: no pandoc found, omitting docs
cfg: no node found, omitting docs
cfg: no llnextgen found, omitting grammar-verification
cfg: no pandoc found, omitting library doc build
cfg: including dist rules
cfg: including snap rules
cfg: including clean rules
make[1]: Entering directory `/tmp/rust-0.8'
make[2]: Entering directory `/tmp/rust-0.8/x86_64-unknown-linux-gnu/llvm'
llvm[2]: Constructing LLVMBuild project information.
Usage: llvm-build [options]

llvm-build: error: invalid native target: 'x86_64' (not in project)
make[3]: Entering directory `/tmp/rust-0.8/x86_64-unknown-linux-gnu/llvm/lib/Support'
llvm[3]: Constructing LLVMBuild project information.
Usage: llvm-build [options]

@thestinger
Copy link
Contributor

@eliovir: are you using the unmodified Rust sources?

@eliovir
Copy link
Contributor Author

eliovir commented Oct 1, 2013

@thestinger: Yes, downloaded from the website.

@eliovir
Copy link
Contributor Author

eliovir commented Oct 1, 2013

I've just tried with the current git sources (master), the result still is the same.

@alexcrichton
Copy link
Member

It doesn't look your most recent post has the build failure. The llvm-build: error messages probably mean something's going wrong, but they're not stopping the build from what it looks like, could you post the full transcript?

@eliovir
Copy link
Contributor Author

eliovir commented Oct 1, 2013

@alexcrichton : it is always the same. The llvm-build: error yet appeared at https://gist.github.com/eliovir/6760286#file-gistfile1-txt-L799. This error message does not appear during the build of rust-0.7.

@alexcrichton
Copy link
Member

Is that the same log where you ran make -j1 explicitly? At the end it says stuff about emake so I just wanted to make sure.

@eliovir
Copy link
Contributor Author

eliovir commented Oct 1, 2013

@alexcrichton : Thanks for you time.

emake is a function for Gentoo ebuild. The gist comes from a Gentoo emerge failure.

Exactly the same output is generated (path excepted) with manual command ./configure; make. The argument -j1 does not change anything.

@alexcrichton
Copy link
Member

Out of curiosity, what is the main version of the python command? Also, if you re-run make in the same directory, does it work the second time (sometimes we've seen that).

@eliovir
Copy link
Contributor Author

eliovir commented Oct 1, 2013

The version used by the Makefile is 2.7.5.

If I run another time make in the same directory, the same fatal error about LibraryDependencies.inc stops the build.

@alexcrichton
Copy link
Member

Our Makefile probes for a version 2 python, although I saw on some mailing lists that this error cropped up when the system python wasn't necessarily 2, is the normal python binary actually version 2.7.5?

@eliovir
Copy link
Contributor Author

eliovir commented Oct 2, 2013

Yes, python --version returns 2.7.5; configure shows that this version is detected. NB: on these systems, Python3 is also installed.

@pnkfelix
Copy link
Member

pnkfelix commented Oct 2, 2013

We might want a verbose variant of the log, with: make -j1 VERBOSE=1, since that will tell us the commands that are being run.

(Also, I personally recommend remake, the GNU Make debugger for debugging makefile problems: http://bashdb.sourceforge.net/remake/ )

@eliovir
Copy link
Contributor Author

eliovir commented Oct 3, 2013

This is the verbose log, using remake clean all -j1 VERBOSE=1 https://gist.github.com/eliovir/6812883

@alexcrichton
Copy link
Member

Hmm, it looks like LLVM was pre-configured from before, could paste the same output but starting from a completely clean clone instead? I'm curious what the configure logs of LLVM will mention.

Also if you could include the log of ./configure in the gist that may also be useful.

@eliovir
Copy link
Contributor Author

eliovir commented Oct 3, 2013

This is the log from ./configure : https://gist.github.com/eliovir/6815152 . The log for remake clean all -j1 VERBOSE=1 is https://gist.github.com/eliovir/6815206 .

Thanks for your help

@alexcrichton
Copy link
Member

Could you give the output of these commands?

cd src/llvm
git rev-parse HEAD
cat lib/Target/X86/LLVMBuild.txt

@eliovir
Copy link
Contributor Author

eliovir commented Oct 3, 2013

From the uncompressed (rust-0.8.tar.bz2), this is the outputs:

$ git rev-parse HEAD

fatal: Not a git repository (or any of the parent directories): .git

$ cat lib/Target/X86/LLVMBuild.txt

;===- ./lib/Target/X86/LLVMBuild.txt ---------------------------*- Conf -*--===;
;
;                     The LLVM Compiler Infrastructure
;
; This file is distributed under the University of Illinois Open Source
; License. See LICENSE.TXT for details.
;
;===------------------------------------------------------------------------===;
;
; This is an LLVMBuild description file for the components in this subdirectory.
;
; For more information on the LLVMBuild system, please see:
;
;   http://llvm.org/docs/LLVMBuild.html
;
;===------------------------------------------------------------------------===;

[common]
subdirectories = AsmParser Disassembler InstPrinter MCTargetDesc TargetInfo Utils

[component_0]
type = TargetGroup
name = X86
parent = Target
has_asmparser = 1
has_asmprinter = 1
has_disassembler = 1
has_jit = 1

[component_1]
type = Library
name = X86CodeGen
parent = X86
required_libraries = Analysis AsmPrinter CodeGen Core MC SelectionDAG Support Target X86AsmPrinter X86Desc X86Info X86Utils
add_to_library_groups = X86

From the GIT sources : (configure log : https://gist.github.com/eliovir/6816984 , remake log : https://gist.github.com/eliovir/6817019)

$ git rev-parse HEAD

c9ffab392a39eb85f2f15ffc8d41e8c4f4397b8e

$ cat lib/Target/X86/LLVMBuild.txt

;===- ./lib/Target/X86/LLVMBuild.txt ---------------------------*- Conf -*--===;
;
;                     The LLVM Compiler Infrastructure
;
; This file is distributed under the University of Illinois Open Source
; License. See LICENSE.TXT for details.
;
;===------------------------------------------------------------------------===;
;
; This is an LLVMBuild description file for the components in this subdirectory.
;
; For more information on the LLVMBuild system, please see:
;
;   http://llvm.org/docs/LLVMBuild.html
;
;===------------------------------------------------------------------------===;

[common]
subdirectories = AsmParser Disassembler InstPrinter MCTargetDesc TargetInfo Utils

[component_0]
type = TargetGroup
name = X86
parent = Target
has_asmparser = 1
has_asmprinter = 1
has_disassembler = 1
has_jit = 1

[component_1]
type = Library
name = X86CodeGen
parent = X86
required_libraries = Analysis AsmPrinter CodeGen Core MC SelectionDAG Support Target X86AsmPrinter X86Desc X86Info X86Utils
add_to_library_groups = X86

@kunthar
Copy link

kunthar commented Jan 1, 2014

Why in the earth you try to compile with -m32 in 64 with system?

configure: looking at LLVM
configure:
configure: configuring LLVM for i686-unknown-linux-gnu
configure: configuring LLVM with:
configure: --enable-targets=x86_64 --enable-optimized --enable-assertions --disable-docs --enable-bindings=none --disable-terminfo --disable-zlib --disable-libffi --build=i686-unknown-linux-gnu                         --host=i686-unknown-linux-gnu --target=i686-unknown-linux-gnu --with-python=/usr/bin/python2.7
/rust/rust-0.8/src/llvm/configure: line 1995: -m32: command not found
/rust/rust-0.8/src/llvm/configure: line 1996: -m32: command not found
checking for i686-unknown-linux-gnu-clang... gcc -m32
checking for C compiler default output file name... configure: error: C compiler cannot create executables
See `config.log' for more details.
Linux bea687a3baa8 3.11.0-13-generic #20-Ubuntu SMP Wed Oct 23 07:38:26 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

Your configure script screwed basically and can't understand the base OS.

How we gonna solve this now?

I have disabled targets to only "--enable-targets=x86_64" but not avail.

@flaper87
Copy link
Contributor

closing since 0.8 is quite old already and the issue has been stalled for several months now.

flip1995 pushed a commit to flip1995/rust that referenced this issue Oct 20, 2022
Don't suggest moving tuple structs with a significant drop to late evaluation

fixes rust-lang#9608

changelog: Don't suggest moving tuple structs with a significant drop to late evaluation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants