[Tutorial] Building Spring on Mac OS X
Moderator: Moderators
-
- Posts: 6
- Joined: 20 Jun 2011, 16:15
Re: [Tutorial] Spring on Mac OS X
I have a whole compilation chain working at home (see http://springrts.com/phpbb/viewtopic.ph ... 16#p492316). For this particular problem, I just modified png.h to define the old function as an alias to the new one. This isn't the cleanest way of doing things but is works great.
-
- Posts: 3
- Joined: 16 Mar 2011, 01:00
Re: [Tutorial] Spring on Mac OS X
Hi,
Got an error compiling springlobby. Max OS X 10.6.8, 2.3 GHz Intel Core i5, macports 1.9.2. Error is:
I know the tutorial states that 64-bit kernel will not work (which is what I have) for spring, but I got spring to build, run, and work. so does springlobby have a building problem for 64-bit?
Got an error compiling springlobby. Max OS X 10.6.8, 2.3 GHz Intel Core i5, macports 1.9.2. Error is:
Log is here: http://pastebin.com/7u2GDP7tError: Target org.macports.build returned: shell command failed
I know the tutorial states that 64-bit kernel will not work (which is what I have) for spring, but I got spring to build, run, and work. so does springlobby have a building problem for 64-bit?
Re: [Tutorial] Spring on Mac OS X
you can try to compile springlobby yourself + disable libnotify support
(OPTION_NOTIFY in cmake)
(OPTION_NOTIFY in cmake)
Re: [Tutorial] Spring on Mac OS X
I've updated the ports (and tutorial online) to SL 0.135. Feel free to try that again and see if you still experience the issue. FYI, the upgrade should read
Code: Select all
sudo port sync && sudo port upgrade springlobby
-
- Posts: 9
- Joined: 24 May 2009, 09:01
Re: [Tutorial] Building Spring on Mac OS X
Hello
I've been trying to compile spring, quite new to all this. It comes up with the error below, any help on how to install the missing dependancies would be great.
kiwi
I've been trying to compile spring, quite new to all this. It comes up with the error below, any help on how to install the missing dependancies would be great.
Thanks---> Activating pkgconfig @0.26_0
---> Cleaning pkgconfig
---> Fetching archive for xorg-xproto
---> Attempting to fetch xorg-xproto-7.0.22_0.darwin_10.noarch.tbz2 from http://packages.macports.org/xorg-xproto
---> Attempting to fetch xorg-xproto-7.0.22_0.darwin_10.noarch.tbz2.rmd160 from http://packages.macports.org/xorg-xproto
---> Installing xorg-xproto @7.0.22_0
---> Activating xorg-xproto @7.0.22_0
Error: Target org.macports.activate returned: Image error: /opt/local/include/X11/DECkeysym.h already exists and does not belong to a registered port. Unable to activate port xorg-xproto. Use 'port -f activate xorg-xproto' to force the activation.
Error: Failed to install xorg-xproto
Log for xorg-xproto is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_x11_xorg-xproto/xorg-xproto/main.log
Error: The following dependencies were not installed: libdevil mesa makedepend xorg-xproto py27-libxml2 libxml2 libxml2 python27 db46 gdbm python_select readline sqlite3 python27 xorg-dri2proto xorg-glproto xorg-libXfixes xorg-fixesproto xorg-libX11 xorg-bigreqsproto xorg-inputproto xorg-kbproto xorg-libXau xorg-libXdmcp xorg-libxcb xorg-libpthread-stubs xorg-xcb-proto xorg-util-macros xorg-xcmiscproto xorg-xextproto xorg-xf86bigfontproto xorg-xtrans xorg-libXi xorg-libXext xorg-libXmu xorg-libXt xorg-libsm xorg-libice xrender xorg-renderproto libsdl-framework libsdl xorg-libXrandr xorg-randrproto libvorbis libogg p7zip
Error: Status 1 encountered during processing.
To report a bug, see <http://guide.macports.org/#project.tickets>
kiwi
Re: [Tutorial] Building Spring on Mac OS X
anything not clear in this error-message? i don't know what i should explain...Error: Target org.macports.activate returned: Image error: /opt/local/include/X11/DECkeysym.h already exists and does not belong to a registered port. Unable to activate port xorg-xproto. Use 'port -f activate xorg-xproto' to force the activation.
Error: Failed to install xorg-xproto
-
- Posts: 9
- Joined: 24 May 2009, 09:01
Re: [Tutorial] Building Spring on Mac OS X
Yeah sorted that out, sorry prob just needed to spend a bit more time looking at whats what.
I've got to may next problem now :) Looking at the text below it appears to be looking for spring on the macports site, I looked on the site and it is not there but seems to find it somewhere?
Kiwi
I've got to may next problem now :) Looking at the text below it appears to be looking for spring on the macports site, I looked on the site and it is not there but seems to find it somewhere?
Have also put the last part of the log below too---> Fetching archive for springrts
---> Attempting to fetch springrts-0.82.7.1_0.darwin_10.x86_64.tbz2 from http://packages.macports.org/springrts
---> Fetching springrts
---> Verifying checksum(s) for springrts
---> Extracting springrts
---> Applying patches to springrts
---> Configuring springrts
---> Building springrts
Error: Target org.macports.build returned: shell command failed (see log for details)
Log for springrts is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_daftserve.dyndns.org_macports_games_springrts/springrts/main.log
Error: Status 1 encountered during processing.
To report a bug, see <http://guide.macports.org/#project.tickets>
Thanks again :):info:build /Developer/usr/bin/ranlib libstreflop.a
:info:build make[3]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_daftserve.dyndns.org_macports_games_springrts/springrts/work/spring_0.82.7.1'
:info:build /opt/local/bin/cmake -E cmake_progress_report /opt/local/var/macports/build/_opt_local_var_macports_sources_daftserve.dyndns.org_macports_games_springrts/springrts/work/spring_0.82.7.1/CMakeFiles 94 95 96 97
:info:build [ 10%] Built target streflop
:info:build make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_daftserve.dyndns.org_macports_games_springrts/springrts/work/spring_0.82.7.1'
:info:build make[1]: *** [rts/builds/default/CMakeFiles/spring.dir/rule] Error 2
:info:build make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_daftserve.dyndns.org_macports_games_springrts/springrts/work/spring_0.82.7.1'
:info:build make: *** [spring] Error 2
:info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_daftserve.dyndns.org_macports_games_springrts/springrts/work/spring_0.82.7.1'
:info:build shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_daftserve.dyndns.org_macports_games_springrts/springrts/work/spring_0.82.7.1" && /usr/bin/make -j2 -w spring " returned error 2
:error:build Target org.macports.build returned: shell command failed (see log for details)
:debug:build Backtrace: shell command failed (see log for details)
while executing
"command_exec build"
(procedure "portbuild::build_main" line
invoked from within
"$procedure $targetname"
:info:build Warning: the following items did not execute (for springrts): org.macports.activate org.macports.build org.macports.destroot org.macports.install
Kiwi
Re: [Tutorial] Building Spring on Mac OS X
this part is useless, the error happened before...
-
- Posts: 9
- Joined: 24 May 2009, 09:01
Re: [Tutorial] Building Spring on Mac OS X
Been trying to sort it out, I came across the following errors, made sure my OpenAL files are all up to date but still getting the same errors.
Thanks again
Starting to think just waiting for the .app may be easier :):info:build /Library/Frameworks/OpenAL.framework/Headers/al.h:87: error: ÔÇÿ<anonymous>ÔÇÖ has incomplete type
:info:build /Library/Frameworks/OpenAL.framework/Headers/al.h:87: error: invalid use of ÔÇÿALvoidÔÇÖ
:info:build /Library/Frameworks/OpenAL.framework/Headers/al.h: In function ÔÇÿbool CheckError(const char*)ÔÇÖ:
:info:build /Library/Frameworks/OpenAL.framework/Headers/al.h:87: error: too few arguments to function ÔÇÿALenum alGetError(<type error>)ÔÇÖ
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_daftserve.dyndns.org_macports_games_springrts/springrts/work/spring_0.82.7.1/rts/System/Sound/ALShared.cpp:11: error: at this point in file
:info:build make[3]: *** [rts/System/Sound/CMakeFiles/sound.dir/ALShared.cpp.o] Error 1
:info:build make[2]: *** [rts/System/Sound/CMakeFiles/sound.dir/all] Error 2
:info:build make[1]: *** [rts/builds/default/CMakeFiles/spring.dir/rule] Error 2
:info:build make: *** [spring] Error 2
:info:build shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_daftserve.dyndns.org_macports_games_springrts/springrts/work/spring_0.82.7.1" && /usr/bin/make -j2 -w spring " returned error 2
:error:build Target org.macports.build returned: shell command failed (see log for details)
Thanks again
-
- Posts: 9
- Joined: 24 May 2009, 09:01
Re: [Tutorial] Building Spring on Mac OS X
Success! Nearly :)
Have got spring running now, thank you for you help Abma, sorted out the OpenAL issue.
The only thing now is once i run spring and got to test game with any ai/map/mod combo spring will exit with the following in the terminal.
Any ideas would be much appreciated.
Thanks
kiwi
Have got spring running now, thank you for you help Abma, sorted out the OpenAL issue.
The only thing now is once i run spring and got to test game with any ai/map/mod combo spring will exit with the following in the terminal.
I found some similar problems people had, but nothing exactly the same.dyld: lazy symbol binding failed: Symbol not found: _png_set_longjmp_fn
Referenced from: /opt/local/lib/libIL.1.dylib
Expected in: flat namespace
dyld: Symbol not found: _png_set_longjmp_fn
Referenced from: /opt/local/lib/libIL.1.dylib
Expected in: flat namespace
Any ideas would be much appreciated.
Thanks
kiwi
Re: [Tutorial] Building Spring on Mac OS X
i dont know how your libIL came into existance, but maybe it was not compiled with PNG support, or it is just too old, or it was compiled against an other version of libpng then the one you are using, ...
something along these lines, possibly.
spring needs DevIL with png support, as it is used to load textures, for example.
maybe you can reinstall libil, or compile it yourself with PNG support, ... no idea what to do on mac.
something along these lines, possibly.
spring needs DevIL with png support, as it is used to load textures, for example.
maybe you can reinstall libil, or compile it yourself with PNG support, ... no idea what to do on mac.
Re: [Tutorial] Building Spring on Mac OS X
could you issue a and give the lines with libdevil and libpng ?
Code: Select all
port installed
-
- Posts: 9
- Joined: 24 May 2009, 09:01
Re: [Tutorial] Building Spring on Mac OS X
I had a go at doing an uninstall / clean / install on both libpng and libdevil, still with the same results. Both are being downloaded by macports from the standard http://packages.macports.org/.
This gives me libpng 1.4.8_0, the latest which I can find online is 1.5.4
The libdevil is 1.7.8_3, the latest of this online seems to be 1.7.8_6
I did get the latest ones but I'm not sure of how to get macports to use them instead of looking on it's own server for the others. Also unsure if it will bring in any new troubles if I start using a newer version than what was intended.
Thanks
kiwi
This gives me libpng 1.4.8_0, the latest which I can find online is 1.5.4
The libdevil is 1.7.8_3, the latest of this online seems to be 1.7.8_6
I did get the latest ones but I'm not sure of how to get macports to use them instead of looking on it's own server for the others. Also unsure if it will bring in any new troubles if I start using a newer version than what was intended.
Thanks
kiwi
Re: [Tutorial] Building Spring on Mac OS X
Things should build fine with the versions provided by MacPorts (they do here on the official buildbot...). So my guess is that you have another version of libpng somewhere on your system (/Library/... /usr/local/...), which prepends over MacPorts's (e.g. I've seen it recently with /Library/Frameworks/UnixImageIO.framework).kiwi_flyer wrote:I had a go at doing an uninstall / clean / install on both libpng and libdevil, still with the same results. Both are being downloaded by macports from the standard http://packages.macports.org/.
This gives me libpng 1.4.8_0, the latest which I can find online is 1.5.4
The libdevil is 1.7.8_3, the latest of this online seems to be 1.7.8_6
I did get the latest ones but I'm not sure of how to get macports to use them instead of looking on it's own server for the others. Also unsure if it will bring in any new troubles if I start using a newer version than what was intended.
Try a
Code: Select all
otool -L /opt/local/bin/spring
otool -L /opt/local/lib/libIL.1.dylib
Also, which OS version do you have ? all the above is functional on SnowLeopard (10.6), but not tested elsewhere.
-
- Posts: 9
- Joined: 24 May 2009, 09:01
Re: [Tutorial] Building Spring on Mac OS X
I did find another version of libpng in the user library so I moved that out the way, tried compiling again with the same result. From the output below it looks as if libIL.1.dylib is looking for version 1.2 of libpng? When installing libpng from macports provides version 1.4 in the /opt/local/lib/ (I do have a libpng14.14.dylib file but no libpng12.0.dylib file)
All the other library versions are either the same or current version above the compatibility version.
Had a look at spring too and it is referencing /opt/local/lib/libIL.1.dylib (compatibility version 3.0.0, current version 3.0.0).DBs-Computer:~ DB$ otool -L /opt/local/lib/libIL.1.dylib
/opt/local/lib/libIL.1.dylib:
/opt/local/lib/libIL.1.dylib (compatibility version 3.0.0, current version 3.0.0)
/opt/local/lib/libtiff.3.dylib (compatibility version 13.0.0, current version 13.5.0)
/usr/local/lib/libpng12.0.dylib (compatibility version 47.0.0, current version 47.0.0)
/opt/local/lib/libmng.1.dylib (compatibility version 2.0.0, current version 2.0.0)
/opt/local/lib/liblcms.1.dylib (compatibility version 2.0.0, current version 2.19.0)
/opt/local/lib/libjasper.1.dylib (compatibility version 2.0.0, current version 2.0.0)
/opt/local/lib/libjpeg.8.dylib (compatibility version 12.0.0, current version 12.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.0.0)
/opt/local/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 52.0.0)
All the other library versions are either the same or current version above the compatibility version.
Re: [Tutorial] Building Spring on Mac OS X
If libdevil points to libpng12, it means it was there before and got cached somehow, or not cleaned correctly when upgrading to 1.4. Do you have packaging option enabled in Macports ? If so, every successful install is stored as an archive in /opt/local/var/packages, thus your uninstall/clean is not 100% clean: when you reinstall, it deflates your previous packaged as it may not see some changes. (weird anyway, more investigation needed). You may want then to remove devil and libpng's packages before cleaning and re-installing them
As a last resort, if you do have the 1.4 dylib in /opt/local, here's how to manually force libIL to point to it once and for allAlthough this is a bit dirty as it should have found the right one by itself...
Hint: backup the libIL before typing the above line in case things go wrong
As a last resort, if you do have the 1.4 dylib in /opt/local, here's how to manually force libIL to point to it once and for all
Code: Select all
install_name_tool -change /opt/local/lib/libpng12.0.dylib /opt/local/lib/libpng14.0.dylib /opt/local/lib/libIL.1.dylib
Hint: backup the libIL before typing the above line in case things go wrong

