Ticket #31777 (closed defect: fixed)
openjade @1.3.2 clang fails, use llvm-gcc-4.2 instead, and also support +universal
| Reported by: | fgp@… | Owned by: | dports@… |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | ports | Version: | 2.0.3 |
| Keywords: | clang universal haspatch | Cc: | mamiano@…, ryandesign@… |
| Port: | openjade |
Description (last modified by ryandesign@…) (diff)
XCode 4.2's clang fails to build openjade, but llvm-gcc-4.2 works. Also, universal builds don't work because libtool doesn't use the magic "-arch ..." incantations when invoking the compiler.
(More generally, i386 builds fail on machines where x86_64 is the default. Thus, putting openjade into the muniversal portgroup doesn't fix the problems with +universal)
I've fixed both problems by
- Setting configure.compiler to llvm-gcc-4.2 if it's set to clang
- Using reinplace to patch libtool's CC and CXX settings
Patch for the Portfile is attached.
Attachments
Change History
comment:2 Changed 19 months ago by ryandesign@…
Unconditionally using ${configure.universal_ldflags} is probably wrong; it would make non-universal builds be universal. Instead you probably want [get_canonical_archflags].
comment:3 Changed 19 months ago by fgp@…
I've replaced ${configure.universal_ldflags} with [get_canonical_archflags] as suggested, and verified that both universal and non-universal builds work and produce the correct binary.
I've only tested on Mac OS X 10.6 with XCode 4.2, though (i.e. universal means i386 and x86_64, non-universal means just x86_64), since that's the only machine available to me.
Patch was updated.
Changed 19 months ago by fgp@…
- Attachment macports.openjade.noclang.universal.diff added
Use llvm-gcc-4.2 instead of clang, and patch libtool to make +universal work
comment:4 Changed 17 months ago by dports@…
- Status changed from new to assigned
- Owner changed from macports-tickets@… to dports@…
comment:6 Changed 17 months ago by dports@…
I forced llvm-gcc-4.2 instead of clang in r88163. I did the same for opensp in r88162 because openjade seemed to be failing to build when opensp was built with clang.
Still looking at the universal part of the patch. Patching libtool seems like a bit of a hack; will see if I can come up with something else.
comment:7 follow-up: ↓ 8 Changed 17 months ago by ryandesign@…
- Cc ryandesign@… added
Patching libtool isn't so awful; we were already doing it in this port (and in others of this vintage); now we'd just be patching it even better to support -arch flags.
comment:8 in reply to: ↑ 7 ; follow-up: ↓ 9 Changed 17 months ago by dports@…
- Status changed from assigned to closed
- Resolution set to fixed
Replying to ryandesign@…:
Patching libtool isn't so awful; we were already doing it in this port (and in others of this vintage); now we'd just be patching it even better to support -arch flags.
Yeah, I was hoping we could just replace it with a newer version of libtool, but that's not looking like an easy task given some of the other things that are going on with openjade's build system. Let's go with patching libtool. Applied in r88165.
I was also thrown off by some linker errors that turned out to be caused by openjade trying to link against libraries from an already-installed version of itself. Fixed that in r88165 too. (It's possible that's the problem I was seeing earlier and r88162 was unnecessary; testing that now.)

