Skip to content
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

[Mac] could not compile libc #1321

Closed
fifichaladyniak opened this issue Jun 1, 2020 · 9 comments
Closed

[Mac] could not compile libc #1321

fifichaladyniak opened this issue Jun 1, 2020 · 9 comments
Labels
triage A bug report being investigated upstream An unresolvable issue: an upstream dependency bug

Comments

@fifichaladyniak
Copy link

fifichaladyniak commented Jun 1, 2020

I'm really new to this lang so maybe it's easy to fix.
When I'm trying to compile (on nightly build ofc) standard code from "Getting started" i get cargo error.
It says:

MacBook-Pro-Fifi:rocket-app fifi$ cargo run
   Compiling typenum v1.12.0
   Compiling cfg-if v0.1.10
   Compiling libc v0.2.71
   Compiling byteorder v1.3.4
   Compiling proc-macro2 v0.4.30
error: linking with `cc` failed: exit code: 1
  |
  = note: "cc" "-m64" "-L" "/Users/fifi/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib" "/Users/fifi/Workspace/rocket-app/target/debug/build/libc-4abdf8071ffad3ad/build_script_build-4abdf8071ffad3ad.build_script_build.4vfk4d3l-cgu.0.rcgu.o" "/Users/fifi/Workspace/rocket-app/target/debug/build/libc-4abdf8071ffad3ad/build_script_build-4abdf8071ffad3ad.build_script_build.4vfk4d3l-cgu.1.rcgu.o" "/Users/fifi/Workspace/rocket-app/target/debug/build/libc-4abdf8071ffad3ad/build_script_build-4abdf8071ffad3ad.build_script_build.4vfk4d3l-cgu.10.rcgu.o" "/Users/fifi/Workspace/rocket-app/target/debug/build/libc-4abdf8071ffad3ad/build_script_build-4abdf8071ffad3ad.build_script_build.4vfk4d3l-cgu.11.rcgu.o" "/Users/fifi/Workspace/rocket-app/target/debug/build/libc-4abdf8071ffad3ad/build_script_build-4abdf8071ffad3ad.build_script_build.4vfk4d3l-cgu.12.rcgu.o" "/Users/fifi/Workspace/rocket-app/target/debug/build/libc-4abdf8071ffad3ad/build_script_build-4abdf8071ffad3ad.build_script_build.4vfk4d3l-cgu.13.rcgu.o" "/Users/fifi/Workspace/rocket-app/target/debug/build/libc-4abdf8071ffad3ad/build_script_build-4abdf8071ffad3ad.build_script_build.4vfk4d3l-cgu.14.rcgu.o" "/Users/fifi/Workspace/rocket-app/target/debug/build/libc-4abdf8071ffad3ad/build_script_build-4abdf8071ffad3ad.build_script_build.4vfk4d3l-cgu.15.rcgu.o" "/Users/fifi/Workspace/rocket-app/target/debug/build/libc-4abdf8071ffad3ad/build_script_build-4abdf8071ffad3ad.build_script_build.4vfk4d3l-cgu.2.rcgu.o" "/Users/fifi/Workspace/rocket-app/target/debug/build/libc-4abdf8071ffad3ad/build_script_build-4abdf8071ffad3ad.build_script_build.4vfk4d3l-cgu.3.rcgu.o" "/Users/fifi/Workspace/rocket-app/target/debug/build/libc-4abdf8071ffad3ad/build_script_build-4abdf8071ffad3ad.build_script_build.4vfk4d3l-cgu.4.rcgu.o" "/Users/fifi/Workspace/rocket-app/target/debug/build/libc-4abdf8071ffad3ad/build_script_build-4abdf8071ffad3ad.build_script_build.4vfk4d3l-cgu.5.rcgu.o" "/Users/fifi/Workspace/rocket-app/target/debug/build/libc-4abdf8071ffad3ad/build_script_build-4abdf8071ffad3ad.build_script_build.4vfk4d3l-cgu.6.rcgu.o" "/Users/fifi/Workspace/rocket-app/target/debug/build/libc-4abdf8071ffad3ad/build_script_build-4abdf8071ffad3ad.build_script_build.4vfk4d3l-cgu.7.rcgu.o" "/Users/fifi/Workspace/rocket-app/target/debug/build/libc-4abdf8071ffad3ad/build_script_build-4abdf8071ffad3ad.build_script_build.4vfk4d3l-cgu.8.rcgu.o" "/Users/fifi/Workspace/rocket-app/target/debug/build/libc-4abdf8071ffad3ad/build_script_build-4abdf8071ffad3ad.build_script_build.4vfk4d3l-cgu.9.rcgu.o" "-o" "/Users/fifi/Workspace/rocket-app/target/debug/build/libc-4abdf8071ffad3ad/build_script_build-4abdf8071ffad3ad" "/Users/fifi/Workspace/rocket-app/target/debug/build/libc-4abdf8071ffad3ad/build_script_build-4abdf8071ffad3ad.bhykb7hdc8luvt.rcgu.o" "-Wl,-dead_strip" "-no-pie" "-nodefaultlibs" "-L" "/Users/fifi/Workspace/rocket-app/target/debug/deps" "-L" "/Users/fifi/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib" "/Users/fifi/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libstd-531784fbbf657928.rlib" "/Users/fifi/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libpanic_unwind-05121b2ff4e318da.rlib" "/Users/fifi/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libhashbrown-e94ad1ff99cda41a.rlib" "/Users/fifi/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/librustc_std_workspace_alloc-88a30720a8da3faf.rlib" "/Users/fifi/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libbacktrace-6366b83c471491bc.rlib" "/Users/fifi/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libbacktrace_sys-a760ab518924e91e.rlib" "/Users/fifi/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/librustc_demangle-cca63f96d834b737.rlib" "/Users/fifi/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libunwind-acebf9305d1c8e83.rlib" "/Users/fifi/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libcfg_if-ec86ac895650254b.rlib" "/Users/fifi/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liblibc-98194019dd82bdcf.rlib" "/Users/fifi/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc-744f909157fd8bb9.rlib" "/Users/fifi/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/librustc_std_workspace_core-37c2c6822f6e4416.rlib" "/Users/fifi/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libcore-2e6e530c778a3583.rlib" "/Users/fifi/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libcompiler_builtins-e1c9cbbd339063b7.rlib" "-lSystem" "-lresolv" "-lc" "-lm"
  = note: clang: error: unknown argument: '-no-pie'
          

