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

Author Topic: template app OK on 32 bits / crash on 64 bits  (Read 1634 times)

0 Members and 1 Guest are viewing this topic.

template

  • Newbie
  • *
  • Posts: 7
    • View Profile
    • Email
template app OK on 32 bits / crash on 64 bits
« on: May 20, 2014, 05:42:50 pm »
Hello,
opened the sfml app template Xcode Project with Xcode 4.6.3 in OSX 10.7 (macbook Pro 2008, 64 bits)
the build was OK with SFML 2.1 clang-universal installed.
The app could run when targeting a 32 bit architecture, with base sdk 10.7
But when targeting 64 bits or Standard, the run would issue :

dyld: Symbol not found: _OBJC_CLASS_$_NSObject
  Referenced from: /Users/me/Library/Developer/Xcode/DerivedData/tu-fpaxmpysdutavabjbdmdizvyttkh/Build/Products/Debug/tu.app/Contents/MacOS/../Frameworks/libsfml-window.2.dylib
  Expected in: /usr/lib/libobjc.A.dylib
 in /Users/me/Library/Developer/Xcode/DerivedData/tu-fpaxmpysdutavabjbdmdizvyttkh/Build/Products/Debug/tu.app/Contents/MacOS/../Frameworks/libsfml-window.2.dylib
(lldb)

Any idea ?

Thanks

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: template app OK on 32 bits / crash on 64 bits
« Reply #1 on: May 20, 2014, 06:32:02 pm »
I honestly don't know what's going on here. I tried 2.1 in a VM running 10.7, got pretty much the same issue (I got it with 32bit, not 64bit). But (in the same VM) with last source from github there is no issue. What change fix that? Dunno.

So I wouldn't worry too much. When 2.2 is release you should be able to update your system without too much trouble.
SFML / OS X developer

template

  • Newbie
  • *
  • Posts: 7
    • View Profile
    • Email
Re: template app OK on 32 bits / crash on 64 bits
« Reply #2 on: May 20, 2014, 09:42:43 pm »
Strangely enough, I tried to build sfml with cmake, and he message I got is : SFML doesn't support 32 bit on
  Mac OS X. This advice is written in the Cmakelists.txt file itself.

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: template app OK on 32 bits / crash on 64 bits
« Reply #3 on: May 20, 2014, 10:14:56 pm »
SFML / OS X developer

template

  • Newbie
  • *
  • Posts: 7
    • View Profile
    • Email
Re: template app OK on 32 bits / crash on 64 bits
« Reply #4 on: May 20, 2014, 10:31:26 pm »
So sorry if I don't get all the picture - I'm not a git hero, but according to the cmakelists.txt file, SFML is not 32 bits-compatible, so why , on the contrary, can I only build for 32 bits and not for 64 ?

template

  • Newbie
  • *
  • Posts: 7
    • View Profile
    • Email
Re: template app OK on 32 bits / crash on 64 bits
« Reply #5 on: May 20, 2014, 11:10:17 pm »
OK, sfml seems to be installed now with cmake.
 I issued this commands  :
cmake -G 'Unix Makefiles' -DCMAKE_OSX_ARCHITECTURES='x86_64'  -DSFML_INSTALL_XCODE4_TEMPLATES='ON' -DCMAKE_OSX_SYSROOT=/Developer/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk -DCMAKE_OSX_DEPLOYMENT_TARGET=10.7

(it would not work if arch was set also to i386. Sysroot and Target were to be set at 10.7)

But now I can't compile anymore, even for 32 bits. Don't know how to get this SFML lib working back again.

Thanks

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: template app OK on 32 bits / crash on 64 bits
« Reply #6 on: May 21, 2014, 10:07:27 am »
Having only 64 bit build is a temporary modification that will be reverted when #601 is merged into master branch. In the meantime, you can git checkout ac28902b57094518e40b138b691b91f0f8004604, which will select the last commit before this modification was introduced into master branch.

If you do that you can build SFML with CMAKE_OSX_ARCHITECTURES="i386;x86_64". When creating your project you might (I'm not sure if it apply to this state of master branch) have to go into the build settings and modify the architectures settings to universal build.
SFML / OS X developer

 

anything