[Solved] Cannot build on Mac OS X 10.10

[Solved] Cannot build on Mac OS X 10.10

Postby verilogdc » 22 Oct 2015, 16:44

I'm trying to build a open source game called SuperTuxKart on Mac OS X 10.10, following the official instruction.

However, when I typed "cmake .. -DUSE_CPP2011=1" or "cmake .. -GXcode", I got error message:
failed to create symbolic link 'lib/libpng.pc': No such file or directory
failed to create symbolic link 'lib/libpng-config': No such file or directory

I have installed libpng1.6 by homebrew.
I have no idea how to love the problem.
Did anyone build STK on Mac OS X 10.10 successfully?
Last edited by verilogdc on 01 Nov 2015, 02:05, edited 1 time in total.
verilogdc
 
Posts: 9
Joined: 22 Oct 2015, 16:39

Re: Cannot build on Mac OS X 10.10

Postby deve » 23 Oct 2015, 08:35

You probably don't need to install libpng because STK compiles its own version of this library on OSX. I had this error few times when I was experimenting with building it on different platforms or using different compilers, but I don't remember the reason :(
deve
 
Posts: 268
Joined: 23 Jan 2014, 13:45

Re: Cannot build on Mac OS X 10.10

Postby Auria » 25 Oct 2015, 02:54

This maybe means that the CMake builds system catches your libpng and tries to use it, it's a bit hard to tell since I don't have this issue oh my mac - could you perhaps post the full cmake log?
Image
User avatar
Auria
STK Moderator
 
Posts: 2976
Joined: 07 Dec 2009, 03:52

Re: Cannot build on Mac OS X 10.10

Postby deve » 26 Oct 2015, 16:13

You can probably just remove these lines from stk-code/lib/libpng/CMakeLists.txt:

{l Code}: {l Select All Code}
  configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng.pc.in
    ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}.pc @ONLY)
  CREATE_SYMLINK(${PNGLIB_NAME}.pc libpng.pc)

  configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng-config.in
    ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config @ONLY)
  CREATE_SYMLINK(${PNGLIB_NAME}-config libpng-config)


It looks like it is not able to generate these files or can't create the symlinks for some reason. But we don't need them for anything. Or you can try to use different cmake version.
deve
 
Posts: 268
Joined: 23 Jan 2014, 13:45

Re: Cannot build on Mac OS X 10.10

Postby verilogdc » 27 Oct 2015, 15:09

Thanks for reply.

Even though I uninstall my system libpng, the error of symbolic link still shows.
But it disappears by removing the 6 lines from stk-code/lib/libpng/CMakeLists.txt.

However there is another problem about OpenMP_FLAG_DETECTED. Below is my cmake log:
{l Code}: {l Select All Code}
cmake .. -GXcode -DUSE_WIIUSE=0
-- The C compiler identification is AppleClang 7.0.0.7000176
-- The CXX compiler identification is AppleClang 7.0.0.7000176
-- Check for working C compiler using: Xcode
-- Check for working C compiler using: Xcode -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler using: Xcode
-- Check for working CXX compiler using: Xcode -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- No build type selected, default to STKRelease
-- Found OpenGL: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/OpenGL.framework 
-- Found ZLIB: /Users/apple/anaconda/lib/libz.dylib (found version "1.2.8")
failed to create symbolic link 'lib/libpng.pc': No such file or directory
failed to create symbolic link 'lib/libpng-config': No such file or directory
-- Found PNG: png15_static (found version "1.5.9")
-- Found JPEG: jpeglib 
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE 
-- Try OpenMP C flag = [ ]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [/openmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [-Qopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [-openmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [-xopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [+Oopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [-qsmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [-mp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [ ]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [/openmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [-Qopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [-openmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [-xopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [+Oopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [-qsmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [-mp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Could NOT find OpenMP (missing:  OpenMP_C_FLAGS OpenMP_CXX_FLAGS)
-- Found CURL: /Users/apple/anaconda/lib/libcurl.dylib (found version "7.43.0")
-- Assets found
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
FREETYPE_INCLUDE_DIRS
   used as include directory in directory /Users/apple/Desktop/SuperTuxKart/stk-code
FRIBIDI_LIBRARY (ADVANCED)
    linked by target "supertuxkart" in directory /Users/apple/Desktop/SuperTuxKart/stk-code

-- Configuring incomplete, errors occurred!
See also "/Users/apple/Desktop/SuperTuxKart/stk-code/cmake_build/CMakeFiles/CMakeOutput.log".
See also "/Users/apple/Desktop/SuperTuxKart/stk-code/cmake_build/CMakeFiles/CMakeError.log".
verilogdc
 
Posts: 9
Joined: 22 Oct 2015, 16:39

Re: Cannot build on Mac OS X 10.10

Postby Akien » 27 Oct 2015, 15:34

Well the blocking issue here seems to be that you don't have FreeType and Fribidi, or they are not where the buildsystem expects them.
Godot Engine project manager and maintainer.
Occasional FOSS gamedev: Lugaru, OpenDungeons, Jetpaca, Minilens.
User avatar
Akien
 
Posts: 737
Joined: 22 Feb 2014, 13:14

Re: Cannot build on Mac OS X 10.10

Postby verilogdc » 29 Oct 2015, 06:30

Akien {l Wrote}:Well the blocking issue here seems to be that you don't have FreeType and Fribidi, or they are not where the buildsystem expects them.

After I downloaded the pre-build dependencies(DepsFrameworks0.9.2.zip) from http://sourceforge.net/projects/supertuxkart/files/SuperTuxKart%20Dependencies/OSX/) and put them to /Library/Frameworks , the Xcode project can be generated. However when I used Xcode to build, the following warnings shows and followed by a lot of error messages.

ld: warning: ld: warning: ld: warning: ignoring file /Library/Frameworks/Vorbis.framework/Vorbis, missing required architecture x86_64 in file /Library/Frameworks/Vorbis.framework/Vorbis (2 slices)ignoring file /Library/Frameworks/Ogg.framework/Ogg, missing required architecture x86_64 in file /Library/Frameworks/Ogg.framework/Ogg (2 slices)ignoring file /Library/Frameworks/OpenAL.framework/OpenAL, missing required architecture x86_64 in file /Library/Frameworks/OpenAL.framework/OpenAL (2 slices)

ld: warning: ignoring file /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/QuickTime.framework/QuickTime.tbd, missing required architecture x86_64 in file /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/QuickTime.framework/QuickTime.tbd
verilogdc
 
Posts: 9
Joined: 22 Oct 2015, 16:39

Re: [Solved] Cannot build on Mac OS X 10.10

Postby Auria » 03 Nov 2015, 00:27

Can you try a regular command-line build (no XCode) ? This is what we usually use, and the generated XCode projects are untested
Image
User avatar
Auria
STK Moderator
 
Posts: 2976
Joined: 07 Dec 2009, 03:52

Who is online

Users browsing this forum: No registered users and 1 guest