error: linking with `cc` failed: exit code: 1
  |
  = note: "cc" "-m64" "-L" "/Users/fifi/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib" "/Users/fifi/Workspace/rocket-app/target/debug/build/proc-macro2-e0d501253fa2d938/build_script_build-e0d501253fa2d938.build_script_build.bkq0cgv4-cgu.0.rcgu.o" "/Users/fifi/Workspace/rocket-app/target/debug/build/proc-macro2-e0d501253fa2d938/build_script_build-e0d501253fa2d938.build_script_build.bkq0cgv4-cgu.1.rcgu.o" "/Users/fifi/Workspace/rocket-app/target/debug/build/proc-macro2-e0d501253fa2d938/build_script_build-e0d501253fa2d938.build_script_build.bkq0cgv4-cgu.10.rcgu.o" "/Users/fifi/Workspace/rocket-app/target/debug/build/proc-macro2-e0d501253fa2d938/build_script_build-e0d501253fa2d938.build_script_build.bkq0cgv4-cgu.11.rcgu.o" "/Users/fifi/Workspace/rocket-app/target/debug/build/proc-macro2-e0d501253fa2d938/build_script_build-e0d501253fa2d938.build_script_build.bkq0cgv4-cgu.12.rcgu.o" "/Users/fifi/Workspace/rocket-app/target/debug/build/proc-macro2-e0d501253fa2d938/build_script_build-e0d501253fa2d938.build_script_build.bkq0cgv4-cgu.13.rcgu.o" "/Users/fifi/Workspace/rocket-app/target/debug/build/proc-macro2-e0d501253fa2d938/build_script_build-e0d501253fa2d938.build_script_build.bkq0cgv4-cgu.14.rcgu.o" "/Users/fifi/Workspace/rocket-app/target/debug/build/proc-macro2-e0d501253fa2d938/build_script_build-e0d501253fa2d938.build_script_build.bkq0cgv4-cgu.15.rcgu.o" "/Users/fifi/Workspace/rocket-app/target/debug/build/proc-macro2-e0d501253fa2d938/build_script_build-e0d501253fa2d938.build_script_build.bkq0cgv4-cgu.2.rcgu.o" "/Users/fifi/Workspace/rocket-app/target/debug/build/proc-macro2-e0d501253fa2d938/build_script_build-e0d501253fa2d938.build_script_build.bkq0cgv4-cgu.3.rcgu.o" "/Users/fifi/Workspace/rocket-app/target/debug/build/proc-macro2-e0d501253fa2d938/build_script_build-e0d501253fa2d938.build_script_build.bkq0cgv4-cgu.4.rcgu.o" "/Users/fifi/Workspace/rocket-app/target/debug/build/proc-macro2-e0d501253fa2d938/build_script_build-e0d501253fa2d938.build_script_build.bkq0cgv4-cgu.5.rcgu.o" "/Users/fifi/Workspace/rocket-app/target/debug/build/proc-macro2-e0d501253fa2d938/build_script_build-e0d501253fa2d938.build_script_build.bkq0cgv4-cgu.6.rcgu.o" "/Users/fifi/Workspace/rocket-app/target/debug/build/proc-macro2-e0d501253fa2d938/build_script_build-e0d501253fa2d938.build_script_build.bkq0cgv4-cgu.7.rcgu.o" "/Users/fifi/Workspace/rocket-app/target/debug/build/proc-macro2-e0d501253fa2d938/build_script_build-e0d501253fa2d938.build_script_build.bkq0cgv4-cgu.8.rcgu.o" "/Users/fifi/Workspace/rocket-app/target/debug/build/proc-macro2-e0d501253fa2d938/build_script_build-e0d501253fa2d938.build_script_build.bkq0cgv4-cgu.9.rcgu.o" "-o" "/Users/fifi/Workspace/rocket-app/target/debug/build/proc-macro2-e0d501253fa2d938/build_script_build-e0d501253fa2d938" "/Users/fifi/Workspace/rocket-app/target/debug/build/proc-macro2-e0d501253fa2d938/build_script_build-e0d501253fa2d938.8ofblx0188lfpoh.rcgu.o" "-Wl,-dead_strip" "-no-pie" "-nodefaultlibs" "-L" "/Users/fifi/Workspace/rocket-app/target/debug/deps" "-L" "/Users/fifi/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib" "/Users/fifi/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libstd-531784fbbf657928.rlib" "/Users/fifi/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libpanic_unwind-05121b2ff4e318da.rlib" "/Users/fifi/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libhashbrown-e94ad1ff99cda41a.rlib" "/Users/fifi/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/librustc_std_workspace_alloc-88a30720a8da3faf.rlib" "/Users/fifi/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libbacktrace-6366b83c471491bc.rlib" "/Users/fifi/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libbacktrace_sys-a760ab518924e91e.rlib" "/Users/fifi/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/librustc_demangle-cca63f96d834b737.rlib" "/Users/fifi/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libunwind-acebf9305d1c8e83.rlib" "/Users/fifi/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libcfg_if-ec86ac895650254b.rlib" "/Users/fifi/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liblibc-98194019dd82bdcf.rlib" "/Users/fifi/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc-744f909157fd8bb9.rlib" "/Users/fifi/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/librustc_std_workspace_core-37c2c6822f6e4416.rlib" "/Users/fifi/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libcore-2e6e530c778a3583.rlib" "/Users/fifi/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libcompiler_builtins-e1c9cbbd339063b7.rlib" "-lSystem" "-lresolv" "-lc" "-lm"
  = note: clang: error: unknown argument: '-no-pie'
          

