Previous Thread
Next Thread
Print Thread
#112257 - 01/21/18 04:31 AM SDL won't let SVN build because of Mac version?  
Joined: Jul 2007
Posts: 195
Monotremata Offline
Senior Member
Monotremata  Offline
Senior Member

Joined: Jul 2007
Posts: 195
California
Trying to build the latest SVN on MacOS 10.13.2 so I could move up to 0.193 and it almost immediately stops with this error:

Code
In file included from /Library/Frameworks/SDL2.framework/Versions/A/Headers/SDL.h:32:
In file included from /Library/Frameworks/SDL2.framework/Versions/A/Headers/SDL_main.h:25:
In file included from /Library/Frameworks/SDL2.framework/Versions/A/Headers/SDL_stdinc.h:31:
In file included from /Library/Frameworks/SDL2.framework/Versions/A/Headers/SDL_config.h:25:
/Library/Frameworks/SDL2.framework/Versions/A/Headers/SDL_platform.h:87:3: error: 
      SDL for Mac OS X only supports deploying on 10.6 and above.
# error SDL for Mac OS X only supports deploying on 10.6 and above.
  ^
1 error generated.
make[1]: *** [qmc2main.o] Error 1
make: *** [qmc2-bin] Error 2


Using SDL 2.0.7/Qt 4.8.7 like the wiki says. First time I have ever run into this one.. Did a distclean and even rechecked the SVN, redownloaded SDL, no dice.

Last edited by Monotremata; 01/21/18 04:32 AM.
#112259 - 01/21/18 09:24 AM Re: SDL won't let SVN build because of Mac version? [Re: Monotremata]  
Joined: May 2008
Posts: 4,888
qmc2 Offline
qmc2  Offline

Very Senior Member

Joined: May 2008
Posts: 4,888
Germany
That's a known issue with 10.13 (it's caused by Qt 4's mkspec for this platform... I also tried using the clang mkspec, but it failed at a different point). I have no fix for it other than using Qt 5.9 or 5.10. You'd also need QtWebKit for it which is currently only available as an external add-on.


A mind is like a parachute. It doesn't work unless it's open. [Frank Zappa]

We're searching for QMC2 translators and support for existing translations. Interested? See here!
#112262 - 01/21/18 12:41 PM Re: SDL won't let SVN build because of Mac version? [Re: Monotremata]  
Joined: May 2008
Posts: 4,888
qmc2 Offline
qmc2  Offline

Very Senior Member

Joined: May 2008
Posts: 4,888
Germany
Another possible work around would be to disable joystick-support which is the only thing that requires SDL in QMC2 ("make JOYSTICK=0 ..."). I haven't tried, but it's supposed to fix that.


A mind is like a parachute. It doesn't work unless it's open. [Frank Zappa]

We're searching for QMC2 translators and support for existing translations. Interested? See here!
#112283 - 01/23/18 02:00 AM Re: SDL won't let SVN build because of Mac version? [Re: qmc2]  
Joined: Jul 2007
Posts: 195
Monotremata Offline
Senior Member
Monotremata  Offline
Senior Member

Joined: Jul 2007
Posts: 195
California
Originally Posted by qmc2
Another possible work around would be to disable joystick-support which is the only thing that requires SDL in QMC2 ("make JOYSTICK=0 ..."). I haven't tried, but it's supposed to fix that.


Yeah that doesn't work, still stops in the same spot with the same error. I installed QT5 with their little online installer but its really throwing me for a loop. The Qt4 installer installed everything as .frameworks, but Qt5 had me make its own directory and then installed a ton of crap that makes no sense to me heh. I have it installed in ~/Qt but I have no idea where I would even tell qmc2 to look for files, this looks like stuff that should be installed in /usr/local or something. I read on the Webkit site that its now bundled with 5.0? I cant find any reference to it in any of the filenames that were installed though.

#112284 - 01/23/18 07:27 AM Re: SDL won't let SVN build because of Mac version? [Re: Monotremata]  
Joined: Jul 2007
Posts: 195
Monotremata Offline
Senior Member
Monotremata  Offline
Senior Member

Joined: Jul 2007
Posts: 195
California
Installed Qt5 with Homebrew, and after figuring out how to put it in my path, still no go. Build ends right after typing make with

Code
Updating build of QMC2 v0.193
make[1]: *** No rule to make target `/usr/local/Qt4.8/mkspecs/macx-g++/qmake.conf', needed by `Makefile.qmake'.  Stop.
make: *** [qmc2-bin] Error 2


Didn't feel like searching and changing every reference to that location to Qt5, but ultimately found a way around it..
After reinstalling Qt 4.8.7, I fixed the original error by a few mods to Makefile.qmake.
Started off and changed "export MACOSX_DEPLOYMENT_TARGET" to 10.6. Build now got past the initial error but then crapped out down the line with this..

Code
In file included from docbrowser.cpp:1:
./settings.h:22:10: fatal error: 'QSettings' file not found
about.cpp:1:10: #include <QSettings>
fatal error         ^~~~~~~~~~~: 
'QProcess' file not found
#include <QProcess>
         ^~~~~~~~~~
options.cpp:1:10: fatal error: 'QTranslator' file not found
#include <QTranslator>
         ^~~~~~~~~~~~~
qmc2main.cpp:1:10: fatal error: 'qglobal.h' file not found
#include <qglobal.h>
         ^~~~~~~~~~~
