Opened 5 years ago

Closed 2 years ago

#60194 closed defect (fixed)

rust@1.42.0: ld: symbol(s) not found for architecture x86_64

Reported by: nasyxx (Nasy) Owned by: g5pw (Aljaž Srebrnič)
Priority: Normal Milestone:
Component: ports Version: 2.6.99
Keywords: Cc: mascguy (Christopher Nielsen)
Port: rust

Description

When updating rust from 1.41.1 to 1.42.0, it failed with:

--->  Computing dependencies for rust
Warning: Your DNS servers incorrectly claim to know the address of nonexistent hosts. This may cause checksum mismatches for some ports. See this page for more information: <https://trac.macports.org/wiki/MisbehavingServers>
--->  Building rust
Error: Failed to build rust: command execution failed
Error: See /Users/Nasy/.macports/var/macports/logs/_Users_Nasy_.macports_macports-ports_lang_rust/rust/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets to report a bug.

When I looked deeper into the log, I found that the error was like this (including the line number of the log)

3749   :info:build           ld: symbol(s) not found for architecture x86_64
3750   :info:build           clang: error: linker command failed with exit code 1 (use -v to see invocation)
3751   :info:build
3752   :info:build error: aborting due to previous error
3753   :info:build error: could not compile `rustc_driver`.

I have installed llvm-9.0@9.0.1+ocaml+polly

Attachments (2)

main.log (729.1 KB) - added by nasyxx (Nasy) 5 years ago.
main.log.tbz2 (6.7 KB) - added by macdeport 5 years ago.
Failed to build rust 1.42.0_0: command execution failed

Download all attachments as: .zip

Change History (14)

Changed 5 years ago by nasyxx (Nasy)

Attachment: main.log added

comment:1 Changed 5 years ago by kencu (Ken)

I don't think this has anything to do with the MacPorts installations of llvm, clang, ld64, or cctools.

It looks to me like an issue with rust. I won't be of much help, sorry.

comment:2 Changed 5 years ago by kencu (Ken)

Cc: kencu removed

comment:3 Changed 5 years ago by kencu (Ken)

Cc: jeremyhu larryv removed
Keywords: rust clang removed
Owner: set to g5pw
Status: newassigned

comment:4 Changed 5 years ago by mouse07410 (Mouse)

While I understand the convenience of using Macports as "the" one package manager, in my experience it works more-or-less for Python, and not at all for Haskell and Rust. Therefore, I recommend doing what turned out the best option for me:

  • Use Macports for most every package/app, except for
  • Haskell, which I install via https://www.haskell.org/ghcup/ (and https://docs.haskellstack.org/en/stable/README/ for stack); then install all the Haskell-based apps via Cabal or Stack correspondingly. For panda and spellcheck it turns out better than trying the same from Macports, and pull less of what I consider as unnecessary "stuff".
  • Rust, which I install via https://rustup.rs ; and then again, whatever Rust-based app I need, Cargo takes care of it better (IMHO) than Macports would.

I appreciate the efforts of the maintainers. but IMHO it's impractical to attempt/hope to replicate the extensive package management that both of the above ecosystems have.

comment:5 Changed 5 years ago by nasyxx (Nasy)

Well, whether it's Python, Haskell or Rust, I didn't use MacPorts as the package manager. The reason why I installed rust again with MacPorts is because of librsvg. Librsvg is used for emacs.

Anyway, thank you very much for your suggestions, and appreciate the maintainers of MacPorts for their efforts.

comment:6 Changed 5 years ago by nasyxx (Nasy)

Hi, today, I rebuild llvm-9.0 without +ocaml. And now rust can upgrade successfully.

comment:7 Changed 5 years ago by kencu (Ken)

Maybe g5pw can tell us why that would be... I'm in the dark about how rebuilding llvm-9.0 fixed the rust build at present.

comment:8 Changed 5 years ago by macdeport

Cc: macdeport added
cargo  0.41.0_0 < 0.43.0_0
rust   1.41.1_0 < 1.42.0_0
Failed to build rust: command execution failed

Not sure of the same previous reason.

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

Changed 5 years ago by macdeport

Attachment: main.log.tbz2 added

Failed to build rust 1.42.0_0: command execution failed

comment:9 Changed 4 years ago by macdeport

Cc: macdeport removed

comment:10 Changed 2 years ago by mascguy (Christopher Nielsen)

Cc: mascguy added

comment:11 Changed 2 years ago by mascguy (Christopher Nielsen)

As with other old Rust-related tickets, can this be closed?

comment:12 Changed 2 years ago by mascguy (Christopher Nielsen)

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.