Opened 4 months ago

Last modified 3 weeks ago

#73957 assigned defect

rust @1.95.0: error: use of overloaded operator '!=' is ambiguous

Reported by: mrkapqa Owned by: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Priority: Normal Milestone:
Component: ports Version: 2.12.5
Keywords: mojave catalina Cc:
Port: rust

Description (last modified by mrkapqa)

Hello ,

this error when doing selfupdate port upgrade outdated

3 errors generated.
:info:build [6/1285] Building CXX object lib/Target/AMDGPU/CMakeFiles/LLVMAMDGPUCodeGen.dir/SILowerSGPRSpills.cpp.o
:info:build [7/1285] Building CXX object lib/Target/AMDGPU/CMakeFiles/LLVMAMDGPUCodeGen.dir/SIMachineScheduler.cpp.o
:info:build [8/1285] Building CXX object lib/Target/AMDGPU/CMakeFiles/LLVMAMDGPUCodeGen.dir/SIMachineFunctionInfo.cpp.o
:info:build [9/1285] Building CXX object lib/Target/AMDGPU/CMakeFiles/LLVMAMDGPUCodeGen.dir/SIOptimizeExecMaskingPreRA.cpp.o
:info:build [10/1285] Building CXX object lib/Target/AMDGPU/CMakeFiles/LLVMAMDGPUCodeGen.dir/SIPeepholeSDWA.cpp.o
:info:build [11/1285] Building CXX object lib/Target/AMDGPU/CMakeFiles/LLVMAMDGPUCodeGen.dir/SIPostRABundler.cpp.o
:info:build [12/1285] Building CXX object lib/Target/AMDGPU/CMakeFiles/LLVMAMDGPUCodeGen.dir/SIOptimizeVGPRLiveRange.cpp.o
:info:build ninja: build stopped: subcommand failed.
:info:build thread 'main' (9458) panicked at /opt/local/var/macports/build/rust-1e9bb5c5/work/rustc-1.95.0-src/vendor/cmake-0.1.54/src/lib.rs:1119:5:
:info:build command did not execute successfully, got: exit status: 1
:info:build build script failed, must exit now

Attachments (2)

rust.log (881.4 KB) - added by mrkapqa 4 months ago.
rst-perl5.34active (860.9 KB) - added by mrkapqa 3 months ago.

Download all attachments as: .zip

Change History (11)

Changed 4 months ago by mrkapqa

Attachment: rust.log added

comment:1 Changed 4 months ago by mrkapqa

Failed to build rust: command execution failed
:debug:build Error code: CHILDSTATUS 816 2
:debug:build Backtrace: command execution failed
:debug:build     while executing
:debug:build "system {*}$notty {*}$callback {*}$nice $fullcmdstring"
:debug:build     invoked from within
:debug:build "command_exec -callback portprogress::target_progress_callback build"
:debug:build     (procedure "portbuild::build_main" line 10)
:debug:build     invoked from within
:debug:build "$procedure $targetname"
Last edited 4 months ago by mrkapqa (previous) (diff)

comment:2 Changed 4 months ago by mrkapqa

Description: modified (diff)

comment:3 Changed 4 months ago by ryandesign (Ryan Carsten Schmidt)

Keywords: rust removed
Summary: (10.14) failed to build rust > ninja subcommand failedrust @1.95.0: error: use of overloaded operator '!=' is ambiguous

The real error in the log seems to be:

:info:build /opt/local/var/macports/build/rust-1e9bb5c5/work/rustc-1.95.0-src/src/llvm-project/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp:3619:21: error: use of overloaded operator '!=' is ambiguous (with operand types 'llvm::Register' and 'llvm::AMDGPU::(anonymous enum at /opt/local/var/macports/build/rust-1e9bb5c5/work/rustc-1.95.0-src/build/x86_64-apple-darwin/llvm/build/lib/Target/AMDGPU/AMDGPUGenRegisterInfoEnums.inc:22187:1)')
:info:build       if (UseSubReg != AMDGPU::NoSubRegister && ImmDefSize == 64)
:info:build           ~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~

comment:4 Changed 4 months ago by ryandesign (Ryan Carsten Schmidt)

Owner: set to MarcusCalhoun-Lopez
Status: newassigned

comment:5 Changed 3 months ago by CL-Jeremy (Mike L.)

I'm having a hard time reproducing this. This is so weird since it failed exactly on 10.14 and 10.15 during the last batch of bot builds. It was literally compiling LLVM components from freshly built LLVM from the same source distribution across OS versions and yet failed on these two OS versions but on not any other ones. It doesn't fail on my local 10.15 machine, either.

Last edited 3 months ago by CL-Jeremy (Mike L.) (previous) (diff)

comment:6 Changed 3 months ago by mrkapqa

like to add the following information:

am using perlbrew to install perl-5.30.1 for use with youtube-viewer since using system-perl or the ones proposed by macports have led to problem installing and using the program correctly.

since macports tend to "overwrite" the perl version in use, after a macports selfupdate need to do "sudo port deactivate perl-5.34" or whatever version has been brought active. this tend to disable some port;

maybe the error lies in there, and the selfupdate hence leads to such error;

comment:7 Changed 3 months ago by mrkapqa

such is error with perl5.34 active

(see attach)

Changed 3 months ago by mrkapqa

Attachment: rst-perl5.34active added

comment:8 in reply to:  6 Changed 2 months ago by ryandesign (Ryan Carsten Schmidt)

Keywords: catalina added

Has duplicate #74064.

Replying to mrkapqa:

since macports tend to "overwrite" the perl version in use,

What do you mean?

comment:9 Changed 3 weeks ago by herbygillot (Herby Gillot)

In e454763820ea5bd5b3cdf9cacd9f25589af56964/macports-ports (master):

rust_build PG: build bundled LLVM with a new enough clang

lang/rust and lang/rust-bootstrap compile the LLVM bundled in the Rust source
tree, but the rust PortGroup only asks for compiler.cxx_standard 2017, whose
Apple clang minimum in base is 1000.11.45.2. That admits Apple clang 11 and
12 -- too old for LLVM 21 -- on exactly the two macOS versions whose newest
Apple clang falls in the gap between that bound and the {clang < 1204} that
lang/llvm-NN already enforces for the same sources.

On macOS 10.14.6 with Apple clang 11.0.0 (clang-1100.0.33.17), building rust
1.97.1 fails in AMDGPU/SIInstrInfo.cpp with "use of overloaded operator '!='
is ambiguous": that clang mis-ranks the integral promotion of a TableGen
enum : uint16_t against llvm::Register's operator!= overload set. Verified
on a clean 10.14.6 host -- unpatched the build dies at SIInstrInfo.cpp.o, and
with this blacklist it selects MacPorts Clang 17 and completes, exit 0.

Also verified on 10.15.7 that the PortGroup placement takes effect: the port
now chooses macports-clang-17 where it previously chose Xcode Clang.

Note that Apple clang 12 was measured to build 1.97.1 successfully, so the
empirically-required bound is < 1200; 1204 is used for parity with
lang/llvm-NN.

See: #73957

Assisted-by: Claude:claude-opus-5
Co-Authored-By: Claude Opus 5 <noreply@…>

Note: See TracTickets for help on using tickets.