ddnet / ddnet

DDraceNetwork, a free cooperative platformer game
https://ddnet.org
Other
589 stars 417 forks source link

CMake error on Windows #2073

Closed moien007 closed 4 years ago

moien007 commented 4 years ago

Hi,

CMake configuration fails after going through these instructions. Here are the logs:

The C compiler identification is MSVC 19.24.28316.0
The CXX compiler identification is MSVC 19.24.28316.0
Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.24.28314/bin/Hostx64/x64/cl.exe
Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.24.28314/bin/Hostx64/x64/cl.exe -- 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: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.24.28314/bin/Hostx64/x64/cl.exe
Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.24.28314/bin/Hostx64/x64/cl.exe -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Detecting CXX compile features
Detecting CXX compile features - done
Could NOT find Crypto (missing: CRYPTO_LIBRARY CRYPTO_INCLUDEDIR) 
Checking for module 'libcurl'
  No package 'libcurl' found
Could NOT find Curl (missing: CURL_LIBRARY CURL_INCLUDEDIR) 
Checking for module 'freetype2'
  No package 'freetype2' found
Could NOT find Freetype (missing: FREETYPE_LIBRARY FREETYPE_INCLUDEDIR) 
Could NOT find GTest (missing: GTEST_LIBRARY GTEST_INCLUDE_DIR GTEST_MAIN_LIBRARY) 
Checking for module 'ogg'
  No package 'ogg' found
Could NOT find Ogg (missing: OGG_INCLUDEDIR) 
Checking for module 'opus'
  No package 'opus' found
Could NOT find Opus (missing: OPUS_INCLUDEDIR) 
Checking for module 'opusfile'
  No package 'opusfile' found
Could NOT find Opusfile (missing: OPUSFILE_LIBRARY OPUSFILE_INCLUDEDIR) 
Checking for module 'sdl2'
  No package 'sdl2' found
Could NOT find SDL2 (missing: SDL2_LIBRARY SDL2_INCLUDEDIR) 
******** DDNet ********
Target OS: windows 64bit
Compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.24.28314/bin/Hostx64/x64/cl.exe
Build type: Release
Dependencies:
 * Curl not found
 * Freetype not found
 * Git found
 * Glew not found (using bundled version)
 * GTest not found
 * Ogg not found
 * OpenSSL Crypto not found
 * Opus not found
 * Opusfile not found
 * Pnglite not found (using bundled version)
 * PythonInterp found
 * SDL2 not found
 * Wavpack not found (using bundled version)
 * Zlib not found (using bundled version)
CMake Error at CMakeLists.txt:408 (message):
  You must install Curl to compile DDNet

CMake Error at CMakeLists.txt:423 (message):
  You must install Freetype to compile the DDNet client

CMake Error at CMakeLists.txt:426 (message):
  You must install Ogg to compile the DDNet client

CMake Error at CMakeLists.txt:429 (message):
  You must install Opus to compile the DDNet client

CMake Error at CMakeLists.txt:432 (message):
  You must install Opusfile to compile the DDNet client

CMake Error at CMakeLists.txt:435 (message):
  You must install SDL2 to compile the DDNet client

Automatically downloading GTest to be able to run tests
-- Configuring done

-- Generating done

-- Build files have been written to: C:/Users/Demon/Desktop/DDNet-12.9.2-src/mebuild/googletest-download

Microsoft (R) Build Engine version 16.4.0+e901037fe for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

  Checking Build System

  Creating directories for 'googletest'

  Building Custom Rule C:/Users/Demon/Desktop/DDNet-12.9.2-src/mebuild/googletest-download/CMakeLists.txt

  Performing download step (git clone) for 'googletest'

  Cloning into 'googletest-src'...

  Note: switching to '7b6561c56e353100aca8458d7bc49c4e0119bae8'.

  You are in 'detached HEAD' state. You can look around, make experimental
  changes and commit them, and you can discard any commits you make in this
  state without impacting any branches by switching back to a branch.

  If you want to create a new branch to retain commits you create, you may
  do so (now or later) by using -c with the switch command. Example:

    git switch -c <new-branch-name>

  Or undo this operation with:

    git switch -

  Turn off this advice by setting config variable advice.detachedHead to false

  HEAD is now at 7b6561c5 Merge pull request #1275 from jwakely/pr/1273

  Performing update step for 'googletest'

  No patch step for 'googletest'

  No configure step for 'googletest'

  No build step for 'googletest'

  No install step for 'googletest'

  No test step for 'googletest'

  Completed 'googletest'

  Building Custom Rule C:/Users/Demon/Desktop/DDNet-12.9.2-src/mebuild/googletest-download/CMakeLists.txt

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:
C:/Users/Demon/Desktop/DDNet-12.9.2-src/OPUSFILE_INCLUDEDIR
   used as include directory in directory C:/Users/Demon/Desktop/DDNet-12.9.2-src
OPUSFILE_LIBRARY (ADVANCED)
    linked by target "DDNet" in directory C:/Users/Demon/Desktop/DDNet-12.9.2-src

Configuring incomplete, errors occurred!
See also "C:/Users/Demon/Desktop/DDNet-12.9.2-src/mebuild/CMakeFiles/CMakeOutput.log".

The following lines which I picked from the above logs are telling me to install libraries like curl but how?

You must install Curl to compile DDNet
You must install Freetype to compile the DDNet client
You must install Ogg to compile the DDNet client
You must install Opus to compile the DDNet client
You must install SDL2 to compile the DDNet client

My environment:

def- commented 4 years ago

ddnet-libs subrepo is missing?

moien007 commented 4 years ago

ddnet-libs subrepo is missing?

@def- Thanks, that was the cause. I found that ddnet-libs is served but empty, so I grabbed the dependencies from the subrepo that you mentioned and compilation succeed.

Should I open an issue regarding the empty ddnet-libs folder?

Learath2 commented 4 years ago

You are supposed to either clone with --recursive or fetch the submodules later with git submodule init && git submodule update

On Wed, Feb 26, 2020, 12:50 Havij khor notifications@github.com wrote:

ddnet-libs subrepo is missing?

@def- https://github.com/def- Thanks, that was the cause. I found that ddnet-libs is served but empty, so I grabbed the dependencies from the subrepo https://github.com/ddnet/ddnet-libs that you mentioned and compilation succeed.

Should I open an issue regarding the empty ddnet-libs folder?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ddnet/ddnet/issues/2073?email_source=notifications&email_token=AADXYBGYNMGLMDSGLRPEIJ3REY3NLA5CNFSM4K3NWJUKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEM7RLKY#issuecomment-591336875, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADXYBEQBR4LFQ7GIKS3TMLREY3NLANCNFSM4K3NWJUA .

moien007 commented 4 years ago

@Learath2 Yeah you are right, I didn't know that. Thanks.