riscv-rust / longan-nano

Board support package for the Longan Nano board
https://www.seeedstudio.com/Sipeed-Longan-Nano-RISC-V-GD32VF103CBT6-Development-Board-p-4205.html
117 stars 30 forks source link

riscv32-unknown-elf/bin/ld:link.x:52: syntax error collect2: error: ld returned 1 exit status #16

Closed advancedwebdeveloper closed 4 years ago

advancedwebdeveloper commented 4 years ago

Hi.

I can't link your project:

riscv32-unknown-elf-gcc -L /home/oceanfish81/.rustup/toolchains/nightly-i686-unknown-linux-gnu/lib/rustlib/riscv32imac-unknown-none-elf/lib /home/oceanfish81/Desktop/longan-nano/target/riscv32imac-unknown-none-elf/release/examples/display-08122bae8a40ea1a.display.2h1wedgs-cgu.0.rcgu.o /home/oceanfish81/Desktop/longan-nano/target/riscv32imac-unknown-none-elf/release/examples/display-08122bae8a40ea1a.display.2h1wedgs-cgu.1.rcgu.o /home/oceanfish81/Desktop/longan-nano/target/riscv32imac-unknown-none-elf/release/examples/display-08122bae8a40ea1a.display.2h1wedgs-cgu.10.rcgu.o /home/oceanfish81/Desktop/longan-nano/target/riscv32imac-unknown-none-elf/release/examples/display-08122bae8a40ea1a.display.2h1wedgs-cgu.11.rcgu.o /home/oceanfish81/Desktop/longan-nano/target/riscv32imac-unknown-none-elf/release/examples/display-08122bae8a40ea1a.display.2h1wedgs-cgu.12.rcgu.o /home/oceanfish81/Desktop/longan-nano/target/riscv32imac-unknown-none-elf/release/examples/display-08122bae8a40ea1a.display.2h1wedgs-cgu.13.rcgu.o /home/oceanfish81/Desktop/longan-nano/target/riscv32imac-unknown-none-elf/release/examples/display-08122bae8a40ea1a.display.2h1wedgs-cgu.14.rcgu.o /home/oceanfish81/Desktop/longan-nano/target/riscv32imac-unknown-none-elf/release/examples/display-08122bae8a40ea1a.display.2h1wedgs-cgu.15.rcgu.o /home/oceanfish81/Desktop/longan-nano/target/riscv32imac-unknown-none-elf/release/examples/display-08122bae8a40ea1a.display.2h1wedgs-cgu.2.rcgu.o /home/oceanfish81/Desktop/longan-nano/target/riscv32imac-unknown-none-elf/release/examples/display-08122bae8a40ea1a.display.2h1wedgs-cgu.3.rcgu.o /home/oceanfish81/Desktop/longan-nano/target/riscv32imac-unknown-none-elf/release/examples/display-08122bae8a40ea1a.display.2h1wedgs-cgu.4.rcgu.o /home/oceanfish81/Desktop/longan-nano/target/riscv32imac-unknown-none-elf/release/examples/display-08122bae8a40ea1a.display.2h1wedgs-cgu.5.rcgu.o /home/oceanfish81/Desktop/longan-nano/target/riscv32imac-unknown-none-elf/release/examples/display-08122bae8a40ea1a.display.2h1wedgs-cgu.6.rcgu.o /home/oceanfish81/Desktop/longan-nano/target/riscv32imac-unknown-none-elf/release/examples/display-08122bae8a40ea1a.display.2h1wedgs-cgu.7.rcgu.o /home/oceanfish81/Desktop/longan-nano/target/riscv32imac-unknown-none-elf/release/examples/display-08122bae8a40ea1a.display.2h1wedgs-cgu.8.rcgu.o /home/oceanfish81/Desktop/longan-nano/target/riscv32imac-unknown-none-elf/release/examples/display-08122bae8a40ea1a.display.2h1wedgs-cgu.9.rcgu.o -o /home/oceanfish81/Desktop/longan-nano/target/riscv32imac-unknown-none-elf/release/examples/display-08122bae8a40ea1a -Wl,--gc-sections -nodefaultlibs -L /home/oceanfish81/Desktop/longan-nano/target/riscv32imac-unknown-none-elf/release/deps -L /home/oceanfish81/Desktop/longan-nano/target/release/deps -L /home/oceanfish81/Desktop/longan-nano/target/riscv32imac-unknown-none-elf/release/build/longan-nano-597dc37d6ccaaffc/out -L /home/oceanfish81/Desktop/longan-nano/target/riscv32imac-unknown-none-elf/release/build/gd32vf103xx-hal-13beb56db03766a0/out -L /home/oceanfish81/Desktop/longan-nano/target/riscv32imac-unknown-none-elf/release/build/riscv-f1813e715ca50308/out -L /home/oceanfish81/Desktop/longan-nano/target/riscv32imac-unknown-none-elf/release/build/riscv-rt-65cd5af53ca48ccd/out -L /home/oceanfish81/Desktop/longan-nano/target/riscv32imac-unknown-none-elf/release/build/riscv-rt-65cd5af53ca48ccd/out -L /home/oceanfish81/.rustup/toolchains/nightly-i686-unknown-linux-gnu/lib/rustlib/riscv32imac-unknown-none-elf/lib -Wl,-Bstatic /home/oceanfish81/Desktop/longan-nano/target/riscv32imac-unknown-none-elf/release/deps/libriscv_rt-db8c3a26100b3697.rlib /home/oceanfish81/Desktop/longan-nano/target/riscv32imac-unknown-none-elf/release/deps/libr0-7139aa29684afde5.rlib /home/oceanfish81/Desktop/longan-nano/target/riscv32imac-unknown-none-elf/release/deps/liblongan_nano-b532624e73d61543.rlib /home/oceanfish81/Desktop/longan-nano/target/riscv32imac-unknown-none-elf/release/deps/libst7735_lcd-021b1e500c59efde.rlib /home/oceanfish81/Desktop/longan-nano/target/riscv32imac-unknown-none-elf/release/deps/libnum_traits-97fe7590dd0f192d.rlib /home/oceanfish81/Desktop/longan-nano/target/riscv32imac-unknown-none-elf/release/deps/libgd32vf103xx_hal-f01a0fb107bd223f.rlib /home/oceanfish81/Desktop/longan-nano/target/riscv32imac-unknown-none-elf/release/deps/libcast-6e78812f04e4ebef.rlib /home/oceanfish81/Desktop/longan-nano/target/riscv32imac-unknown-none-elf/release/deps/libembedded_hal-006e7d87375f4cca.rlib /home/oceanfish81/Desktop/longan-nano/target/riscv32imac-unknown-none-elf/release/deps/libvoid-df659fdcf5354dfb.rlib /home/oceanfish81/Desktop/longan-nano/target/riscv32imac-unknown-none-elf/release/deps/libnb-538fd3e1c64357c9.rlib /home/oceanfish81/Desktop/longan-nano/target/riscv32imac-unknown-none-elf/release/deps/libnb-7982f976e6834162.rlib /home/oceanfish81/Desktop/longan-nano/target/riscv32imac-unknown-none-elf/release/deps/libgd32vf103_pac-1a843f401fda34cd.rlib /home/oceanfish81/Desktop/longan-nano/target/riscv32imac-unknown-none-elf/release/deps/libvcell-6d4569d42959d3cf.rlib /home/oceanfish81/Desktop/longan-nano/target/riscv32imac-unknown-none-elf/release/deps/libriscv-952ac5df99f50de9.rlib /home/oceanfish81/Desktop/longan-nano/target/riscv32imac-unknown-none-elf/release/deps/libbit_field-46f665c6bbfcca03.rlib /home/oceanfish81/Desktop/longan-nano/target/riscv32imac-unknown-none-elf/release/deps/libbare_metal-daefd88082e735a5.rlib /home/oceanfish81/Desktop/longan-nano/target/riscv32imac-unknown-none-elf/release/deps/libembedded_graphics-de284b1ac4d300de.rlib /home/oceanfish81/Desktop/longan-nano/target/riscv32imac-unknown-none-elf/release/deps/libbyteorder-566a32ccb4be9389.rlib -Wl,--start-group /home/oceanfish81/Desktop/longan-nano/target/riscv32imac-unknown-none-elf/release/deps/libpanic_halt-4a8c716ea29e0086.rlib /home/oceanfish81/.rustup/toolchains/nightly-i686-unknown-linux-gnu/lib/rustlib/riscv32imac-unknown-none-elf/lib/librustc_std_workspace_core-1bd0d3673780d693.rlib /home/oceanfish81/.rustup/toolchains/nightly-i686-unknown-linux-gnu/lib/rustlib/riscv32imac-unknown-none-elf/lib/libcore-5aec724f1f867fb1.rlib -Wl,--end-group /home/oceanfish81/.rustup/toolchains/nightly-i686-unknown-linux-gnu/lib/rustlib/riscv32imac-unknown-none-elf/lib/libcompiler_builtins-deaf2d068ddf18c0.rlib -Tmemory-c8.x -Tlink.x -Tmemory-c8.x -Tlink.x -Wl,-Bdynamic /usr/local/lib/gcc/riscv32-unknown-elf/10.2.0/../../../../riscv32-unknown-elf/bin/ld:link.x:52: syntax error collect2: error: ld returned 1 exit status

Disasm commented 4 years ago

Hi! Could you spend some time extracting useful information from your giant dumps? Currently they are completely useless. Also I can't reproduce your problems without a Rust project for which you get the problem. Everything just works with projects I have. You can upload your project to github, and give a link to it. This way someone can reproduce the problem and maybe fix it.