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

Author Topic: Xcode CMake Post Build Rules Error  (Read 3241 times)

0 Members and 1 Guest are viewing this topic.

Gan

  • Jr. Member
  • **
  • Posts: 98
    • View Profile
Xcode CMake Post Build Rules Error
« on: February 01, 2013, 03:01:06 am »
Just got the latest snapshot, generated the Xcode files specified towards Frameworks, Examples and Xcode Templates. Opened the Xcode file, hit build and got this error:


Full Text:
Quote
SymLink "/Users/matthew/Desktop/SFML 2.0/Debug/SFML.framework/Versions/Current" 2.0.0
    cd /Users/matthew/Desktop/LaurentGomila-SFML-f3d2129
    /bin/ln -sf 2.0.0 "/Users/matthew/Desktop/SFML 2.0/Debug/SFML.framework/Versions/Current"

SymLink "/Users/matthew/Desktop/SFML 2.0/Debug/SFML.framework/Resources" Versions/Current/Resources
    cd /Users/matthew/Desktop/LaurentGomila-SFML-f3d2129
    /bin/ln -sf Versions/Current/Resources "/Users/matthew/Desktop/SFML 2.0/Debug/SFML.framework/Resources"

SymLink "/Users/matthew/Desktop/SFML 2.0/Debug/SFML.framework/Headers" Versions/Current/Headers
    cd /Users/matthew/Desktop/LaurentGomila-SFML-f3d2129
    /bin/ln -sf Versions/Current/Headers "/Users/matthew/Desktop/SFML 2.0/Debug/SFML.framework/Headers"

SymLink "/Users/matthew/Desktop/SFML 2.0/Debug/SFML.framework/SFML" Versions/Current/SFML
    cd /Users/matthew/Desktop/LaurentGomila-SFML-f3d2129
    /bin/ln -sf Versions/Current/SFML "/Users/matthew/Desktop/SFML 2.0/Debug/SFML.framework/SFML"

ProcessInfoPlistFile "/Users/matthew/Desktop/SFML 2.0/Debug/SFML.framework/Versions/2.0.0/Resources/Info.plist" "/Users/matthew/Desktop/SFML 2.0/CMakeFiles/SFML.dir/Info.plist"
    cd /Users/matthew/Desktop/LaurentGomila-SFML-f3d2129
    builtin-infoPlistUtility "/Users/matthew/Desktop/SFML 2.0/CMakeFiles/SFML.dir/Info.plist" -expandbuildsettings -platform macosx -o "/Users/matthew/Desktop/SFML 2.0/Debug/SFML.framework/Versions/2.0.0/Resources/Info.plist"

PhaseScriptExecution "CMake Rules" "/Users/matthew/Desktop/SFML 2.0/SFML.build/Debug/SFML.build/Script-14CE40DF018649A28B0AA75A.sh"
    cd /Users/matthew/Desktop/LaurentGomila-SFML-f3d2129
    /bin/sh -c "\"/Users/matthew/Desktop/SFML 2.0/SFML.build/Debug/SFML.build/Script-14CE40DF018649A28B0AA75A.sh\""

touch /Users/matthew/Desktop/SFML\ 2.0/dummy.cpp

CpHeader include/SFML/Audio.hpp "/Users/matthew/Desktop/SFML 2.0/Debug/SFML.framework/Versions/2.0.0/Headers/Audio.hpp"
    cd /Users/matthew/Desktop/LaurentGomila-SFML-f3d2129
    builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -strip-debug-symbols -strip-tool /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip -resolve-src-symlinks /Users/matthew/Desktop/LaurentGomila-SFML-f3d2129/include/SFML/Audio.hpp "/Users/matthew/Desktop/SFML 2.0/Debug/SFML.framework/Versions/2.0.0/Headers"

CpHeader include/SFML/Config.hpp "/Users/matthew/Desktop/SFML 2.0/Debug/SFML.framework/Versions/2.0.0/Headers/Config.hpp"
    cd /Users/matthew/Desktop/LaurentGomila-SFML-f3d2129
    builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -strip-debug-symbols -strip-tool /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip -resolve-src-symlinks /Users/matthew/Desktop/LaurentGomila-SFML-f3d2129/include/SFML/Config.hpp "/Users/matthew/Desktop/SFML 2.0/Debug/SFML.framework/Versions/2.0.0/Headers"