error: aborting due to previous error

error: could not compile `libc`.

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: aborting due to previous error

error: linking with `cc` failed: exit code: 1
  |
  = note: "cc" "-m64" "-L" "/Users/fifi/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib" "/Users/fifi/Workspace/rocket-app/target/debug/build/byteorder-347ca5803413e3fe/build_script_build-347ca5803413e3fe.build_script_build.7584h3hi-cgu.0.rcgu.o" "/Users/fifi/Workspace/rocket-app/target/debug/build/byteorder-347ca5803413e3fe/build_script_build-347ca5803413e3fe.build_script_build.7584h3hi-cgu.1.rcgu.o" "/Users/fifi/Workspace/rocket-app/target/debug/build/byteorder-347ca5803413e3fe/build_script_build-347ca5803413e3fe.build_script_build.7584h3hi-cgu.10.rcgu.o" "/Users/fifi/Workspace/rocket-app/target/debug/build/byteorder-347ca5803413e3fe/build_script_build-347ca5803413e3fe.build_script_build.7584h3hi-cgu.11.rcgu.o" "/Users/fifi/Workspace/rocket-app/target/debug/build/byteorder-347ca5803413e3fe/build_script_build-347ca5803413e3fe.build_script_build.7584h3hi-cgu.12.rcgu.o" "/Users/fifi/Workspace/rocket-app/target/debug/build/byteorder-347ca5803413e3fe/build_script_build-347ca5803413e3fe.build_script_build.7584h3hi-cgu.13.rcgu.o" "/Users/fifi/Workspace/rocket-app/target/debug/build/byteorder-347ca5803413e3fe/build_script_build-347ca5803413e3fe.build_script_build.7584h3hi-cgu.14.rcgu.o" "/Users/fifi/Workspace/rocket-app/target/debug/build/byteorder-347ca5803413e3fe/build_script_build-347ca5803413e3fe.build_script_build.7584h3hi-cgu.15.rcgu.o" "/Users/fifi/Workspace/rocket-app/target/debug/build/byteorder-347ca5803413e3fe/build_script_build-347ca5803413e3fe.build_script_build.7584h3hi-cgu.2.rcgu.o" "/Users/fifi/Workspace/rocket-app/target/debug/build/byteorder-347ca5803413e3fe/build_script_build-347ca5803413e3fe.build_script_build.7584h3hi-cgu.3.rcgu.o" "/Users/fifi/Workspace/rocket-app/target/debug/build/byteorder-347ca5803413e3fe/build_script_build-347ca5803413e3fe.build_script_build.7584h3hi-cgu.4.rcgu.o" "/Users/fifi/Workspace/rocket-app/target/debug/build/byteorder-347ca5803413e3fe/build_script_build-347ca5803413e3fe.build_script_build.7584h3hi-cgu.5.rcgu.o" "/Users/fifi/Workspace/rocket-app/target/debug/build/byteorder-347ca5803413e3fe/build_script_build-347ca5803413e3fe.build_script_build.7584h3hi-cgu.6.rcgu.o" "/Users/fifi/Workspace/rocket-app/target/debug/build/byteorder-347ca5803413e3fe/build_script_build-347ca5803413e3fe.build_script_build.7584h3hi-cgu.7.rcgu.o" "/Users/fifi/Workspace/rocket-app/target/debug/build/byteorder-347ca5803413e3fe/build_script_build-347ca5803413e3fe.build_script_build.7584h3hi-cgu.8.rcgu.o" "/Users/fifi/Workspace/rocket-app/target/debug/build/byteorder-347ca5803413e3fe/build_script_build-347ca5803413e3fe.build_script_build.7584h3hi-cgu.9.rcgu.o" "-o" "/Users/fifi/Workspace/rocket-app/target/debug/build/byteorder-347ca5803413e3fe/build_script_build-347ca5803413e3fe" "/Users/fifi/Workspace/rocket-app/target/debug/build/byteorder-347ca5803413e3fe/build_script_build-347ca5803413e3fe.1vwqfetf0lhetuct.rcgu.o" "-Wl,-dead_strip" "-no-pie" "-nodefaultlibs" "-L" "/Users/fifi/Workspace/rocket-app/target/debug/deps" "-L" "/Users/fifi/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib" "/Users/fifi/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libstd-531784fbbf657928.rlib" "/Users/fifi/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libpanic_unwind-05121b2ff4e318da.rlib" "/Users/fifi/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libhashbrown-e94ad1ff99cda41a.rlib" "/Users/fifi/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/librustc_std_workspace_alloc-88a30720a8da3faf.rlib" "/Users/fifi/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libbacktrace-6366b83c471491bc.rlib" "/Users/fifi/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libbacktrace_sys-a760ab518924e91e.rlib" "/Users/fifi/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/librustc_demangle-cca63f96d834b737.rlib" "/Users/fifi/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libunwind-acebf9305d1c8e83.rlib" "/Users/fifi/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libcfg_if-ec86ac895650254b.rlib" "/Users/fifi/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liblibc-98194019dd82bdcf.rlib" "/Users/fifi/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc-744f909157fd8bb9.rlib" "/Users/fifi/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/librustc_std_workspace_core-37c2c6822f6e4416.rlib" "/Users/fifi/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libcore-2e6e530c778a3583.rlib" "/Users/fifi/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libcompiler_builtins-e1c9cbbd339063b7.rlib" "-lSystem" "-lresolv" "-lc" "-lm"
  = note: clang: error: unknown argument: '-no-pie'
          

