Compiling sqlx-macros v0.5.9 error.

2
open
RustChater
RustChater
Posted 2 months ago

Compiling sqlx-macros v0.5.9 error. #605

my env: Ubuntu-18 x86_64 cargo 1.56.0 rustc 1.56.1 cross 0.2.1 gcc version 9.3.0

after installed cross, execute following command:

cd /home/xxx/my_app
cross build --target aarch64-unknown-linux-gnu

got error: Compiling sqlx-macros v0.5.9 error: linking with cc failed: exit status: 1 | = note: "cc" "-m64" "/target/debug/deps/sqlx_macros-xxx.sqlx_macros.xxx-cgu.0.rcgu.o" "/target/debug/deps/sqlx_macros-xxx.sqlx_ma ...... "/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-xxx.rlib" "/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-xxx.rlib" "-Wl,--end-group" "/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-xxx.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-znoexecstack" "-L" "/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/target/debug/deps/libsqlx_macros-xxx.so" "-Wl,--gc-sections" "-shared" "-Wl,-zrelro" "-Wl,-znow" "-nodefaultlibs" = note: collect2: fatal error: ld terminated with signal 9 [Killed] compilation terminated.

error: could not compile sqlx-macros due to previous error

Emilgardis
Emilgardis
Created 2 months ago

This seems to me to be a memory issue, e.g your memory is getting exhausted.

RustChater
RustChater
Created 2 months ago

This seems to me to be a memory issue, e.g your memory is getting exhausted.

OK, I'll try to increase the memory.