-
- Posts: 9
- Joined: 24 May 2009, 09:01
Re: [Tutorial] Building Spring on Mac OS X
Thanks daftalx, all up and running now :). turned out I had missed seeing that is was looking in usr/local/lib rather than opt/local/lib and there was actually still a copy of version 1.2 in there.
Spring lobby also launches, not tried getting on the server yet, just single player. The Java based AI's seem to die as soon as the games starts though, and the commander AI doesn't build anything. Will try downloading a few more and trying them, which normally work well?
Thanks
kiwi
Spring lobby also launches, not tried getting on the server yet, just single player. The Java based AI's seem to die as soon as the games starts though, and the commander AI doesn't build anything. Will try downloading a few more and trying them, which normally work well?
Thanks
kiwi
Re: [Tutorial] Building Spring on Mac OS X
the "commander AI" is actually a startscript and put you against a NullAIthe commander AI doesn't build anything

So it is normal that it does not do anything.
RAI for BA. The Lua AIs that came with same games (zeroK, kernel panic, spring:1944) should work too.Will try downloading a few more and trying them, which normally work well?
Re: [Tutorial] Building Spring on Mac OS X
Error when compiling SpringRTS
Machine details:
Log file: http://pastebin.com/H5dCwAaN
Errors start with:
Just in case, here is the output of "port installed": http://pastebin.com/SzrP2KCW
Machine details:
Code: Select all
Model Name: MacBook Pro
Model Identifier: MacBookPro3,1
Processor Name: Intel Core 2 Duo
Processor Speed: 2.4 GHz
Number Of Processors: 1
Total Number Of Cores: 2
L2 Cache: 4 MB
Memory: 4 GB
Mac OS X version 10.6.8
Errors start with:
Code: Select all
/opt/local/var/macports/build/_opt_local_var_macports_sources_daftserve.dyndns.org_macports_games_springrts/springrts/work/spring_0.82.7.1/rts/System/Sound/IAudioChannel.cpp:1: error: CPU you selected does not support x86-64 instruction set
:info:build lipo: can't open input file: /var/tmp//ccX4GJ15.out (No such file or directory)
:info:build make[3]: *** [rts/System/Sound/CMakeFiles/sound.dir/IAudioChannel.cpp.o] Error 1
:info:build make[3]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_daftserve.dyndns.org_macports_games_springrts/springrts/work/spring_0.82.7.1'
:info:build make[2]: *** [rts/System/Sound/CMakeFiles/sound.dir/all] Error 2
:info:build make[2]: *** Waiting for unfinished jobs....
:info:build /opt/local/bin/cmake -E cmake_progress_report /opt/local/var/macports/build/_opt_local_var_macports_sources_daftserve.dyndns.org_macports_games_springrts/springrts/work/spring_0.82.7.1/CMakeFiles
:info:build [ 0%] Building CXX object rts/lib/oscpack/CMakeFiles/oscpack.dir/OscTypes.cpp.o
:info:build lipo: can't open input file: /var/tmp//ccJYVif7.out (No such file or directory)
:info:build cd