CpHeader include/SFML/Graphics.hpp "/Users/matthew/Desktop/SFML 2.0/Debug/SFML.framework/Versions/2.0.0/Headers/Graphics.hpp"
    cd /Users/matthew/Desktop/LaurentGomila-SFML-f3d2129
    builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -strip-debug-symbols -strip-tool /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip -resolve-src-symlinks /Users/matthew/Desktop/LaurentGomila-SFML-f3d2129/include/SFML/Graphics.hpp "/Users/matthew/Desktop/SFML 2.0/Debug/SFML.framework/Versions/2.0.0/Headers"

CpHeader include/SFML/Network.hpp "/Users/matthew/Desktop/SFML 2.0/Debug/SFML.framework/Versions/2.0.0/Headers/Network.hpp"
    cd /Users/matthew/Desktop/LaurentGomila-SFML-f3d2129
    builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -strip-debug-symbols -strip-tool /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip -resolve-src-symlinks /Users/matthew/Desktop/LaurentGomila-SFML-f3d2129/include/SFML/Network.hpp "/Users/matthew/Desktop/SFML 2.0/Debug/SFML.framework/Versions/2.0.0/Headers"

CpHeader include/SFML/OpenGL.hpp "/Users/matthew/Desktop/SFML 2.0/Debug/SFML.framework/Versions/2.0.0/Headers/OpenGL.hpp"
    cd /Users/matthew/Desktop/LaurentGomila-SFML-f3d2129
    builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -strip-debug-symbols -strip-tool /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip -resolve-src-symlinks /Users/matthew/Desktop/LaurentGomila-SFML-f3d2129/include/SFML/OpenGL.hpp "/Users/matthew/Desktop/SFML 2.0/Debug/SFML.framework/Versions/2.0.0/Headers"

CpHeader include/SFML/System.hpp "/Users/matthew/Desktop/SFML 2.0/Debug/SFML.framework/Versions/2.0.0/Headers/System.hpp"
    cd /Users/matthew/Desktop/LaurentGomila-SFML-f3d2129
    builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -strip-debug-symbols -strip-tool /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip -resolve-src-symlinks /Users/matthew/Desktop/LaurentGomila-SFML-f3d2129/include/SFML/System.hpp "/Users/matthew/Desktop/SFML 2.0/Debug/SFML.framework/Versions/2.0.0/Headers"

CpHeader include/SFML/Window.hpp "/Users/matthew/Desktop/SFML 2.0/Debug/SFML.framework/Versions/2.0.0/Headers/Window.hpp"
    cd /Users/matthew/Desktop/LaurentGomila-SFML-f3d2129
    builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -strip-debug-symbols -strip-tool /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip -resolve-src-symlinks /Users/matthew/Desktop/LaurentGomila-SFML-f3d2129/include/SFML/Window.hpp "/Users/matthew/Desktop/SFML 2.0/Debug/SFML.framework/Versions/2.0.0/Headers"

CompileC "/Users/matthew/Desktop/SFML 2.0/SFML.build/Debug/SFML.build/Objects-normal/x86_64/dummy.o" "../SFML 2.0/dummy.cpp" normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
    cd /Users/matthew/Desktop/LaurentGomila-SFML-f3d2129
    setenv LANG en_US.US-ASCII
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c++ -arch x86_64 -fmessage-length=0 -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-return-type -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wformat -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wno-unused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-enum-conversion -Wno-shorten-64-to-32 -Wno-newline-eof -Wno-c++11-extensions "-DCMAKE_INTDIR=\"Debug\"" -DSFML_EXPORTS -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -fasm-blocks -fstrict-aliasing -Wdeprecated-declarations -Winvalid-offsetof -mmacosx-version-min=10.8 -g -Wno-sign-conversion "-I/Users/matthew/Desktop/SFML 2.0/Debug/include" -I/Users/matthew/Desktop/LaurentGomila-SFML-f3d2129/include "-I/Users/matthew/Desktop/SFML 2.0/SFML.build/Debug/SFML.build/DerivedSources/x86_64" "-I/Users/matthew/Desktop/SFML 2.0/SFML.build/Debug/SFML.build/DerivedSources" -Wmost -Wno-four-char-constants -Wno-unknown-pragmas "-F/Users/matthew/Desktop/SFML 2.0/Debug" -stdlib=libc++ -fPIC -MMD -MT dependencies -MF "/Users/matthew/Desktop/SFML 2.0/SFML.build/Debug/SFML.build/Objects-normal/x86_64/dummy.d" --serialize-diagnostics "/Users/matthew/Desktop/SFML 2.0/SFML.build/Debug/SFML.build/Objects-normal/x86_64/dummy.dia" -c "/Users/matthew/Desktop/LaurentGomila-SFML-f3d2129/../SFML 2.0/dummy.cpp" -o "/Users/matthew/Desktop/SFML 2.0/SFML.build/Debug/SFML.build/Objects-normal/x86_64/dummy.o"

