1

Topic: Can't Compile on MAC due to SDL2

I am doing

 
 brew install cmake freetype sdl2
  brew -v link sdl2 --overwrite
  git submodule update --init
  mkdir build; cd build
  cmake -Werror=dev -DDOWNLOAD_GTEST=ON ..
  cd ..
  mkdir build_debug; cd build_debug
  cmake -Werror=dev -DDOWNLOAD_GTEST=ON -DDEV=ON ..
  cd ..

This should work, the second line isn't neccessary as you can see in the logs.
I think it doesn't find SDL2, but it's obviously installed and linked.
Any ideas?

Link to log (better visuals):
https://github.com/AssassinTee/catch64/ … #step:3:12

copied logs:

2019-10-08T07:02:28.7405680Z Warning: cmake 3.15.3 is already installed and up-to-date
2019-10-08T07:02:28.7406010Z To reinstall 3.15.3, run `brew reinstall cmake`
2019-10-08T07:02:28.7741600Z ==> Installing dependencies for freetype: libpng
2019-10-08T07:02:28.7742060Z ==> Installing freetype dependency: libpng
2019-10-08T07:02:29.4135460Z ==> Downloading https://homebrew.bintray.com/bottles/libpng-1.6.37.mojave.bottle.tar.gz
2019-10-08T07:02:29.4137590Z ==> Downloading from https://akamai.bintray.com/53/53bbd14cc27c86c16605e256e7646a1b5656c253abca084958c5d80a2961cb01?__gda__=exp=1570518869~hmac=92cf1dd51403d64eb37f9be49fb34d37e96bc4e2de18bec947c18c6c83559e28&response-content-disposition=attachment%3Bfilename%3D%22libpng-1.6.37.mojave.bottle.tar.gz%22&response-content-type=application%2Fgzip&requestInfo=U2FsdGVkX1_NX5tsRLWNupga5yKuci_W1xR04QrANb8uEf6_nkicsscOx-Ki6_hJySSBslNDL-L4ryGYoiFftIYQv-o9y3kC1xR9a3wxAoeAshYwI62EEHKQvhabyNBXcQ-RA8SvyUqJwXvVj-Fdwg&response-X-Checksum-Sha1=ba9e6904473d1668c3bb010b3ca6d691156d81c5&response-X-Checksum-Sha2=53bbd14cc27c86c16605e256e7646a1b5656c253abca084958c5d80a2961cb01
2019-10-08T07:02:29.5394300Z ==> Pouring libpng-1.6.37.mojave.bottle.tar.gz
2019-10-08T07:02:31.2187790Z 🍺  /usr/local/Cellar/libpng/1.6.37: 27 files, 1.2MB
2019-10-08T07:02:31.2188110Z ==> Installing freetype
2019-10-08T07:02:31.6448030Z ==> Downloading https://homebrew.bintray.com/bottles/freetype-2.10.1.mojave.bottle.tar.gz
2019-10-08T07:02:31.6449570Z ==> Downloading from https://akamai.bintray.com/2f/2f5716f987df6f45a9d66e5f9af935bbb4202fe0b9850b6b0660fd6555ba1be4?__gda__=exp=1570518871~hmac=c4dfa7e91de8a15c45ce3663e43b703e20fc922bf97c653da7a0145c5154dfd3&response-content-disposition=attachment%3Bfilename%3D%22freetype-2.10.1.mojave.bottle.tar.gz%22&response-content-type=application%2Fgzip&requestInfo=U2FsdGVkX181IXQFOHgZOHhXqhbXYfLpwvAmA_Af_6Ud4ECveTUFqQGT8fjnZZF6gGCk56KZxQEliT5IKDeuZKZk_ozsN4O4f7BuCOcLrbzOu-NmsCwj5dvhcug7xfrqg0svYIyMzeg3NM-uRDM0oA&response-X-Checksum-Sha1=9d61a635caf8ca6e552c18bdac88eaca21f9b761&response-X-Checksum-Sha2=2f5716f987df6f45a9d66e5f9af935bbb4202fe0b9850b6b0660fd6555ba1be4
2019-10-08T07:02:31.7395080Z ==> Pouring freetype-2.10.1.mojave.bottle.tar.gz
2019-10-08T07:02:33.0360840Z 🍺  /usr/local/Cellar/freetype/2.10.1: 61 files, 2.2MB
2019-10-08T07:02:33.4991680Z ==> Downloading https://homebrew.bintray.com/bottles/sdl2-2.0.10.mojave.bottle.tar.gz
2019-10-08T07:02:33.4993160Z ==> Downloading from https://akamai.bintray.com/ed/ede7f2495e32fd7f1a1bee57db35542066993f7ad4d24bb4c2078a68b0856dfb?__gda__=exp=1570518873~hmac=e5e816d20c7449b898ac056644fc7054dc8a4d4218a0ec9d234de7944f243640&response-content-disposition=attachment%3Bfilename%3D%22sdl2-2.0.10.mojave.bottle.tar.gz%22&response-content-type=application%2Fgzip&requestInfo=U2FsdGVkX1_hpW0p9Uzsxv_9lJSnqCfJe6J7jhH_Q98AtE0gXzHO70mDJ3Qsla67Cuwvis5YCyRz8vUvHkYuf9ja7OhGHdW0BocEJFYRFm-m39ys83XOdMynPL_NfxQCjWzgi4sdofoE4zW0Mh5pOA&response-X-Checksum-Sha1=6a221d81c949eb856f9f80bae0c69384ba856664&response-X-Checksum-Sha2=ede7f2495e32fd7f1a1bee57db35542066993f7ad4d24bb4c2078a68b0856dfb
2019-10-08T07:02:33.6403910Z ==> Pouring sdl2-2.0.10.mojave.bottle.tar.gz
2019-10-08T07:02:34.9924470Z 🍺  /usr/local/Cellar/sdl2/2.0.10: 87 files, 4.6MB
2019-10-08T07:02:36.0041870Z Warning: Already linked: /usr/local/Cellar/sdl2/2.0.10
2019-10-08T07:02:36.0076810Z To relink: brew unlink sdl2 && brew link sdl2
2019-10-08T07:02:36.1466980Z Submodule 'datasrc/languages' (git://github.com/teeworlds/teeworlds-translation.git) registered for path 'datasrc/languages'
2019-10-08T07:02:36.1486950Z Submodule 'datasrc/maps' (git://github.com/teeworlds/teeworlds-maps.git) registered for path 'datasrc/maps'
2019-10-08T07:02:36.1646940Z Cloning into '/Users/runner/runners/2.158.0/work/catch64/catch64/datasrc/languages'...
2019-10-08T07:02:36.5667730Z Cloning into '/Users/runner/runners/2.158.0/work/catch64/catch64/datasrc/maps'...
2019-10-08T07:02:36.9561720Z Submodule path 'datasrc/languages': checked out '1cd4924413891e9bcdf0686e483c7ef0315c81e8'
2019-10-08T07:02:37.0620850Z Submodule path 'datasrc/maps': checked out '7fefdb4c643f4e623f179460b8e68cd51f4d5e9d'
2019-10-08T07:02:38.3016070Z -- The C compiler identification is AppleClang 10.0.1.10010046
2019-10-08T07:02:38.4085990Z -- The CXX compiler identification is AppleClang 10.0.1.10010046
2019-10-08T07:02:38.4461240Z -- Check for working C compiler: /Applications/Xcode_10.3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
2019-10-08T07:02:39.2584470Z -- Check for working C compiler: /Applications/Xcode_10.3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
2019-10-08T07:02:39.2644920Z -- Detecting C compiler ABI info
2019-10-08T07:02:39.4174080Z -- Detecting C compiler ABI info - done
2019-10-08T07:02:39.4326130Z -- Detecting C compile features
2019-10-08T07:02:39.4346900Z -- Detecting C compile features - done
2019-10-08T07:02:39.4474700Z -- Check for working CXX compiler: /Applications/Xcode_10.3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
2019-10-08T07:02:39.6085130Z -- Check for working CXX compiler: /Applications/Xcode_10.3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
2019-10-08T07:02:39.6131190Z -- Detecting CXX compiler ABI info
2019-10-08T07:02:39.8453200Z -- Detecting CXX compiler ABI info - done
2019-10-08T07:02:39.8620460Z -- Detecting CXX compile features
2019-10-08T07:02:39.8639230Z -- Detecting CXX compile features - done
2019-10-08T07:02:39.8793930Z -- Looking for __i386
2019-10-08T07:02:39.9844660Z -- Looking for __i386 - not found
2019-10-08T07:02:40.1589810Z -- Found PythonInterp: /usr/local/bin/python (found version "2.7.16") 
2019-10-08T07:02:40.1621050Z -- Performing Test FLAG_SUPPORTED_fstack_protector_strong
2019-10-08T07:02:40.3151250Z -- Performing Test FLAG_SUPPORTED_fstack_protector_strong - Success
2019-10-08T07:02:40.3183560Z -- Performing Test FLAG_SUPPORTED_fstack_clash_protection
2019-10-08T07:02:40.4492340Z -- Performing Test FLAG_SUPPORTED_fstack_clash_protection - Failed
2019-10-08T07:02:40.4528430Z -- Performing Test FLAG_SUPPORTED_fcf_protection
2019-10-08T07:02:40.5954820Z -- Performing Test FLAG_SUPPORTED_fcf_protection - Success
2019-10-08T07:02:40.5985160Z -- Performing Test FLAG_SUPPORTED_stdlib_libc__
2019-10-08T07:02:40.7445430Z -- Performing Test FLAG_SUPPORTED_stdlib_libc__ - Success
2019-10-08T07:02:40.7476420Z -- Performing Test FLAG_SUPPORTED_mmacosx_version_min_10_7
2019-10-08T07:02:40.8959460Z -- Performing Test FLAG_SUPPORTED_mmacosx_version_min_10_7 - Success
2019-10-08T07:02:40.8994720Z -- Performing Test FLAG_SUPPORTED_Wall
2019-10-08T07:02:41.0484540Z -- Performing Test FLAG_SUPPORTED_Wall - Success
2019-10-08T07:02:41.0517210Z -- Performing Test FLAG_SUPPORTED_Wdeclaration_after_statement
2019-10-08T07:02:41.2027570Z -- Performing Test FLAG_SUPPORTED_Wdeclaration_after_statement - Success
2019-10-08T07:02:41.2057370Z -- Performing Test FLAG_SUPPORTED_Wextra
2019-10-08T07:02:41.3632010Z -- Performing Test FLAG_SUPPORTED_Wextra - Success
2019-10-08T07:02:41.3662280Z -- Performing Test FLAG_SUPPORTED_Wno_unused_parameter
2019-10-08T07:02:41.5167380Z -- Performing Test FLAG_SUPPORTED_Wno_unused_parameter - Success
2019-10-08T07:02:41.5201830Z -- Performing Test FLAG_SUPPORTED_Wno_missing_field_initializers
2019-10-08T07:02:41.6667470Z -- Performing Test FLAG_SUPPORTED_Wno_missing_field_initializers - Success
2019-10-08T07:02:41.6696140Z -- Performing Test FLAG_SUPPORTED_Wformat_2
2019-10-08T07:02:41.8193750Z -- Performing Test FLAG_SUPPORTED_Wformat_2 - Success
2019-10-08T07:02:41.8224120Z -- Performing Test FLAG_SUPPORTED_Wno_implicit_function_declaration
2019-10-08T07:02:41.9725180Z -- Performing Test FLAG_SUPPORTED_Wno_implicit_function_declaration - Success
2019-10-08T07:02:41.9755510Z -- Performing Test DEFINE_FORTIFY_SOURCE
2019-10-08T07:02:42.1702000Z -- Performing Test DEFINE_FORTIFY_SOURCE - Success
2019-10-08T07:02:42.1784870Z -- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) 
2019-10-08T07:02:43.0439130Z -- Found ZLIB: /usr/lib/libz.dylib (found version "1.2.11") 
2019-10-08T07:02:43.6075800Z -- Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing: OPENSSL_INCLUDE_DIR) 
2019-10-08T07:02:43.6093610Z -- Could NOT find Crypto (missing: CRYPTO_LIBRARY CRYPTO_INCLUDEDIR) 
2019-10-08T07:02:43.7977910Z -- Found Freetype: /usr/local/lib/libfreetype.dylib  
2019-10-08T07:02:43.8066080Z -- Found Git: /usr/local/bin/git (found version "2.23.0") 
2019-10-08T07:02:43.9048750Z -- Could NOT find GTest (missing: GTEST_LIBRARY GTEST_INCLUDE_DIR GTEST_MAIN_LIBRARY) 
2019-10-08T07:02:43.9595780Z -- Found Pnglite: src/engine/external/pnglite  
2019-10-08T07:02:44.0335230Z -- Could NOT find SDL2 (missing: SDL2_INCLUDEDIR) 
2019-10-08T07:02:44.0408550Z -- Looking for pthread.h
2019-10-08T07:02:44.2662600Z -- Looking for pthread.h - found
2019-10-08T07:02:44.2669100Z -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
2019-10-08T07:02:44.4513270Z -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
2019-10-08T07:02:44.4534850Z -- Found Threads: TRUE  
2019-10-08T07:02:44.5114840Z -- Found Wavpack: src/engine/external/wavpack  
2019-10-08T07:02:44.5161260Z -- ******** Teeworlds ********
2019-10-08T07:02:44.5161820Z -- Target OS: mac 64bit
2019-10-08T07:02:44.5162660Z -- Compiler: /Applications/Xcode_10.3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
2019-10-08T07:02:44.5163200Z -- Build type: Debug
2019-10-08T07:02:44.5163640Z -- Dependencies:
2019-10-08T07:02:44.5164130Z --  * Dmg tools not found
2019-10-08T07:02:44.5164780Z --  * Freetype found
2019-10-08T07:02:44.5166140Z --  * Hdiutil not found
2019-10-08T07:02:44.5167210Z --  * OpenSSL Crypto not found
2019-10-08T07:02:44.5168200Z --  * Pnglite not found (using bundled version)
2019-10-08T07:02:44.5169190Z --  * PythonInterp found
2019-10-08T07:02:44.5170030Z --  * SDL2 not found
2019-10-08T07:02:44.5171100Z --  * Wavpack not found (using bundled version)
2019-10-08T07:02:44.5172070Z --  * Zlib found
2019-10-08T07:02:44.5172760Z CMake Error at CMakeLists.txt:361 (message):
2019-10-08T07:02:44.5173200Z   You must install SDL2 to compile the Teeworlds client
2019-10-08T07:02:44.5193030Z -- Automatically downloading GTest to be able to run tests
2019-10-08T07:02:44.5193180Z 
2019-10-08T07:02:44.5193270Z 
2019-10-08T07:02:44.6702010Z -- Configuring done
2019-10-08T07:02:44.6792770Z -- Generating done
2019-10-08T07:02:44.6837930Z -- Build files have been written to: /Users/runner/runners/2.158.0/work/catch64/catch64/build/googletest-download
2019-10-08T07:02:44.7557470Z Scanning dependencies of target googletest
2019-10-08T07:02:44.7736090Z [ 11%] Creating directories for 'googletest'
2019-10-08T07:02:44.8696370Z [ 22%] Performing download step (git clone) for 'googletest'
2019-10-08T07:02:44.9018520Z Cloning into 'googletest-src'...
2019-10-08T07:02:46.0050740Z HEAD is now at 2fe3bd99 Merge pull request #1433 from dsacre/fix-clang-warnings
2019-10-08T07:02:46.1887330Z [ 33%] No patch step for 'googletest'
2019-10-08T07:02:46.2300140Z [ 44%] Performing update step for 'googletest'
2019-10-08T07:02:46.2914710Z [ 55%] No configure step for 'googletest'
2019-10-08T07:02:46.3343980Z [ 66%] No build step for 'googletest'
2019-10-08T07:02:46.3737490Z [ 77%] No install step for 'googletest'
2019-10-08T07:02:46.4135080Z [ 88%] No test step for 'googletest'
2019-10-08T07:02:46.4543440Z [100%] Completed 'googletest'
2019-10-08T07:02:46.5004170Z [100%] Built target googletest
2019-10-08T07:02:47.1632560Z -- Looking for WavpackOpenFileInputEx
2019-10-08T07:02:47.2596290Z -- Looking for WavpackOpenFileInputEx - not found
2019-10-08T07:02:47.4334590Z -- Configuring incomplete, errors occurred!
2019-10-08T07:02:47.4335000Z See also "/Users/runner/runners/2.158.0/work/catch64/catch64/build/CMakeFiles/CMakeOutput.log".
2019-10-08T07:02:47.4335260Z See also "/Users/runner/runners/2.158.0/work/catch64/catch64/build/CMakeFiles/CMakeError.log".
2019-10-08T07:02:47.4453140Z ##[error]Process completed with exit code 1.

