Skip to content
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

Installing artiq 3.1 from source fails during rust install #888

Closed
philipkent opened this issue Jan 10, 2018 · 26 comments
Closed

Installing artiq 3.1 from source fails during rust install #888

philipkent opened this issue Jan 10, 2018 · 26 comments

Comments

@philipkent
Copy link

philipkent commented Jan 10, 2018

On Ubuntu 14.04.5 LTS 64 bit, trying to install ARTIQ 3.1 fails during the rust install with:

cargo:warning=cc: error: ../../libcompiler_builtins/compiler-rt/lib/builtins/absvdi2.c: No such file or directory

I'm following the instructions on https://m-labs.hk/artiq/manual-release-3/developing.html#installing-artiq-from-source and it fails during the 'make install' command to install rust.

Here is the full error I'm getting:

 cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/ucmpti2.c
 TARGET = Some("x86_64-unknown-linux-gnu")
 OPT_LEVEL = Some("2")
 TARGET = Some("x86_64-unknown-linux-gnu")
 HOST = Some("x86_64-unknown-linux-gnu")
 TARGET = Some("x86_64-unknown-linux-gnu")
 TARGET = Some("x86_64-unknown-linux-gnu")
 HOST = Some("x86_64-unknown-linux-gnu")
 CC_x86_64-unknown-linux-gnu = Some("cc")
 TARGET = Some("x86_64-unknown-linux-gnu")
 HOST = Some("x86_64-unknown-linux-gnu")
 CFLAGS_x86_64-unknown-linux-gnu = Some("-ffunction-sections -fdata-sections -fPIC -m64")
 DEBUG = Some("false")
 running: "cc" "-O2" "-ffunction-sections" "-fdata-sections" "-fPIC" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-m64" "-fno-builtin" "-fvisibility=hidden" "-fomit-frame-pointer" "-ffreestanding" "-DVISIBILITY_HIDDEN" "-o" "/home/maglab/artiq-dev/artiq_3.1/rust/build/build/x86_64-unknown-linux-gnu/stage0-std/x86_64-unknown-linux-gnu/release/build/compiler_builtins-7bd5df6f54dc2a21/out/../../libcompiler_builtins/compiler-rt/lib/builtins/absvdi2.o" "-c" "../../libcompiler_builtins/compiler-rt/lib/builtins/absvdi2.c"
 cargo:warning=cc: error: ../../libcompiler_builtins/compiler-rt/lib/builtins/absvdi2.c: No such file or directory
 cargo:warning=cc: fatal error: no input files
 cargo:warning=compilation terminated.
 exit code: 4
 
 --- stderr
 thread 'main' panicked at '
 
 Internal error occurred: Command "cc" "-O2" "-ffunction-sections" "-fdata-sections" "-fPIC" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-m64" "-fno-builtin" "-fvisibility=hidden" "-fomit-frame-pointer" "-ffreestanding" "-DVISIBILITY_HIDDEN" "-o" "/home/maglab/artiq-dev/artiq_3.1/rust/build/build/x86_64-unknown-linux-gnu/stage0-std/x86_64-unknown-linux-gnu/release/build/compiler_builtins-7bd5df6f54dc2a21/out/../../libcompiler_builtins/compiler-rt/lib/builtins/absvdi2.o" "-c" "../../libcompiler_builtins/compiler-rt/lib/builtins/absvdi2.c" with args "cc" did not execute successfully (status code exit code: 4).

 ', /home/maglab/.cargo/registry/src/github.com-1ecc6299db9ec823/cc-1.0.0/src/lib.rs:1645:4
 note: Run with `RUST_BACKTRACE=1` for a backtrace.

 warning: build failed, waiting for other jobs to finish...
 error: build failed
 thread 'main' panicked at 'command did not execute successfully: "/home/maglab/artiq-dev/artiq_3.1/rust/build/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "--release" "--features" "panic-unwind jemalloc backtrace" "--manifest-path" "/home/maglab/artiq-dev/artiq_3.1/rust/src/libstd/Cargo.toml" "--message-format" "json"
 expected success, got: exit code: 101', /home/maglab/artiq-dev/artiq_3.1/rust/src/bootstrap/compile.rs:883:8
 note: Run with `RUST_BACKTRACE=1` for a backtrace.
 failed to run: /home/maglab/artiq-dev/artiq_3.1/rust/build/build/bootstrap/debug/bootstrap install
 Build completed unsuccessfully in 0:01:41
 make: *** [install] Error 1`
@whitequark
Copy link
Contributor

Which errors do you get exactly?

@philipkent
Copy link
Author

cargo:warning=cc: error: ../../libcompiler_builtins/compiler-rt/lib/builtins/absvdi2.c: No such file or directory

I've searched for that file with find and I'm not seeing it, but maybe I'm missing something.

@philipkent
Copy link
Author

I do have three 'libcompiler_bultins' directories but no 'absvdi2.c' file:

find . -name libcompiler_builtins
./rust/build/build/x86_64-unknown-linux-gnu/stage0-std/x86_64-unknown-linux-gnu/release/build/libcompiler_builtins
./rust/src/libcompiler_builtins
./rust/.git/modules/src/libcompiler_builtins

@whitequark
Copy link
Contributor

You forgot to run git submodule update --init in the Rust sources.

@philipkent
Copy link
Author

hmm, I'll try it again but I did update the rust submodules.

@philipkent
Copy link
Author

philipkent commented Jan 10, 2018

I tried a second time but I still get the same error. git submodule update --init seemed to go smoothly. Maybe there is something configured incorrectly on my machine?

This is everything I did.

maglab@687stylab:~/artiq-dev/artiq_3.1$ rm -fr rust
maglab@687stylab:~/artiq-dev/artiq_3.1$ git clone -b artiq-1.22.1 https://github.com/m-labs/rust
Cloning into 'rust'...
remote: Counting objects: 709966, done.
remote: Total 709966 (delta 0), reused 0 (delta 0), pack-reused 709965
Receiving objects: 100% (709966/709966), 323.81 MiB | 13.38 MiB/s, done.
Resolving deltas: 100% (573640/573640), done.
Checking connectivity... done.
maglab@687stylab:~/artiq-dev/artiq_3.1$ cd rust
maglab@687stylab:~/artiq-dev/artiq_3.1/rust$ git submodule update --init
Submodule 'book' (https://github.com/rust-lang/book.git) registered for path 'src/doc/book'
Submodule 'src/doc/nomicon' (https://github.com/rust-lang-nursery/nomicon.git) registered for path 'src/doc/nomicon'
Submodule 'reference' (https://github.com/rust-lang-nursery/reference.git) registered for path 'src/doc/reference'
Submodule 'src/jemalloc' (https://github.com/rust-lang/jemalloc.git) registered for path 'src/jemalloc'
Submodule 'src/libcompiler_builtins' (https://github.com/rust-lang-nursery/compiler-builtins) registered for path 'src/libcompiler_builtins'
Submodule 'src/liblibc' (https://github.com/rust-lang/libc.git) registered for path 'src/liblibc'
Submodule 'src/rt/hoedown' (https://github.com/rust-lang/hoedown.git) registered for path 'src/rt/hoedown'
Submodule 'src/tools/cargo' (https://github.com/rust-lang/cargo.git) registered for path 'src/tools/cargo'
Submodule 'src/tools/clippy' (https://github.com/rust-lang-nursery/rust-clippy.git) registered for path 'src/tools/clippy'
Submodule 'src/tools/miri' (https://github.com/solson/miri.git) registered for path 'src/tools/miri'
Submodule 'src/tools/rls' (https://github.com/rust-lang-nursery/rls.git) registered for path 'src/tools/rls'
Submodule 'src/rust-installer' (https://github.com/rust-lang/rust-installer.git) registered for path 'src/tools/rust-installer'
Submodule 'src/tools/rustfmt' (https://github.com/rust-lang-nursery/rustfmt.git) registered for path 'src/tools/rustfmt'
Cloning into 'src/doc/book'...
remote: Counting objects: 19001, done.
remote: Compressing objects: 100% (50/50), done.
remote: Total 19001 (delta 57), reused 59 (delta 38), pack-reused 18913
Receiving objects: 100% (19001/19001), 22.16 MiB | 9.05 MiB/s, done.
Resolving deltas: 100% (14835/14835), done.
Checking connectivity... done.
Submodule path 'src/doc/book': checked out '7db393dae740d84775b73f403123c866e94e3a5b'
Cloning into 'src/doc/nomicon'...
remote: Counting objects: 1074, done.
remote: Compressing objects: 100% (14/14), done.
remote: Total 1074 (delta 4), reused 3 (delta 0), pack-reused 1060
Receiving objects: 100% (1074/1074), 918.69 KiB | 0 bytes/s, done.
Resolving deltas: 100% (705/705), done.
Checking connectivity... done.
Submodule path 'src/doc/nomicon': checked out '0ee3f7265e9d09746d901cef6f1f300baff1d923'
Cloning into 'src/doc/reference'...
remote: Counting objects: 2868, done.
remote: Total 2868 (delta 0), reused 0 (delta 0), pack-reused 2868
Receiving objects: 100% (2868/2868), 1.98 MiB | 0 bytes/s, done.
Resolving deltas: 100% (1980/1980), done.
Checking connectivity... done.
Submodule path 'src/doc/reference': checked out '36adc6ae504c6e0343ab5d7b3871f0a2a71236da'
Cloning into 'src/jemalloc'...
remote: Counting objects: 16722, done.
remote: Total 16722 (delta 0), reused 0 (delta 0), pack-reused 16722
Receiving objects: 100% (16722/16722), 7.39 MiB | 7.43 MiB/s, done.
Resolving deltas: 100% (11932/11932), done.
Checking connectivity... done.
Submodule path 'src/jemalloc': checked out '1f5a28755e301ac581e2048011e4e0ff3da482ef'
Cloning into 'src/libcompiler_builtins'...
remote: Counting objects: 2564, done.
remote: Compressing objects: 100% (20/20), done.
remote: Total 2564 (delta 11), reused 21 (delta 7), pack-reused 2537
Receiving objects: 100% (2564/2564), 459.16 KiB | 0 bytes/s, done.
Resolving deltas: 100% (1597/1597), done.
Checking connectivity... done.
Submodule path 'src/libcompiler_builtins': checked out '0b9844764ea1f99ea11a7917a4f3ba7fd2db775c'
Cloning into 'src/liblibc'...
remote: Counting objects: 39963, done.
remote: Compressing objects: 100% (15/15), done.
remote: Total 39963 (delta 2), reused 9 (delta 0), pack-reused 39948
Receiving objects: 100% (39963/39963), 15.90 MiB | 12.11 MiB/s, done.
Resolving deltas: 100% (31905/31905), done.
Checking connectivity... done.
Submodule path 'src/liblibc': checked out '44e4018e1a37716286ec98cb5b7dd7d33ecaf940'
Cloning into 'src/rt/hoedown'...
remote: Counting objects: 2545, done.
remote: Total 2545 (delta 0), reused 0 (delta 0), pack-reused 2545
Receiving objects: 100% (2545/2545), 668.96 KiB | 0 bytes/s, done.
Resolving deltas: 100% (1505/1505), done.
Checking connectivity... done.
Submodule path 'src/rt/hoedown': checked out 'da282f1bb7277b4d30fa1599ee29ad8eb4dd2a92'
Cloning into 'src/tools/cargo'...
remote: Counting objects: 36456, done.
remote: Compressing objects: 100% (88/88), done.
remote: Total 36456 (delta 59), reused 71 (delta 39), pack-reused 36329
Receiving objects: 100% (36456/36456), 16.21 MiB | 11.91 MiB/s, done.
Resolving deltas: 100% (26860/26860), done.
Checking connectivity... done.
Submodule path 'src/tools/cargo': checked out '61fa02415ee1bc17a0c364c1c67107953d04ea87'
Cloning into 'src/tools/clippy'...
remote: Counting objects: 22864, done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 22864 (delta 0), reused 2 (delta 0), pack-reused 22859
Receiving objects: 100% (22864/22864), 7.07 MiB | 7.64 MiB/s, done.
Resolving deltas: 100% (17366/17366), done.
Checking connectivity... done.
Submodule path 'src/tools/clippy': checked out '25444585592f5da648edd5317fcdd21f2db8bb64'
Cloning into 'src/tools/miri'...
remote: Counting objects: 9230, done.
remote: Compressing objects: 100% (23/23), done.
remote: Total 9230 (delta 8), reused 17 (delta 7), pack-reused 9199
Receiving objects: 100% (9230/9230), 2.82 MiB | 0 bytes/s, done.
Resolving deltas: 100% (6018/6018), done.
Checking connectivity... done.
Submodule path 'src/tools/miri': checked out '80853e2f24a01db96fe9821e468dd2af75a4d2e5'
Cloning into 'src/tools/rls'...
remote: Counting objects: 4297, done.
remote: Compressing objects: 100% (42/42), done.
remote: Total 4297 (delta 47), reused 86 (delta 47), pack-reused 4208
Receiving objects: 100% (4297/4297), 1.46 MiB | 0 bytes/s, done.
Resolving deltas: 100% (2656/2656), done.
Checking connectivity... done.
Submodule path 'src/tools/rls': checked out '93b47d14cef5720bba7cfb4dcb8078fbf1f706c1'
Cloning into 'src/tools/rust-installer'...
remote: Counting objects: 614, done.
remote: Total 614 (delta 0), reused 0 (delta 0), pack-reused 613
Receiving objects: 100% (614/614), 185.72 KiB | 0 bytes/s, done.
Resolving deltas: 100% (372/372), done.
Checking connectivity... done.
Submodule path 'src/tools/rust-installer': checked out '0ddd53c4bc2a76df565a1c1fc0cc6f19f254b51e'
Cloning into 'src/tools/rustfmt'...
remote: Counting objects: 17232, done.
remote: Compressing objects: 100% (13/13), done.
remote: Total 17232 (delta 3), reused 8 (delta 2), pack-reused 17217
Receiving objects: 100% (17232/17232), 5.97 MiB | 7.47 MiB/s, done.
Resolving deltas: 100% (12956/12956), done.
Checking connectivity... done.
Submodule path 'src/tools/rustfmt': checked out '22eb5241c0ee5bb7eaf95e270a2b1500e82bf767'
maglab@687stylab:~/artiq-dev/artiq_3.1/rust$ mkdir build
maglab@687stylab:~/artiq-dev/artiq_3.1/rust$ cd build
maglab@687stylab:~/artiq-dev/artiq_3.1/rust/build$ ../configure --prefix=/usr/local/rust-or1k --llvm-root=/usr/local/llvm-or1k --disable-manage-submodules --disable-docs
configure: processing command line
configure: 
configure: target.x86_64-unknown-linux-gnu.llvm-config := /usr/local/llvm-or1k/bi ...
configure: install.prefix       := /usr/local/rust-or1k
configure: build.submodules     := False
configure: build.docs           := False
configure: build.configure-args := ['--prefix=/usr/local/rust-or1k', '--llvm-root ...
configure: 
configure: writing `config.toml` in current directory
configure: 
configure: run `python ../src/bootstrap/x.py --help`
configure: 
maglab@687stylab:~/artiq-dev/artiq_3.1/rust/build$ sudo mkdir /usr/local/rust-or1k
[sudo] password for maglab: 
mkdir: cannot create directory ‘/usr/local/rust-or1k’: File exists
maglab@687stylab:~/artiq-dev/artiq_3.1/rust/build$ sudo rmdir /usr/local/rust-or1k/
maglab@687stylab:~/artiq-dev/artiq_3.1/rust/build$ sudo mkdir /usr/local/rust-or1k
maglab@687stylab:~/artiq-dev/artiq_3.1/rust/build$  sudo chown $USER.$USER /usr/local/rust-or1k
maglab@687stylab:~/artiq-dev/artiq_3.1/rust/build$ make install
downloading https://static.rust-lang.org/dist/2017-10-12/rust-std-1.21.0-x86_64-unknown-linux-gnu.tar.gz
######################################################################## 100.0%
extracting /home/maglab/artiq-dev/artiq_3.1/rust/build/build/cache/2017-10-12/rust-std-1.21.0-x86_64-unknown-linux-gnu.tar.gz
downloading https://static.rust-lang.org/dist/2017-10-12/rustc-1.21.0-x86_64-unknown-linux-gnu.tar.gz
######################################################################## 100.0%
extracting /home/maglab/artiq-dev/artiq_3.1/rust/build/build/cache/2017-10-12/rustc-1.21.0-x86_64-unknown-linux-gnu.tar.gz
downloading https://static.rust-lang.org/dist/2017-10-12/cargo-0.22.0-x86_64-unknown-linux-gnu.tar.gz
######################################################################## 100.0%
extracting /home/maglab/artiq-dev/artiq_3.1/rust/build/build/cache/2017-10-12/cargo-0.22.0-x86_64-unknown-linux-gnu.tar.gz
   Compiling dtoa v0.4.2
   Compiling itoa v0.3.4
   Compiling lazy_static v0.2.8
   Compiling quote v0.3.15
   Compiling num-traits v0.1.40
   Compiling getopts v0.2.15
   Compiling serde v1.0.15
   Compiling libc v0.2.31
   Compiling unicode-xid v0.0.4
   Compiling cc v1.0.0
   Compiling synom v0.11.3
   Compiling filetime v0.1.12
   Compiling num_cpus v1.6.2
   Compiling syn v0.11.11
   Compiling build_helper v0.1.0 (file:///home/maglab/artiq-dev/artiq_3.1/rust/src/build_helper)
   Compiling cmake v0.1.26
   Compiling serde_derive_internals v0.16.0
   Compiling serde_derive v1.0.15
   Compiling serde_json v1.0.3
   Compiling toml v0.4.5
   Compiling bootstrap v0.0.0 (file:///home/maglab/artiq-dev/artiq_3.1/rust/src/bootstrap)
    Finished dev [unoptimized] target(s) in 55.37 secs
Building stage0 std artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
   Compiling libc v0.2.31
   Compiling unwind v0.0.0 (file:///home/maglab/artiq-dev/artiq_3.1/rust/src/libunwind)
   Compiling core v0.0.0 (file:///home/maglab/artiq-dev/artiq_3.1/rust/src/libcore)
   Compiling cc v1.0.0
   Compiling filetime v0.1.12
   Compiling build_helper v0.1.0 (file:///home/maglab/artiq-dev/artiq_3.1/rust/src/build_helper)
   Compiling cmake v0.1.26
   Compiling std v0.0.0 (file:///home/maglab/artiq-dev/artiq_3.1/rust/src/libstd)
   Compiling alloc_jemalloc v0.0.0 (file:///home/maglab/artiq-dev/artiq_3.1/rust/src/liballoc_jemalloc)
   Compiling compiler_builtins v0.0.0 (file:///home/maglab/artiq-dev/artiq_3.1/rust/src/rustc/compiler_builtins_shim)
   Compiling rustc_lsan v0.0.0 (file:///home/maglab/artiq-dev/artiq_3.1/rust/src/librustc_lsan)
   Compiling rustc_tsan v0.0.0 (file:///home/maglab/artiq-dev/artiq_3.1/rust/src/librustc_tsan)
   Compiling rustc_msan v0.0.0 (file:///home/maglab/artiq-dev/artiq_3.1/rust/src/librustc_msan)
   Compiling rustc_asan v0.0.0 (file:///home/maglab/artiq-dev/artiq_3.1/rust/src/librustc_asan)
error: failed to run custom build command for `compiler_builtins v0.0.0 (file:///home/maglab/artiq-dev/artiq_3.1/rust/src/rustc/compiler_builtins_shim)`
process didn't exit successfully: `/home/maglab/artiq-dev/artiq_3.1/rust/build/build/x86_64-unknown-linux-gnu/stage0-std/release/build/compiler_builtins-4ea3a9c8d1a4e0f3/build-script-build` (exit code: 101)
--- stdout
cargo:rerun-if-changed=build.rs
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/absvdi2.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/absvsi2.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/absvti2.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/addvdi3.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/addvsi3.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/addvti3.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/apple_versioning.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/clzdi2.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/clzsi2.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/clzti2.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/cmpdi2.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/cmpti2.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/comparedf2.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/comparesf2.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/ctzdi2.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/ctzsi2.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/ctzti2.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/divdc3.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/divdf3.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/divsc3.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/divsf3.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/divxc3.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/extendhfsf2.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/extendsfdf2.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/ffsdi2.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/ffsti2.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/x86_64/floatdisf.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/x86_64/floatdixf.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/x86_64/floatundidf.S
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/x86_64/floatundisf.S
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/x86_64/floatundixf.S
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/int_util.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/muldc3.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/muldf3.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/mulsc3.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/mulsf3.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/mulvdi3.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/mulvsi3.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/mulvti3.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/mulxc3.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/negdf2.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/negdi2.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/negsf2.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/negti2.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/negvdi2.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/negvsi2.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/negvti2.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/paritydi2.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/paritysi2.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/parityti2.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/popcountdi2.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/popcountsi2.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/popcountti2.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/powixf2.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/subvdi3.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/subvsi3.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/subvti3.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/truncdfhf2.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/truncdfsf2.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/truncsfhf2.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/ucmpdi2.c
cargo:rerun-if-changed=../../libcompiler_builtins/compiler-rt/lib/builtins/ucmpti2.c
TARGET = Some("x86_64-unknown-linux-gnu")
OPT_LEVEL = Some("2")
TARGET = Some("x86_64-unknown-linux-gnu")
HOST = Some("x86_64-unknown-linux-gnu")
TARGET = Some("x86_64-unknown-linux-gnu")
TARGET = Some("x86_64-unknown-linux-gnu")
HOST = Some("x86_64-unknown-linux-gnu")
CC_x86_64-unknown-linux-gnu = Some("cc")
TARGET = Some("x86_64-unknown-linux-gnu")
HOST = Some("x86_64-unknown-linux-gnu")
CFLAGS_x86_64-unknown-linux-gnu = Some("-ffunction-sections -fdata-sections -fPIC -m64")
DEBUG = Some("false")
running: "cc" "-O2" "-ffunction-sections" "-fdata-sections" "-fPIC" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-m64" "-fno-builtin" "-fvisibility=hidden" "-fomit-frame-pointer" "-ffreestanding" "-DVISIBILITY_HIDDEN" "-o" "/home/maglab/artiq-dev/artiq_3.1/rust/build/build/x86_64-unknown-linux-gnu/stage0-std/x86_64-unknown-linux-gnu/release/build/compiler_builtins-7bd5df6f54dc2a21/out/../../libcompiler_builtins/compiler-rt/lib/builtins/absvdi2.o" "-c" "../../libcompiler_builtins/compiler-rt/lib/builtins/absvdi2.c"
cargo:warning=cc: error: ../../libcompiler_builtins/compiler-rt/lib/builtins/absvdi2.c: No such file or directory
cargo:warning=cc: fatal error: no input files
cargo:warning=compilation terminated.
exit code: 4

--- stderr
thread 'main' panicked at '

Internal error occurred: Command "cc" "-O2" "-ffunction-sections" "-fdata-sections" "-fPIC" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-m64" "-fno-builtin" "-fvisibility=hidden" "-fomit-frame-pointer" "-ffreestanding" "-DVISIBILITY_HIDDEN" "-o" "/home/maglab/artiq-dev/artiq_3.1/rust/build/build/x86_64-unknown-linux-gnu/stage0-std/x86_64-unknown-linux-gnu/release/build/compiler_builtins-7bd5df6f54dc2a21/out/../../libcompiler_builtins/compiler-rt/lib/builtins/absvdi2.o" "-c" "../../libcompiler_builtins/compiler-rt/lib/builtins/absvdi2.c" with args "cc" did not execute successfully (status code exit code: 4).

', /home/maglab/.cargo/registry/src/github.com-1ecc6299db9ec823/cc-1.0.0/src/lib.rs:1645:4
note: Run with `RUST_BACKTRACE=1` for a backtrace.

warning: build failed, waiting for other jobs to finish...
error: build failed
thread 'main' panicked at 'command did not execute successfully: "/home/maglab/artiq-dev/artiq_3.1/rust/build/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "--release" "--features" "panic-unwind jemalloc backtrace" "--manifest-path" "/home/maglab/artiq-dev/artiq_3.1/rust/src/libstd/Cargo.toml" "--message-format" "json"
expected success, got: exit code: 101', /home/maglab/artiq-dev/artiq_3.1/rust/src/bootstrap/compile.rs:883:8
note: Run with `RUST_BACKTRACE=1` for a backtrace.
failed to run: /home/maglab/artiq-dev/artiq_3.1/rust/build/build/bootstrap/debug/bootstrap install
Build completed unsuccessfully in 0:01:49
make: *** [install] Error 1

@whitequark
Copy link
Contributor

Oh! git submodule update --init --recursive.

@philipkent
Copy link
Author

Ah! Will try that, thanks.

@philipkent
Copy link
Author

philipkent commented Jan 10, 2018

That fixed the 'absvdi2.c' error, thanks! Now it's failing for not being able to find llvmconfig. Is that supposed to be installed as apart of the LLVM and Clang build? There were a few directory permission issues on this machine earlier so it may be that llvmconfig is just not visible for my user. I'm going to look into that more tomorrow.

@whitequark
Copy link
Contributor

Is that supposed to be installed as apart of the LLVM and Clang build?

The llvm-config executable should be installed as a part of LLVM. Is it not present as /usr/local/llvm-or1k/bin/llvm-config?

@philipkent
Copy link
Author

It was present. llvm-config did get installed to /usr/local/llvm-or1k/bin, it was just that /usr/local/llvm-or1k/bin wasn't on the system path. After adding /usr/local/llvm-or1k/bin to my path variable make install ran without errors and I get the "Rust ready to roll" message at the end.

@sbourdeauducq
Copy link
Member

sbourdeauducq commented Jan 11, 2018

trying to install ARTIQ 3.1

Any particular reason you're not using 3.2? Or the conda packages?

@whitequark
Copy link
Contributor

After adding /usr/local/llvm-or1k/bin to my path variable make install ran without errors and I get the "Rust ready to roll" message at the end.

That's very odd, it should not be necessary. Exactly which component is not finding llvm-config? It would be helpful if you posted the actual error message in its context instead of paraphrasing it.

@philipkent
Copy link
Author

philipkent commented Jan 11, 2018

@sbourdeauducq

Any particular reason you're not using 3.2? Or the conda packages?

No particular reason for 3.1, that was just the last version I knew supported DMA. I'll upgrade to version 3.2 instead.

We need to build a modified version of the gateware with the output FIFO depth increased to 1024. We did this for ARTIQ version 2 and it reduced the number of underflow errors we we're getting. We tried running a few experiments using the gateware provided in the ARTIQ version 3 conda packages but that resulted in underflow errors that did not occur using the version 2.0 gateware with the FIFO output depth increased to 1024. So we're expecting we'll need the same FIFO depth when using ARTIQ version 3.

I just noticed the mention of the artiq-dev package in the instructions for version 3 I didn't realize those were available, would that be enough to build the gateware with an updated FIFO depth?

@philipkent
Copy link
Author

philipkent commented Jan 11, 2018

@whitequark
That's very odd, it should not be necessary. Exactly which component is not finding llvm-config? It would be helpful if you posted the actual error message in its context instead of paraphrasing it.

It was something in the 'make install' script that installs rust. I'll try running through the install process again tonight and post the specific component/error. The steps for installing from source instruct you to add /usr/local/llvm-or1k/bin to your path with:

export PATH=/usr/local/llvm-or1k/bin:$PATH

after installing rust. Maybe that step just needs to be mentioned higher up in the instructions before the steps to build rust?

@philipkent
Copy link
Author

@whitequark This is the error I was getting when trying to install rust.

maglab@687stylab:~/artiq-dev/artiq_3.1/rust/build$ make install
Finished dev [unoptimized] target(s) in 0.0 secs
Building stage0 std artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
warning: ../../libcompiler_builtins/compiler-rt/lib/builtins/divdc3.c:21:1: warning: conflicting types for built-in function ‘__divdc3’ [enabled by default]
warning:  __divdc3(double __a, double __b, double __c, double __d)
warning:  ^
warning: ../../libcompiler_builtins/compiler-rt/lib/builtins/divsc3.c:21:1: warning: conflicting types for built-in function ‘__divsc3’ [enabled by default]
warning:  __divsc3(float __a, float __b, float __c, float __d)
warning:  ^
warning: ../../libcompiler_builtins/compiler-rt/lib/builtins/divxc3.c:22:1: warning: conflicting types for built-in function ‘__divxc3’ [enabled by default]
warning:  __divxc3(long double __a, long double __b, long double __c, long double __d)
warning:  ^
warning: ../../libcompiler_builtins/compiler-rt/lib/builtins/muldc3.c:21:1: warning: conflicting types for built-in function ‘__muldc3’ [enabled by default]
warning:  __muldc3(double __a, double __b, double __c, double __d)
warning:  ^
warning: ../../libcompiler_builtins/compiler-rt/lib/builtins/mulsc3.c:21:1: warning: conflicting types for built-in function ‘__mulsc3’ [enabled by default]
warning:  __mulsc3(float __a, float __b, float __c, float __d)
warning:  ^
warning: ../../libcompiler_builtins/compiler-rt/lib/builtins/mulxc3.c:23:1: warning: conflicting types for built-in function ‘__mulxc3’ [enabled by default]
warning:  __mulxc3(long double __a, long double __b, long double __c, long double __d)
warning:  ^
Finished release [optimized] target(s) in 0.0 secs
Copying stage0 std from stage0 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
Building stage0 test artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
Finished release [optimized] target(s) in 0.0 secs
Copying stage0 test from stage0 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
Building stage0 compiler artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
Finished release [optimized] target(s) in 0.0 secs
Copying stage0 rustc from stage0 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
Assembling stage1 compiler (x86_64-unknown-linux-gnu)
Building stage1 std artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
warning: ../../libcompiler_builtins/compiler-rt/lib/builtins/divdc3.c:21:1: warning: conflicting types for built-in function ‘__divdc3’ [enabled by default]
warning:  __divdc3(double __a, double __b, double __c, double __d)
warning:  ^
warning: ../../libcompiler_builtins/compiler-rt/lib/builtins/divsc3.c:21:1: warning: conflicting types for built-in function ‘__divsc3’ [enabled by default]
warning:  __divsc3(float __a, float __b, float __c, float __d)
warning:  ^
warning: ../../libcompiler_builtins/compiler-rt/lib/builtins/divxc3.c:22:1: warning: conflicting types for built-in function ‘__divxc3’ [enabled by default]
warning:  __divxc3(long double __a, long double __b, long double __c, long double __d)
warning:  ^
warning: ../../libcompiler_builtins/compiler-rt/lib/builtins/muldc3.c:21:1: warning: conflicting types for built-in function ‘__muldc3’ [enabled by default]
warning:  __muldc3(double __a, double __b, double __c, double __d)
warning:  ^
warning: ../../libcompiler_builtins/compiler-rt/lib/builtins/mulsc3.c:21:1: warning: conflicting types for built-in function ‘__mulsc3’ [enabled by default]
warning:  __mulsc3(float __a, float __b, float __c, float __d)
warning:  ^
warning: ../../libcompiler_builtins/compiler-rt/lib/builtins/mulxc3.c:23:1: warning: conflicting types for built-in function ‘__mulxc3’ [enabled by default]
warning:  __mulxc3(long double __a, long double __b, long double __c, long double __d)
warning:  ^
    Finished release [optimized] target(s) in 0.0 secs
Copying stage1 std from stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
Building stage1 test artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
    Finished release [optimized] target(s) in 0.0 secs
Copying stage1 test from stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
Building stage1 compiler artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
    Finished release [optimized] target(s) in 0.0 secs
Copying stage1 rustc from stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
Assembling stage2 compiler (x86_64-unknown-linux-gnu)
Dist std stage2 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
Uplifting stage1 std (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
Copying stage2 std from stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
Uplifting stage1 test (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
Copying stage2 test from stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
Uplifting stage1 rustc (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
Copying stage2 rustc from stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
Building stage0 tool fabricate (x86_64-unknown-linux-gnu)
    Finished release [optimized] target(s) in 0.0 secs
Install std stage2 (Some("x86_64-unknown-linux-gnu"))
install: uninstalling component 'rust-std-x86_64-unknown-linux-gnu'
install: creating uninstall script at /usr/local/rust-or1k/lib/rustlib/uninstall.sh
install: installing component 'rust-std-x86_64-unknown-linux-gnu'

    std is standing at the ready.

Dist rustc stage2 (x86_64-unknown-linux-gnu)
Building rustdoc for stage2 (x86_64-unknown-linux-gnu)
   Compiling rustc_llvm v0.0.0 (file:///home/maglab/artiq-dev/artiq_3.1/rust/src/librustc_llvm)
error: failed to run custom build command for `rustc_llvm v0.0.0 (file:///home/maglab/artiq-dev/artiq_3.1/rust/src/librustc_llvm)`
process didn't exit successfully: `/home/maglab/artiq-dev/artiq_3.1/rust/build/build/x86_64-unknown-linux-gnu/stage2-tools/release/build/rustc_llvm-5f6e96f94cb8b094/build-script-build` (exit code: 1)
--- stdout
cargo:rerun-if-changed=llvm-config
cargo:rerun-if-env-changed=LLVM_CONFIG


**failed to execute command: "llvm-config" "--version"**
error: No such file or directory (os error 2)





command did not execute successfully: "/home/maglab/artiq-dev/artiq_3.1/rust/build/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "--release" "--manifest-path" "/home/maglab/artiq-dev/artiq_3.1/rust/src/tools/rustdoc/Cargo.toml"
expected success, got: exit code: 101


failed to run: /home/maglab/artiq-dev/artiq_3.1/rust/build/build/bootstrap/debug/bootstrap install
Build completed unsuccessfully in 0:01:42
make: *** [install] Error 1

@sbourdeauducq
Copy link
Member

I just noticed the mention of the artiq-dev package in the instructions for version 3 I didn't realize those were available, would that be enough to build the gateware with an updated FIFO depth?

Yes. And note that you do not need Rust if you are only making such a minor change to the gateware. You can skip the whole firmware compilation with --no-compile-software - but be careful, mismatches you introduce at the firmware/gateware interface can result in somewhat obscure bugs.

@sbourdeauducq
Copy link
Member

We need to build a modified version of the gateware with the output FIFO depth increased to 1024. We did this for ARTIQ version 2 and it reduced the number of underflow errors we we're getting. We tried running a few experiments using the gateware provided in the ARTIQ version 3 conda packages but that resulted in underflow errors that did not occur using the version 2.0 gateware with the FIFO output depth increased to 1024.

Which exactly is that FIFO you need expanding? Since you are the main users of those packages, we can also build them with the FIFO sizes you want.

@jordens
Copy link
Member

jordens commented Jan 12, 2018

And the documentation also clearly states that that approach to installing from source is irrelevant to you. Just use the conda packages pulled in by artiq-dev.

@whitequark
Copy link
Contributor

Okay, this is a known rustc bug rust-lang/rust#46995, I've updated our workaround for it in our rustc fork so you should no longer hit it.

@dhslichter
Copy link
Contributor

Which exactly is that FIFO you need expanding? Since you are the main users of those packages, we can also build them with the FIFO sizes you want.

I have been very delayed on sending in an updated gateware description file for NIST QC 2, but we are going to expand the number of TTL channels in hardware and can make modifications to the FIFO depths at the same time. @philipkent is there something in particular you are looking for? What are you doing so rapidly that you need such deep output FIFOs?

@philipkent
Copy link
Author

@dhslichter we needed to expanded the FIFO depth to prevent underflow errors from occurring during the Raman cooling sequence. I'm working on more thorough tests using ARTIQ 3.1 and DMA but the expanded FIFO depth still seemed to be necessary on 3.1 after a first test, even when we used recorded DMA sequences for Raman cooling. The FIFO depth of 1024 was the first modification that we made while on ARTIQ version 2 and we haven't changed that depth since. A depth less than 1024 would probably be fine for our purposes, but we would need to test to find a reasonable lower limit.

@dhslichter
Copy link
Contributor

@philipkent ack. We have had similar issues with our sideband cooling and went to deeper output FIFOs as a result. Let's discuss offline and run some tests to come up with a good resource allocation.

@philipkent
Copy link
Author

@dhslichter We will be moving to ARTIQ 3 soon and we're planning on having to setup a development environment to compile gatewares with the expanded FIFO depths. Would it make sense to update the FIFO depth's in the pre-compiled gatewares in the nist_qc2 conda package for ARTIQ 3 to be at least 1024 sense that seems to be what everyone is using?

@dhslichter
Copy link
Contributor

Yes, I think that sounds sensible. There are separate input and output FIFOs, and I would suggest that we would make better use of the resources available if we make the input FIFOs relatively small (say 128 or 256) except on a few special channels, when we make them much deeper (16k or so). Then we can hopefully fit 1024 on each output, which would be nice. @r-srinivas @dtcallcock any strong feelings on optimal FIFO depths to shoot for?

@r-srinivas
Copy link

r-srinivas commented Jun 25, 2018

I think 1024 is what we have now and that seems to work for most of our
experiments. This is what I have from our notes from almost 2 years ago with artiq 2.

ofifo depth for 39 ttl Channels block_ram_tile_util_percentage (%) ramb36_fifo_util_percentage (%) ramb18_util_percentage (%)
64 34.38 23.82 10.56
1024 43.82 33.26 10.56
2048 61.35 50.79 10.56
4096 92.02 77.08 14.94

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants