Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#62252 closed defect (fixed)

rust @1.47.0_0: Failed to build rust: command execution failed

Reported by: macdeport Owned by: g5pw (Aljaž Srebrnič)
Priority: Normal Milestone:
Component: ports Version: 2.6.4
Keywords: Cc: herbygillot (Herby Gillot), macdeport, cjones051073 (Chris Jones)
Port: rust

Description

Did not run successfully: signal: 11
rustc exited with signal: 11
"/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_rust/rust/work/rustc-1.47.0-src/build/x86_64-apple-darwin/stage1/bin/rustc" "--crate-name" "core" "--edition=2018" "library/core/src/lib.rs" "--error-format=json" "--json=diagnostic-rendered-ansi,artifacts" "--crate-type" "lib" "--emit=dep-info,metadata,link" "-C" "opt-level=3" "-Cembed-bitcode=no" "-C" "debuginfo=0" "-C" "metadata=86974b7b6295ebe8" "-C" "extra-filename=-86974b7b6295ebe8" "--out-dir" "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_rust/rust/work/rustc-1.47.0-src/build/x86_64-apple-darwin/stage1-std/x86_64-apple-darwin/release/deps" "--target" "x86_64-apple-darwin" "-C" "linker=/usr/bin/clang" "-L" "dependency=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_rust/rust/work/rustc-1.47.0-src/build/x86_64-apple-darwin/stage1-std/x86_64-apple-darwin/release/deps" "-L" "dependency=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_rust/rust/work/rustc-1.47.0-src/build/x86_64-apple-darwin/stage1-std/release/deps" "-Zmacro-backtrace" "-Zosx-rpath-install-name" "-Clink-args=-Wl,-rpath,@loader_path/../lib" "-Cprefer-dynamic" "-Cembed-bitcode=yes" "-Zbinary-dep-depinfo" "-Wrust_2018_idioms" "-Wunused_lifetimes" "-Dwarnings" "--sysroot" "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_rust/rust/work/rustc-1.47.0-src/build/x86_64-apple-darwin/stage1" "-Z" "force-unstable-if-unmarked"
-------------
error: could not compile `core`.

Caused by:
  process didn't exit successfully: `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_rust/rust/work/rustc-1.47.0-src/build/bootstrap/debug/rustc --crate-name core --edition=2018 library/core/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -Cembed-bitcode=no -C debuginfo=0 -C metadata=86974b7b6295ebe8 -C extra-filename=-86974b7b6295ebe8 --out-dir /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_rust/rust/work/rustc-1.47.0-src/build/x86_64-apple-darwin/stage1-std/x86_64-apple-darwin/release/deps --target x86_64-apple-darwin -C linker=/usr/bin/clang -L dependency=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_rust/rust/work/rustc-1.47.0-src/build/x86_64-apple-darwin/stage1-std/x86_64-apple-darwin/release/deps -L dependency=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_rust/rust/work/rustc-1.47.0-src/build/x86_64-apple-darwin/stage1-std/release/deps -Zmacro-backtrace -Zosx-rpath-install-name '-Clink-args=-Wl,-rpath,@loader_path/../lib' -Cprefer-dynamic -Cembed-bitcode=yes -Zbinary-dep-depinfo` (exit code: 254)
command did not execute successfully: "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_rust/rust/work/rustc-1.47.0-src/build/stage0-x86_64/bin/cargo" "build" "--target" "x86_64-apple-darwin" "-Zbinary-dep-depinfo" "-j" "8" "--release" "--frozen" "--features" "panic-unwind backtrace compiler-builtins-c" "--manifest-path" "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_rust/rust/work/rustc-1.47.0-src/library/test/Cargo.toml" "--message-format" "json-render-diagnostics"
expected success, got: exit code: 101
Traceback (most recent call last):
  File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_rust/rust/work/rustc-1.47.0-src/src/bootstrap/bootstrap.py", line 1026, in <module>
    main()
  File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_rust/rust/work/rustc-1.47.0-src/src/bootstrap/bootstrap.py", line 1009, in main
    bootstrap(help_triggered)
  File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_rust/rust/work/rustc-1.47.0-src/src/bootstrap/bootstrap.py", line 995, in bootstrap
    run(args, env=env, verbose=build.verbose)
  File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_rust/rust/work/rustc-1.47.0-src/src/bootstrap/bootstrap.py", line 143, in run
    raise RuntimeError(err)
RuntimeError: failed to run: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_rust/rust/work/rustc-1.47.0-src/build/bootstrap/debug/bootstrap build --stage 2 -v -j8
make: *** [all] Error 1
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_rust/rust/work/rustc-1.47.0-src'
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_rust/rust/work/rustc-1.47.0-src" && /usr/bin/make -j8 -w all VERBOSE=1 BOOTSTRAP_ARGS="-v -j8" 
Exit code: 2
Error: Failed to build rust: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_rust/rust/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets to report a bug.
Error: Processing of port rust failed

Attachments (2)

main.log.zip (24.7 KB) - added by macdeport 4 years ago.
main.log <= rust-1.47.0_0.darwin_14.x86_64.tbz2
main.log.2.zip (103.7 KB) - added by macdeport 4 years ago.
main.log <= rust-1.51.0_0.darwin_14.x86_64.tbz2

Download all attachments as: .zip

Change History (23)

Changed 4 years ago by macdeport

Attachment: main.log.zip added

main.log <= rust-1.47.0_0.darwin_14.x86_64.tbz2

comment:1 Changed 4 years ago by macdeport

Cc: macdeport added

comment:2 Changed 4 years ago by mf2k (Frank Schima)

Priority: HighNormal

The Priority field is for use by Macports team members only, please do not change it.

comment:3 Changed 4 years ago by mf2k (Frank Schima)

Cc: herbygillot added; g5pw removed
Owner: set to g5pw
Status: newassigned

comment:4 Changed 4 years ago by herbygillot (Herby Gillot)

What version of OS X are you using? Rust is currently 1.50.0, can you try again?

comment:5 in reply to:  4 Changed 4 years ago by macdeport

Replying to herbygillot:

What version of OS X are you using? Rust is currently 1.50.0, can you try again?

OSX 10.10.5 Yosemite

Works nicely, thank you, much appreciated.

Last edited 4 years ago by macdeport (previous) (diff)

comment:6 Changed 4 years ago by herbygillot (Herby Gillot)

Resolution: fixed
Status: assignedclosed

Thanks, closing this issue

comment:7 in reply to:  6 Changed 4 years ago by macdeport

Replying to herbygillot:

Thanks, closing this issue

I reopen because:

$ export xxx=`date "+%d/%m/%y %T"`;echo $xxx;time sudo port upgrade rust;echo $xxx =\> `date "+%d/%m/%y %T"`
26/03/21 22:30:56
--->  Computing dependencies for rust
--->  Fetching archive for rust
--->  Attempting to fetch rust-1.51.0_0.darwin_14.x86_64.tbz2 from https://lil.fr.packages.macports.org/rust
--->  Attempting to fetch rust-1.51.0_0.darwin_14.x86_64.tbz2 from https://mse.uk.packages.macports.org/rust
--->  Attempting to fetch rust-1.51.0_0.darwin_14.x86_64.tbz2 from https://packages.macports.org/rust
--->  Fetching distfiles for rust
--->  Attempting to fetch rustc-1.51.0-src.tar.gz from https://lil.fr.distfiles.macports.org/rust
--->  Attempting to fetch rust-std-1.50.0-x86_64-apple-darwin.tar.gz from https://lil.fr.distfiles.macports.org/rust
--->  Attempting to fetch rustc-1.50.0-x86_64-apple-darwin.tar.gz from https://lil.fr.distfiles.macports.org/rust
--->  Attempting to fetch cargo-1.50.0-x86_64-apple-darwin.tar.gz from https://lil.fr.distfiles.macports.org/rust
--->  Verifying checksums for rust                                                   
--->  Extracting rust
--->  Configuring rust
--->  Building rust
Error: Failed to build rust: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_rust/rust/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets to report a bug.

real	38m38,062s
user	239m39,600s
sys	8m9,182s
26/03/21 22:30:56 => 26/03/21 23:09:34

Changed 4 years ago by macdeport

Attachment: main.log.2.zip added

main.log <= rust-1.51.0_0.darwin_14.x86_64.tbz2

comment:8 Changed 4 years ago by herbygillot (Herby Gillot)

Resolution: fixed
Status: closedreopened

Can you attach the main.log log file for this failure? And what version of macOS and XCode are you running?

comment:9 Changed 4 years ago by herbygillot (Herby Gillot)

OK nevermind, I spoke to soon, I see you just did.

comment:10 in reply to:  8 Changed 4 years ago by macdeport

Replying to herbygillot:

Can you attach the main.log log file for this failure? And what version of macOS and XCode are you running?

OSX 10.10.5 Yosemite, XCode is not installed...

Last edited 4 years ago by macdeport (previous) (diff)

comment:11 Changed 4 years ago by herbygillot (Herby Gillot)

:info:build Undefined symbols for architecture x86_64:
:info:build   "_macports_legacy_sysconf", referenced from:
:info:build       llvm::sys::commandLineFitsWithinSystemLimits(llvm::StringRef, llvm::ArrayRef<char const*>) in libLLVMSupport.a(Program.cpp.o)
:info:build       llvm::sys::commandLineFitsWithinSystemLimits(llvm::StringRef, llvm::ArrayRef<llvm::StringRef>) in libLLVMSupport.a(Program.cpp.o)
:info:build ld: symbol(s) not found for architecture x86_64
:info:build clang: error: linker command failed with exit code 1 (use -v to see invocation)

My guess is that this may have to do with the legacysupport added in this commit: [e4c13e2baf252842c5702dcfed2fca79c4e8fc14/macports-ports]

Last edited 4 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:12 Changed 4 years ago by herbygillot (Herby Gillot)

In e1a7c905d7ce3f516b66281cb9e00a508f0b994a/macports-ports (master):

rust: remove legacysupport

See: #62252

comment:13 Changed 4 years ago by herbygillot (Herby Gillot)

OK, I've pushed the commit above to remove the legacysupport bits from rust.

It may take a while for the change to propagate to you, but let's verify if this helps.

comment:14 Changed 4 years ago by cjones051073 (Chris Jones)

Cc: cjones051073 added

comment:15 in reply to:  13 Changed 4 years ago by macdeport

Replying to herbygillot:

OK, I've pushed the commit above to remove the legacysupport bits from rust.

It may take a while for the change to propagate to you, but let's verify if this helps.

I tested:

$ export xxx=`date "+%d/%m/%y %T"`;echo $xxx;time sudo port upgrade rust;echo $xxx =\> `date "+%d/%m/%y %T"`
27/03/21 08:08:06
Portfile changed since last build; discarding previous state.
--->  Computing dependencies for rust
--->  Fetching archive for rust
--->  Attempting to fetch rust-1.51.0_1.darwin_14.x86_64.tbz2 from https://lil.fr.packages.macports.org/rust
--->  Attempting to fetch rust-1.51.0_1.darwin_14.x86_64.tbz2 from https://mse.uk.packages.macports.org/rust
--->  Attempting to fetch rust-1.51.0_1.darwin_14.x86_64.tbz2 from https://packages.macports.org/rust
--->  Fetching distfiles for rust
--->  Verifying checksums for rust
--->  Extracting rust
--->  Configuring rust
--->  Building rust
^CError: Aborted: SIGINT received.

real	104m7,854s
user	364m33,501s
sys	10m28,471s
27/03/21 08:08:06 => 27/03/21 09:52:13
$ export xxx=`date "+%d/%m/%y %T"`;echo $xxx;time sudo port upgrade rust;echo $xxx =\> `date "+%d/%m/%y %T"`
27/03/21 09:52:51
Password:
--->  Computing dependencies for rust
--->  Fetching archive for rust
--->  Attempting to fetch rust-1.51.0_1.darwin_14.x86_64.tbz2 from https://lil.fr.packages.macports.org/rust
--->  Attempting to fetch rust-1.51.0_1.darwin_14.x86_64.tbz2 from https://mse.uk.packages.macports.org/rust
--->  Attempting to fetch rust-1.51.0_1.darwin_14.x86_64.tbz2 from https://packages.macports.org/rust
--->  Attempting to fetch rust-1.51.0_1.darwin_14.x86_64.tbz2.rmd160 from https://packages.macports.org/rust
--->  Installing rust @1.51.0_1
--->  Cleaning rust
--->  Computing dependencies for rust
--->  Deactivating rust @1.50.0_3
--->  Cleaning rust
--->  Activating rust @1.51.0_1
--->  Cleaning rust
--->  Scanning binaries for linking errors
--->  No broken files found.                             
--->  No broken ports found.

