Lion compile failure

Craig Treleaven ctreleaven at
Thu Jun 14 19:33:30 PDT 2012

At 6:28 AM +1000 6/15/12, Joshua Root wrote:
>On 2012-6-15 06:14 , Craig Treleaven wrote:
>  > The port I've been working on (endlessly, it seems) compiles fine on
>  > 10.6 but fails on 10.7.  After a few runs trying both clang and llvm, I
>  > [...]
>Well first of all it's running 'gcc', not obeying ${} and
>friends. You should fix that. So it's currently using llvm-gcc-4.2 on
>Lion no matter what.
>Secondly, the inline asm may well be incorrect. (The "standard input" is
>probably because the message is coming from the assembler, which is
>being called by the compiler on the snippet of asm, not the C file.)

Thanks for the pointers (here and offline). I got a successful build 
using macports-gcc42.  I've incorporated the block to use 
macports-gcc42 as necessary viz:

If anybody is interest, using llvm fails as in my original posting:

>/usr/bin/llvm-gcc-4.2 -c -pipe -I/opt/local/include -D_ISOC99_SOURCE 
>-pipe -O2 -arch x86_64 -std=c99 -fomit-frame-pointer -fPIC -g -Wall 
>-Wno-parentheses -Wno-switch -Wdisabled-optimization -Wpointer-arith 
>-Wredundant-decls -Wno-pointer-sign -Wcast-qual -Wwrite-strings 
>-Wundef -Wmissing-prototypes -O3 -fno-math-errno -fno-tree-vectorize 
>-w -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.7 -DMMX 
>-I/opt/local/share/qt4/mkspecs/macx-g++ -I. -I/usr/include 
>-I/opt/local -I/opt/local/include/libxml2 -Ireplex 
>-I../../../external/FFmpeg -I../../../libs/libmythbase -o ts.o ts.c
>{standard input}:465:can't encode register '%ah' in an instruction 
>requiring REX prefix.
>make[2]: *** [ts.o] Error 1

Failure with clang comes earlier, ala:

>/usr/bin/clang -c -pipe -pipe -D_ISOC99_SOURCE 
>-pipe -O2 -arch x86_64 -std=c99 -fomit-frame-pointer -fPIC -g -Wall 
>-Wno-parentheses -Wno-switch -Wdisabled-optimization -Wpointer-arith 
>-Wredundant-decls -Wno-pointer-sign -Wcast-qual -Wwrite-strings 
>-Wtype-limits -Wundef -Wmissing-prototypes -O3 -fno-math-errno 
>-fno-signed-zeros -Qunused-arguments -O2 -arch x86_64 -Xarch_x86_64 
>-mmacosx-version-min=10.7 -DMMX -DUSING_APPLEREMOTE -D_GNU_SOURCE 
>-DQT_SHARED -I/opt/local/share/qt4/mkspecs/macx-g++ -I. -I. 
>-I/usr/include -I/opt/local -I/opt/local/include/libxml2 
>-I../libmythbase -I../.. -I.. -I../../external/FFmpeg 
>-I/opt/local/include/QtWebKit -I/opt/local/include/QtSql 
>-I/opt/local/include/QtXml -I/opt/local/include/QtOpenGL 
>-I/opt/local/include/QtGui -I/opt/local/include/QtNetwork 
>-I/opt/local/include/QtCore -I/opt/local/include 
>-o util-osx-cocoa.o
>error: invalid argument '-std=c99' not allowed with 'C++/ObjC++'
>make[2]: *** [util-osx-cocoa.o] Error 1

At this point, I'm happy just to have a build that finishes without errors.

Thanks again for the tutoring.


More information about the macports-dev mailing list