Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Clean template i386 Architecture won't start  (Read 1655 times)

0 Members and 1 Guest are viewing this topic.

bryan800

  • Newbie
  • *
  • Posts: 2
    • View Profile
Clean template i386 Architecture won't start
« on: November 19, 2015, 09:34:43 am »
I just created a new SFML project using the template and changed the archtecture to i386. I tried both release and debug config and also a new project using cmake.

#The error after compiling:

dyld`dyld_fatal_error:
0x8fe01084 <+0>: int3

-> 0x8fe01085 <+1>: nop

#Console output:

dyld: Library not loaded: /Users/m/Prog/Projects/SFML/build_deps/libvorbis-1.3.4/build/1.3.4//i386/root/lib/libvorbis.0.dylib
Referenced from: /Users/user/Library/Developer/Xcode/DerivedData/GameDevelopment-amsiyeknecjdthfapvfranpkf/Build/Products/Release/GameDevelopment.app/Contents/Frameworks/vorbisenc.framework/Versions/A/vorbisenc
Reason: image not found

#My development setup
OSX 10.11.1
Xcode 7.1
SFML 2.3.2

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: Clean template i386 Architecture won't start
« Reply #1 on: November 20, 2015, 11:42:37 am »
I had to install a VM with 10.11 to reproduce it correctly. After digging a bit, it seems that the script I used to build the extlibs is slightly broken.

If you go to `/Library/Frameworks/vorbisenc.framework` and run `otool -L vorbisenc` you should see:
vorbisenc:
        @rpath/../Frameworks/vorbisenc.framework/Versions/A/vorbisenc (compatibility version 3.0.0, current version 3.10.0)
        @rpath/../Frameworks/vorbis.framework/Versions/A/vorbis (compatibility version 5.0.0, current version 5.7.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.1.0)
        @rpath/../Frameworks/ogg.framework/Versions/A/ogg (compatibility version 9.0.0, current version 9.2.0)
which looks fine. But if you specify the i386 arch you get something less promising:

$ otool -L -arch i386 vorbisenc
vorbisenc:
        @rpath/../Frameworks/vorbisenc.framework/Versions/A/vorbisenc (compatibility version 3.0.0, current version 3.10.0)
        /Users/m/Prog/Projects/SFML/build_deps/libvorbis-1.3.4/build/1.3.4//i386/root/lib/libvorbis.0.dylib (compatibility version 5.0.0, current version 5.7.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.1.0)
        /Users/m/Prog/Projects/SFML/build_deps/libogg-1.3.2/build/1.3.2//i386/root/lib/libogg.0.dylib (compatibility version 9.0.0, current version 9.2.0)

The problem is that `install_name_tool` is too dumb to change those references for all architectures when asked to. Unfortunately, `install_name_tool` doesn't have an `arch` parameter..

So I guess that the references should be modified before `lipo`is invoked.

I currently don't have time to investigate more and patch the script. Do you have the knowledge and time to do it yourself?
SFML / OS X developer

bryan800

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Clean template i386 Architecture won't start
« Reply #2 on: November 21, 2015, 03:22:06 pm »
Thank you very much for the information and your time to investigate this issue.

I will try to fix this but I'm just a student who build a game for the first time for a school project.

If I found a solution I will post it.