Skip to content

[AOT] mini_core_hello_world fails to build in ./test.sh #268

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

Closed
matty-kuhn opened this issue Apr 16, 2023 · 2 comments
Closed

[AOT] mini_core_hello_world fails to build in ./test.sh #268

matty-kuhn opened this issue Apr 16, 2023 · 2 comments

Comments

@matty-kuhn
Copy link

when following the steps in the README, linking fails while attempting to build mini_core_hello_world.

the specific error is as follows:

No command passed, running '--all'...
[BUILD] mini_core
[BUILD] example
[AOT] mini_core_hello_world
error: linking with `cc` failed: exit status: 1
  |
  = note: LC_ALL="C" PATH="/home/user/src/rustc_codegen_gcc/build_sysroot/sysroot/lib/rustlib/x86_64-unknown-linux-gnu/bin:/home/user/.cargo/bin:/home/user/.go/bin:/home/user/.local/bin:/opt/google/chrome:/home/user/.cargo/bin:/opt/google/chrome:/home/user/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl" VSLANG="1033" "cc" "-m64" "/tmp/rustcJRO1So/symbols.o" "target/out/mini_core_hello_world.mini_core_hello_world.f26eb6fd-cgu.0.rcgu.o" "target/out/mini_core_hello_world.mini_core_hello_world.f26eb6fd-cgu.1.rcgu.o" "target/out/mini_core_hello_world.mini_core_hello_world.f26eb6fd-cgu.2.rcgu.o" "-Wl,--as-needed" "-L" "target/out" "-L" "/home/user/src/rustc_codegen_gcc/build_sysroot/sysroot/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-lpthread" "-Wl,-Bstatic" "/home/user/src/rustc_codegen_gcc/target/out/libmini_core.rlib" "-Wl,-Bdynamic" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/home/user/src/rustc_codegen_gcc/build_sysroot/sysroot/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "target/out/mini_core_hello_world" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-nodefaultlibs"
  = note: /usr/bin/ld: target/out/mini_core_hello_world.mini_core_hello_world.f26eb6fd-cgu.2.rcgu.o: warning: relocation in read-only section `.rodata.global.17'
          /usr/bin/ld: target/out/mini_core_hello_world.mini_core_hello_world.f26eb6fd-cgu.1.rcgu.o:(.data.rel.local.DW.ref.__gcc_personality_v0[DW.ref.__gcc_personality_v0]+0x0): undefined reference to `__gcc_personality_v0'
          /usr/bin/ld: warning: creating DT_TEXTREL in a PIE
          collect2: error: ld returned 1 exit status

  = note: some `extern` functions couldn't be found; some native libraries may need to be installed or have their path specified
  = note: use the `-l` flag to specify native libraries to link
  = note: use the `cargo:rustc-link-lib` directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#cargorustc-link-libkindname)

error: aborting due to previous error

I am running on 6.2.8-arch1-1, x86_64

@antoyo
Copy link
Contributor

antoyo commented Apr 16, 2023

I'm pretty sure it's because this PR wasn't merged yet.

Can you pull the master branch and try again?

@matty-kuhn
Copy link
Author

it works now, thanks!

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

No branches or pull requests

2 participants