Page 1 of 1

Failed to compile on OSX

Posted: 10 Aug 2016, 03:49
by deet
Hi, I'm trying to install the current version using either Xcode or the OneStep command, but I receive the following errors:
The following build commands failed:
CpHeader /Users/david/Desktop/wzmaster/3rdparty/miniupnpc/bsdqueue.h build/Release/MiniUPnPc.framework/Versions/A/Headers/bsdqueue.h
CpHeader /Users/david/Desktop/wzmaster/3rdparty/miniupnpc/declspec.h build/Release/MiniUPnPc.framework/Versions/A/Headers/declspec.h
(2 failures)
Can you please tell me how to proceed? Thank you.
Deet

Re: Failed to compile on OSX

Posted: 10 Aug 2016, 15:14
by Cyp
Sorry, no idea… If you figure it out, please send a patch.

Re: Failed to compile on OSX

Posted: 10 Aug 2016, 21:53
by Maximum Dude
Happened to me too.

The error message:


The following build commands failed:
CpHeader /Users/sclausnitzer/Downloads/warzone2100-3.2.1/3rdparty/miniupnpc/declspec.h build/Release/MiniUPnPc.framework/Versions/A/Headers/declspec.h
CpHeader /Users/sclausnitzer/Downloads/warzone2100-3.2.1/3rdparty/miniupnpc/bsdqueue.h build/Release/MiniUPnPc.framework/Versions/A/Headers/bsdqueue.h
(2 failures)

Using OS X 10.10.5 with xcode 6.4

Re: Failed to compile on OSX

Posted: 16 Aug 2016, 19:49
by Maximum Dude
Anyone have any ideas what is causing this yet?

Thanks!

Re: Failed to compile on OSX

Posted: 24 Sep 2016, 15:36
by cdplayer
My 'guess' is there is a discrepancy with the included third party package 'miniupnp' see http://miniupnp.free.fr
The one included in wz2100(3.2.1) is missing two files which strangely seem absent in the latest v2.0 build of miniupnp. Perhaps they only used a older version.

I think maybe they have sourced the package from 'https://github.com/ion1/miniupnpd-ubuntu' which does have the missing files. This repo does not seem to be updated for quiet some time. Its the only repo i can find that seems to have the missing file.

The github repo that appears to be the correct place to source from, appears to be 'https://github.com/miniupnp/miniupnp' due to more recent updating.

Some changes to content has occurred with v2.0 [miniupnpc/declspec.h => miniupnpc_declspec.h]
I can't offer a quick fix as I'm way too inexperienced, but this may aid the main developers to ensure the macOS version builds correctly in future releases.

Hope this helps someone!

My Build Error
CpHeader /Users/chris/Downloads/warzone2100-3.2.1/3rdparty/miniupnpc/bsdqueue.h build/Release/MiniUPnPc.framework/Versions/A/Headers/bsdqueue.h
cd /Users/chris/Downloads/warzone2100-3.2.1/macosx
builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -resolve-src-symlinks /Users/chris/Downloads/warzone2100-3.2.1/3rdparty/miniupnpc/bsdqueue.h /Users/chris/Downloads/warzone2100-3.2.1/macosx/build/Release/MiniUPnPc.framework/Versions/A/Headers
error: /Users/chris/Downloads/warzone2100-3.2.1/3rdparty/miniupnpc/bsdqueue.h: No such file or directory

CpHeader /Users/chris/Downloads/warzone2100-3.2.1/3rdparty/miniupnpc/declspec.h build/Release/MiniUPnPc.framework/Versions/A/Headers/declspec.h
cd /Users/chris/Downloads/warzone2100-3.2.1/macosx
builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -resolve-src-symlinks /Users/chris/Downloads/warzone2100-3.2.1/3rdparty/miniupnpc/declspec.h /Users/chris/Downloads/warzone2100-3.2.1/macosx/build/Release/MiniUPnPc.framework/Versions/A/Headers
error: /Users/chris/Downloads/warzone2100-3.2.1/3rdparty/miniupnpc/declspec.h: No such file or directory