welcome.cpp:1:10: fatal error: 'QTimer' file not found
#include <QTimer>
         ^~~~~~~~
1 error generated.


Was about to just give up, even after I made sure those header files are indeed there inside the QtCore.Framework. Gave it one last shot and opened up the Makefile again and noticed the CFLAGS and CXXFLAGS lines this time. Changed both of those from 10.5 to 10.6 and it finally built (and runs too haha). Same goes for Arcade as well, just change the Makefile inside the arcade folder and it builds fine.

EDIT: Oddly, while both QMC2 and QMC2-Arcade needed the makefiles edited, QCHDMAN built without having to change anything. And like the wiki instructions, I do a 'make distclean' after I build and install each app so there wasn't even anything modified left hanging around. Weird.

Last edited by Monotremata; 01/23/18 08:14 AM.
#112293 - 01/23/18 04:28 PM Re: SDL won't let SVN build because of Mac version? [Re: Monotremata]  
Joined: May 2008
Posts: 4,888
qmc2 Offline
qmc2  Offline

Very Senior Member

Joined: May 2008
Posts: 4,888
Germany
Originally Posted by Monotremata
Was about to just give up, even after I made sure those header files are indeed there inside the QtCore.Framework. Gave it one last shot and opened up the Makefile again and noticed the CFLAGS and CXXFLAGS lines this time. Changed both of those from 10.5 to 10.6 and it finally built (and runs too haha). Same goes for Arcade as well, just change the Makefile inside the arcade folder and it builds fine.

Cool! You could alternatively try setting CFLAGS and CXXFLAGS accordingly on the make command line (make CC_FLAGS=... CXX_FLAGS=...).

Originally Posted by Monotremata
EDIT: Oddly, while both QMC2 and QMC2-Arcade needed the makefiles edited, QCHDMAN built without having to change anything.

That not surprising because QCHDMAN doesn't use SDL.


A mind is like a parachute. It doesn't work unless it's open. [Frank Zappa]

We're searching for QMC2 translators and support for existing translations. Interested? See here!
#112313 - 01/24/18 11:40 AM Re: SDL won't let SVN build because of Mac version? [Re: Monotremata]  
Joined: May 2008
Posts: 4,888
qmc2 Offline
qmc2  Offline

Very Senior Member

Joined: May 2008
Posts: 4,888
Germany
BTW, you could also change the qmake-configuration for Mac OS X. Look for a file called g++-macx.conf within Qt 4's installation path(s) - on my openSUSE Linux system it's installed as /usr/share/qt4/mkspecs/common/g++-macx.conf. Then change the lines 19 and 20 from

Code
QMAKE_CFLAGS_X86_64 += -Xarch_x86_64 -mmacosx-version-min=10.5
QMAKE_CFLAGS_PPC_64 += -Xarch_ppc64 -mmacosx-version-min=10.5

to

Code
QMAKE_CFLAGS_X86_64 += -Xarch_x86_64 -mmacosx-version-min=10.6
QMAKE_CFLAGS_PPC_64 += -Xarch_ppc64 -mmacosx-version-min=10.6

Again, I haven't tried this myself yet, but I think it's the easiest way to fix SDL2 and Qt 4 coexistence on Mac OS X 10.13+.


A mind is like a parachute. It doesn't work unless it's open. [Frank Zappa]

We're searching for QMC2 translators and support for existing translations. Interested? See here!
#112321 - 01/24/18 07:39 PM Re: SDL won't let SVN build because of Mac version? [Re: Monotremata]  
Joined: Jul 2007
Posts: 195
Monotremata Offline
Senior Member
Monotremata  Offline
Senior Member

Joined: Jul 2007
Posts: 195
California
Ahh thats even better!

#112375 - 01/27/18 01:26 PM Re: SDL won't let SVN build because of Mac version? [Re: Monotremata]  
Joined: May 2008
Posts: 4,888
qmc2 Offline
qmc2  Offline

Very Senior Member

Joined: May 2008
Posts: 4,888
Germany
FYI: I tried this now (successfully!) and updated the build instructions in this FAQ accordingly. The only drawback is that Phonon isn't supported for XCode 8+, so it has to be disabled on the make command line ("make PHONON=0 ...").


A mind is like a parachute. It doesn't work unless it's open. [Frank Zappa]

We're searching for QMC2 translators and support for existing translations. Interested? See here!
#112407 - 01/30/18 06:24 PM Re: SDL won't let SVN build because of Mac version? [Re: Monotremata]  
Joined: Jul 2007
Posts: 195
Monotremata Offline
Senior Member
Monotremata  Offline
Senior Member

Joined: Jul 2007
Posts: 195
California
Weird, mine lives at /usr/local/Qt4.8, and already has those two lines listed as 10.6.


Moderated by  qmc2 

Who's Online Now
6 registered members (AJR, judge, Roberto Fresca, EoceneMiacid, MarkBielman, remax), 30 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Shout Box
Forum Statistics
Forums9
Topics8,496
Posts110,806
Members4,781
Most Online225
May 26th, 2014
Powered by UBB.threads™ PHP Forum Software 7.6.0
Page Time: 0.028s Queries: 14 (0.008s) Memory: 5.0121 MB (Peak: 5.2602 MB) Zlib enabled. Server Time: 2018-02-22 16:37:41 UTC