tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Clarity on rust failures (NetBSD)



>> The issue isn't so much the physical memory of the system, it is
>> the virtual address limitations imposed by the port.  If my
>> recollection is right, I beleive it bombed out at somewhere
>> around 1.7GB virtual size.  (The emulated system is a 4-cpu 2GB
>> system.)
>
> Don't do a debug build. That should be good enough. Of course, might
> need some kicking cargo in the ...

Rust is already configured with

CONFIGURE_ARGS+=        --disable-debug
CONFIGURE_ARGS+=        --disable-debug-assertions
CONFIGURE_ARGS+=        --disable-llvm-release-debuginfo
CONFIGURE_ARGS+=        --debuginfo-level=0
CONFIGURE_ARGS+=        --debuginfo-level-rustc=0
CONFIGURE_ARGS+=        --debuginfo-level-std=0
CONFIGURE_ARGS+=        --debuginfo-level-tools=0
CONFIGURE_ARGS+=        --debuginfo-level-tests=0

when building for earmv7hf.

A random probing of object files in the (cross) build tree seems
to indicate they are without debug info:

./build/tools/bugpoint/CMakeFiles/bugpoint.dir/CrashDebugger.cpp.o: ELF 32-bit LSB relocatable, ARM, EABI5 version 1 (SYSV), not stripped
./build/lib/IR/CMakeFiles/LLVMCore.dir/Comdat.cpp.o: ELF 32-bit LSB relocatable, ARM, EABI5 version 1 (SYSV), not stripped
./build/lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/BranchFolding.cpp.o: ELF 32-bit LSB relocatable, ARM, EABI5 version 1 (SYSV), not stripped
./build/lib/Target/CMakeFiles/LLVMTarget.dir/TargetMachine.cpp.o: ELF 32-bit LSB relocatable, ARM, EABI5 version 1 (SYSV), not stripped
./build/lib/BugpointPasses.so: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, for NetBSD 8.0, compiled for: earmv7hf, not stripped
./bin/llvm-as: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /usr/libexec/ld.elf_so, for NetBSD 8.0, compiled for: earmv7hf, not stripped

etc.

Hm.  Now that I look at it, the earlier error is when linking
rustc:

LLVM ERROR: out of memory
error: Could not compile `rustc`.

However, later attempts (I see 1.38.0, 1.40.0 and 1.42.0) struck
another more serious problem, in that the cross-built bootstrap
compiler no longer works at all:

   Compiling proc-macro2 v0.4.30
error: could not compile `proc-macro2`.

Caused by:
  process didn't exit successfully: `/usr/pkgsrc/lang/rust/work/rust-bootstrap/bin/rustc --crate-name build_script_build /usr/pkgsrc/lang/rust/work/rustc-1.42.0-src/vendor/proc-macro2-0.4.30/build.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C debug-assertions=off -C overflow-checks=on --cfg 'feature="default"' --cfg 'feature="proc-macro"' -C metadata=7f1ca0135b53e171 -C extra-filename=-7f1ca0135b53e171 --out-dir /usr/pkgsrc/lang/rust/work/rustc-1.42.0-src/build/bootstrap/debug/build/proc-macro2-7f1ca0135b53e171 -L dependency=/usr/pkgsrc/lang/rust/work/rustc-1.42.0-src/build/bootstrap/debug/deps --cap-lints allow -Copt-level=2 -Wrust_2018_idioms -Wunused_lifetimes -Dwarnings` (signal: 11, SIGSEGV: invalid memory reference)
Traceback (most recent call last):


So, "sigh!"  There doesn't seem to be an "arm target doesn't work
at all" issue in rust's github bug tracker either.


As I said, I'll make another attempt with 1.44.0, but don't have
much hope of that working either.

Regards,

- Håvard


Home | Main Index | Thread Index | Old Index