** BUILD FAILED **


The following build commands failed:
CpHeader /Users/chris/Downloads/warzone2100-3.2.1/3rdparty/miniupnpc/bsdqueue.h build/Release/MiniUPnPc.framework/Versions/A/Headers/bsdqueue.h
CpHeader /Users/chris/Downloads/warzone2100-3.2.1/3rdparty/miniupnpc/declspec.h build/Release/MiniUPnPc.framework/Versions/A/Headers/declspec.h
(2 failures)

wz2100 is one of my favourite games. :)

Re: Failed to compile on OSX

Posted: 08 Oct 2016, 06:19
by inphovore
Having the same issue though I got a little further:

Mac OS 10.10.2 (14C109)
xcode: Version 6.2 (6C131e)

xcodebuild -project Warzone.xcodeproj -target Warzone -configuration Release

1. Fix miniupnp

* git clone https://github.com/miniupnp/miniupnp.git
* git checkout miniupnpd_1_9
* make
* replace miniupnp/miniupnpc with version in WarZone/3rdparty

2. Fix libpng download

* vi ./macosx/configs/fetchscripts/Png-FetchSource.sh
* replace:
SourceDLP="http://downloads.sourceforge.net/projec ... ${FileName}"
with:
SourceDLP="https://sourceforge.net/projects/libpng ... z/download"

3. Fix tests/qslint.cpp and tests/lint.cpp
* copied from master (https://github.com/Warzone2100/warzone2 ... ster/tests)

4. framework debug fails

fails with 20 errors on warzone2100-3.2.1/lib/framework/debug.h

Re: Failed to compile on OSX

Posted: 15 Dec 2016, 20:22
by diamondice00085
inphovore wrote:Having the same issue though I got a little further:

Mac OS 10.10.2 (14C109)
xcode: Version 6.2 (6C131e)

xcodebuild -project Warzone.xcodeproj -target Warzone -configuration Release

1. Fix miniupnp

* git clone https://github.com/miniupnp/miniupnp.git
* git checkout miniupnpd_1_9
* make
* replace miniupnp/miniupnpc with version in WarZone/3rdparty

2. Fix libpng download

* vi ./macosx/configs/fetchscripts/Png-FetchSource.sh
* replace:
SourceDLP="http://downloads.sourceforge.net/projec ... ${FileName}"
with:
SourceDLP="https://sourceforge.net/projects/libpng ... z/download"

3. Fix tests/qslint.cpp and tests/lint.cpp
* copied from master (https://github.com/Warzone2100/warzone2 ... ster/tests)

4. framework debug fails

fails with 20 errors on warzone2100-3.2.1/lib/framework/debug.h
I've gotten a little further by following your steps but I started by cloning the github repo master branch. This gets me past the framework debug but I'm getting stuck in the quesoglc dependencies. More specifically:

Code: Select all

/Users/nicholas/build/warzone2100/macosx/../3rdparty/quesoglc/ocontext.h:135:3: error: unknown type name 'GLEWContext'
  GLEWContext glewContext;      /* GLEW context for OpenGL extensions */
  ^
In file included from /Users/nicholas/build/warzone2100/3rdparty/quesoglc/font.c:64:
/Users/nicholas/build/warzone2100/macosx/../3rdparty/quesoglc/internal.h:351:9: error: unknown type name 'GLEWContext'
GLEWAPI GLEWContext* glewGetContext(void);
        ^
It's fairly simple to get to this point by downloading the latest tarball from https://sourceforge.net/projects/quesoglc/files/ and building the database.h file using python and moving the files into the appropriate directory. However, when it get's to the include failures I'm outside of my knowledge.

Re: Failed to compile on OSX

Posted: 18 Dec 2016, 05:59
by vexed
QuesoGLC was dropped in the latest revision of WZ (3.2.2), so, you should be able to get past that now.
It requires Harfbuzz though. On the plus side, seems easier to compile, if you follow directions from https://github.com/behdad/harfbuzz/blob/master/BUILD.md

Nobody on the dev teams has a mac or xcode, so, about the best we can do is ask other people to fix the Xcode.