Ld "/Users/matthew/Desktop/SFML 2.0/Debug/SFML.framework/Versions/2.0.0/SFML" normal x86_64
    cd /Users/matthew/Desktop/LaurentGomila-SFML-f3d2129
    setenv MACOSX_DEPLOYMENT_TARGET 10.8
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch x86_64 -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk "-L/Users/matthew/Desktop/SFML 2.0/Debug" "-F/Users/matthew/Desktop/SFML 2.0/Debug" -filelist "/Users/matthew/Desktop/SFML 2.0/SFML.build/Debug/SFML.build/Objects-normal/x86_64/SFML.LinkFileList" -install_name "@executable_path/../Frameworks/SFML.framework/Versions/2.0.0/SFML" -mmacosx-version-min=10.8 -single_module -o "/Users/matthew/Desktop/SFML 2.0/Debug/SFML.framework/Versions/2.0.0/SFML"

PhaseScriptExecution "CMake PostBuild Rules" "/Users/matthew/Desktop/SFML 2.0/SFML.build/Debug/SFML.build/Script-5CD8DA3C18EF4F7090F20FA9.sh"
    cd /Users/matthew/Desktop/LaurentGomila-SFML-f3d2129
    /bin/sh -c "\"/Users/matthew/Desktop/SFML 2.0/SFML.build/Debug/SFML.build/Script-5CD8DA3C18EF4F7090F20FA9.sh\""

cp -r /Users/matthew/Desktop/LaurentGomila-SFML-f3d2129/include/SFML/* SFML.framework/Versions/2.0.0/Headers
usage: cp [-R [-H | -L | -P]] [-f | -i | -n] [-apvX] source_file target_file
       cp [-R [-H | -L | -P]] [-f | -i | -n] [-apvX] source_file ... target_directory
make: *** [SFML_buildpart_0] Error 64
Command /bin/sh failed with exit code 2


Any reason for this happening?

Gan

  • Jr. Member
  • **
  • Posts: 98
    • View Profile
Re: Xcode CMake Post Build Rules Error
« Reply #1 on: February 01, 2013, 03:06:03 am »
I believe it has something to do with this line in the post build scripts:
Quote
make -C /Users/matthew/Desktop/SFML\ 2.0 -f /Users/matthew/Desktop/SFML\ 2.0/CMakeScripts/SFML_postBuildPhase.make$CONFIGURATION all

Gan

  • Jr. Member
  • **
  • Posts: 98
    • View Profile
Re: Xcode CMake Post Build Rules Error
« Reply #2 on: February 01, 2013, 03:29:01 am »
I redid the cmake using Unix Makefile. Worked fine, then did sudo make install. That did fine as well.

Made a new template project as C++11, Framework and Universal. 64 linker errors. Tried another one using Dylibs, said it couldn't find -lsfml-system.

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: Xcode CMake Post Build Rules Error
« Reply #3 on: February 01, 2013, 07:50:04 am »
The CMAKE tutorial explicitly says you should not try using Xcode generator.

Regarding the linker errors, you have to compile SFML for both 32 and 64 bits if you want your project to be "universal". So you have to set CMAKE_OSX_ARCHITECTURES to "i386;x86_64" (yeah, the cmake tutorial doesn't say that, I know... will be updated "soon")
SFML / OS X developer

Gan

  • Jr. Member
  • **
  • Posts: 98
    • View Profile
Re: Xcode CMake Post Build Rules Error
« Reply #4 on: February 01, 2013, 05:11:38 pm »
I love you.

The first time in weeks, SFML is now working again on my computer!

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: Xcode CMake Post Build Rules Error
« Reply #5 on: February 01, 2013, 06:02:39 pm »
you're welcome !
SFML / OS X developer