project-navigation
Personal tools

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - ponkan

Pages: [1]
1
Mac / scratch compilation: game.dylib not found by binary, but it's there
« on: November 14, 2010, 11:24:16 pm »
Compiling the 2.4 dev code, finally got it to compile all the way. ./configure && make && make install worked and I have /usr/local/bin/ufo running. Splash screen, intro video, campaign briefing all work. Geoscape looks great, everything works the same as the official 2.3 build until I try to enter a battle, and nothing happens. Console output says this:

Code: [Select]
------- Loading game.dylib -------
not found at '/usr/local/lib'
not found at '/Users/andrea/Documents/UFOAI-2.4-dev/base'
not found at './base'
not found at '/usr/local/games/ufoai/base'
********************
ERROR: failed to load game library
********************


This is despite the fact that it's right there, and I even ran a file commant to verify that it's a library:

Code: [Select]
andrea-10:ufoai andrea$ ls /usr/local/games/ufoai/base
0base.pk3 0media.pk3 0pics.pk3 0textures.pk3 game.dylib
0maps.pk3 0models.pk3 0shaders.pk3 0ufos.pk3 i18n
0materials.pk3 0music.pk3 0snd.pk3 0videos.pk3

andrea-10:ufoai andrea$ file /usr/local/games/ufoai/base/game.dylib
/usr/local/games/ufoai/base/game.dylib: Mach-O dynamically linked shared library i386

I'm running a make macinstaller right now to test whether I'll get this issue in the .app version as well, but it's taking a while and I'd really like to have a working unpackaged binary if possible.

EDIT: make macinstaller failed with:

Code: [Select]
Finalizing ufomodel...
done
(Q)@cp README /Users/andrea/build/ufoai/contrib/installer/mac/ufoai-2.4-dev-macosx-universal
/bin/sh: -c: line 0: syntax error near unexpected token `@cp'
/bin/sh: -c: line 0: `(Q)@cp README /Users/andrea/build/ufoai/contrib/installer/mac/ufoai-2.4-dev-macosx-universal'
make: *** [copynotes-ufoai] Error 2

Apparently build/mac_installer.mk has this section:

Code: [Select]
copynotes-ufoai: package-dir-ufoai
        (Q)@cp README $(MAC_INST_DIR)/$(UFOAI_MAC_PACKAGE_NAME)
        $(Q)cp COPYING $(MAC_INST_DIR)/$(UFOAI_MAC_PACKAGE_NAME)

I'm guessing that's not right so I'm editing it and trying again.

2
First of all, I would like to thank all the developers for the amazing job they've done on the game so far. I stumbled upon it looking for some information on X-COM:TFTD, and it's been a blast playing it these few weeks.

So I tried to compile the svn version since I had heard such good things about the 2.3 branch. The UFOAI.app file prepared by make bundle errors out when opening, though the binary itself executes fine when I go down to the root directory and fire up ./ufo +set vid_fullscreen 1. This is the specific error I get when trying to open the bundle through the command line:
Code: [Select]
andreas-computer:~/src/ufoai/trunk/src/ports/macosx/installer andrea$ open UFOAI.app/
2008-05-08 03:37:58.717 open[15847] LSOpenFromURLSpec() returned -10827 for application (null) urls file://localhost/Users/andrea/src/ufoai/trunk/src/ports/macosx/installer/UFOAI.app/.

This is under a Macbook Pro 2.4GHz running Mac OS 10.4, if it's relevant. The way I got the application bundle was through the standard ./configure CPPFLAGS="-I/sw/include/" LDFLAGS="-L/sw/lib", make, make lang, make maps, sh archives.sh (in base), make bundle TARGET_CPU=i386.

