project-navigation
Personal tools

Author Topic: scratch compilation: game.dylib not found by binary, but it's there  (Read 3254 times)

Offline ponkan

  • Rookie
  • ***
  • Posts: 20
    • View Profile
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.
« Last Edit: November 15, 2010, 12:08:27 am by ponkan »

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: scratch compilation: game.dylib not found by binary, but it's there
« Reply #1 on: November 15, 2010, 08:11:44 am »
thanks for reporting the installer target error - it's fixed in the latest version.

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: scratch compilation: game.dylib not found by binary, but it's there
« Reply #2 on: November 15, 2010, 08:20:31 am »
please try to start with: ./ufo +set developer 1

you should see some more output for the game.dylib loading then. maybe it helps.