Failed to compile on OSX

Discuss the future of Warzone 2100 with us.

Failed to compile on OSX

Postby deet » 10 Aug 2016, 03:49

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
deet
New user
 
Posts: 4
Joined: 31 Jul 2012, 00:55

Re: Failed to compile on OSX

Postby Cyp » 10 Aug 2016, 15:14

Sorry, no idea… If you figure it out, please send a patch.
Cyp
Evitcani
Evitcani
 
Posts: 692
Joined: 17 Jan 2010, 23:35

Re: Failed to compile on OSX

Postby Maximum Dude » 10 Aug 2016, 21:53

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
Maximum Dude
New user
 
Posts: 2
Joined: 10 Aug 2016, 21:46

Re: Failed to compile on OSX

Postby Maximum Dude » 16 Aug 2016, 19:49

Anyone have any ideas what is causing this yet?

Thanks!
Maximum Dude
New user
 
Posts: 2
Joined: 10 Aug 2016, 21:46

Re: Failed to compile on OSX

Postby cdplayer » 24 Sep 2016, 15:36

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. :)
cdplayer
New user
 
Posts: 1
Joined: 24 Sep 2016, 15:09

Re: Failed to compile on OSX

Postby inphovore » 08 Oct 2016, 06:19

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/project/libpng/libpng15/${VerLib}/${FileName}"
with:
SourceDLP="https://sourceforge.net/projects/libpng/files/libpng15/older-releases/1.5.21/libpng-1.5.21.tar.gz/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
inphovore
New user
 
Posts: 1
Joined: 08 Oct 2016, 06:16

Re: Failed to compile on OSX

Postby diamondice00085 » 15 Dec 2016, 20:22

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/project/libpng/libpng15/${VerLib}/${FileName}"
with:
SourceDLP="https://sourceforge.net/projects/libpng/files/libpng15/older-releases/1.5.21/libpng-1.5.21.tar.gz/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.
diamondice00085
New user
 
Posts: 1
Joined: 15 Dec 2016, 20:18

Re: Failed to compile on OSX

Postby vexed » 18 Dec 2016, 05:59

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.
/facepalm ...Grinch stole Warzone🙈🙉🙊 contra principia negantem non est disputandum
Super busy, don't expect a timely reply back.
User avatar
vexed
Inactive
Inactive
 
Posts: 2411
Joined: 27 Jul 2010, 02:07


Return to Development