VOGONS


First post, by emendelson

User metadata
Rank Oldbie
Rank
Oldbie

Back in January, I had no trouble compiling DOSBox SVN under OS X 10.7, using the detailed advice generously given by Dominus. Since then, i've installed Xcode 4.3.2, which changes a lot of file locations. When I tried to build DOSBox again today, I got error messages saying that gcc-4.2 and g++-4.2 could not be found.

I solved this by creating two symbolic links in /usr/bin - one link to /usr/bin/gcc (also a symbolic link), with the link named /usr/bin/gcc-4.2, and another link to /usr/bin/g++, with the link named /usr/bin/g++-4.2. With these links created, I was able to build DOSBox successfully.

So, my question is: although I was able to build DOSBox, did I fix the problem in a stupid way, and should I have done something else instead? If Dominus is reading this thread, I will happily revise my method if you (or anyone else) tells me that I've made a mistake.

But if this was in fact the right way to do it, I hope the information can be useful to someone else.

Reply 1 of 7, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

The only real problem should be that the sdks for 10.6 and 10.7 as well as the development tools are inside /applications/xcode.app. Everything that points at /developers/... is gone. AND you need to explicitly download the unix dev tools from xcode preferences.

Also I would register a FREE developer account with apple and download the standalone unix dev tools package. This installs to /usr correctly

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 2 of 7, by emendelson

User metadata
Rank Oldbie
Rank
Oldbie

I will do exactly that. (I assume it's OK to keep the two symbolic links that I created.) Thank you!

Reply 3 of 7, by emendelson

User metadata
Rank Oldbie
Rank
Oldbie

Actually, the command-line tools are now downloadable from the Preference panel of Xcode. I had already installed them - but I still needed to create those symbolic links before I could build DOSBox.

Reply 4 of 7, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

The one you download from the preferences install to somewhere in the xcode.app. AND the installer doesn't necessarily fix symlinks that are present.
Also, if your script uses gcc-4.2 explicitly then it may fail because gcc 4.2 is no longer shipped with xcode, it's lvm-gcc and clang now only.

Btw,with unix dev tools I meant the command line tools. I'm away from mymac and can't look up the correct expressions 😉

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 5 of 7, by emendelson

User metadata
Rank Oldbie
Rank
Oldbie

I see that I should simply have modified my script to point to "gcc" and not "gcc-4.2" etc. That would have made things easier. Here are the exports from my build script, which are based entirely on your suggestions in older threads:

#!/bin/sh

export CC='/usr/bin/gcc-4.2 -arch i386'
export CXX='/usr/bin/g++-4.2 -arch i386'
export GCOV='/usr/bin/gcov-4.2 -arch i386'

I'll try removing the "-4.2" and will report what happens. Thanks again for making it possible for me to build my application under OS X!

Reply 6 of 7, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

You're welcome 😉
I think the pointing to gcc-4.2 was a leftover from building for ppc and for that I needed to point to gcc-4.0 or so... Not sure, I was learning this stuff too when you asked for help back then 😉

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 7 of 7, by emendelson

User metadata
Rank Oldbie
Rank
Oldbie

I removed "-4.2" from the three exports, and DOSBox built successfully. Thank you! It's good to make things simpler...