error: aborting due to previous error

error: linking with `cc` failed: exit code: 1
  |
  = note: "cc" "-m64" "-L" "/Users/fifi/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib" "/Users/fifi/Workspace/rocket-app/target/debug/build/typenum-d58c67b4174f5885/build_script_main-d58c67b4174f5885.build_script_main.8etryirb-cgu.0.rcgu.o" "/Users/fifi/Workspace/rocket-app/target/debug/build/typenum-d58c67b4174f5885/build_script_main-d58c67b4174f5885.build_script_main.8etryirb-cgu.1.rcgu.o" "/Users/fifi/Workspace/rocket-app/target/debug/build/typenum-d58c67b4174f5885/build_script_main-d58c67b4174f5885.build_script_main.8etryirb-cgu.10.rcgu.o" "/Users/fifi/Workspace/rocket-app/target/debug/build/typenum-d58c67b4174f5885/build_script_main-d58c67b4174f5885.build_script_main.8etryirb-cgu.11.rcgu.o" "/Users/fifi/Workspace/rocket-app/target/debug/build/typenum-d58c67b4174f5885/build_script_main-d58c67b4174f5885.build_script_main.8etryirb-cgu.12.rcgu.o" "/Users/fifi/Workspace/rocket-app/target/debug/build/typenum-d58c67b4174f5885/build_script_main-d58c67b4174f5885.build_script_main.8etryirb-cgu.13.rcgu.o" "/Users/fifi/Workspace/rocket-app/target/debug/build/typenum-d58c67b4174f5885/build_script_main-d58c67b4174f5885.build_script_main.8etryirb-cgu.14.rcgu.o" "/Users/fifi/Workspace/rocket-app/target/debug/build/typenum-d58c67b4174f5885/build_script_main-d58c67b4174f5885.build_script_main.8etryirb-cgu.15.rcgu.o" "/Users/fifi/Workspace/rocket-app/target/debug/build/typenum-d58c67b4174f5885/build_script_main-d58c67b4174f5885.build_script_main.8etryirb-cgu.2.rcgu.o" "/Users/fifi/Workspace/rocket-app/target/debug/build/typenum-d58c67b4174f5885/build_script_main-d58c67b4174f5885.build_script_main.8etryirb-cgu.3.rcgu.o" "/Users/fifi/Workspace/rocket-app/target/debug/build/typenum-d58c67b4174f5885/build_script_main-d58c67b4174f5885.build_script_main.8etryirb-cgu.4.rcgu.o" "/Users/fifi/Workspace/rocket-app/target/debug/build/typenum-d58c67b4174f5885/build_script_main-d58c67b4174f5885.build_script_main.8etryirb-cgu.5.rcgu.o" "/Users/fifi/Workspace/rocket-app/target/debug/build/typenum-d58c67b4174f5885/build_script_main-d58c67b4174f5885.build_script_main.8etryirb-cgu.6.rcgu.o" "/Users/fifi/Workspace/rocket-app/target/debug/build/typenum-d58c67b4174f5885/build_script_main-d58c67b4174f5885.build_script_main.8etryirb-cgu.7.rcgu.o" "/Users/fifi/Workspace/rocket-app/target/debug/build/typenum-d58c67b4174f5885/build_script_main-d58c67b4174f5885.build_script_main.8etryirb-cgu.8.rcgu.o" "/Users/fifi/Workspace/rocket-app/target/debug/build/typenum-d58c67b4174f5885/build_script_main-d58c67b4174f5885.build_script_main.8etryirb-cgu.9.rcgu.o" "-o" "/Users/fifi/Workspace/rocket-app/target/debug/build/typenum-d58c67b4174f5885/build_script_main-d58c67b4174f5885" "/Users/fifi/Workspace/rocket-app/target/debug/build/typenum-d58c67b4174f5885/build_script_main-d58c67b4174f5885.41c41ef82dd1zt4b.rcgu.o" "-Wl,-dead_strip" "-no-pie" "-nodefaultlibs" "-L" "/Users/fifi/Workspace/rocket-app/target/debug/deps" "-L" "/Users/fifi/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib" "/Users/fifi/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libstd-531784fbbf657928.rlib" "/Users/fifi/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libpanic_unwind-05121b2ff4e318da.rlib" "/Users/fifi/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libhashbrown-e94ad1ff99cda41a.rlib" "/Users/fifi/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/librustc_std_workspace_alloc-88a30720a8da3faf.rlib" "/Users/fifi/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libbacktrace-6366b83c471491bc.rlib" "/Users/fifi/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libbacktrace_sys-a760ab518924e91e.rlib" "/Users/fifi/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/librustc_demangle-cca63f96d834b737.rlib" "/Users/fifi/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libunwind-acebf9305d1c8e83.rlib" "/Users/fifi/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libcfg_if-ec86ac895650254b.rlib" "/Users/fifi/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liblibc-98194019dd82bdcf.rlib" "/Users/fifi/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc-744f909157fd8bb9.rlib" "/Users/fifi/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/librustc_std_workspace_core-37c2c6822f6e4416.rlib" "/Users/fifi/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libcore-2e6e530c778a3583.rlib" "/Users/fifi/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libcompiler_builtins-e1c9cbbd339063b7.rlib" "-lSystem" "-lresolv" "-lc" "-lm"
  = note: clang: error: unknown argument: '-no-pie'
          