The first time I ran make bundle I got this output, I noticed several permission denied errors, so I reran the command under sudo, which produced clean output that time, but in either case the bundle gave me the same error. Here's the output of the first make bundle:
Code: [Select]
../../../../base/0base.pk3 -> UFOAI.app/base/0base.pk3
../../../../base/0snd.pk3 -> UFOAI.app/base/0snd.pk3
../../../../base/0pics.pk3 -> UFOAI.app/base/0pics.pk3
../../../../base/0music.pk3 -> UFOAI.app/base/0music.pk3
../../../../base/0models.pk3 -> UFOAI.app/base/0models.pk3
../../../../base/0media.pk3 -> UFOAI.app/base/0media.pk3
../../../../base/0materials.pk3 -> UFOAI.app/base/0materials.pk3
../../../../base/0maps.pk3 -> UFOAI.app/base/0maps.pk3
../../../../base/0ufos.pk3 -> UFOAI.app/base/0ufos.pk3
Installing /opt/local/lib/libcrypto.0.9.8.dylib...install_name_tool: can't open input file: UFOAI.app/Contents/Libraries/libcrypto.0.9.8.dylib for writing (Permission denied)
install_name_tool: can't lseek to offset: 4096 in file: UFOAI.app/Contents/Libraries/libcrypto.0.9.8.dylib for writing (Bad file descriptor)
install_name_tool: can't write new headers in file: UFOAI.app/Contents/Libraries/libcrypto.0.9.8.dylib (Bad file descriptor)
install_name_tool: can't lseek to offset: 1413120 in file: UFOAI.app/Contents/Libraries/libcrypto.0.9.8.dylib for writing (Bad file descriptor)
install_name_tool: can't write new headers in file: UFOAI.app/Contents/Libraries/libcrypto.0.9.8.dylib (Bad file descriptor)
install_name_tool: can't close written on input file: UFOAI.app/Contents/Libraries/libcrypto.0.9.8.dylib (Bad file descriptor)
install_name_tool: can't open input file: UFOAI.app/Contents/Libraries/libcrypto.0.9.8.dylib for writing (Permission denied)
install_name_tool: can't lseek to offset: 4096 in file: UFOAI.app/Contents/Libraries/libcrypto.0.9.8.dylib for writing (Bad file descriptor)
install_name_tool: can't write new headers in file: UFOAI.app/Contents/Libraries/libcrypto.0.9.8.dylib (Bad file descriptor)
install_name_tool: can't lseek to offset: 1413120 in file: UFOAI.app/Contents/Libraries/libcrypto.0.9.8.dylib for writing (Bad file descriptor)
install_name_tool: can't write new headers in file: UFOAI.app/Contents/Libraries/libcrypto.0.9.8.dylib (Bad file descriptor)
install_name_tool: can't close written on input file: UFOAI.app/Contents/Libraries/libcrypto.0.9.8.dylib (Bad file descriptor)
done
Installing /sw/lib/libpng.3.dylib...done
Installing @executable_path/../Frameworks/SDL_ttf.framework/Versions/A/SDL_ttf...done
Installing /opt/local/lib/libssl.0.9.8.dylib...install_name_tool: can't open input file: UFOAI.app/Contents/Libraries/libssl.0.9.8.dylib for writing (Permission denied)
install_name_tool: can't lseek to offset: 4096 in file: UFOAI.app/Contents/Libraries/libssl.0.9.8.dylib for writing (Bad file descriptor)
install_name_tool: can't write new headers in file: UFOAI.app/Contents/Libraries/libssl.0.9.8.dylib (Bad file descriptor)
install_name_tool: can't lseek to offset: 294912 in file: UFOAI.app/Contents/Libraries/libssl.0.9.8.dylib for writing (Bad file descriptor)
install_name_tool: can't write new headers in file: UFOAI.app/Contents/Libraries/libssl.0.9.8.dylib (Bad file descriptor)
install_name_tool: can't close written on input file: UFOAI.app/Contents/Libraries/libssl.0.9.8.dylib (Bad file descriptor)
install_name_tool: can't open input file: UFOAI.app/Contents/Libraries/libssl.0.9.8.dylib for writing (Permission denied)
install_name_tool: can't lseek to offset: 4096 in file: UFOAI.app/Contents/Libraries/libssl.0.9.8.dylib for writing (Bad file descriptor)
install_name_tool: can't write new headers in file: UFOAI.app/Contents/Libraries/libssl.0.9.8.dylib (Bad file descriptor)
install_name_tool: can't lseek to offset: 294912 in file: UFOAI.app/Contents/Libraries/libssl.0.9.8.dylib for writing (Bad file descriptor)
install_name_tool: can't write new headers in file: UFOAI.app/Contents/Libraries/libssl.0.9.8.dylib (Bad file descriptor)
install_name_tool: can't close written on input file: UFOAI.app/Contents/Libraries/libssl.0.9.8.dylib (Bad file descriptor)
install_name_tool: can't open input file: UFOAI.app/Contents/Libraries/libssl.0.9.8.dylib for writing (Permission denied)
install_name_tool: can't lseek to offset: 4096 in file: UFOAI.app/Contents/Libraries/libssl.0.9.8.dylib for writing (Bad file descriptor)
install_name_tool: can't write new headers in file: UFOAI.app/Contents/Libraries/libssl.0.9.8.dylib (Bad file descriptor)
install_name_tool: can't lseek to offset: 294912 in file: UFOAI.app/Contents/Libraries/libssl.0.9.8.dylib for writing (Bad file descriptor)
install_name_tool: can't write new headers in file: UFOAI.app/Contents/Libraries/libssl.0.9.8.dylib (Bad file descriptor)
install_name_tool: can't close written on input file: UFOAI.app/Contents/Libraries/libssl.0.9.8.dylib (Bad file descriptor)
done
Installing /sw/lib/libjpeg.62.dylib...done
Installing /sw/lib/libintl.3.dylib...done
Installing @executable_path/../Frameworks/SDL_mixer.framework/Versions/A/SDL_mixer...done
Installing /opt/local/lib/libz.1.dylib...done
Installing /usr/lib/libcurl.4.dylib...done
Installing /sw/lib/libiconv.2.dylib...done
Installing @executable_path/../Frameworks/SDL.framework/Versions/A/SDL...done
Finalizing ufo...done
Finalizing ufoded...done
Finalizing ufo2map...done
andreas-computer:~/src/ufoai/trunk/src/ports/macosx/installer andrea$

Could the case be that I have bad libraries? They're from MacPorts, it's the only thing touching the /opt tree. What I don't understand is why it's getting any files from there when I explicitly told configure to search under /sw?

Any insight on how to resolve this problem would be much appreciated.

EDIT: I've successfully done it on 2.2.1, though that was before I installed MacPorts. Should I just remove all MacPorts packages altogether? I had been hoping to make a universal dmg for 2.2.1, but that didn't work either, don't know why. The working 2.2.1 version I have is just i386, from before I installed MacPorts.

Pages: [1]