nickm Posted August 16, 2012 Report Share Posted August 16, 2012 Hello, I've been experiencing a bug where the game crashes every time I try to move the screen around ingame (version r11863). I figured that I might be able to get rid of the problem by building the game from the SVN source. However, when I run ./update-workspaces.sh I always get this:readlink: illegal option -- fusage: readlink [-n] [file ...]Updating bundled third-party dependencies...bash -c 'mkdir -p output/{debug,release,test}/{FCollada/{FCDocument,FMath,FUtils,FColladaTest/{FCTestAssetManagement,FCTestExportImport,FCTestXRef}},FColladaPlugins/FArchiveXML}'cp output/libFColladaSD.a ../lib/libFColladaSD.acp output/libFColladaSR.a ../lib/libFColladaSR.aSpiderMonkey is already up to dateBuilding NVTT...-- Setting optimal options-- Processor: i386-- Compiler Flags: -- Looking for OpenGL - found-- Looking for GLUT - found-- Looking for DirectX - not found-- Looking for GLEW - not found-- Looking for Cg - not found-- Looking for CUDA - not found-- Looking for Maya - not found-- Looking for JPEG - found-- Looking for PNG - found-- Looking for TIFF - found-- Looking for OpenEXR - not found-- Use thread library: -lpthread-- Configuring done-- Generating doneCMake Warning: Manually-specified variables were not used by the project: BINDIR CG CUDA GLEW GLUT LIBDIR OPENEXR-- Build files have been written to: /Users/Nic/0ad/libraries/nvtt/src/build[ 13%] Linking CXX shared library libnvcore.dylibBuilt target squish[ 16%] Built target posh[ 32%] Built target nvcoreLinking CXX shared library libnvmath.dylib[ 46%] Built target nvmathLinking CXX shared library libnvimage.dylibld: warning: ignoring file /usr/local/lib/libpng.dylib, file was built for unsupported file format which is not the architecture being linked (x86_64)Undefined symbols for architecture x86_64: "_png_create_read_struct", referenced from: nv::ImageIO::loadPNG(nv::Stream&) in ImageIO.cpp.o "_png_create_info_struct", referenced from: nv::ImageIO::loadPNG(nv::Stream&) in ImageIO.cpp.o "_png_destroy_read_struct", referenced from: nv::ImageIO::loadPNG(nv::Stream&) in ImageIO.cpp.o "_png_set_longjmp_fn", referenced from: nv::ImageIO::loadPNG(nv::Stream&) in ImageIO.cpp.o "_png_set_read_fn", referenced from: nv::ImageIO::loadPNG(nv::Stream&) in ImageIO.cpp.o "_png_read_info", referenced from: nv::ImageIO::loadPNG(nv::Stream&) in ImageIO.cpp.o "_png_get_IHDR", referenced from: nv::ImageIO::loadPNG(nv::Stream&) in ImageIO.cpp.o "_png_set_expand", referenced from: nv::ImageIO::loadPNG(nv::Stream&) in ImageIO.cpp.o "_png_get_valid", referenced from: nv::ImageIO::loadPNG(nv::Stream&) in ImageIO.cpp.o "_png_set_packing", referenced from: nv::ImageIO::loadPNG(nv::Stream&) in ImageIO.cpp.o "_png_set_strip_16", referenced from: nv::ImageIO::loadPNG(nv::Stream&) in ImageIO.cpp.o "_png_set_gray_to_rgb", referenced from: nv::ImageIO::loadPNG(nv::Stream&) in ImageIO.cpp.o "_png_set_filler", referenced from: nv::ImageIO::loadPNG(nv::Stream&) in ImageIO.cpp.o "_png_get_sRGB", referenced from: nv::ImageIO::loadPNG(nv::Stream&) in ImageIO.cpp.o "_png_get_gAMA", referenced from: nv::ImageIO::loadPNG(nv::Stream&) in ImageIO.cpp.o "_png_set_gamma", referenced from: nv::ImageIO::loadPNG(nv::Stream&) in ImageIO.cpp.o "_png_read_update_info", referenced from: nv::ImageIO::loadPNG(nv::Stream&) in ImageIO.cpp.o "_png_read_image", referenced from: nv::ImageIO::loadPNG(nv::Stream&) in ImageIO.cpp.o "_png_read_end", referenced from: nv::ImageIO::loadPNG(nv::Stream&) in ImageIO.cpp.o "_png_get_io_ptr", referenced from: user_read_data(png_struct_def*, unsigned char*, unsigned long)in ImageIO.cpp.o "_png_error", referenced from: user_read_data(png_struct_def*, unsigned char*, unsigned long)in ImageIO.cpp.old: symbol(s) not found for architecture x86_64collect2: ld returned 1 exit statusmake[3]: *** [src/nvimage/libnvimage.dylib] Error 1make[2]: *** [src/nvimage/CMakeFiles/nvimage.dir/all] Error 2make[1]: *** [src/nvtt/CMakeFiles/nvtt.dir/rule] Error 2make: *** [nvtt] Error 2ERROR: NVTT build failedI've tried upgrading my libpng with macports and homebrew, same results. I've also tried building with the latest Nvidia Texture Tool, again same. However that's about where my debugging skills end. Does anybody have any suggestions? I've looked at Quacker's thread, it was similar to my issue but I've been unable to get past the libpng error. Here's my system info if it helps:OS : Darwin 11.0.0 (Darwin Kernel Version 11.0.0: Sat Jun 18 12:56:35 PDT 2011; root:xnu-1699.22.73~1/RELEASE_X86_64)CPU : x86_64, Intel Core2 Duo P8600 @ 2.40GHz (1x2x1), 2.39 GHzMemory : 2048 MiB; 1625 MiB freeGraphics Card : NVIDIA NVIDIA GeForce 320M OpenGL EngineOpenGL Drivers : 2.1 NVIDIA-7.2.9; OpenGL 2.1 NVIDIA-7.2.9Video Mode : 1280x800:32 Thanks! Quote Link to comment Share on other sites More sharing options...
myconid Posted August 16, 2012 Report Share Posted August 16, 2012 I think that means you're linking a 64-bit binary to a 32-bit library. Have your package manager install the 64-bit libpng and it should work. Quote Link to comment Share on other sites More sharing options...
nickm Posted August 16, 2012 Author Report Share Posted August 16, 2012 Thanks for the reply but I'm pretty sure libpng is not the issue. libpng ships with OS X and it should be compatible. Still, I updated it with macports anyways. Here's my version of libpng:$ port -v installed libpngThe following ports are currently installed: libpng @1.4.12_0 (active) platform='darwin 11' archs='x86_64'Maybe I'm just having issues with my compiler. Gonna paste the below text into my .profile and reboot, then try and build. I'm going to cross my fingers and hope for the best export CC=/usr/bin/gcc-4.2export CPP=/usr/bin/cpp-4.2export CXX=/usr/bin/g++-4.2 Quote Link to comment Share on other sites More sharing options...
historic_bruno Posted August 16, 2012 Report Share Posted August 16, 2012 /usr/local/lib/libpng.dylib is not the OS X version of libpng, that's one provided by Mac Ports, and it's what is trying to be linked by NVTT. Also you didn't mention your version of OS X, but at least on Mountain Lion libpng is no longer included (since it was only included as part of X11). Quote Link to comment Share on other sites More sharing options...
nickm Posted August 16, 2012 Author Report Share Posted August 16, 2012 darn, failed again. I still think it's a compiler issue. Gonna poke around some more, will report back in a bit. Quote Link to comment Share on other sites More sharing options...
historic_bruno Posted August 16, 2012 Report Share Posted August 16, 2012 Which compiler are you using? (gcc --version) Do you have Xcode's command line tools installed, which version of Xcode? Apple has made this extra confusing recently, so it's quite possibly a compiler issue. Quote Link to comment Share on other sites More sharing options...
nickm Posted August 16, 2012 Author Report Share Posted August 16, 2012 (edited) @bruno, sorry I thought the system info had my OS X version number in there somewhere. I'm on 10.7.0 (lion). And I was having the same issue before I updated libpng to 1.4.12_0 with macports. I think the original one was 1.4.11.--edit--gcc --version:i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00)I was about to try and change it to a non-llvm version. Do you have a command that I could run in Terminal? Otherwise I'm just gonna dig into my usr/bin and replace the alias (not sure if this is the best way to do it).--edit--Downloading High Performance Computing's gcc-lion binary. Will install and re-try ./update-workspaces.sh. Edited August 16, 2012 by nickm Quote Link to comment Share on other sites More sharing options...
nickm Posted August 16, 2012 Author Report Share Posted August 16, 2012 Well that was disappointing. Installed gcc 4.8 from High Performance Computing and tested:$ gcc --versiongcc (GCC) 4.8.0 20120603 (experimental)Ran ./update-workspaces.sh again and same error. I'm gonna revert back to llvm and maybe I'll download the latest command line tools from apple later. Otherwise I'm pretty much out of ideas. Quote Link to comment Share on other sites More sharing options...
nickm Posted August 16, 2012 Author Report Share Posted August 16, 2012 Slightly off topic: that bug that I described where the game "crashes every time I try to move the screen around ingame" isn't quite accurate. It'll freeze within a second or two of moving the screen (i.e. pushing arrow keys) but if I just leave the game running for a minute it'll freeze up on its own. I end up killing the game by pushing cmd+option+escape (I was desperate and turns out this'll close the game, not sure if that's an actual key combo). Anyways, I'm gonna take a break for an hour. I'll check back on this thread later to see if anyone has any new ideas Quote Link to comment Share on other sites More sharing options...
historic_bruno Posted August 16, 2012 Report Share Posted August 16, 2012 What's the result of running "file /usr/local/lib/libpng.dylib"? Quote Link to comment Share on other sites More sharing options...
nickm Posted August 16, 2012 Author Report Share Posted August 16, 2012 $ file /usr/local/lib/libpng.dylib/usr/local/lib/libpng.dylib: data Quote Link to comment Share on other sites More sharing options...
historic_bruno Posted August 16, 2012 Report Share Posted August 16, 2012 That's weird, it should be a Mach-O type. It seems there was a problem building that library, assuming it even came from Mac Ports, I thought Mac Ports used /opt/local for it's files? Quote Link to comment Share on other sites More sharing options...
myconid Posted August 16, 2012 Report Share Posted August 16, 2012 Some odd suggestions, though note I don't own a Mac so I have no idea what I'm talking about.Maybe the Mac equivalent of ldd would give you more useful information. Looks like this might be it:otool -vf /usr/local/lib/libpng.dylibJust to see how many versions of the library you have, this may or may not help:locate libpng.dylibOn Linux this would give you a clue about what ld is thinking:ldconfig -v | grep libpngIt appears on Mac you can force the package manager to install all versions of a library with the +universal flag.Finally, there's this:It is unsupported to have software installed in /usr/local while using MacPorts because of interference like this. Please remove or rename /usr/local, "sudo port clean hatari", and then try again. Quote Link to comment Share on other sites More sharing options...
nickm Posted August 16, 2012 Author Report Share Posted August 16, 2012 Well those two posts were helpful. I figured that the compiler wasn't using macport's libpng for some reason, so I created a symlink from the libpng.dylib in /usr/local to /usr/bin. Kind of a messy way to do it but it worked! But now I have another issue. Shared library "libnvimage.dylib" builds now, but immediately following it I get an error with libnvtt.dylib. Linking CXX shared library libnvtt.dylibUndefined symbols for architecture x86_64: "nv::mem::malloc(unsigned long)", referenced from: nvtt::Compressor::Compressor()in Compressor.cpp.o nvtt::Compressor::Private::processInputImage(nvtt::Mipmap&, nvtt::InputOptions::Private const&) constin Compressor.cpp.o nvtt::Compressor::enableCudaAcceleration(bool) in Compressor.cpp.o nvtt::Compressor::Compressor()in Compressor.cpp.o nvtt::Mipmap::asMutableFixedImage() in Compressor.cpp.o nvtt::Mipmap::toFloatImage(nvtt::InputOptions::Private const&)in Compressor.cpp.o nv::compressRGB(nv::Image const*, nvtt::OutputOptions::Private const&, nvtt::CompressionOptions::Private const&)in CompressRGB.cpp.o ... "nv::mem::free(void const*)", referenced from: nvtt::Compressor::Private::processInputImage(nvtt::Mipmap&, nvtt::InputOptions::Private const&) constin Compressor.cpp.o nvtt::Compressor::Private::scaleMipmap(nvtt::Mipmap&, nvtt::InputOptions::Private const&, unsigned int, unsigned int, unsigned int) constin Compressor.cpp.o nvtt::Compressor::Private::downsampleMipmap(nvtt::Mipmap&, nvtt::InputOptions::Private const&) constin Compressor.cpp.o nvtt::Compressor::Private::initMipmap(nvtt::Mipmap&, nvtt::InputOptions::Private const&, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int) constin Compressor.cpp.o nvtt::Compressor::enableCudaAcceleration(bool) in Compressor.cpp.o nvtt::Compressor::~Compressor()in Compressor.cpp.o nvtt::Compressor::~Compressor()in Compressor.cpp.o ...ld: symbol(s) not found for architecture x86_64collect2: ld returned 1 exit statusmake[3]: *** [src/nvtt/libnvtt.dylib] Error 1make[2]: *** [src/nvtt/CMakeFiles/nvtt.dir/all] Error 2make[1]: *** [src/nvtt/CMakeFiles/nvtt.dir/rule] Error 2make: *** [nvtt] Error 2ERROR: NVTT build failedDoesn't look like a problem with any external libraries this time, but it's the same error. I have no clue what could be causing it this time though. Quote Link to comment Share on other sites More sharing options...
myconid Posted August 16, 2012 Report Share Posted August 16, 2012 Could it be using the C compiler to compile C++? I guess that could cause linker errors like those.Other than that, I have no idea. To be thorough, close your terminal and re-open it, to get rid of any weird variables. Then clean-workspaces, update-workspaces and start over. Quote Link to comment Share on other sites More sharing options...
nickm Posted August 16, 2012 Author Report Share Posted August 16, 2012 (edited) Thanks myconid, cleaning the workspace got rid of that weird error. Don't know why I didn't think of that And to clear up any confusion, I'm just trying to get through update-workspaces.The 'Building spidermonkey' stage complained about my gcc and g++ compilers so I opted for my HPC compilers instead of llvm:export CC=/usr/local/bin/gccexport CXX=/usr/local/bin/g++Works perfectly. However I'm getting another weird error:checking for 64-bit OS... yeschecking for Python version >= 2.5 but not 3.x... yeschecking for -dead_strip option to ld... nochecking for ANSI C header files... nochecking for working const... nochecking for mode_t... yeschecking for off_t... yeschecking for pid_t... yeschecking for size_t... yeschecking for __stdcall... nochecking for ssize_t... nochecking for st_blksize in struct stat... nochecking for siginfo_t... nochecking for stdint.h... yeschecking for the size of void*... configure: error: No size found for void*ERROR: SpiderMonkey build failedVoid*? anyone know that that is? I cleaned the workspace again after I got this error but nothing changed. Edited August 16, 2012 by nickm Quote Link to comment Share on other sites More sharing options...
historic_bruno Posted August 16, 2012 Report Share Posted August 16, 2012 I think your build environment is slightly confusing or confused. It's quite possible to build the game on Lion with Apple's llvm-gcc, the only thing you have to do is define CC=gcc and CXX=g++ before update-workspaces.sh, since Spidermonkey's config script defaults to looking for gcc-4.2. I wouldn't go mixing compilers at each step though, just pick one (preferably Apple's latest command line tools for Xcode) and do a clean build. Quote Link to comment Share on other sites More sharing options...
nickm Posted August 16, 2012 Author Report Share Posted August 16, 2012 Well bruno, I didn't think that would work seeing as they are my defaults anyways but I went ahead and ran this:export CC=gccexport CXX=g++Spidermonkey was already compiled under my HPC compilers, so the script skipped over it. Everything else worked fine. I opened pyrogenesis.xcodeproj and ran pyrogenesis. I didn't get any compile errors but text rendering is awful, as well as most of the menus. I'm getting yellow/green artifacts everywhere. When I ran a match none of the meshes loaded and I got a empty map. I know I downloaded the bleeding edge source but I guess I sort of expected it to be at least somewhat playable. Oh well, at least I got it to compile. I guess I'll just go file a bug report regarding my initial problem. And yeah bruno, my build environment is both confusing and confused. I think I have around three or four gcc compilers now Quote Link to comment Share on other sites More sharing options...
Echelon9 Posted August 17, 2012 Report Share Posted August 17, 2012 i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00)LLVM build 2336.1.00 was from around Xcode 4.1 (a little old now). While Apple keep pushing the accelerating update process, can you check there isn't an update to Xcode suggested to you? Quote Link to comment Share on other sites More sharing options...
nickm Posted August 17, 2012 Author Report Share Posted August 17, 2012 Yep I'm still using Xcode 4.2. I'm planning on updating someday, but I keep putting it off since its a pretty massive download. Quote Link to comment Share on other sites More sharing options...
myconid Posted August 17, 2012 Report Share Posted August 17, 2012 I know I downloaded the bleeding edge source but I guess I sort of expected it to be at least somewhat playable. Oh well, at least I got it to compile. I guess I'll just go file a bug report regarding my initial problem.It may bleeding edge, but it should still be reasonably usable - as was Alpha 10, for that matter. What you are describing shouldn't ever happen on a stable system... Check you have the latest drivers, check the game is linking to the right drivers, check your opengl is working correctly (as opposed to software emulation). Quote Link to comment Share on other sites More sharing options...
historic_bruno Posted August 17, 2012 Report Share Posted August 17, 2012 Yep I'm still using Xcode 4.2. I'm planning on updating someday, but I keep putting it off since its a pretty massive download.Just so you know, between Xcode 4.1 and 4.3 there have been significant changes. Whereas before the command line tools were bundled with Xcode, now it's a separated ~160MB download available through Xcode preferences (or you can download them freely from ADC if you have an Apple ID, but I would recommend using Xcode so it will properly integrate). I think 4.2 is late enough that GCC was no longer bundled, but if say, you upgraded from an earlier version, then you might have fragments of GCC around in addition to LLVM. The process could be even more confusing if you upgraded from Snow Leopard. Also, installing a new Xcode won't clean up the old pre-4.3 developer tools (in e.g. /Developer) nor will removing the old app bundle, so you'll have to run the dev tools uninstall script - I would do that before upgrading. One nice thing about upgrading is that Xcode updates are now incremental, instead of requiring a new 3GB download every time, you can upgrade components via download preferences.Also if you'd like to try Git and have an itch for a decent OS X build environment for the game, I've been working on a Github fork. I use it to build the official app bundles we distribute. I'd love to know how it handles your build environment at any rate and if the graphical defects disappear, as other people report similar problems when using Mac Ports and Homebrew, but not with our bundles, so I'm also inclined to blame a faulty build environment and the mercurial nature of Apple's dev tools. Quote Link to comment Share on other sites More sharing options...
nickm Posted August 18, 2012 Author Report Share Posted August 18, 2012 Oh man, I wish I had known there was an official OS X fork to begin with.. this would've been so much easier. Unfortunately I just got back home from vacation today and I'm back to my crappy 60kbs wireless broadband internet (250 mb/day cap). Sometime in the next few weeks I'll drop by the public library and I'll definitely check out those downloads. Thanks for all the advice guys, its a cool community you have here. Btw- I managed to delay the game crash I was getting by about 30 minutes by changing the render paths to "fixed" in default.cfg. Quote Link to comment Share on other sites More sharing options...
MishFTW Posted August 25, 2012 Report Share Posted August 25, 2012 Okay as recommedned, I checked out SVN r12525 earlier. I proceeded to follow the build instructions and during the first step (update-workspaces) FCollada build failed.Output:Last login: Sat Aug 25 13:17:34 on ttys000iMac:~ Geek$ cd /Users/Geek/0ad/build/workspacesiMac:workspaces Geek$ ./update-workspaces.sh -j3readlink: illegal option -- fusage: readlink [-n] [file ...]Updating bundled third-party dependencies...bash -c 'mkdir -p output/{debug,release,test}/{FCollada/{FCDocument,FMath,FUtils,FColladaTest/{FCTestAssetManagement,FCTestExportImport,FCTestXRef}},FColladaPlugins/FArchiveXML}'FCollada/FCollada.cppg++ -fvisibility=hidden -W -Wall -Wno-unused-parameter -Wno-unused-function -fPIC -fno-strict-aliasing -O0 -g -D_DEBUG -DRETAIL -IFCollada `pkg-config libxml-2.0 --cflags` -MD -MF output/debug/FCollada/FCollada.d -c FCollada/FCollada.cpp -o output/debug/FCollada/FCollada.oFCollada/FColladaPlugin.cppg++ -fvisibility=hidden -W -Wall -Wno-unused-parameter -Wno-unused-function -fPIC -fno-strict-aliasing -O0 -g -D_DEBUG -DRETAIL -IFCollada `pkg-config libxml-2.0 --cflags` -MD -MF output/debug/FCollada/FColladaPlugin.d -c FCollada/FColladaPlugin.cpp -o output/debug/FCollada/FColladaPlugin.oFCollada/FCDocument/FCDAnimated.cppg++ -fvisibility=hidden -W -Wall -Wno-unused-parameter -Wno-unused-function -fPIC -fno-strict-aliasing -O0 -g -D_DEBUG -DRETAIL -IFCollada `pkg-config libxml-2.0 --cflags` -MD -MF output/debug/FCollada/FCDocument/FCDAnimated.d -c FCollada/FCDocument/FCDAnimated.cpp -o output/debug/FCollada/FCDocument/FCDAnimated.o/bin/sh: pkg-config: command not found/bin/sh: pkg-config: command not found/bin/sh: pkg-config: command not foundIn file included from FCollada/FCollada.h:49, from FCollada/StdAfx.h:13, from FCollada/FColladaPlugin.cpp:9:FCollada/FUtils/FUtils.h:91:25: error: libxml/tree.h: No such file or directoryIn file included from FCollada/FCollada.h:49, from FCollada/StdAfx.h:13, from FCollada/FCDocument/FCDAnimated.cpp:15:FCollada/FUtils/FUtils.h:91:25: error: libxml/tree.h: No such file or directoryIn file included from FCollada/FCollada.h:49, from FCollada/StdAfx.h:13, from FCollada/FCollada.cpp:9:FCollada/FUtils/FUtils.h:91:25: error: libxml/tree.h: No such file or directoryIn file included from FCollada/FCDocument/FCDAnimated.cpp:20:FCollada/FCDocument/FCDAnimated.h:280: error: ‘xmlNode’ has not been declaredmake: *** [output/debug/FCollada/FCDocument/FCDAnimated.o] Error 1make: *** Waiting for unfinished jobs....make: *** [output/debug/FCollada/FCollada.o] Error 1make: *** [output/debug/FCollada/FColladaPlugin.o] Error 1ERROR: FCollada build failediMac:workspaces Geek$ Quote Link to comment Share on other sites More sharing options...
historic_bruno Posted August 25, 2012 Report Share Posted August 25, 2012 Hmm do you have Mac Ports installed? It says it's missing pkg-config, which should be included with Mac Ports. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.