error: aborting due to previous error

error: build failed
@jebrosen
Copy link
Collaborator

jebrosen commented Jun 1, 2020

Can you include the output of rustc --version, cargo --version, and clang --version? This looks like it should have been fixed by rust-lang/rust#48076.

@jebrosen jebrosen added triage A bug report being investigated upstream An unresolvable issue: an upstream dependency bug labels Jun 1, 2020
@fifichaladyniak
Copy link
Author

rustc 1.45.0-nightly (5fd2f06e9 2020-05-31)
cargo 1.45.0-nightly (9fcb8c1d2 2020-05-25)
Apple LLVM version 9.0.0 (clang-900.0.39.2)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

@jebrosen
Copy link
Collaborator

jebrosen commented Jun 2, 2020

Since the failures are all build scripts that are very deep in the dependency tree, I expect this is unrelated to Rocket. Unfortunately I don't have access to a mac - can you try compiling with stable and beta as well to check if this problem is nightly-specific?

The following command will add some extra logging that might be helpful for troubleshooting:

RUSTC_LOG=rustc_codegen_ssa=info cargo build >build.log 2>&1

@Ornithomatiker
Copy link

Ornithomatiker commented Jun 4, 2020

Hey,
I have the same problem. It comes up, when compiling proc-macro2 and also for num-complex v0.2.4. When using the stable release, it compiles without any issues. However, I need the nightly release for some embedded project.
Used versions:

