BioGearsEngine / core

Repository for libbiogears and all core utilities
Apache License 2.0
56 stars 48 forks source link

Errors in build with cmake #51

Closed DMLON closed 3 years ago

DMLON commented 4 years ago

Hello, i'm trying to build BioGears with cmake and i get these issues: In the GUI i get this:

Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.19041.

    Using the following search paths
    CMAKE_MODULE_PATH = C:/biogears/core/cmake;C:/biogears/core/cmake;C:/biogears/core/cmake/common
    CMAKE_PREFIX_PATH  = 
    CMAKE_FIND_ROOT_PATH = 

GIT_REV=7.3.1-147-g4cb0be17

Configuring biogears_common
  C:/biogears/core/projects/biogears-common/include
  C:/biogears/core/projects/biogears-common/src
  C:/biogears/core/build/projects/biogears-common

CMake Warning at cmake/cmake-common_logic.cmake:42 (message):
  The following packages CodeSynthesis were not found.For native compilations
  setting CMAKE_PREFIX_PATH can solve this problemFor cross complilation try
  expanding your CMAKE_FIND_ROOT_PATH
Call Stack (most recent call first):
  projects/biogears/CMakeLists.txt:34 (verify_package)

CMake Error at cmake/cmake-common_logic.cmake:47 (message):
  Unable to find CodeSynthesis which is marked REQUIRED
Call Stack (most recent call first):
  projects/biogears/CMakeLists.txt:34 (verify_package)

Configuring incomplete, errors occurred!
See also "C:/biogears/core/build/CMakeFiles/CMakeOutput.log".
See also "C:/biogears/core/build/CMakeFiles/CMakeError.log".

In the CMakeError.log i get this:

Determining if the include file pthread.h exists failed with the following output:
Change Dir: C:/biogears/core/build/CMakeFiles/CMakeTmp

Run Build Command(s):C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/MSBuild/Current/Bin/MSBuild.exe cmTC_3d419.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=16.0 /v:m && Microsoft (R) Build Engine versión 16.7.0+b89cb5fde para .NET Framework

Copyright (C) Microsoft Corporation. Todos los derechos reservados.

  Microsoft (R) C/C++ Optimizing Compiler Version 19.27.29111 for x64

  CheckIncludeFile.c

  Copyright (C) Microsoft Corporation.  All rights reserved.

  cl /c /Zi /W3 /WX- /diagnostics:column /Od /Ob0 /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_3d419.dir\Debug\\" /Fd"cmTC_3d419.dir\Debug\vc142.pdb" /Gd /TC /errorReport:queue C:\biogears\core\build\CMakeFiles\CMakeTmp\CheckIncludeFile.c

C:\biogears\core\build\CMakeFiles\CMakeTmp\CheckIncludeFile.c(1,10): fatal error C1083: Cannot open include file: 'pthread.h': No such file or directory [C:\biogears\core\build\CMakeFiles\CMakeTmp\cmTC_3d419.vcxproj]

It seems pthread.h is missing, and in the cmake GUI the Threads_DIR is empty i don't know what to put in there.

I already installed all dependencies (even Boost, which is not mentioned in the build steps). Using Visual studio 16 2019 with x64 in windows 10.

Thanks in advance.

ajbaird commented 4 years ago

Hi @DMLON ! looks to me like you need to set your CMAKE_PREFIX_PATH to be equal to where your external dependencies are. For example for my build I set

CMAKE_PREFIX_PATH = D:/BioGears/biogears/external/windows-vc15-amd

You'll want to modify the rhs with the location for your machine. Let me know if this helps and we can go from there!

DMLON commented 4 years ago

Hello! I've been doing some tests changing the prefix path, but i'm having the same issue, CodeSynthesis is not being found. This is my output:

Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.19041.

    Using the following search paths
    CMAKE_MODULE_PATH = C:/biogears/core/cmake;C:/biogears/core/cmake;C:/biogears/core/cmake/common
    CMAKE_PREFIX_PATH  = C:/biogears/external
    CMAKE_FIND_ROOT_PATH = 

GIT_REV=7.3.1-147-g4cb0be17

Configuring biogears_common
  C:/biogears/core/projects/biogears-common/include
  C:/biogears/core/projects/biogears-common/src
  C:/biogears/core/build/projects/biogears-common

CMake Warning at cmake/cmake-common_logic.cmake:42 (message):
  The following packages CodeSynthesis were not found.For native compilations
  setting CMAKE_PREFIX_PATH can solve this problemFor cross complilation try
  expanding your CMAKE_FIND_ROOT_PATH
Call Stack (most recent call first):
  projects/biogears/CMakeLists.txt:34 (verify_package)

CMake Error at cmake/cmake-common_logic.cmake:47 (message):
  Unable to find CodeSynthesis which is marked REQUIRED
Call Stack (most recent call first):
  projects/biogears/CMakeLists.txt:34 (verify_package)

Configuring incomplete, errors occurred!
See also "C:/biogears/core/build/CMakeFiles/CMakeOutput.log".
See also "C:/biogears/core/build/CMakeFiles/CMakeError.log".

CodeSynthesis is already installed as xsd.exe in the binary folder and xsd folder in include directory, am i missing anything?

ajbaird commented 4 years ago

ok so it looks like its still not finding xsd code synthesis, I guess double check that xds.exe is indeed in the C:/biogears/external directory? If this still isn't working we can help you by hosting a screen shareing application like webex and we can track down the issues.