Opened 11 years ago
Closed 11 years ago
#42672 closed defect (fixed)
x264 @20130823_0: universal build failure on Apple clang, i386 issues.
Reported by: | RJVB (René Bertin) | Owned by: | dbevans (David B. Evans) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | i386 | Cc: | jeremyhu (Jeremy Huddleston Sequoia), cooljeanius (Eric Gallager) |
Port: | x264 |
Description
Building x264 @20130823 in the +asm+universal variant fails on Mac OS X 10.9 when using the system clang compiler, because of a register allocation issue (out of registers) in 32bit mode. The build completes without issues using gcc-mp-4.7 as well as on my 10.6.8 system (presumably using Apple gcc 4.2.4). This is thus probably a compiler bug rather than a bug in x264.
Attachments (2)
Change History (9)
Changed 11 years ago by RJVB (René Bertin)
comment:1 Changed 11 years ago by larryv (Lawrence Velázquez)
Keywords: | mavericks added; clang gcc register allocation removed |
---|---|
Owner: | changed from macports-tickets@… to devans@… |
Port: | x264 added; x264@20130823 removed |
Summary: | x264 build failure on 10.9 using Apple clang → x264 @20130823_0: build failure on 10.9 using Apple clang |
comment:2 Changed 11 years ago by dbevans (David B. Evans)
Status: | new → assigned |
---|---|
Version: | 2.2.1 |
x264 updated to build 142 (x264 @20140124) in r117551.
Please update your ports and try again.
Changed 11 years ago by RJVB (René Bertin)
Attachment: | main.2.log added |
---|
build log for version 20140124
comment:3 Changed 11 years ago by RJVB (René Bertin)
If you only updated the x264 version, I fear that was not enough; see the new build log.
comment:4 Changed 11 years ago by dbevans (David B. Evans)
Cc: | jeremyhu@… added |
---|---|
Summary: | x264 @20130823_0: build failure on 10.9 using Apple clang → x264 @20130823_0: universal build failure on Apple clang, i386 issues. |
jeremyhu@ committed an additional clang fix in r117575 but that doesn't help this issue either.
The issue was recently discussed (heatedly) upstream Failure to build x264 with ASM on i386.
The closing guidance from the upstream developers is this:
- give up on --enable-pic as x264's asm optimizations for i386 wouldn't be PIC anyway (even if you didn't get this compilation error) and will have textrels;
- give up on asm and use --disable-asm if you for some stupid reason no matter what need PIC;
- give up on i386 and build for x86_64 if need both PIC and asm.
I don't see any way around the situation either but, of course, I would defer to anyone who has a better idea.
In the meantime, in the current state of the port, it is obvious that +asm is incompatible with +universal due to i386 issues. +universal builds successfully without +asm and this is the current +universal default. +asm builds fine for x86_64 without +universal, the -universal default.
I also note that this is not just a Mavericks issue. I can reproduce the problem on ML as well.
For now, don't use +asm and +universal together. If you want +asm, use the default build. I am marking variant +asm as conflicting with +universal.
comment:5 Changed 11 years ago by dbevans (David B. Evans)
+asm marked conflicts +universal in r117592 for now.
comment:7 Changed 11 years ago by dbevans (David B. Evans)
Keywords: | i386 added; mavericks removed |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
Better solution.
+asm variant dropped and --disable-asm asserted whenever configuring for i386. This allows +universal to build with asm optimizations for x86_64 and without for i386. Also fixes -universal build for i386. Other possible archs are handled by the port itself. No ABI impact.
See https://lists.macosforge.org/pipermail/macports-users/2014-March/034711.html
x264 build log