rustc 1.45.0-nightly (fe10f1a49 2020-06-02)
cargo 1.45.0-nightly (9fcb8c1d2 2020-05-25)
Apple LLVM version 9.0.0 (clang-900.0.39.2)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

The extra logging info gave the following:
build.log

The issue is certainly not caused by rocket.
Maybe it can be handled by setting the default flag to -pie for the clang-compiler, but I am not sure, where to do this.

@fifichaladyniak
Copy link
Author

That's definitely problem with nightly release. I tried to compile actix-web code and stable version compiled with no problems. I also tried compile this app on nightly version and it's getting the same "unknown argument: '-no-pie'" clang error.

@fifichaladyniak
Copy link
Author

I tried to find some solutions for this "-nopie" issue but nothing match my problem.

@jebrosen
Copy link
Collaborator

jebrosen commented Jun 4, 2020

@fifichaladyniak, can you open an issue on rust-lang/rust and mention this issue? Unfortunately I don't know this part of rustc well enough to try to troubleshoot, nor do I have easy access to a mac to test it on.

Looking through recent commits, rust-lang/rust#71804 looks like a possible cause.

@zhaohuxing
Copy link

I also had the same problem:

error[E0658]: `const extern fn` definitions are unstable
    --> /Users/xzh/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/libc-0.2.129/src/macros.rs:203:17
     |
203  | /                 pub $($constness)* extern fn $i($($arg: $argty),*
204  | |                 ) -> $ret {
205  | |                     $($body);*
206  | |                 }
     | |_________________^
     |
    ::: /Users/xzh/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/libc-0.2.129/src/unix/bsd/apple/mod.rs:4796:1
     |
4796 | / safe_f! {
4797 | |     pub {const} fn WSTOPSIG(status: ::c_int) -> ::c_int {
4798 | |         status >> 8
4799 | |     }
...    |
4815 | |     }
4816 | | }
     | |_- in this macro invocation
     |
     = note: see issue #64926 <https://github.com/rust-lang/rust/issues/64926> for more information
     = help: add `#![feature(const_extern_fn)]` to the crate attributes to enable
     = note: this error originates in the macro `safe_f` (in Nightly builds, run with -Z macro-backtrace for more info)

cargo 1.62.0-nightly (e2e2dddeb 2022-04-05)
I updated version to rustc 1.65.0-nightly (34a6cae28 2022-08-09), is ok

@prodbyola
Copy link

I solved this (on Linux) by installing build-tools:
sudo apt-get install build-essential.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage A bug report being investigated upstream An unresolvable issue: an upstream dependency bug
Projects
None yet
Development

No branches or pull requests

5 participants