real	2m39,351s
user	0m26,122s
sys	0m11,351s
27/03/21 09:52:51 => 27/03/21 09:55:30

comment:16 Changed 4 years ago by herbygillot (Herby Gillot)

OK, that looks like the binary package installed successfully. Closing this.

Last edited 4 years ago by herbygillot (Herby Gillot) (previous) (diff)

comment:17 Changed 4 years ago by herbygillot (Herby Gillot)

Resolution: fixed
Status: reopenedclosed

comment:18 in reply to:  16 Changed 4 years ago by macdeport

Replying to herbygillot:

OK, that looks like the binary package installed successfully. Closing this.

Thank you.

comment:19 in reply to:  11 ; Changed 4 years ago by kencu (Ken)

Replying to herbygillot:

:info:build Undefined symbols for architecture x86_64:
:info:build   "_macports_legacy_sysconf", referenced from:
:info:build       llvm::sys::commandLineFitsWithinSystemLimits(llvm::StringRef, llvm::ArrayRef<char const*>) in libLLVMSupport.a(Program.cpp.o)
:info:build       llvm::sys::commandLineFitsWithinSystemLimits(llvm::StringRef, llvm::ArrayRef<llvm::StringRef>) in libLLVMSupport.a(Program.cpp.o)
:info:build ld: symbol(s) not found for architecture x86_64
:info:build clang: error: linker command failed with exit code 1 (use -v to see invocation)

My guess is that this may have to do with the legacysupport added in this commit: [e4c13e2baf252842c5702dcfed2fca79c4e8fc14/macports-ports]

FYI the reason this occurs is:

the legacy support library is built, showing no need for the macports_legacy_sysconf wrap based on the system version being built against.

later, software tries to build against an older deployment target. The legacysupport headers see the deployment target and so they think the macports_legacy_sysconf wrap is needed, but when it goes to link, that symbol doesn't exist in the library.

I am trying to sort out how to elegantly handle this issue.

comment:20 in reply to:  19 Changed 4 years ago by cjones051073 (Chris Jones)

Replying to kencu:

Replying to herbygillot:

:info:build Undefined symbols for architecture x86_64:
:info:build   "_macports_legacy_sysconf", referenced from:
:info:build       llvm::sys::commandLineFitsWithinSystemLimits(llvm::StringRef, llvm::ArrayRef<char const*>) in libLLVMSupport.a(Program.cpp.o)
:info:build       llvm::sys::commandLineFitsWithinSystemLimits(llvm::StringRef, llvm::ArrayRef<llvm::StringRef>) in libLLVMSupport.a(Program.cpp.o)
:info:build ld: symbol(s) not found for architecture x86_64
:info:build clang: error: linker command failed with exit code 1 (use -v to see invocation)

My guess is that this may have to do with the legacysupport added in this commit: [e4c13e2baf252842c5702dcfed2fca79c4e8fc14/macports-ports]

FYI the reason this occurs is:

the legacy support library is built, showing no need for the macports_legacy_sysconf wrap based on the system version being built against.

later, software tries to build against an older deployment target. The legacysupport headers see the deployment target and so they think the macports_legacy_sysconf wrap is needed, but when it goes to link, that symbol doesn't exist in the library.

I am trying to sort out how to elegantly handle this issue.

Maybe the thing to do is to always build the method macports_legacy_sysconf in the c file, such that it will then always appear in the dynamic and static libs, but to carry on only exposing its use in the wrapped headers when required. That way with the scenario above the symbols will still be found when an older deployment target is used.

comment:21 Changed 4 years ago by kencu (Ken)

Yes, perhaps -- the sysconf fixes in legacysupport are robust enough to be used instead of the ones in libSystem on these rare occasions I think.

In clang-devel I will use our sysconf blocker to prevent it being found to fix this...I can't think of a way to do a current system test in headers...just a current SDK test, which is not sufficiently good to use.

Runtime system branching is tricky, esp when a weak linked symbol won't do it as the symbol exists, you just want to override it.

The new __available() builtins would be just wonderful for this, if the old system compilers would compile them, but they won't

Actually, probably I could pull that from clang-rt. That is where I last got to in the thought process about this.

Note: See TracTickets for help on using tickets.