2

Re: Can't Compile on MAC due to SDL2

Are you trying to compile master? I'm not a Mac dude, but maybe you could compare your script with that of the Travis build? https://travis-ci.org/teeworlds/teeworl … 376/config

Not Luck, Just Magic.

3 (edited by Assa 2019-10-08 14:50:39)

Re: Can't Compile on MAC due to SDL2

I am not a Mac dude, either. I copied the code from the travis.yml understanding what it does. But it doesn't work for me.
If you take a look I am doing exactly the same.

Looks like an issue finding sdl2

after running

ls-l /usr/local/bin

I see that sdl is installed:

 lrwxr-xr-x  1 runner  admin   37 Oct  8 12:37 sdl2-config -> ../Cellar/sdl2/2.0.10/bin/sdl2-config

But cmake doesn't find it?!

I checked the PATH variable and /usr/local/lib is there

4

Re: Can't Compile on MAC due to SDL2

Have you tried with bam? https://teeworlds.com/?page=docs&wi … ything_mac

Not Luck, Just Magic.

5

Re: Can't Compile on MAC due to SDL2

In theory this is working, but I am using some c++11 stuff and bam dosn't compile C on linux with std=c++11

6

Re: Can't Compile on MAC due to SDL2

Solved on discord

Not Luck, Just Magic.