rust-lang / rust

Empowering everyone to build reliable and efficient software.
https://www.rust-lang.org
Other
98.03k stars 12.68k forks source link

Running rustc -V binary on SailfishOS 2.0.1.11 (Taalojärvi) (armv7hl) raised Exception #33483

Closed corvinux closed 8 years ago

corvinux commented 8 years ago

LOG of whole installation process, running script curl https://sh.rustup.rs -sSf | sh as suggested on https://www.rustup.rs/ is here http://paste2.org/y23WWxCA,

This is output from journalctrl -f regarding running rustc -V in bash cli May 07 18:55:24 Jolla kernel: rustc (13431): undefined instruction: pc=402c8d68 May 07 18:55:24 Jolla kernel: Code: e320f000 e320f000 f2200150 e12fff1e (ec510f1e) May 07 18:55:24 Jolla kernel: rustc(13431) send signal 4 to rustc(13431) May 07 18:55:24 Jolla kernel: rustc: unhandled page fault (11) at 0xbe8ce5fc, code 0x805 May 07 18:55:24 Jolla kernel: pgd = e4fc0000 May 07 18:55:24 Jolla kernel: [be8ce5fc] *pgd=00000000 May 07 18:55:24 Jolla kernel: May 07 18:55:24 Jolla kernel: Pid: 13432, comm: rustc May 07 18:55:24 Jolla kernel: CPU: 0 Tainted: P W O (3.4.108.20150901.1 #1) May 07 18:55:24 Jolla kernel: PC is at 0x400aedf0 May 07 18:55:24 Jolla kernel: LR is at 0x400a0e61 May 07 18:55:24 Jolla kernel: pc : [<400aedf0>] lr : [<400a0e61>] psr: 60070030 sp : be8ce600 ip : beacecec fp : beacef1c May 07 18:55:24 Jolla kernel: r10: 0020061a r9 : 400b1494 r8 : beacee7c May 07 18:55:24 Jolla kernel: r7 : beacec38 r6 : beacee44 r5 : be8ce610 r4 : beacef1c May 07 18:55:24 Jolla kernel: r3 : 00000004 r2 : 00000000 r1 : 00163780 r0 : 00000003 May 07 18:55:24 Jolla kernel: Flags: nZCv IRQs on FIQs on Mode USER_32 ISA Thumb Segment user May 07 18:55:24 Jolla kernel: Control: 10c5787d Table: a51c006a DAC: 00000015 May 07 18:55:24 Jolla kernel: from May 07 18:55:24 Jolla kernel: from May 07 18:55:24 Jolla kernel: from May 07 18:55:24 Jolla kernel: from May 07 18:55:24 Jolla kernel: Exception stack(0xc4543fb0 to 0xc4543ff8) May 07 18:55:24 Jolla kernel: 3fa0: 00000003 00163780 00000000 00000004 May 07 18:55:24 Jolla kernel: 3fc0: beacef1c be8ce610 beacee44 beacec38 beacee7c 400b1494 0020061a beacef1c May 07 18:55:24 Jolla kernel: 3fe0: beacecec be8ce600 400a0e61 400aedf0 60070030 ffffffff May 07 18:55:24 Jolla kernel: rustc(13432) send signal 11 to rustc(13432)

MagaTailor commented 8 years ago

If it doesn't happen with the arm- triple (instead of armv7), the ARM part you're running this on probably doesn't have NEON. (Thumb2?)

If it still does, run the command in gdb and post the backtrace.

corvinux commented 8 years ago

[root@Jolla ~]# cat /proc/cpuinfo Processor : ARMv7 Processor rev 4 (v7l) processor : 0 BogoMIPS : 13.53

processor : 1 BogoMIPS : 13.53

Features : swp half thumb fastmult vfp edsp neon vfpv3 tls CPU implementer : 0x51 CPU architecture: 7 CPU variant : 0x1 CPU part : 0x04d CPU revision : 4

Hardware : QCT MSM8930 CDP Revision : 300000 Serial : 0000000000000000

I've installed Nightly Build: [root@Jolla tmp]# curl -sSf https://static.rust-lang.org/rustup.sh | sh -s -- --channel=nightly rustup: gpg available. signatures will be verified rustup: downloading manifest for 'nightly' rustup: downloading toolchain for 'nightly' ######################################################################## 100.0% gpg: Signature made Sun May 8 14:18:57 2016 CEST using RSA key ID 7B3B09DC gpg: Good signature from "Rust Language (Tag and Release Signing Key) rust-key@rust-lang.org" gpg: WARNING: This key is not certified with a trusted signature! gpg: There is no indication that the signature belongs to the owner. Primary key fingerprint: 108F 6620 5EAE B0AA A8DD 5E1C 85AB 96E6 FA1B E5FE Subkey fingerprint: C134 66B7 E169 A085 1886 3216 5CB4 A934 7B3B 09DC rustup: installing toolchain for 'nightly' rustup: extracting installer install: creating uninstall script at /usr/local/lib/rustlib/uninstall.sh install: installing component 'rustc' install: installing component 'rust-std-armv7-unknown-linux-gnueabihf' install: installing component 'rust-docs' install: installing component 'cargo'

Rust is ready to roll.

When I try to run lustc -V or what ever I get this: [root@Jolla ~]# rust-gdb [root@Jolla ~]# dmesg [88921.186285] rustc: unhandled page fault (11) at 0xbec2ac74, code 0x817 [88921.186285] pgd = c301c000 [88872.251659] sps:BAM 0x124c2000 enabled: ver:0x5, number of pipes:6 [88921.186315] [bec2ac74] pgd=a47ca831 [88921.186315] , pte=00000000, *ppte=00000000

[88921.186346] Pid: 32077, comm: rustc [88921.186346] CPU: 1 Tainted: P W O (3.4.108.20150901.1 #1) [88921.186376] PC is at 0x4012cdf0 [88921.186376] LR is at 0x4011ee61 [88921.186407] pc : [<4012cdf0>] lr : [<4011ee61>] psr: 60070030 sp : bec2ac78 ip : bee2c2a8 fp : bee2c4dc [88921.186407] r10: 002015a0 r9 : 4012f494 r8 : bee2c43c [88921.186437] r7 : bee2c230 r6 : bee2c404 r5 : bec2ac88 r4 : bee2c4dc [88921.186437] r3 : 00000004 r2 : 00000000 r1 : 00163d30 r0 : 00000003 [88921.186468] Flags: nZCv IRQs on FIQs on Mode USER_32 ISA Thumb Segment user [88921.186468] Control: 10c5787d Table: 8321c06a DAC: 00000015 [88921.186498] from [88921.186529] from [88921.186559] from [88921.186590] from [88921.186590] Exception stack(0xc3053fb0 to 0xc3053ff8) [88921.186620] 3fa0: 00000003 00163d30 00000000 00000004 [88921.186620] 3fc0: bee2c4dc bec2ac88 bee2c404 bee2c230 bee2c43c 4012f494 002015a0 bee2c4dc [88921.186651] 3fe0: bee2c2a8 bec2ac78 4011ee61 4012cdf0 60070030 ffffffff [88921.186651] rustc(32077) send signal 11 to rustc(32077) Which as I know, shouldn't happened.

corvinux commented 8 years ago

[root@Jolla ~]# rustc --help Segmentation fault [root@Jolla ~]# rustc -V
Segmentation fault [root@Jolla ~]#

corvinux commented 8 years ago

(gdb) run Starting program: /usr/local/bin/rustc

Program received signal SIGSEGV, Segmentation fault. lseek () at ../sysdeps/unix/syscall-template.S:81 81 ../sysdeps/unix/syscall-template.S: No such file or directory. (gdb) backtrace

0 lseek () at ../sysdeps/unix/syscall-template.S:81

1 0x40004e60 in open_verify (name=name@entry=0xbefff268 "/usr/local/bin/../lib/libstd-1d20f6bd73ff8b5a.so",

fbp=fbp@entry=0xbefff3f4, loader=loader@entry=0x4002a908, whatcode=whatcode@entry=4, found_other_class=0xbefff3e0, 
free_name=false) at dl-load.c:2134

2 0x40005138 in open_path (name=name@entry=0x2a0004d5 "libstd-1d20f6bd73ff8b5a.so", namelen=namelen@entry=27,

secure=secure@entry=0, sps=<optimized out>, realname=realname@entry=0xbefff3e8, fbp=fbp@entry=0xbefff3f4, 
loader=loader@entry=0x4002a908, whatcode=whatcode@entry=4, found_other_class=found_other_class@entry=0xbefff3e0)
at dl-load.c:2252

3 0x400074c8 in _dl_map_object (loader=0x4002a908, name=0x2a0004d5 "libstd-1d20f6bd73ff8b5a.so", type=1, trace_mode=0,

mode=mode@entry=0, nsid=nsid@entry=0) at dl-load.c:2459

4 0x4000a83e in openaux (a=0xbefff8a0) at dl-deps.c:63

5 0x4000c68c in _dl_catch_error (objname=objname@entry=0xbefff898, errstring=errstring@entry=0xbefff890,

mallocedp=mallocedp@entry=0xbefff888, operate=0x4000a819 <openaux>, args=args@entry=0xbefff8a0) at dl-error.c:187

6 0x4000acb4 in _dl_map_object_deps (map=map@entry=0x4002a908, preloads=, npreloads=npreloads@entry=0,

trace_mode=trace_mode@entry=0, open_mode=open_mode@entry=0) at dl-deps.c:254

7 0x400027ec in dl_main (phdr=, phnum=, user_entry=, auxv=)

at rtld.c:1774

8 0x400116fe in _dl_sysdep_start (start_argptr=start_argptr@entry=0xbefffcb0, dl_main=0x400011ad )

at ../elf/dl-sysdep.c:249

9 0x4000114a in _dl_start_final (arg=arg@entry=0xbefffcb0, info=info@entry=0xbefffa30) at rtld.c:332

10 0x40003f36 in _dl_start (arg=0xbefffcb0) at rtld.c:560

11 0x40000c4e in _start () from /lib/ld-linux-armhf.so.3

12 0x40000c4e in _start () from /lib/ld-linux-armhf.so.3

Backtrace stopped: previous frame identical to this frame (corrupt stack?)

MagaTailor commented 8 years ago

Two questions:

corvinux commented 8 years ago

I've tried also yesterday compiling from rustc-nightly source on my Jolla phone. make && make install

. It has stopped with this COMPILE: triple/builtins/arm: /root/tmp/rustc-nightly/src/compiler-rt/lib/builtins/udivsi3.c COMPILE: triple/builtins/arm: /root/tmp/rustc-nightly/src/compiler-rt/lib/builtins/udivti3.c COMPILE: triple/builtins/arm: /root/tmp/rustc-nightly/src/compiler-rt/lib/builtins/umoddi3.c COMPILE: triple/builtins/arm: /root/tmp/rustc-nightly/src/compiler-rt/lib/builtins/umodsi3.c COMPILE: triple/builtins/arm: /root/tmp/rustc-nightly/src/compiler-rt/lib/builtins/umodti3.c MKDIR: /root/tmp/rustc-nightly/arm-unknown-linux-gnueabihf/rt/compiler-rt/triple/builtins/arm ARCHIVE: triple/builtins/arm: /root/tmp/rustc-nightly/arm-unknown-linux-gnueabihf/rt/compiler-rt/triple/builtins/arm/libcompiler_rt.a MKDIR: /root/tmp/rustc-nightly/arm-unknown-linux-gnueabihf/rt/compiler-rt/triple/builtins FINAL-ARCHIVE: triple/builtins: /root/tmp/rustc-nightly/arm-unknown-linux-gnueabihf/rt/compiler-rt/triple/builtins/libcompiler_rt.a make[1]: Leaving directory `/root/tmp/rustc-nightly/src/compiler-rt' mkdir -p arm-unknown-linux-gnueabihf/stage0/lib/rustlib/arm-unknown-linux-gnueabihf/lib/ cp: arm-unknown-linux-gnueabihf/stage0/lib/rustlib/arm-unknown-linux-gnueabihf/lib/libcompiler-rt.a rustc: arm-unknown-linux-gnueabihf/stage0/lib/rustlib/arm-unknown-linux-gnueabihf/lib/libcore make: *\ [arm-unknown-linux-gnueabihf/stage0/lib/rustlib/arm-unknown-linux-gnueabihf/lib/stamp.core] Segmentation fault [root@Jolla rustc-nightly]# [root@Jolla rustc-nightly]#

corvinux commented 8 years ago

I also tried to build from git and I got the same output: COMPILE: triple/builtins/arm: /root/rust/src/compiler-rt/lib/builtins/ucmpdi2.c COMPILE: triple/builtins/arm: /root/rust/src/compiler-rt/lib/builtins/ucmpti2.c COMPILE: triple/builtins/arm: /root/rust/src/compiler-rt/lib/builtins/udivdi3.c COMPILE: triple/builtins/arm: /root/rust/src/compiler-rt/lib/builtins/udivmoddi4.c COMPILE: triple/builtins/arm: /root/rust/src/compiler-rt/lib/builtins/udivmodsi4.c COMPILE: triple/builtins/arm: /root/rust/src/compiler-rt/lib/builtins/udivmodti4.c COMPILE: triple/builtins/arm: /root/rust/src/compiler-rt/lib/builtins/udivsi3.c COMPILE: triple/builtins/arm: /root/rust/src/compiler-rt/lib/builtins/udivti3.c COMPILE: triple/builtins/arm: /root/rust/src/compiler-rt/lib/builtins/umoddi3.c COMPILE: triple/builtins/arm: /root/rust/src/compiler-rt/lib/builtins/umodsi3.c COMPILE: triple/builtins/arm: /root/rust/src/compiler-rt/lib/builtins/umodti3.c MKDIR: /root/rust/arm-unknown-linux-gnueabihf/rt/compiler-rt/triple/builtins/arm ARCHIVE: triple/builtins/arm: /root/rust/arm-unknown-linux-gnueabihf/rt/compiler-rt/triple/builtins/arm/libcompiler_rt.a MKDIR: /root/rust/arm-unknown-linux-gnueabihf/rt/compiler-rt/triple/builtins FINAL-ARCHIVE: triple/builtins: /root/rust/arm-unknown-linux-gnueabihf/rt/compiler-rt/triple/builtins/libcompiler_rt.a make[2]: Leaving directory /root/rust/src/compiler-rt' mkdir -p arm-unknown-linux-gnueabihf/stage0/lib/rustlib/arm-unknown-linux-gnueabihf/lib/ cp: arm-unknown-linux-gnueabihf/stage0/lib/rustlib/arm-unknown-linux-gnueabihf/lib/libcompiler-rt.a rustc: arm-unknown-linux-gnueabihf/stage0/lib/rustlib/arm-unknown-linux-gnueabihf/lib/libcore make[1]: *** [arm-unknown-linux-gnueabihf/stage0/lib/rustlib/arm-unknown-linux-gnueabihf/lib/stamp.core] Segmentation fault make[1]: Leaving directory/root/rust' make: *\ [install] Error 2 [1]+ Exit 2 make

MagaTailor commented 8 years ago

This answers my first question, and from the trace you provided it seems the crash happens very early, probably still in the dynamic loader. That's why I asked you about your glibc version and GNU Linux binaries compatibility. You can throw in other libraries's versions and your gcc -v.

Did you try running cargo?

corvinux commented 8 years ago

root@Jolla rust]# gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/armv7hl-meego-linux-gnueabi/4.8.3/lto-wrapper Target: armv7hl-meego-linux-gnueabi Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --disable-bootstrap --with-bugurl=http://bugs.merproject.org/ --build=armv7hl-meego-linux-gnueabi --with-isl=/home/abuild/rpmbuild/BUILD/gcc-linaro-4.8-2014.01/obj-armv7hl-meego-linux-gnueabi/isl-install --with-cloog=/home/abuild/rpmbuild/BUILD/gcc-linaro-4.8-2014.01/obj-armv7hl-meego-linux-gnueabi/cloog-install --disable-libstdcxx-pch --with-float=hard --with-fpu=neon --with-mode=thumb --with-arch=armv7-a --disable-sjlj-exceptions --disable-multilib --enable-checking=release --disable-fixed-point --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-lto --enable-linker-build-id --enable-languages=c,c++,objc,obj-c++ --enable-threads=posix --enable-shared --disable-libgcj --build=armv7hl-meego-linux-gnueabi Thread model: posix gcc version 4.8.3 20140106 (Mer 4.8.3-1) (Linaro GCC 4.8-2014.01)

root@Jolla rust]# ldd --version ldd (EGLIBC) 2.19 Copyright (C) 2014 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Written by Roland McGrath and Ulrich Drepper

root@Jolla rust]# /lib/libc.so.6 GNU C Library (EGLIBC) stable release version 2.19, by Roland McGrath et al. Copyright (C) 2014 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Compiled by GNU CC version 4.8.3 20140106 (Mer 4.8.3-1). Compiled on OBS, see rpm -q glibc for more information Available extensions: crypt add-on version 2.1 by Michael Glad and others GNU Libidn by Simon Josefsson Native POSIX Threads Library by Ulrich Drepper et al BIND-8.2.3-T5B libc ABIs: UNIQUE For bug reporting instructions, please see: http://www.eglibc.org/issues/. [root@Jolla rust]#

MagaTailor commented 8 years ago

Now you're talking! It's a recent distro with glibc 2.19 - you should be able to try out my stage0 snapshot or some unofficial builds, e.g. Rust 1.8 stable from https://github.com/warricksothr/RustBuild

I recommend the stage0 binary first, it has very few dependencies.

corvinux commented 8 years ago

@petevine Thanks for help, your stage0, works. :+1:

MagaTailor commented 8 years ago

Great, let us know if you manage to bootstrap a full rust compiler. (or run one of the unofficial builds)

If you do, the issue should be solvable, @japaric will probably have a word or two with the buildbot :)

corvinux commented 8 years ago

Today I tried again installing rust with the latest nightly build. Installation curl -sSf https://static.rust-lang.org/rustup.sh | sh -s -- --channel=nightly went OK. [root@Jolla bin]# curl -sSf https://static.rust-lang.org/rustup.sh | sh -s -- --channel=nightly rustup: gpg available. signatures will be verified rustup: downloading manifest for 'nightly' rustup: downloading toolchain for 'nightly' ######################################################################## 100.0% gpg: Signature made Fri Jun 3 14:55:45 2016 CEST using RSA key ID 7B3B09DC gpg: Good signature from "Rust Language (Tag and Release Signing Key) rust-key@rust-lang.org" gpg: WARNING: This key is not certified with a trusted signature! gpg: There is no indication that the signature belongs to the owner. Primary key fingerprint: 108F 6620 5EAE B0AA A8DD 5E1C 85AB 96E6 FA1B E5FE Subkey fingerprint: C134 66B7 E169 A085 1886 3216 5CB4 A934 7B3B 09DC rustup: installing toolchain for 'nightly' rustup: extracting installer install: uninstalling component 'rustc' install: uninstalling component 'rust-std-armv7-unknown-linux-gnueabihf' install: uninstalling component 'rust-docs' install: uninstalling component 'cargo' install: creating uninstall script at /usr/local/lib/rustlib/uninstall.sh install: installing component 'rustc' install: installing component 'rust-std-armv7-unknown-linux-gnueabihf' install: installing component 'rust-docs' install: installing component 'cargo'

Rust is ready to roll.

But if I try to run rustc, cargo or any other binary I got Segmentation fault. Trying running cargo gave me an error: root@Jolla bin]# cargo -V error: Process didn't exit successfully: rustc -vV (signal: 11, SIGSEGV: invalid memory reference) root@Jolla bin]# dmesg [10140.393345] cargo (13400): undefined instruction: pc=4040d728 [10140.393375] Code: e320f000 e320f000 f2200150 e12fff1e (ec510f1e) [10140.393406] cargo(13400) send signal 4 to cargo(13400) [10140.420142] rustc: unhandled page fault (11) at 0xbe65f804, code 0x805 [10140.420172] pgd = c5804000 [10140.420172] [be65f804] *pgd=00000000

[10140.420203] Pid: 13401, comm: rustc [10140.420203] CPU: 0 Tainted: P W O (3.4.108.20150901.1 #1) [10140.420233] PC is at 0x40156df0 [10140.420233] LR is at 0x40148e61 [10140.420264] pc : [<40156df0>] lr : [<40148e61>] psr: 600e0030 sp : be65f808 ip : becaf039 fp : becaf26c [10140.420264] r10: 0064f793 r9 : 40159494 r8 : becaf1cc [10140.420294] r7 : becaefb8 r6 : becaf194 r5 : be65f818 r4 : becaf26c [10140.420294] r3 : 00000004 r2 : 00000000 r1 : 003aaec0 r0 : 00000003 [10140.420325] Flags: nZCv IRQs on FIQs on Mode USER_32 ISA Thumb Segment user [10140.420325] Control: 10c5787d Table: 85a0406a DAC: 00000015 [10140.420355] from [10140.420386] from [10140.420416] from [10140.420447] from [10140.420447] Exception stack(0xebf7bfb0 to 0xebf7bff8) [10140.420477] bfa0: 00000003 003aaec0 00000000 00000004 [10140.420477] bfc0: becaf26c be65f818 becaf194 becaefb8 becaf1cc 40159494 0064f793 becaf26c [10140.420508] bfe0: becaf039 be65f808 40148e61 40156df0 600e0030 ffffffff [10140.420539] rustc(13401) send signal 11 to rustc(13401) [10140.443093] rustc: unhandled page fault (11) at 0xbe45f824, code 0x805 [10140.443093] pgd = c36b8000 [10140.443124] [be45f824] *pgd=00000000

[10140.443154] Pid: 13402, comm: rustc [10140.443154] CPU: 0 Tainted: P W O (3.4.108.20150901.1 #1) [10140.443185] PC is at 0x40064df0 [10140.443185] LR is at 0x40056e61 [10140.443185] pc : [<40064df0>] lr : [<40056e61>] psr: 600e0030 sp : be45f828 ip : beaaf059 fp : beaaf28c [10140.443215] r10: 0064f793 r9 : 40067494 r8 : beaaf1ec [10140.443215] r7 : beaaefd8 r6 : beaaf1b4 r5 : be45f838 r4 : beaaf28c [10140.443246] r3 : 00000004 r2 : 00000000 r1 : 003aaec0 r0 : 00000003 [10140.443246] Flags: nZCv IRQs on FIQs on Mode USER_32 ISA Thumb Segment user [10140.443276] Control: 10c5787d Table: 838b806a DAC: 00000015 [10140.443307] from [10140.443337] from [10140.443368] from [10140.443368] from [10140.443398] Exception stack(0xe9735fb0 to 0xe9735ff8) [10140.443398] 5fa0: 00000003 003aaec0 00000000 00000004 [10140.443429] 5fc0: beaaf28c be45f838 beaaf1b4 beaaefd8 beaaf1ec 40067494 0064f793 beaaf28c [10140.443459] 5fe0: beaaf059 be45f828 40056e61 40064df0 600e0030 ffffffff [10140.443459] rustc(13402) send signal 11 to rustc(13402)

MagaTailor commented 8 years ago

You could try some unofficial builds. This one doesn't link in libstdc++ statically:

https://www.dropbox.com/s/esfhr8erg8kyhoe/rust-nightly-armv7.tar.xz?dl=0

or one from Rustbuild, built with clang: https://www.dropbox.com/sh/gcat9erkhd4acq1/AABSM3TWIqcrSFx0LRijUNAYa?dl=0

corvinux commented 8 years ago

Installing with curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly script show no Segmentation fault "per se", but the result is the same.

[root@Jolla tmp]# curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly info: downloading installer

Welcome to Rust!

This will download and install the official compiler for the Rust programming language, and its package manager, Cargo.

It will add the cargo, rustc, rustup and other commands to Cargo's bin directory, located at:

/root/.cargo/bin

This path will then be added to your PATH environment variable by modifying the profile file located at:

/root/.profile

You can uninstall at any time with rustup self uninstall and these changes will be reverted.

WARNING: This is beta software.

Current installation options:

 default toolchain: nightly

modify PATH variable: yes

1) Proceed with installation (default) 2) Customize installation 3) Cancel installation 2

I'm going to ask you the value of each these installation options. You may simply press the Enter key to leave unchanged.

Default toolchain? (stable/beta/nightly)

Modify PATH variable? (y/n)

Current installation options:

 default toolchain: nightly

modify PATH variable: yes

1) Proceed with installation (default) 2) Customize installation 3) Cancel installation 1

info: syncing channel updates for 'nightly-armv7-unknown-linux-gnueabihf' info: downloading component 'rustc' 46.6 MiB / 46.6 MiB (100 %) 1.4 MiB/s ETA: 0 s
info: downloading component 'rust-std' 63.6 MiB / 63.6 MiB (100 %) 2.3 MiB/s ETA: 0 s
info: downloading component 'rust-docs' 7.2 MiB / 7.2 MiB (100 %) 1.0 MiB/s ETA: 0 s
info: downloading component 'cargo' 3.9 MiB / 3.9 MiB (100 %) 807.3 KiB/s ETA: 0 s
info: installing component 'rustc' info: installing component 'rust-std' info: installing component 'rust-docs' info: installing component 'cargo' info: default toolchain set to 'nightly'

nightly installed - (error reading rustc version)

Rust is installed now. Great!

To get started you need Cargo's bin directory in your PATH environment variable. Next time you log in this will be done automatically.

To configure your current shell run source $HOME/.cargo/env. [root@Jolla tmp]# source $HOME/.cargo/env PATH environment variable set. You're ready to Rust!

I've cleared dmesg (dmesg -c,) before running rustc -V,here is the output: root@Jolla tmp]# rust rust-gdb rust-lldb rustc rustdoc rustup
[root@Jolla tmp]# rustc -V [root@Jolla tmp]# root@Jolla tmp]# dmesg [11972.544604] rustc (19354): undefined instruction: pc=402f9e48 [11972.544634] Code: e320f000 e320f000 f2200150 e12fff1e (ec510f1e) [11972.544665] rustc(19354) send signal 4 to rustc(19354) [11972.610589] rustc: unhandled page fault (11) at 0xbe5ff61c, code 0x805 [11972.610589] pgd = c6828000 [11972.610619] [be5ff61c] *pgd=00000000

[11972.610650] Pid: 19355, comm: rustc [11972.610650] CPU: 0 Tainted: P W O (3.4.108.20150901.1 #1) [11972.610680] PC is at 0x4014ddf0 [11972.610680] LR is at 0x4013fe61 [11972.610711] pc : [<4014ddf0>] lr : [<4013fe61>] psr: 600e0030 sp : be5ff620 ip : bec4ee88 fp : bec4f0bc [11972.610711] r10: 0064f793 r9 : 40150494 r8 : bec4f01c [11972.610741] r7 : bec4edd0 r6 : bec4efe4 r5 : be5ff630 r4 : bec4f0bc [11972.612542] r3 : 00000004 r2 : 00000000 r1 : 003aaec0 r0 : 00000003 [11972.612572] Flags: nZCv IRQs on FIQs on Mode USER_32 ISA Thumb Segment user [11972.612603] Control: 10c5787d Table: 86a2806a DAC: 00000015 [11972.612634] from [11972.612664] from [11972.612664] from [11972.612695] from [11972.612725] Exception stack(0xc6729fb0 to 0xc6729ff8) [11972.612725] 9fa0: 00000003 003aaec0 00000000 00000004 [11972.612756] 9fc0: bec4f0bc be5ff630 bec4efe4 bec4edd0 bec4f01c 40150494 0064f793 bec4f0bc [11972.612756] 9fe0: bec4ee88 be5ff620 4013fe61 4014ddf0 600e0030 ffffffff [11972.612786] rustc(19355) send signal 11 to rustc(19355)

[root@Jolla tmp]# rustup show nightly-armv7-unknown-linux-gnueabihf (default) (error reading rustc version) [root@Jolla tmp]#

MagaTailor commented 8 years ago

So, your hardware is a Qualcomm Snapdragon MSM8930 SoC - do you know of any quirks/bugs related to vfpv3 or neon it might be affected with?

A rebuild of your linux kernel could be necessary.

corvinux commented 8 years ago

Yes, It's Jolla Phone (https://en.wikipedia.org/wiki/Jolla_(smartphone), with Qualcomm Snapdragon 400 1.4 GHz dual-core processor. uname -a Linux Jolla 3.4.108.20150901.1 #1 SMP PREEMPT Sun Apr 24 12:19:33 UTC 2016 armv7l armv7l armv7l GNU/Linux

MagaTailor commented 8 years ago

That kernel is old and probably heavily patched so let's make sure you can't run any rust binaries, ok? Please try a different build from the above links.

If nothing works, you'd already confirmed my last stage0 snapshot worked (good for bootstrapping rust 1.10 but not nightly any more) so if you already had llvm installed it would take about 5-6h to build your own rustc. Let me know if you want to try it and need a few pointers.

MagaTailor commented 8 years ago

Found this:
www.spinics.net/lists/linux-omap/msg50398.html

corvinux commented 8 years ago

Yes, I would like to build it, I already tried a few time, but unsuccessfully.

MagaTailor commented 8 years ago

Do you remember why it failed?

Provided you were trying to use the snapshot I'd uploaded, did you do something like this? The rustc snapshot should be found in /tmp/bin and your LLVM installation in /usr.

wget  https://static.rust-lang.org/dist/rustc-beta-src.tar.gz
tar xvf rustc-beta-src.tar.gz
cd rustc-beta
./configure --enable-optimize --disable-jemalloc --llvm-root=/usr --disable-docs --enable-local-rust --local-rust-root=/tmp --prefix=~/rust-beta-1.10 --build=armv7-unknown-linux-gnueabihf
make -j2
make install

If you don't have LLVM installed, remove --llvm-root=/usr but be prepared to wait another 8h :( @

corvinux commented 8 years ago

It always failed as I mentioned in earlier posts like this

rustc: arm-unknown-linux-gnueabihf/stage0/lib/rustlib/arm-unknown-linux-gnueabihf/lib/libcore
make: *** [arm-unknown-linux-gnueabihf/stage0/lib/rustlib/arm-unknown-linux-gnueabihf/lib/stamp.core] Segmentation fault
```.
I was also cross-compiling with Linux kalix 4.3.0-kali1-amd64 #1 SMP Debian 4.3.5-1kali1 (2016-02-11) armv7l armv7l armv7l GNU/Linux with BUILD: Jolla-2.0.1.11-Sailfish_SDK_Target-armv7hl, 
but had also issue with "qemu: Unsupported syscall: 374".
corvinux commented 8 years ago

@petevine rust-nightly-armv7.tar.xz is working, on my Jolla Phone :+1:
[root@Jolla tmp]#rustc -V rustc 1.11.0-dev (623af22b9 2016-05-28 [root@Jolla tmp]# cargo -V cargo: error while loading shared libraries: libcurl-gnutls.so.4: cannot open shared object file: No such file or directory I have to find libcurl-gnutls.so.4, though.

corvinux commented 8 years ago

@petevine I had to install additional libraries for cargo to run.

Now, everything is working!

[root@Jolla lib]# cargo -V cargo 0.11.0 [root@Jolla lib]#

MagaTailor commented 8 years ago

@corvinux Glad you can try rust out, however there's a misunderstanding here:

It always failed as I mentioned in earlier posts like this

rustc: arm-unknown-linux-gnueabihf/stage0/lib/rustlib/arm-unknown-linux-gnueabihf/lib/libcore

Those were the official rust binaries which for some reason crash on your system. The ones that work, including the stage0 snapshot that you didn't use in the end, were built natively on my ARM Linux system (without NEON). And that's the whole issue.

You could try the other links (e.g rustc built with NEON) or you can try bootstrapping your own rustc using the commands I gave you. (use my snapshot, put the rustc binary in /tmp/bin, etc)

corvinux commented 8 years ago

@petevine - have some problems with building ./configure --enable-optimize --disable-jemalloc --llvm-root=/usr/lib/llvm-3.8 --disable-docs --enable-local-rust --local-rust-root=/usr/local/bin/ --prefix=~/rust --target=armv7-unknown-linux-gnueabihf --build=armv7-unknown-linux-gnueabihf configure: looking for configure programs configure: found program 'cmp' configure: found program 'mkdir' configure: found program 'printf' configure: found program 'cut' configure: found program 'head' configure: found program 'grep' configure: found program 'xargs' configure: found program 'cp' configure: found program 'find' configure: found program 'uname' configure: found program 'date' configure: found program 'tr' configure: found program 'sed' configure: found program 'file' configure: found program 'make' configure: inspecting environment configure: recreating config.tmp configure: configure: processing ./configure args configure: configure: CFG_DISABLE_DOCS := 1 configure: CFG_ENABLE_LOCAL_RUST := 1 configure: CFG_LOCALSTATEDIR := /var/lib configure: CFG_SYSCONFDIR := /etc configure: CFG_DATADIR := /share configure: CFG_INFODIR := /share/info configure: CFG_LLVM_ROOT := /usr/lib/llvm-3.8 configure: CFG_PYTHON :=
configure: CFG_JEMALLOC_ROOT :=
configure: CFG_BUILD := armv7-unknown-linux-gnueabihf configure: CFG_ANDROID_CROSS_PATH :=
configure: CFG_I686_LINUX_ANDROID_NDK :=
configure: CFG_ARM_LINUX_ANDROIDEABI_NDK :=
configure: CFG_ARMV7_LINUX_ANDROIDEABI_NDK :=
configure: CFG_AARCH64_LINUX_ANDROID_NDK :=
configure: CFG_NACL_CROSS_PATH :=
configure: CFG_RELEASE_CHANNEL := dev configure: CFG_MUSL_ROOT := /usr/local configure: CFG_EXTRA_FILENAME :=
configure: CFG_DEFAULT_LINKER := cc configure: CFG_DEFAULT_AR := ar configure: CFG_LIBDIR := /root/rust/lib configure: configure: validating ./configure args configure: configure: configure: looking for build programs configure: configure: CFG_CURL := /usr/bin/curl (7.47.0) configure: CFG_PYTHON := /usr/bin/python2.7 configure: CFG_GIT := /usr/bin/git (2.8.1) configure: CFG_MD5 :=
configure: CFG_MD5SUM := /usr/bin/md5sum (8.25) configure: CFG_HASH_COMMAND := /usr/bin/md5sum | cut -c 1-8 configure: CFG_CLANG := /usr/bin/clang++ (3.6.2-3) configure: CFG_CCACHE :=
configure: CFG_GCC := /usr/bin/gcc (5.3.1-21) configure: CFG_LD := /usr/bin/ld (2.26) configure: CFG_VALGRIND :=
configure: CFG_PERF := /usr/bin/perf configure: CFG_ISCC :=
configure: CFG_ANTLR4 :=
configure: CFG_GRUN :=
configure: CFG_FLEX := /usr/bin/flex (2.6.0) configure: CFG_BISON :=
configure: CFG_GDB := /usr/bin/gdb (7.10-1) configure: CFG_LLDB := /usr/bin/lldb (2016-05-02) configure: CFG_DISABLE_VALGRIND_RPASS := 1 configure: CFG_GDB_VERSION := GNU gdb (Debian 7.10-1+b1) 7.10 configure: CFG_LLDB_VERSION := lldb-buildbot-2016-05-02 (LLDB aeae ... configure: CFG_LLDB_PYTHON_DIR := /usr/lib/python2.7/site-packages configure: CFG_LLDB_PYTHON := /usr/bin/python2.7 configure: configure: looking for target specific programs configure: configure: CFG_ADB := /usr/bin/adb configure: configure: using rustc at: /usr/local with version: rustc 1.11.0-nightly (12238b984 2016-06-04) configure: configure: CFG_LOCAL_RUST_ROOT := /usr/local configure: CFG_DISABLE_JEMALLOC := 1 configure: configure: using custom LLVM at /usr/lib/llvm-3.8 configure: configure: found ok version of LLVM: 3.8.0 configure: CFG_CC := gcc configure: CFG_STDCPP_NAME := stdc++ configure: CFG_PERF_WITH_LOGFD := 1 configure: configure: making directories configure: configure: configure: configuring submodules configure: configure: git: submodule sync Synchronizing submodule url for 'src/compiler-rt' Synchronizing submodule url for 'src/jemalloc' Synchronizing submodule url for 'src/liblibc' Synchronizing submodule url for 'src/rt/hoedown' Synchronizing submodule url for 'src/rust-installer' configure: git: submodule init Submodule 'src/llvm' (https://github.com/rust-lang/llvm.git) registered for path 'src/llvm' configure: git: submodule deinit src/llvm Cleared directory 'src/llvm' Submodule 'src/llvm' (https://github.com/rust-lang/llvm.git) unregistered for path 'src/llvm' configure: git: submodule update configure: git: submodule foreach sync Entering 'src/compiler-rt' Entering 'src/jemalloc' Entering 'src/liblibc' Entering 'src/rt/hoedown' Entering 'src/rust-installer' configure: git: submodule foreach update configure: git: submodule status 57315f7e07d09b6f0341ebbcd50dded6c20d782f src/compiler-rt (remotes/origin/rust-2015-11-06) aab1c0a0e0b39825b16673128729ef46310a5da8 src/jemalloc (3.6.0-531-gaab1c0a) 45d85899e99d33e291b2bf3259881b46cc5365d7 src/liblibc (0.2.11-57-g45d8589) -80ad955b60b3ac02d0462a4a65fcea597d0ebfb1 src/llvm a3736a0a1907cbc8bf619708738815a5fd789c80 src/rt/hoedown (2.0.0-211-ga3736a0) c37d3747da75c280237dc2d6b925078e69555499 src/rust-installer (remotes/origin/next-27-gc37d374) -aed73472416064642911af790b25d57c9390b6c7 src/rust-installer/test/rust-installer-v1 -e577c97b494be2815b215e3042207d6d4b7c5516 src/rust-installer/test/rust-installer-v2 configure: git: submodule clobber Entering 'src/compiler-rt' Entering 'src/jemalloc' Entering 'src/liblibc' Entering 'src/rt/hoedown' Entering 'src/rust-installer' Entering 'src/compiler-rt' Entering 'src/jemalloc' Entering 'src/liblibc' Entering 'src/rt/hoedown' Entering 'src/rust-installer' configure: configure: looking at LLVM configure: configure: not reconfiguring LLVM, external LLVM root configure: error: program '/usr/lib/llvm-3.8/bin/FileCheck' is missing, please install it config.log.txt http://sprunge.us/ASUQ

MagaTailor commented 8 years ago

@corvinux If you don't have FileCheck installed, adding --disable-codegen-tests to the configure command line should help.

It's true rust bootstrap process is a little convoluted but you're still not following my instructions so it would fail anyway! You need to use the working snapshot and build the 1.10-beta source (a working 1.10-beta rustc would allow you to bootstrap the nightly compiler).

MagaTailor commented 8 years ago

Oh, and if rustc 1.11.0-nightly (12238b9 2016-06-04) that you installed in /usr/local is working for you, where did you get it from?

corvinux commented 8 years ago

@petevine rustc 1.11.0-nightly (12238b9 2016-06-04) was probably my attempt to do cross-compiling on my X86_64 Debian Rolling machine. Today I tried to build rust on my Jolla Phone on which I have working, as I mention in some previous post, rustc 1.11.0-dev (623af22 2016-05-28) from your link https://www.dropbox.com/s/esfhr8erg8kyhoe/rust-nightly-armv7.tar.xz?dl=0, following your instructions: [root@Jolla rustc-beta]# ./configure --enable-optimize --disable-jemalloc --llvm-root=/usr/local --disable-codegen-tests --disable-docs --enable-local-rust --local-rust-root=/usr/local --prefix=~/rust-beta-1.10 --build=armv7-unknown-linux-gnueabihf And I got this error: compile: armv7-unknown-linux-gnueabihf/rustllvm/ExecutionEngineWrapper.o g++: error: unrecognized command line option '-Wcovered-switch-default' make: * [armv7-unknown-linux-gnueabihf/rustllvm/ExecutionEngineWrapper.o] Error 1 make: * Waiting for unfinished jobs.... make: * wait: No child processes. Stop. All output here;** http://paste2.org/m3ECdbL3

MagaTailor commented 8 years ago

Yes, I encountered this error in the past too (it means your llvm was compiled with clang, there's an issue about it in this very repo) but it was never addressed. At that time, and I needed to do it just once, I removed that flag from the g++ command line - you can see the full command by running:

VERBOSE=1 make.

Let me repeat; to successfully build the 1.10-beta, you need to use the older snapshot and not the latest nightly!

MagaTailor commented 8 years ago

@corvinux I can see you've got clanginstalled so the quickest solution to the above problem would be to use it instead of gcc. Add --enable-clang to the configure command line.

corvinux commented 8 years ago

@petevinem, Still errors, [root@Jolla rustc-beta]# ./configure --enable-clang --enable-optimize --disable-jemalloc --llvm-root=/usr/local --disable-codegen-tests --disable-docs --enable-local-rust --local-rust-root=/root/tmp --prefix=~/rust-beta-1.10 --build=armv7-unknown-linux-gnueabihf --target=armv7-unknown-linux-gnueabihf configure: looking for configure programs configure: found program 'cmp' configure: found program 'mkdir' configure: found program 'printf' configure: found program 'cut' configure: found program 'head' configure: found program 'grep' configure: found program 'xargs' configure: found program 'cp' configure: found program 'find' configure: found program 'uname' configure: found program 'date' configure: found program 'tr' configure: found program 'sed' configure: found program 'file' configure: found program 'make' configure: inspecting environment configure: recreating config.tmp configure: configure: processing ./configure args configure: configure: CFG_DISABLE_DOCS := 1 configure: CFG_ENABLE_LOCAL_RUST := 1 configure: CFG_DISABLE_CODEGEN_TESTS := 1 configure: CFG_LOCALSTATEDIR := /var/lib configure: CFG_SYSCONFDIR := /etc configure: CFG_DATADIR := /share configure: CFG_INFODIR := /share/info configure: CFG_LLVM_ROOT := /usr/local configure: CFG_PYTHON :=
configure: CFG_JEMALLOC_ROOT :=
configure: CFG_BUILD := armv7-unknown-linux-gnueabihf configure: CFG_ANDROID_CROSS_PATH :=
configure: CFG_I686_LINUX_ANDROID_NDK :=
configure: CFG_ARM_LINUX_ANDROIDEABI_NDK :=
configure: CFG_ARMV7_LINUX_ANDROIDEABI_NDK :=
configure: CFG_AARCH64_LINUX_ANDROID_NDK :=
configure: CFG_NACL_CROSS_PATH :=
configure: CFG_RELEASE_CHANNEL := dev configure: CFG_MUSL_ROOT := /usr/local configure: CFG_EXTRA_FILENAME :=
configure: CFG_DEFAULT_LINKER := cc configure: CFG_DEFAULT_AR := ar configure: CFG_LIBDIR := /root/rust-beta-1.10/lib configure: configure: validating ./configure args configure: configure: configure: looking for build programs configure: configure: CFG_CURLORWGET := /usr/bin/curl (7.47.1) configure: CFG_PYTHON := /usr/bin/python2.7 configure: CFG_GIT := /usr/bin/git (2.0.0) configure: git: no git directory. disabling submodules configure: CFG_MD5 :=
configure: CFG_MD5SUM := /usr/bin/md5sum (6.9) configure: CFG_HASH_COMMAND := /usr/bin/md5sum | cut -c 1-8 configure: CFG_CLANG := /usr/local/bin/clang++ (3.8.0) configure: CFG_CCACHE :=
configure: CFG_GCC := /usr/bin/gcc (4.8-2014.01) configure: CFG_LD := /usr/bin/ld (2.25) configure: CFG_VALGRIND :=
configure: CFG_PERF :=
configure: CFG_ISCC :=
configure: CFG_ANTLR4 :=
configure: CFG_GRUN :=
configure: CFG_FLEX := /usr/bin/flex (2.5.37) configure: CFG_BISON := /usr/bin/bison (2.7) configure: CFG_GDB := /usr/bin/gdb (7.5.1) configure: CFG_LLDB :=
configure: CFG_DISABLE_VALGRIND_RPASS := 1 configure: CFG_GDB_VERSION := GNU gdb (GDB) Mer (7.5.1+git3) configure: CFG_LLDB_PYTHON := /usr/bin/python2.7 configure: configure: looking for target specific programs configure: configure: CFG_ADB :=
configure: configure: using rustc at: /root/tmp with version: rustc 1.10.0-dev (b324fa720 2016-04-18) configure: configure: CFG_LOCAL_RUST_ROOT := /root/tmp configure: CFG_ENABLE_CLANG := 1 configure: CFG_DISABLE_JEMALLOC := 1 configure: configure: using custom LLVM at /usr/local configure: configure: found ok version of LLVM: 3.8.0 configure: CFG_USING_CLANG := 1 configure: configure: found ok version of CLANG: 3.8.0 configure: configure: CFG_CC := clang configure: CFG_CXX := clang++ configure: CFG_STDCPP_NAME := stdc++ configure: configure: making directories configure: configure: configure: configuring submodules configure: configure: configure: looking at LLVM configure: configure: not reconfiguring LLVM, external LLVM root configure: configure: writing configuration configure: configure: CFG_SRC_DIR := /root/tmp/rustc-beta/ configure: CFG_SRC_DIR_RELATIVE := ./ configure: CFG_BUILD_DIR := /root/tmp/rustc-beta/ configure: CFG_OSTYPE := unknown-linux-gnueabihf configure: CFG_CPUTYPE := arm configure: CFG_CONFIGURE_ARGS := --enable-clang --enable-optimize -- ... configure: CFG_PREFIX := /root/rust-beta-1.10 configure: CFG_HOST := armv7-unknown-linux-gnueabihf configure: CFG_TARGET := armv7-unknown-linux-gnueabihf configure: CFG_LIBDIR_RELATIVE := lib configure: CFG_DISABLE_MANAGE_SUBMODULES := 1 configure: CFG_AARCH64_LINUX_ANDROID_NDK :=
configure: CFG_ARM_LINUX_ANDROIDEABI_NDK :=
configure: CFG_ARMV7_LINUX_ANDROIDEABI_NDK :=
configure: CFG_I686_LINUX_ANDROID_NDK :=
configure: CFG_NACL_CROSS_PATH :=
configure: CFG_MANDIR := /root/rust-beta-1.10/share/man configure: CFG_USING_LIBCPP := 1 configure: CFG_LLVM_SRC_DIR := /root/tmp/rustc-beta/src/llvm/ configure: CFG_LLVM_BUILD_DIR_armv7_unknown_linux_gnueabihf :=
configure: CFG_LLVM_INST_DIR_armv7_unknown_linux_gnueabihf := /usr/local configure: configure: leaving ./Makefile unchanged configure: leaving config.mk unchanged configure: configure: configured in release mode. for development consider --enable-debug configure: configure: run make help

[root@Jolla rustc-beta]# VERBOSE=1 make -j2 cfg: version 1.10.0-dev cfg: build triple armv7-unknown-linux-gnueabihf cfg: host triples armv7-unknown-linux-gnueabihf cfg: target triples armv7-unknown-linux-gnueabihf cfg: host for armv7-unknown-linux-gnueabihf is armv7 cfg: os for armv7-unknown-linux-gnueabihf is unknown-linux-gnueabihf cfg: no good valgrind for armv7-unknown-linux-gnueabihf cfg: using CC=clang (CFG_CC) cfg: using CXX=clang++ (CFG_CXX) cfg: disabling valgrind run-pass tests cfg: disabling doc build (CFG_DISABLE_DOCS) /root/tmp/rustc-beta/src/etc/localstage0.sh armv7-unknown-linux-gnueabihf /root/tmp rustlib make -C "/root/tmp/rustc-beta/src/compiler-rt" ProjSrcRoot="/root/tmp/rustc-beta/src/compiler-rt" ProjObjRoot="/root/tmp/rustc-beta/armv7-unknown-linux-gnueabihf/rt/compiler-rt" CC='gcc' AR='ar' RANLIB='ar s' CFLAGS="-Wall -g -fPIC -Darm -march=armv7-a -Wno-error -std=c99" TargetTriple=armv7-unknown-linux-gnueabihf triple-builtins cp: cannot stat /root/tmp/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/*': No such file or directory cp: cannot stat/root/tmp/lib/libextra.so': No such file or directory cp: cannot stat /root/tmp/lib/librust_.so': No such file or directory cp: cannot stat/root/tmp/lib/libstd.so': No such file or directory cp: cannot stat/root/tmp/lib/libsyntax_.so': No such file or directory cp: cannot stat/root/tmp/lib/libflate_.so': No such file or directory cp: cannot stat `/root/tmp/lib/libfmt_macros.so': No such file or directory cp: cannot stat/root/tmp/lib/libgetopts_.so': No such file or directory cp: cannot stat/root/tmp/lib/libgraphviz.so': No such file or directory cp: cannot stat /root/tmp/lib/liblog*.so': No such file or directory cp: cannot stat/root/tmp/lib/librbml.so': No such file or directory cp: cannot stat /root/tmp/lib/libserialize_.so': No such file or directory cp: cannot stat/root/tmp/lib/libterm*.so': No such file or directory if [ -e "armv7-unknown-linux-gnueabihf/stage0/bin/rustc" ]; then touch "armv7-unknown-linux-gnueabihf/stage0/bin/rustc"; else echo "ERROR: snapshot armv7-unknown-linux-gnueabihf/stage0/bin/rustc not found"; exit 1; fi rm -rf armv7-unknown-linux-gnueabihf/rt/libbacktrace mkdir -p armv7-unknown-linux-gnueabihf/rt/libbacktrace (cd armv7-unknown-linux-gnueabihf/rt/libbacktrace && env PWD= CC="gcc" AR="ar" RANLIB="ar s" CFLAGS="-Wall -g -fPIC -Darm -march=armv7-a -Wno-error -fno-stack-protector" /root/tmp/rustc-beta/src/libbacktrace/configure --build=armv7-unknown-linux-gnueabihf --host=armv7-unknown-linux-gnueabihf) checking build system type... armv7-unknown-linux-gnueabihf checking host system type... armv7-unknown-linux-gnueabihf checking target system type... armv7-unknown-linux-gnueabihf checking for armv7-unknown-linux-gnueabihf-gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking how to run the C preprocessor... gcc -E checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for ANSI C header files... make[1]: Entering directory/root/tmp/rustc-beta/src/compiler-rt' make[1]: Nothing to be done fortriple-builtins'. make[1]: Leaving directory/root/tmp/rustc-beta/src/compiler-rt' cp armv7-unknown-linux-gnueabihf/rt/compiler-rt/triple/builtins/libcompiler_rt.a armv7-unknown-linux-gnueabihf/rt/libcompiler-rt.a 'gcc' -O2 -Wall -g -fPIC -D__arm__ -march=armv7-a -c -o armv7-unknown-linux-gnueabihf/rt/miniz.o -I /root/tmp/rustc-beta/src/rt/hoedown/src -I /root/tmp/rustc-beta/src/rt /root/tmp/rustc-beta/src/rt/miniz.c yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking minix/config.h usability... no checking minix/config.h presence... no checking for minix/config.h... no checking whether it is safe to define **EXTENSIONS**... yes checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes /bin/sh: /root/tmp/rustc-beta/src/libbacktrace/missing: No such file or directory configure: WARNING:missing' script is too old or missing checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking whether to enable maintainer-specific portions of Makefiles... no checking for armv7-unknown-linux-gnueabihf-gcc... (cached) gcc checking whether we are using the GNU C compiler... (cached) yes checking whether gcc accepts -g... (cached) yes checking for gcc option to accept ISO C89... (cached) none needed checking for armv7-unknown-linux-gnueabihf-ranlib... ar s checking for gawk... (cached) gawk checking how to print strings... printf checking for a sed that does not truncate output... /bin/sed checking for fgrep... /bin/grep -F checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B checking the name lister (/usr/bin/nm -B) interface... BSD nm checking whether ln -s works... yes checking the maximum length of command line arguments... 393216 checking whether the shell understands some XSI constructs... yes checking whether the shell understands "+="... yes checking for /usr/bin/ld option to reload object files... -r checking for armv7-unknown-linux-gnueabihf-objdump... no checking for objdump... objdump checking how to recognize dependent libraries... pass_all checking for armv7-unknown-linux-gnueabihf-ar... ar checking for armv7-unknown-linux-gnueabihf-strip... no checking for strip... strip checking for armv7-unknown-linux-gnueabihf-ranlib... (cached) ar s checking command to parse /usr/bin/nm -B output from gcc object... ok checking for dlfcn.h... yes checking for objdir... .libs checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC -DPIC checking if gcc PIC flag -fPIC -DPIC works... yes checking if gcc static flag -static works... yes checking if gcc supports -c -o file.o... yes checking if gcc supports -c -o file.o... (cached) yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... yes checking unwind.h usability... yes checking unwind.h presence... yes checking for unwind.h... yes checking for _Unwind_Backtrace... yes checking for -funwind-tables option... yes checking for -frandom-seed=string option... yes checking whether gcc supports -W... yes checking whether gcc supports -Wall... 'g++' -O2 -Wall -g -fPIC -Darm -march=armv7-a -fno-rtti -c -o armv7-unknown-linux-gnueabihf/rustllvm/ExecutionEngineWrapper.o -I//usr//local//include -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wcovered-switch-default -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Werror=date-time -std=c++11 -ffunction-sections -fdata-sections -O3 -DNDEBUG -fno-exceptions -fno-rtti -D_GNU_SOURCE -DSTDC_CONSTANT_MACROS -DSTDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DLLVM_COMPONENT_AARCH64 -DLLVM_COMPONENT_AARCH64ASMPARSER -DLLVM_COMPONENT_AARCH64ASMPRINTER -DLLVM_COMPONENT_AARCH64CODEGEN -DLLVM_COMPONENT_AARCH64DESC -DLLVM_COMPONENT_AARCH64DISASSEMBLER -DLLVM_COMPONENT_AARCH64INFO -DLLVM_COMPONENT_AARCH64UTILS -DLLVM_COMPONENT_ALL -DLLVM_COMPONENT_ALL_TARGETS -DLLVM_COMPONENT_AMDGPU -DLLVM_COMPONENT_AMDGPUASMPARSER -DLLVM_COMPONENT_AMDGPUASMPRINTER -DLLVM_COMPONENT_AMDGPUCODEGEN -DLLVM_COMPONENT_AMDGPUDESC -DLLVM_COMPONENT_AMDGPUINFO -DLLVM_COMPONENT_AMDGPUUTILS -DLLVM_COMPONENT_ANALYSIS -DLLVM_COMPONENT_ARM -DLLVM_COMPONENT_ARMASMPARSER -DLLVM_COMPONENT_ARMASMPRINTER -DLLVM_COMPONENT_ARMCODEGEN -DLLVM_COMPONENT_ARMDESC -DLLVM_COMPONENT_ARMDISASSEMBLER -DLLVM_COMPONENT_ARMINFO -DLLVM_COMPONENT_ASMPARSER -DLLVM_COMPONENT_ASMPRINTER -DLLVM_COMPONENT_BITREADER -DLLVM_COMPONENT_BITWRITER -DLLVM_COMPONENT_BPF -DLLVM_COMPONENT_BPFASMPRINTER -DLLVM_COMPONENT_BPFCODEGEN -DLLVM_COMPONENT_BPFDESC -DLLVM_COMPONENT_BPFINFO -DLLVM_COMPONENT_CODEGEN -DLLVM_COMPONENT_CORE -DLLVM_COMPONENT_CPPBACKEND -DLLVM_COMPONENT_CPPBACKENDCODEGEN -DLLVM_COMPONENT_CPPBACKENDINFO -DLLVM_COMPONENT_DEBUGINFOCODEVIEW -DLLVM_COMPONENT_DEBUGINFODWARF -DLLVM_COMPONENT_DEBUGINFOPDB -DLLVM_COMPONENT_ENGINE -DLLVM_COMPONENT_EXECUTIONENGINE -DLLVM_COMPONENT_HEXAGON -DLLVM_COMPONENT_HEXAGONASMPARSER -DLLVM_COMPONENT_HEXAGONCODEGEN -DLLVM_COMPONENT_HEXAGONDESC -DLLVM_COMPONENT_HEXAGONDISASSEMBLER -DLLVM_COMPONENT_HEXAGONINFO -DLLVM_COMPONENT_INSTCOMBINE -DLLVM_COMPONENT_INSTRUMENTATION -DLLVM_COMPONENT_INTERPRETER -DLLVM_COMPONENT_IPO -DLLVM_COMPONENT_IRREADER -DLLVM_COMPONENT_LIBDRIVER -DLLVM_COMPONENT_LINEEDITOR -DLLVM_COMPONENT_LINKER -DLLVM_COMPONENT_LTO -DLLVM_COMPONENT_MC -DLLVM_COMPONENT_MCDISASSEMBLER -DLLVM_COMPONENT_MCJIT -DLLVM_COMPONENT_MCPARSER -DLLVM_COMPONENT_MIPS -DLLVM_COMPONENT_MIPSASMPARSER -DLLVM_COMPONENT_MIPSASMPRINTER -DLLVM_COMPONENT_MIPSCODEGEN -DLLVM_COMPONENT_MIPSDESC -DLLVM_COMPONENT_MIPSDISASSEMBLER -DLLVM_COMPONENT_MIPSINFO -DLLVM_COMPONENT_MIRPARSER -DLLVM_COMPONENT_MSP430 -DLLVM_COMPONENT_MSP430ASMPRINTER -DLLVM_COMPONENT_MSP430CODEGEN -DLLVM_COMPONENT_MSP430DESC -DLLVM_COMPONENT_MSP430INFO -DLLVM_COMPONENT_NATIVE -DLLVM_COMPONENT_NATIVECODEGEN -DLLVM_COMPONENT_NVPTX -DLLVM_COMPONENT_NVPTXASMPRINTER -DLLVM_COMPONENT_NVPTXCODEGEN -DLLVM_COMPONENT_NVPTXDESC -DLLVM_COMPONENT_NVPTXINFO -DLLVM_COMPONENT_OBJCARCOPTS -DLLVM_COMPONENT_OBJECT -DLLVM_COMPONENT_OPTION -DLLVM_COMPONENT_ORCJIT -DLLVM_COMPONENT_PASSES -DLLVM_COMPONENT_POWERPC -DLLVM_COMPONENT_POWERPCASMPARSER -DLLVM_COMPONENT_POWERPCASMPRINTER -DLLVM_COMPONENT_POWERPCCODEGEN -DLLVM_COMPONENT_POWERPCDESC -DLLVM_COMPONENT_POWERPCDISASSEMBLER -DLLVM_COMPONENT_POWERPCINFO -DLLVM_COMPONENT_PROFILEDATA -DLLVM_COMPONENT_RUNTIMEDYLD -DLLVM_COMPONENT_SCALAROPTS -DLLVM_COMPONENT_SELECTIONDAG -DLLVM_COMPONENT_SPARC -DLLVM_COMPONENT_SPARCASMPARSER -DLLVM_COMPONENT_SPARCASMPRINTER -DLLVM_COMPONENT_SPARCCODEGEN -DLLVM_COMPONENT_SPARCDESC -DLLVM_COMPONENT_SPARCDISASSEMBLER -DLLVM_COMPONENT_SPARCINFO -DLLVM_COMPONENT_SUPPORT -DLLVM_COMPONENT_SYMBOLIZE -DLLVM_COMPONENT_SYSTEMZ -DLLVM_COMPONENT_SYSTEMZASMPARSER -DLLVM_COMPONENT_SYSTEMZASMPRINTER -DLLVM_COMPONENT_SYSTEMZCODEGEN -DLLVM_COMPONENT_SYSTEMZDESC -DLLVM_COMPONENT_SYSTEMZDISASSEMBLER -DLLVM_COMPONENT_SYSTEMZINFO -DLLVM_COMPONENT_TABLEGEN -DLLVM_COMPONENT_TARGET -DLLVM_COMPONENT_TRANSFORMUTILS -DLLVM_COMPONENT_VECTORIZE -DLLVM_COMPONENT_X86 -DLLVM_COMPONENT_X86ASMPARSER -DLLVM_COMPONENT_X86ASMPRINTER -DLLVM_COMPONENT_X86CODEGEN -DLLVM_COMPONENT_X86DESC -DLLVM_COMPONENT_X86DISASSEMBLER -DLLVM_COMPONENT_X86INFO -DLLVM_COMPONENT_X86UTILS -DLLVM_COMPONENT_XCORE -DLLVM_COMPONENT_XCOREASMPRINTER -DLLVM_COMPONENT_XCORECODEGEN -DLLVM_COMPONENT_XCOREDESC -DLLVM_COMPONENT_XCOREDISASSEMBLER -DLLVM_COMPONENT_XCOREINFO -I /usr/local/include -I /root/tmp/rustc-beta/src/rustllvm/include /root/tmp/rustc-beta/src/rustllvm/ExecutionEngineWrapper.cpp g++: error: unrecognized command line option '-Wcovered-switch-default' make: * [armv7-unknown-linux-gnueabihf/rustllvm/ExecutionEngineWrapper.o] Error 1 make: * Waiting for unfinished jobs.... yes checking whether gcc supports -Wwrite-strings... yes checking whether gcc supports -Wstrict-prototypes... yes checking whether gcc supports -Wmissing-prototypes... yes checking whether gcc supports -Wold-style-definition... yes checking whether gcc supports -Wmissing-format-attribute... yes checking whether gcc supports -Wcast-qual... yes checking for _Unwind_GetIPInfo... yes checking sync extensions... yes checking atomic extensions... yes checking output filetype... elf32 looking for a compliant stdint.h in stdint.h, checking for uintmax_t... yes checking for uintptr_t... yes checking for int_least32_t... yes checking for int_fast32_t... yes checking for uint64_t... yes checking what to include in gstdint.h... stdint.h (already complete) checking sys/mman.h usability... yes checking sys/mman.h presence... yes checking for sys/mman.h... yes checking for mmap... yes checking link.h usability... yes checking link.h presence... yes checking for link.h... yes checking for dl_iterate_phdr... yes checking for fcntl... yes checking whether strnlen is declared... yes checking for getexecname... no checking whether tests can run... yes configure: creating ./config.status config.status: creating Makefile config.status: creating backtrace-supported.h config.status: creating config.h config.status: executing libtool commands config.status: executing gstdint.h commands config.status: executing default commands echo '#undef HAVE_ATOMIC_FUNCTIONS' >> armv7-unknown-linux-gnueabihf/rt/libbacktrace/config.h echo '#undef HAVE_SYNC_FUNCTIONS' >> armv7-unknown-linux-gnueabihf/rt/libbacktrace/config.h make: *\ wait: No child processes. Stop.

corvinux commented 8 years ago

@petevine I also tried VERBOSE=1 make install, [root@Jolla rustc-beta]# VERBOSE=1 make install and I got these errors: g++: error: unrecognized command line option '-Wcovered-switch-default' make[1]: * [armv7-unknown-linux-gnueabihf/rustllvm/ExecutionEngineWrapper.o] Error 1 make[1]: Leaving directory `/root/tmp/rustc-beta' make: * [install] Error 2

Here is all output http://paste2.org/pxBVOyVU.

MagaTailor commented 8 years ago

It seems the correct snapshot is being used and it even managed to compile a few crates but you're still using g++. I suggest deleting the build directory (armv7-unknown-linux-gnueabihf) and running configure again with --enable-clang.

corvinux commented 8 years ago

@petevine I've removed /root/tmp/rustc-beta/armv7-unknown-linux-gnueabihf and run again: [root@Jolla rustc-beta]# ./configure --enable-clang --enable-optimize --disable-jemalloc --llvm-root=/usr/local --disable-codegen-tests --disable-docs --enable-local-rust --local-rust-root=/root/tmp --prefix=~/rust-beta-1.10 --build=armv7-unknown-linux-gnueabihf --target=armv7-unknown-linux-gnueabihf the g++ is still persistent error: g++: error: unrecognized command line option '-Wcovered-switch-default' make: * [armv7-unknown-linux-gnueabihf/rustllvm/ExecutionEngineWrapper.o] Error 1 make: * Waiting for unfinished jobs.... COMPILE: triple/builtins/armv7: /root/tmp/rustc-beta/src/compiler-rt/lib/builtins/absvdi2.c COMPILE: triple/builtins/armv7: /root/tmp/rustc-beta/src/compiler-rt/lib/builtins/absvsi2.c COMPILE: triple/builtins/armv7: /root/tmp/rustc-beta/src/compiler-rt/lib/builtins/absvti2.c COMPILE: triple/builtins/armv7: /root/tmp/rustc-beta/src/compiler-rt/lib/builtins/adddf3.c ASSEMBLE: triple/builtins/armv7: /root/tmp/rustc-beta/src/compiler-rt/lib/builtins/arm/adddf3vfp.S ARCHIVE: triple/builtins/armv7: /root/tmp/rustc-beta/armv7-unknown-linux-gnueabihf/rt/compiler-rt/triple/builtins/armv7/libcompiler_rt.a FINAL-ARCHIVE: triple/builtins: /root/tmp/rustc-beta/armv7-unknown-linux-gnueabihf/rt/compiler-rt/triple/builtins/libcompiler_rt.a make[1]: Leaving directory `/root/tmp/rustc-beta/src/compiler-rt' cp armv7-unknown-linux-gnueabihf/rt/compiler-rt/triple/builtins/libcompiler_rt.a armv7-unknown-linux-gnueabihf/rt/libcompiler-rt.a make: *\ wait: No child processes. Stop.

Whole output here http://paste2.org/gn8p6zJE

MagaTailor commented 8 years ago

Maybe --enable-clang is buggy or doesn't cover the llvm wrapper compilation and CC/CXX variables need to be set explicitly. Try running like this:

$ CC=clang CXX=clang++ ./configure ...

If that doesn't help, I'll post a workaround.

corvinux commented 8 years ago

@petevine I tried, but no luck! I have also tried with downgrade gcc (Linaro GCC 4.8-2014.01) 4.8.3 20140106 (Mer 4.8.3-1), before I was using gcc 5.2.

CC=clang CXX=clang++ ./configure --enable-clang --enable-optimize --disable-docs --llvm-root=/usr/local --enable-local-rust --local-rust-root=/root/tmp --disable-codegen-tests --prefix=~/rust-beta-1.10 --build=armv7-unknown-linux-gnueabihf

All ouput http://paste2.org/VUE8Ip0y

MagaTailor commented 8 years ago

The error is not related to the gcc version but a switch specific to clang that's injected from llvm-config --cflags. Alright, here's a solution that should work without any future manual work.

Rename your llvm-config to llvm-config.orig and put the following in your new llvm-config (make it executable with chmod +x):

/usr/local/bin/llvm-config.orig "$@" | sed s/-Wcovered-switch-default//

Now it should start working with g++. I expect a success story this time! ;)

corvinux commented 8 years ago

@petevine Almost, almost :) Output here: http://paste2.org/JXjFOAwk This error came up; In file included from /root/tmp/rustc-beta/src/rustllvm/ExecutionEngineWrapper.cpp:11:0: /root/tmp/rustc-beta/src/rustllvm/rustllvm.h:11:31: fatal error: llvm/IR/IRBuilder.h: No such file or directory compilation terminated. make[1]: * [armv7-unknown-linux-gnueabihf/rustllvm/ExecutionEngineWrapper.o] Error 1 make[1]: Leaving directory `/root/tmp/rustc-beta' make: * [install] Error 2

MagaTailor commented 8 years ago

You probably didn't move your llvm directory around so it shouldn't happen. To see which include paths are being used, please add verbose output from that last command and let's ask @brson for help.

@corvinux You could also add output from llvm-config --includedir

corvinux commented 8 years ago

@petevine @brson: Can you please help with discussed issue, tnx root@Jolla rustc-beta]# llvm-config --includedir /usr/local/include . . . rustc: armv7-unknown-linux-gnueabihf/stage0/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/libflate rustc: armv7-unknown-linux-gnueabihf/stage0/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/libgetopts rustc: armv7-unknown-linux-gnueabihf/stage0/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/libgraphviz rustc: armv7-unknown-linux-gnueabihf/stage0/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/libterm rustc: armv7-unknown-linux-gnueabihf/stage0/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/liblog rustc: armv7-unknown-linux-gnueabihf/stage0/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/libserialize rustc: armv7-unknown-linux-gnueabihf/stage0/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/librustc_bitflags rustc: armv7-unknown-linux-gnueabihf/stage0/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/libsyntax rustc: armv7-unknown-linux-gnueabihf/stage0/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/libfmt_macros rustc: armv7-unknown-linux-gnueabihf/stage0/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/librbml compile: armv7-unknown-linux-gnueabihf/rustllvm/ExecutionEngineWrapper.o In file included from /root/tmp/rustc-beta/src/rustllvm/ExecutionEngineWrapper.cpp:11:0: /root/tmp/rustc-beta/src/rustllvm/rustllvm.h:11:31: fatal error: llvm/IR/IRBuilder.h: No such file or directory compilation terminated. make[1]: * [armv7-unknown-linux-gnueabihf/rustllvm/ExecutionEngineWrapper.o] Error 1 make[1]: Leaving directory `/root/tmp/rustc-beta' make: * [install] Error 2 Whole output here: http://paste2.org/771nvXHw

MagaTailor commented 8 years ago

@corvinux We'll need the last part from VERBOSE=1 make. Could you confirm /usr/local/include/llvm/IR/IRBuilder.h's presence?

corvinux commented 8 years ago

@petevine It was my mistake,sorry. I was manually copying LLVM structure to /usr/local/include and I have mistakenly copy include into /usr/local/include/include. I moved content of /usr/local/include/include one level up: [root@Jolla rustc-beta]# ls -lsah /usr/local/include/ total 60K 0 drwxr-xr-x 1 root root 154 Jun 13 15:26 . 0 drwxr-xr-x 1 root root 86 Jun 5 01:25 .. 0 drwxr-xr-x 1 root root 288 Jun 13 15:26 clang 0 drwxr-xr-x 1 root root 182 Jun 13 15:26 clang-c 0 drwxrwxr-x 1 root root 44 Jun 11 18:52 include 12K -rw-r--r-- 1 root root 8.3K Nov 23 2015 lauxlib.h 0 drwxr-xr-x 1 root root 544 Jun 13 15:26 llvm 0 drwxr-xr-x 1 root root 424 Jun 13 15:26 llvm-c 16K -rw-r--r-- 1 root root 15K Nov 13 2015 lua.h 4.0K -rw-r--r-- 1 root root 191 Dec 23 2004 lua.hpp 24K -rw-r--r-- 1 root root 21K Oct 21 2015 luaconf.h 0 drwxrwxr-x 1 root root 92 May 2 17:09 luajit-2.0 4.0K -rw-r--r-- 1 root root 1.2K Feb 6 2014 lualib.h [root@Jolla rustc-beta]# ls -lash /usr/local/include/llvm/IR/IRBuilder.h 76K -rw-r--r-- 1 root root 74K Jun 13 15:26 /usr/local/include/llvm/IR/IRBuilder.h

Now i get this error: . . . FINAL-ARCHIVE: triple/builtins: /root/tmp/rustc-beta/armv7-unknown-linux-gnueabihf/rt/compiler-rt/triple/builtins/libcompiler_rt.a make[1]: Leaving directory `/root/tmp/rustc-beta/src/compiler-rt' compile: armv7-unknown-linux-gnueabihf/rustllvm/ExecutionEngineWrapper.o compile: armv7-unknown-linux-gnueabihf/rustllvm/RustWrapper.o compile: armv7-unknown-linux-gnueabihf/rustllvm/PassWrapper.o compile: armv7-unknown-linux-gnueabihf/rustllvm/ArchiveWrapper.o Traceback (most recent call last): File "/root/tmp/rustc-beta/src/etc/mklldeps.py", line 61, in llvm_shared, out = runErr(args) File "/root/tmp/rustc-beta/src/etc/mklldeps.py", line 49, in runErr proc = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE) File "/usr/lib/python2.7/subprocess.py", line 710, in init errread, errwrite) File "/usr/lib/python2.7/subprocess.py", line 1335, in _execute_child raise child_exception OSError: [Errno 8] Exec format error make: * [/root/tmp/rustc-beta/armv7-unknown-linux-gnueabihf/rt/llvmdeps.rs] Error 1 make: * Waiting for unfinished jobs.... [root@Jolla rustc-beta]#

Again output here: http://paste2.org/sL3W97XG

MagaTailor commented 8 years ago

OK, as promised, the llvm wrapper compiles fine now. @corvinux Please, just type VERBOSE=1 make without running configure again and show us the last part.

EDIT: Oh, it's probably just python not liking the llvm-config wrapper script. Please put the original back in place, run make and it should probably be OK.

corvinux commented 8 years ago

@petevine I put back llvm-config and it came back :( FINAL-ARCHIVE: triple/builtins: /root/tmp/rustc-beta/armv7-unknown-linux-gnueabihf/rt/compiler-rt/triple/builtins/libcompiler_rt.a make[1]: Leaving directory `/root/tmp/rustc-beta/src/compiler-rt' cp armv7-unknown-linux-gnueabihf/rt/compiler-rt/triple/builtins/libcompiler_rt.a armv7-unknown-linux-gnueabihf/rt/libcompiler-rt.a 'g++' -O2 -Wall -g -fPIC -Darm -march=armv7-a -fno-rtti -c -o armv7-unknown-linux-gnueabihf/rustllvm/ExecutionEngineWrapper.o -I//usr//local//include -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wcovered-switch-default -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Werror=date-time -std=c++11 -ffunction-sections -fdata-sections -O3 -DNDEBUG -fno-exceptions -fno-rtti -D_GNU_SOURCE -DSTDC_CONSTANT_MACROS -DSTDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DLLVM_COMPONENT_AARCH64 -DLLVM_COMPONENT_AARCH64ASMPARSER -DLLVM_COMPONENT_AARCH64ASMPRINTER -DLLVM_COMPONENT_AARCH64CODEGEN -DLLVM_COMPONENT_AARCH64DESC -DLLVM_COMPONENT_AARCH64DISASSEMBLER -DLLVM_COMPONENT_AARCH64INFO -DLLVM_COMPONENT_AARCH64UTILS -DLLVM_COMPONENT_ALL -DLLVM_COMPONENT_ALL_TARGETS -DLLVM_COMPONENT_AMDGPU -DLLVM_COMPONENT_AMDGPUASMPARSER -DLLVM_COMPONENT_AMDGPUASMPRINTER -DLLVM_COMPONENT_AMDGPUCODEGEN -DLLVM_COMPONENT_AMDGPUDESC -DLLVM_COMPONENT_AMDGPUINFO -DLLVM_COMPONENT_AMDGPUUTILS -DLLVM_COMPONENT_ANALYSIS -DLLVM_COMPONENT_ARM -DLLVM_COMPONENT_ARMASMPARSER -DLLVM_COMPONENT_ARMASMPRINTER -DLLVM_COMPONENT_ARMCODEGEN -DLLVM_COMPONENT_ARMDESC -DLLVM_COMPONENT_ARMDISASSEMBLER -DLLVM_COMPONENT_ARMINFO -DLLVM_COMPONENT_ASMPARSER -DLLVM_COMPONENT_ASMPRINTER -DLLVM_COMPONENT_BITREADER -DLLVM_COMPONENT_BITWRITER -DLLVM_COMPONENT_BPF -DLLVM_COMPONENT_BPFASMPRINTER -DLLVM_COMPONENT_BPFCODEGEN -DLLVM_COMPONENT_BPFDESC -DLLVM_COMPONENT_BPFINFO -DLLVM_COMPONENT_CODEGEN -DLLVM_COMPONENT_CORE -DLLVM_COMPONENT_CPPBACKEND -DLLVM_COMPONENT_CPPBACKENDCODEGEN -DLLVM_COMPONENT_CPPBACKENDINFO -DLLVM_COMPONENT_DEBUGINFOCODEVIEW -DLLVM_COMPONENT_DEBUGINFODWARF -DLLVM_COMPONENT_DEBUGINFOPDB -DLLVM_COMPONENT_ENGINE -DLLVM_COMPONENT_EXECUTIONENGINE -DLLVM_COMPONENT_HEXAGON -DLLVM_COMPONENT_HEXAGONASMPARSER -DLLVM_COMPONENT_HEXAGONCODEGEN -DLLVM_COMPONENT_HEXAGONDESC -DLLVM_COMPONENT_HEXAGONDISASSEMBLER -DLLVM_COMPONENT_HEXAGONINFO -DLLVM_COMPONENT_INSTCOMBINE -DLLVM_COMPONENT_INSTRUMENTATION -DLLVM_COMPONENT_INTERPRETER -DLLVM_COMPONENT_IPO -DLLVM_COMPONENT_IRREADER -DLLVM_COMPONENT_LIBDRIVER -DLLVM_COMPONENT_LINEEDITOR -DLLVM_COMPONENT_LINKER -DLLVM_COMPONENT_LTO -DLLVM_COMPONENT_MC -DLLVM_COMPONENT_MCDISASSEMBLER -DLLVM_COMPONENT_MCJIT -DLLVM_COMPONENT_MCPARSER -DLLVM_COMPONENT_MIPS -DLLVM_COMPONENT_MIPSASMPARSER -DLLVM_COMPONENT_MIPSASMPRINTER -DLLVM_COMPONENT_MIPSCODEGEN -DLLVM_COMPONENT_MIPSDESC -DLLVM_COMPONENT_MIPSDISASSEMBLER -DLLVM_COMPONENT_MIPSINFO -DLLVM_COMPONENT_MIRPARSER -DLLVM_COMPONENT_MSP430 -DLLVM_COMPONENT_MSP430ASMPRINTER -DLLVM_COMPONENT_MSP430CODEGEN -DLLVM_COMPONENT_MSP430DESC -DLLVM_COMPONENT_MSP430INFO -DLLVM_COMPONENT_NATIVE -DLLVM_COMPONENT_NATIVECODEGEN -DLLVM_COMPONENT_NVPTX -DLLVM_COMPONENT_NVPTXASMPRINTER -DLLVM_COMPONENT_NVPTXCODEGEN -DLLVM_COMPONENT_NVPTXDESC -DLLVM_COMPONENT_NVPTXINFO -DLLVM_COMPONENT_OBJCARCOPTS -DLLVM_COMPONENT_OBJECT -DLLVM_COMPONENT_OPTION -DLLVM_COMPONENT_ORCJIT -DLLVM_COMPONENT_PASSES -DLLVM_COMPONENT_POWERPC -DLLVM_COMPONENT_POWERPCASMPARSER -DLLVM_COMPONENT_POWERPCASMPRINTER -DLLVM_COMPONENT_POWERPCCODEGEN -DLLVM_COMPONENT_POWERPCDESC -DLLVM_COMPONENT_POWERPCDISASSEMBLER -DLLVM_COMPONENT_POWERPCINFO -DLLVM_COMPONENT_PROFILEDATA -DLLVM_COMPONENT_RUNTIMEDYLD -DLLVM_COMPONENT_SCALAROPTS -DLLVM_COMPONENT_SELECTIONDAG -DLLVM_COMPONENT_SPARC -DLLVM_COMPONENT_SPARCASMPARSER -DLLVM_COMPONENT_SPARCASMPRINTER -DLLVM_COMPONENT_SPARCCODEGEN -DLLVM_COMPONENT_SPARCDESC -DLLVM_COMPONENT_SPARCDISASSEMBLER -DLLVM_COMPONENT_SPARCINFO -DLLVM_COMPONENT_SUPPORT -DLLVM_COMPONENT_SYMBOLIZE -DLLVM_COMPONENT_SYSTEMZ -DLLVM_COMPONENT_SYSTEMZASMPARSER -DLLVM_COMPONENT_SYSTEMZASMPRINTER -DLLVM_COMPONENT_SYSTEMZCODEGEN -DLLVM_COMPONENT_SYSTEMZDESC -DLLVM_COMPONENT_SYSTEMZDISASSEMBLER -DLLVM_COMPONENT_SYSTEMZINFO -DLLVM_COMPONENT_TABLEGEN -DLLVM_COMPONENT_TARGET -DLLVM_COMPONENT_TRANSFORMUTILS -DLLVM_COMPONENT_VECTORIZE -DLLVM_COMPONENT_X86 -DLLVM_COMPONENT_X86ASMPARSER -DLLVM_COMPONENT_X86ASMPRINTER -DLLVM_COMPONENT_X86CODEGEN -DLLVM_COMPONENT_X86DESC -DLLVM_COMPONENT_X86DISASSEMBLER -DLLVM_COMPONENT_X86INFO -DLLVM_COMPONENT_X86UTILS -DLLVM_COMPONENT_XCORE -DLLVM_COMPONENT_XCOREASMPRINTER -DLLVM_COMPONENT_XCORECODEGEN -DLLVM_COMPONENT_XCOREDESC -DLLVM_COMPONENT_XCOREDISASSEMBLER -DLLVM_COMPONENT_XCOREINFO -I /usr/local/include -I /root/tmp/rustc-beta/src/rustllvm/include /root/tmp/rustc-beta/src/rustllvm/ExecutionEngineWrapper.cpp g++: error: unrecognized command line option '-Wcovered-switch-default' make: * [armv7-unknown-linux-gnueabihf/rustllvm/ExecutionEngineWrapper.o] Error 1 make: * Waiting for unfinished jobs.... make: *\ wait: No child processes. Stop.

MagaTailor commented 8 years ago

Strange, maybe it was necessary to touch the four .o files in rustllvm first. Try that before anything else and ask for a permanent solution here.

If you're really motivated to see the bootstrap process finish, try copy/pasting the 4 commands minus -Wcovered-switch-default - the first one:

g++ -O2 -Wall -g -fPIC -D__arm__ -march=armv7-a -fno-rtti -c -o armv7-unknown-linux-gnueabihf/rustllvm/ExecutionEngineWrapper.o -I//usr//local//include -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Werror=date-time -std=c++11 -ffunction-sections -fdata-sections -O3 -DNDEBUG -fno-exceptions -fno-rtti -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DLLVM_COMPONENT_AARCH64 -DLLVM_COMPONENT_AARCH64ASMPARSER -DLLVM_COMPONENT_AARCH64ASMPRINTER -DLLVM_COMPONENT_AARCH64CODEGEN -DLLVM_COMPONENT_AARCH64DESC -DLLVM_COMPONENT_AARCH64DISASSEMBLER -DLLVM_COMPONENT_AARCH64INFO -DLLVM_COMPONENT_AARCH64UTILS -DLLVM_COMPONENT_ALL -DLLVM_COMPONENT_ALL_TARGETS -DLLVM_COMPONENT_AMDGPU -DLLVM_COMPONENT_AMDGPUASMPARSER -DLLVM_COMPONENT_AMDGPUASMPRINTER -DLLVM_COMPONENT_AMDGPUCODEGEN -DLLVM_COMPONENT_AMDGPUDESC -DLLVM_COMPONENT_AMDGPUINFO -DLLVM_COMPONENT_AMDGPUUTILS -DLLVM_COMPONENT_ANALYSIS -DLLVM_COMPONENT_ARM -DLLVM_COMPONENT_ARMASMPARSER -DLLVM_COMPONENT_ARMASMPRINTER -DLLVM_COMPONENT_ARMCODEGEN -DLLVM_COMPONENT_ARMDESC -DLLVM_COMPONENT_ARMDISASSEMBLER -DLLVM_COMPONENT_ARMINFO -DLLVM_COMPONENT_ASMPARSER -DLLVM_COMPONENT_ASMPRINTER -DLLVM_COMPONENT_BITREADER -DLLVM_COMPONENT_BITWRITER -DLLVM_COMPONENT_BPF -DLLVM_COMPONENT_BPFASMPRINTER -DLLVM_COMPONENT_BPFCODEGEN -DLLVM_COMPONENT_BPFDESC -DLLVM_COMPONENT_BPFINFO -DLLVM_COMPONENT_CODEGEN -DLLVM_COMPONENT_CORE -DLLVM_COMPONENT_CPPBACKEND -DLLVM_COMPONENT_CPPBACKENDCODEGEN -DLLVM_COMPONENT_CPPBACKENDINFO -DLLVM_COMPONENT_DEBUGINFOCODEVIEW -DLLVM_COMPONENT_DEBUGINFODWARF -DLLVM_COMPONENT_DEBUGINFOPDB -DLLVM_COMPONENT_ENGINE -DLLVM_COMPONENT_EXECUTIONENGINE -DLLVM_COMPONENT_HEXAGON -DLLVM_COMPONENT_HEXAGONASMPARSER -DLLVM_COMPONENT_HEXAGONCODEGEN -DLLVM_COMPONENT_HEXAGONDESC -DLLVM_COMPONENT_HEXAGONDISASSEMBLER -DLLVM_COMPONENT_HEXAGONINFO -DLLVM_COMPONENT_INSTCOMBINE -DLLVM_COMPONENT_INSTRUMENTATION -DLLVM_COMPONENT_INTERPRETER -DLLVM_COMPONENT_IPO -DLLVM_COMPONENT_IRREADER -DLLVM_COMPONENT_LIBDRIVER -DLLVM_COMPONENT_LINEEDITOR -DLLVM_COMPONENT_LINKER -DLLVM_COMPONENT_LTO -DLLVM_COMPONENT_MC -DLLVM_COMPONENT_MCDISASSEMBLER -DLLVM_COMPONENT_MCJIT -DLLVM_COMPONENT_MCPARSER -DLLVM_COMPONENT_MIPS -DLLVM_COMPONENT_MIPSASMPARSER -DLLVM_COMPONENT_MIPSASMPRINTER -DLLVM_COMPONENT_MIPSCODEGEN -DLLVM_COMPONENT_MIPSDESC -DLLVM_COMPONENT_MIPSDISASSEMBLER -DLLVM_COMPONENT_MIPSINFO -DLLVM_COMPONENT_MIRPARSER -DLLVM_COMPONENT_MSP430 -DLLVM_COMPONENT_MSP430ASMPRINTER -DLLVM_COMPONENT_MSP430CODEGEN -DLLVM_COMPONENT_MSP430DESC -DLLVM_COMPONENT_MSP430INFO -DLLVM_COMPONENT_NATIVE -DLLVM_COMPONENT_NATIVECODEGEN -DLLVM_COMPONENT_NVPTX -DLLVM_COMPONENT_NVPTXASMPRINTER -DLLVM_COMPONENT_NVPTXCODEGEN -DLLVM_COMPONENT_NVPTXDESC -DLLVM_COMPONENT_NVPTXINFO -DLLVM_COMPONENT_OBJCARCOPTS -DLLVM_COMPONENT_OBJECT -DLLVM_COMPONENT_OPTION -DLLVM_COMPONENT_ORCJIT -DLLVM_COMPONENT_PASSES -DLLVM_COMPONENT_POWERPC -DLLVM_COMPONENT_POWERPCASMPARSER -DLLVM_COMPONENT_POWERPCASMPRINTER -DLLVM_COMPONENT_POWERPCCODEGEN -DLLVM_COMPONENT_POWERPCDESC -DLLVM_COMPONENT_POWERPCDISASSEMBLER -DLLVM_COMPONENT_POWERPCINFO -DLLVM_COMPONENT_PROFILEDATA -DLLVM_COMPONENT_RUNTIMEDYLD -DLLVM_COMPONENT_SCALAROPTS -DLLVM_COMPONENT_SELECTIONDAG -DLLVM_COMPONENT_SPARC -DLLVM_COMPONENT_SPARCASMPARSER -DLLVM_COMPONENT_SPARCASMPRINTER -DLLVM_COMPONENT_SPARCCODEGEN -DLLVM_COMPONENT_SPARCDESC -DLLVM_COMPONENT_SPARCDISASSEMBLER -DLLVM_COMPONENT_SPARCINFO -DLLVM_COMPONENT_SUPPORT -DLLVM_COMPONENT_SYMBOLIZE -DLLVM_COMPONENT_SYSTEMZ -DLLVM_COMPONENT_SYSTEMZASMPARSER -DLLVM_COMPONENT_SYSTEMZASMPRINTER -DLLVM_COMPONENT_SYSTEMZCODEGEN -DLLVM_COMPONENT_SYSTEMZDESC -DLLVM_COMPONENT_SYSTEMZDISASSEMBLER -DLLVM_COMPONENT_SYSTEMZINFO -DLLVM_COMPONENT_TABLEGEN -DLLVM_COMPONENT_TARGET -DLLVM_COMPONENT_TRANSFORMUTILS -DLLVM_COMPONENT_VECTORIZE -DLLVM_COMPONENT_X86 -DLLVM_COMPONENT_X86ASMPARSER -DLLVM_COMPONENT_X86ASMPRINTER -DLLVM_COMPONENT_X86CODEGEN -DLLVM_COMPONENT_X86DESC -DLLVM_COMPONENT_X86DISASSEMBLER -DLLVM_COMPONENT_X86INFO -DLLVM_COMPONENT_X86UTILS -DLLVM_COMPONENT_XCORE -DLLVM_COMPONENT_XCOREASMPRINTER -DLLVM_COMPONENT_XCORECODEGEN -DLLVM_COMPONENT_XCOREDESC -DLLVM_COMPONENT_XCOREDISASSEMBLER -DLLVM_COMPONENT_XCOREINFO -I /usr/local/include -I /root/tmp/rustc-beta/src/rustllvm/include /root/tmp/rustc-beta/src/rustllvm/ExecutionEngineWrapper.cpp

followed by a rerun of VERBOSE=1 make and so on.

MagaTailor commented 8 years ago

@corvinux To fix the llvm-config wrapper problem add #!/bin/bash to it on the first line. This will keep python (mklldeps.py) happy.

#!/bin/bash
/usr/local/bin/llvm-config.orig "$@" | sed s/-Wcovered-switch-default//
corvinux commented 8 years ago

@petevine, shebang was OK. I still got some other issues:

note: /usr/bin/ld: cannot find -lc++
collect2: error: ld returned 1 exit status

error: aborting due to previous error
make: *** [armv7-unknown-linux-gnueabihf/stage0/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/stamp.rustc_llvm] Error 101
make: *** Waiting for unfinished jobs....
info: now are following matches for librustc_platform_intrinsics-*.so libraries:
armv7-unknown-linux-gnueabihf/stage0/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/librustc_platform_intrinsics-2f39a9bd.so
info: now are following matches for librustc_platform_intrinsics-*.rlib libraries:
armv7-unknown-linux-gnueabihf/stage0/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/librustc_platform_intrinsics-2f39a9bd.rlib

I find this https://github.com/Golevka/emacs-clang-complete-async/issues/37, and I tried building from scratch, using rustc-beta-src.tar.gz. No change, same error appear. Log is here http://paste2.org/0fZfb5Kp

MagaTailor commented 8 years ago

You should be able to use gcc/g++ without a problem now, --enable-clang can be skipped. If that's not enough, however, you could also try --disable-libcpp or install libc++.

corvinux commented 8 years ago

@petevine Finally I came over all building/compiling obstacles, to get to square root one :) [root@Jolla rustc-beta]# make all cfg: version 1.10.0-dev cfg: build triple armv7-unknown-linux-gnueabihf cfg: host triples armv7-unknown-linux-gnueabihf cfg: target triples armv7-unknown-linux-gnueabihf cfg: host for armv7-unknown-linux-gnueabihf is armv7 cfg: os for armv7-unknown-linux-gnueabihf is unknown-linux-gnueabihf cfg: no good valgrind for armv7-unknown-linux-gnueabihf cfg: using CC=gcc (CFG_CC) cfg: disabling valgrind run-pass tests rustc: armv7-unknown-linux-gnueabihf/stage0/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/librustc_metadata rustc: armv7-unknown-linux-gnueabihf/stage0/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/librustc_plugin rustc: armv7-unknown-linux-gnueabihf/stage0/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/libsyntax_ext rustc: armv7-unknown-linux-gnueabihf/stage0/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/librustc_passes rustc: armv7-unknown-linux-gnueabihf/stage0/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/librustc_save_analysis rustc: armv7-unknown-linux-gnueabihf/stage0/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/librustc_driver mkdir -p armv7-unknown-linux-gnueabihf/stage0/lib/rustlib/armv7-unknown-linux-gnueabihf/bin/ rustc: armv7-unknown-linux-gnueabihf/stage0/lib/rustlib/armv7-unknown-linux-gnueabihf/bin/rustc cp: armv7-unknown-linux-gnueabihf/stage1/lib/libstd cp: armv7-unknown-linux-gnueabihf/stage1/lib/libarena cp: armv7-unknown-linux-gnueabihf/stage1/lib/libflate cp: armv7-unknown-linux-gnueabihf/stage1/lib/libgetopts cp: armv7-unknown-linux-gnueabihf/stage1/lib/libgraphviz cp: armv7-unknown-linux-gnueabihf/stage1/lib/libterm cp: armv7-unknown-linux-gnueabihf/stage1/lib/liblog cp: armv7-unknown-linux-gnueabihf/stage1/lib/libserialize cp: armv7-unknown-linux-gnueabihf/stage1/lib/libsyntax cp: armv7-unknown-linux-gnueabihf/stage1/lib/libfmt_macros cp: armv7-unknown-linux-gnueabihf/stage1/lib/librbml cp: armv7-unknown-linux-gnueabihf/stage1/lib/librustc_llvm cp: armv7-unknown-linux-gnueabihf/stage1/lib/librustc_back cp: armv7-unknown-linux-gnueabihf/stage1/lib/librustc_data_structures cp: armv7-unknown-linux-gnueabihf/stage1/lib/librustc_const_math cp: armv7-unknown-linux-gnueabihf/stage1/lib/librustc cp: armv7-unknown-linux-gnueabihf/stage1/lib/librustc_const_eval cp: armv7-unknown-linux-gnueabihf/stage1/lib/librustc_mir cp: armv7-unknown-linux-gnueabihf/stage1/lib/librustc_borrowck cp: armv7-unknown-linux-gnueabihf/stage1/lib/librustc_platform_intrinsics cp: armv7-unknown-linux-gnueabihf/stage1/lib/librustc_typeck cp: armv7-unknown-linux-gnueabihf/stage1/lib/librustc_resolve cp: armv7-unknown-linux-gnueabihf/stage1/lib/librustc_incremental cp: armv7-unknown-linux-gnueabihf/stage1/lib/librustc_trans cp: armv7-unknown-linux-gnueabihf/stage1/lib/librustc_privacy cp: armv7-unknown-linux-gnueabihf/stage1/lib/librustc_lint cp: armv7-unknown-linux-gnueabihf/stage1/lib/librustc_metadata cp: armv7-unknown-linux-gnueabihf/stage1/lib/librustc_plugin cp: armv7-unknown-linux-gnueabihf/stage1/lib/libsyntax_ext cp: armv7-unknown-linux-gnueabihf/stage1/lib/librustc_passes cp: armv7-unknown-linux-gnueabihf/stage1/lib/librustc_save_analysis cp: armv7-unknown-linux-gnueabihf/stage1/lib/librustc_driver cp: armv7-unknown-linux-gnueabihf/stage1/bin/rustc mkdir -p armv7-unknown-linux-gnueabihf/stage1/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/ cp: armv7-unknown-linux-gnueabihf/stage1/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/libcompiler-rt.a rustc: armv7-unknown-linux-gnueabihf/stage1/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/libcore make: *\ [armv7-unknown-linux-gnueabihf/stage1/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/stamp.core] Segmentation fault