texmacs-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Texmacs-dev] OSX compile


From: Michael Lachmann
Subject: [Texmacs-dev] OSX compile
Date: Fri, 10 Jan 2014 12:05:28 +0100

I had some problems with the OSX compile on 10.9 using Xcode 4.3.6
(Apple switched compilers, and lots of things broke.)
compiling when using the configure flag --enable-macosx-distr fails.

One of the errors looks like this:
--
g++ -ISystem -ISystem/Boot -ISystem/Classes -ISystem/Files -ISystem/Link 
-ISystem/Misc -ISystem/Language -IKernel/Abstractions -IKernel/Containers 
-IKernel/Types -IData/Convert -IData/Drd -IData/History -IData/Observers 
-IData/Document -IData/String -IData/Tmfs -IData/Tree -IScheme 
-IGraphics/Bitmap_fonts -IGraphics/Fonts -IGraphics/Gui -IGraphics/Mathematics 
-IGraphics/Renderer -IGraphics/Handwriting -IGraphics/Types -IGraphics/Pictures 
-IGraphics/Spacial -IPlugins -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB 
-DQT_SHARED -I/opt/local/share/qt4/mkspecs/macx-g++ -I. -I. 
-I/opt/local/Library/Frameworks/QtCore.framework/Versions/4/Headers 
-I/opt/local/Library/Frameworks/QtGui.framework/Versions/4/Headers -I. 
-I/opt/local/Library/Frameworks/QtGui.framework/Versions/4/Headers 
-I/opt/local/Library/Frameworks/QtCore.framework/Versions/4/Headers 
-I/opt/local/include -F/opt/local/Library/Frameworks -F/opt/local/lib 
-DQTTEXMACS -Wall -Wno-return-type -O2 -fno-rtti -INONE/include 
-mmacosx-version-min=10.4 -DMACOSX_DEPLOYMENT_TARGET=10.4 -c 
./Plugins/MacOS/HIDRemote.m -o Objects/HIDRemote.o
cc1obj: warning: command line option "-fno-rtti" is valid for C++/ObjC++ but 
not for ObjC
<built-in>:0: warning: Mac OS X version 10.5 or later is needed for use of the 
new objc abi
In file included from 
/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:161,
                 from 
/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:12,
                 from ./Plugins/MacOS/HIDRemote.h:56,
                 from ./Plugins/MacOS/HIDRemote.m:52:
/System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h:16:
 error: expected ‘,’ or ‘}’ before ‘__attribute__’
make[1]: *** [Objects/HIDRemote.o] Error 1
--
(the problem only occurs when the -mmacosx-version-min= flag is used)

If you google this type of error, you'll see that many projects encountered the 
problem.
It could be that updating to a new version of QT will fix the problem.

A fix that worked for me is following:
http://www.cocoawithlove.com/2009/09/building-for-earlier-os-versions-in.html

and adding 
-isysroot 
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk

to the CXX_FLAGS and BFLAGS.
MacOSX10.7.sdk worked for me for compiling with min version 10.4, but I haven't 
actually checked the result on 10.4 -- I don't have earlier versions of the sdk 
installed on my system. I'm also not sure that the path to the sdk
will always be the same - on my system it is in the Xcode app, but the web site 
above had it in 
/Developer/SDKs

So, I'm not sure what is the best way to fix the configure script.
But, using this change, 
configure --enable-macosx-distr   --enable-macosx-extensions --enable-qtpipes 
--enable-pdf-renderer
make MACOS_PACKAGE
finished successfully.

Here's a diff of my configure script:
---
Index: configure
===================================================================
--- configure   (revision 8129)
+++ configure   (working copy)
@@ -7666,8 +7666,8 @@

 if test "$enable_macosx_distr" != "no" ; then
     MACOSX_DEPLOYMENT_TARGET="MACOSX_DEPLOYMENT_TARGET=10.4"
-    CONFIG_CXXFLAGS="$CONFIG_CXXFLAGS -mmacosx-version-min=10.4 
-DMACOSX_DEPLOYMENT_TARGET=10.4"
-    CONFIG_BFLAGS="$CONFIG_BFLAGS -mmacosx-version-min=10.4 
-DMACOSX_DEPLOYMENT_TARGET=10.4"
+    CONFIG_CXXFLAGS="$CONFIG_CXXFLAGS -isysroot 
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk
 -mmacosx-version-min=10.4 -DMACOSX_DEPLOYMENT_TARGET=10.4"
+    CONFIG_BFLAGS="$CONFIG_BFLAGS -isysroot 
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk
 -mmacosx-version-min=10.4 -DMACOSX_DEPLOYMENT_TARGET=10.4"
     if test "$enable_macosx_distr" != "yes" -a "$enable_macosx_distr" != "" ; 
then
         CONFIG_ARCHS="$enable_macosx_distr"
            { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabling Mac OSX 
distribution for architecture $enable_macosx_distr" >&5
---


Michael









reply via email to

[Prev in Thread] Current Thread [Next in Thread]