Opened 2 years ago

Closed 2 years ago

#64639 closed defect (wontfix)

libcxx @5.0.1 does not build on PPC

Reported by: barracuda156 Owned by: jeremyhu (Jeremy Huddleston Sequoia)
Priority: Normal Milestone:
Component: ports Version: 2.7.1
Keywords: powerpc Cc:
Port: libcxx

Description

Trying to build with sudo port -v install libcxx configure.compiler=macports-gcc-7 supported_archs="ppc ppc64" fails with:

g++-mp-7: error: unrecognized command line option '-stdlib=libc++'
g++-mp-7: error: unrecognized command line option '-Wmismatched-tags'
g++-mp-7: error: unrecognized command line option '-Wshorten-64-to-32'
g++-mp-7: error: unrecognized command line option '-Wnewline-eof'

I need libcxx in order to build mrustc.

Attachments (1)

main.log (90.7 KB) - added by barracuda156 2 years ago.

Download all attachments as: .zip

Change History (7)

Changed 2 years ago by barracuda156

Attachment: main.log added

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

you cannot (easily) build libcxx with the current Portfile on 10.5 for PPC using gcc. I have done it, last time in 2018. It's a big project.

Anyway, mrustc uses LLVM to build it's code, but LLVM does not work on PPC Darwin, so lost cause until someone like Iain fixes llvm to work on PPC darwin (five years and counting :> ).

comment:2 in reply to:  1 Changed 2 years ago by barracuda156

Replying to kencu:

you cannot (easily) build libcxx with the current Portfile on 10.5 for PPC using gcc. I have done it, last time in 2018. It's a big project. Anyway, mrustc uses LLVM to build it's code, but LLVM does not work on PPC Darwin, so lost cause until someone like Iain fixes llvm to work on PPC darwin (five years and counting :> ).

Our friend @catap told me that Rust may allow using gcc soon. Probably sooner than llvm is fixed anyway )

Have you retained your custom port file for libcxx? I won’t request you to waste time on explaining that step by step to me, but if I have your old WIP, I can probably make it.

comment:3 Changed 2 years ago by evanmiller (Evan Miller)

mrustc does not require LLVM directly. It only uses LLVM in order to bootstrap a real Rust, i.e. compile rustc.

I was able to build mrustc on Tiger/PPC without libcxx. However, the compiler hangs on any input due to the exception-handling bug described in https://github.com/iains/darwin-toolchains-start-here/discussions/17

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

Hey, you're right. There is a gcc backend for rust. After that comment I went looking, never imagining such a thing might exist:

https://github.com/rust-lang/rustc_codegen_gcc

Well now -- with mrustc not needing llvm, and a gcc backend for rust, having rust on other architectures, like PPC Darwin, suddenly seems not necessarily impossible someday.

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

Keywords: leopard removed
Owner: set to jeremyhu
Status: newassigned
Summary: How to build libcxx on 10.5.8?libcxx @5.0.1 does not build on PPC

libcxx is not supported on PPC in MacPorts at present at least

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

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