Open 3eka opened 3 years ago
./x.py setup --build x86_64-unknown-illumos
should work. The build target auto-detection incorrectly assumes the deprecated build triple x86_64-sun-solaris
which is only supported for cross-compilation from other platforms.
Thanks, I should guess myself. Will give it a try.
Hi, tried, and after hour or two, it has failed... Failure output is 3,1MG (uncompressed)... This was command:
:; python3 x.py build --build x86_64-unknown-illumos --j 2 |& tee /tmp/rust-compile.txt
not sure if you are interested in log. Regards.
The actual error should be in the last 100-200 lines. So those should be enough.
Here you are:
rust-compile.last_200_lines.txt
...
Building stage0 compiler artifacts (x86_64-unknown-illumos -> x86_64-unknown-illumos)
Compiling rustc_driver v0.0.0 (/nobackup/SFW_build/rust/compiler/rustc_driver)
error: linking with `gcc` failed: exit status: 1
...
= note: Text relocation remains referenced
against symbol offsetin file
vtable for llvm::format_object<float> 0x62 /nobackup/SFW_build/rust/build/x86_64-unknown-illumos/stage0-rustc/x86_64-unknown-illumos/release/deps/librustc_llvm-b3854e7bc8fbee87.rlib(AArch64I
nstPrinter.cpp.o)
vtable for llvm::format_object<float> 0x5d /nobackup/SFW_build/rust/build/x86_64-unknown-illumos/stage0-rustc/x86_64-unknown-illumos/release/deps/librustc_llvm-b3854e7bc8fbee87.rlib(AArch64InstPrinter.cpp.o)
...
plenty of it (last 200 in the attached file)
THanks
This seems to be a Solaris/Illumos-specific ld error linking in the llvm library, so I am not sure if I can help here. One idea would be to build llvm locally on your machine by putting this in your config.toml file:
[llvm]
download-ci-llvm = false
Of course this will make the build take even longer.
Thanks @hkratz, anyway, I will give it a try...
It has failed (after setting in config.toml
were applied:
...
error: could not compile `rustc_driver` due to previous error
Build completed unsuccessfully in 2:05:13
to me, it seems with identical error...
So, I am also out of ideas. Thanks anyway. Regards.
FYI, SmartOS has it built (see https://www.pkgsrc.org), but using different methods (I would say). I was just curious if it could be built with instructions from github.
Will do investigation, and give it a try later. Regards.
@hkratz ;
would be possible to specify different Compiler, etc via config.toml
:
#cc = "cc" (path)
#cxx = "c++" (path)
#ar = "ar" (path)
For example, if there is GCC 9 present under /usr/gcc/9/bin/gcc
what would be cc value?
Regards.
Yes, like this:
cc = "/usr/gcc/9/bin/gcc"
cxx = "/usr/gcc/9/bin/g++"
ar = "/usr/gcc/9/bin/ar"
Hmm, (cloned rust from git again), and
:; python3 x.py build --build x86_64-unknown-illumos
...
Compiling cmake v0.1.44
Compiling quote v1.0.7
Compiling filetime v0.2.14
Compiling time v0.1.43
Compiling num_cpus v1.13.0
Compiling aho-corasick v0.7.18
Compiling bstr v0.2.13
Compiling regex v1.5.4
Compiling globset v0.4.5
Compiling ignore v0.4.17
Compiling merge_derive v0.1.0
Compiling merge v0.1.0
Compiling toml v0.5.7
Finished dev [unoptimized] target(s) in 56.03s
failed to parse TOML configuration 'config.toml': unknown field `cc`, expected one of `optimize`, `debug`, `codegen-units`, `codegen-units-std`, `debug-assertions`, `debug-assertions-std`, `overflow-checks`, `overflow-checks-std`, `debug-logging`, `debuginfo-level`, `debuginfo-level-rustc`, `debuginfo-level-std`, `debuginfo-level-tools`, `debuginfo-level-tests`, `run-dsymutil`, `backtrace`, `incremental`, `parallel-compiler`, `default-linker`, `channel`, `description`, `musl-root`, `rpath`, `verbose-tests`, `optimize-tests`, `codegen-tests`, `ignore-git`, `dist-src`, `save-toolstates`, `codegen-backends`, `lld`, `use-lld`, `llvm-tools`, `deny-warnings`, `backtrace-on-ice`, `verify-llvm-ir`, `thin-lto-import-instr-limit`, `remap-debuginfo`, `jemalloc`, `test-compare-mode`, `llvm-libunwind`, `control-flow-guard`, `new-symbol-mangling`, `profile-generate`, `profile-use`, `download-rustc` for key `rust` at line 708 column 1
Build completed unsuccessfully in 0:01:37
with:
:; grep -E "(cc|cxx|ar) =" config.toml | grep -v ^#
cc = "/usr/gcc/9/bin/gcc"
cxx = "/usr/gcc/9/bin/g++"
ar = "/usr/gcc/9/bin/gcc-ar"
so, I have probably done something wrong. Thanks for being patient. Regards.
It must be in a target section, like this:
[target.x86_64-unknown-illumos]
cc = "/usr/gcc/9/bin/gcc"
cxx = "/usr/gcc/9/bin/g++"
ar = "/usr/gcc/9/bin/gcc-ar"
Thanks, that has helped, but compilation died (see https://app.box.com/s/ykkfjp2j8g03fs81oipdo6zzbosn88cg) log file.
:; grep -v ^# config.toml | grep .
changelog-seen = 2
[llvm]
download-ci-llvm = false
[build]
[install]
prefix = "/pz/SFW"
[rust]
[target.x86_64-unknown-illumos]
cc = "/usr/gcc/9/bin/gcc"
cxx = "/usr/gcc/9/bin/g++"
ar = "/usr/gcc/9/bin/gcc-ar"
[dist]
was configuration . If you have no idea, let me know (again, this is just my curiosity, not so important atm).
Regards.
P.S. I will delete log file next Wednesday.
For @3eka's issue with undefined symbols setting target.x86_64-pc-solaris.ar
and target.x86_64-pc-solaris.ranlib
in config.toml
to point at newer toolchain bits should help things along. I'm not sure what OpenIndiana comes with but both GNU binutils 2.40 and LLVM 14 worked for me where the stock Apple stuff did not. See also #114162.
Hi,
just wanted to try to build latest rustc on openindiana:
note difference:
rust-std-beta-x86_64-sun-solaris.tar.xz
vsrustc-beta-x86_64-sun-solaris.tar.xz
Why it downloads one file, and then tries to use another one? For example:
Am I doing something wrong? Regards.