Building OpenMW on Windows

Support for running, installing or compiling OpenMW

Before you submit a bug report for the first time, please read: Bug reporting guidelines
Post Reply
Uncanny
Posts: 14
Joined: 20 Jul 2014, 20:49

Building OpenMW on Windows

Post by Uncanny » 21 Oct 2018, 12:19

I'm having some difficulties building OpenMW on Windows.

I have followed the recommended method to build, described at: https://wiki.openmw.org/index.php?title ... ment_Setup

Everything seems to work fine at first, but after running "CI/before_script.msvc.sh -k -p Win64 -v 2017", I do get a folder called MSVC2017_64, but no file called OpenMW.sln to open

Output.log gives me the following error message:

Code: Select all

-- Configuring OpenMW...
-- Using Qt5
-- Found FFmpeg_AVCODEC 
-- Found FFmpeg_AVFORMAT 
-- Found FFmpeg_AVUTIL 
-- Found FFmpeg_SWSCALE 
-- Found FFmpeg_SWRESAMPLE 
CMake Error at CMakeLists.txt:214 (get_filename_component):
  get_filename_component unknown component
  D:/OpenMW-dev/MSVC2017_64/deps/OSG/lib/osgDB.lib


-- Boost version: 1.67.0
-- Found the following Boost libraries:
--   system
--   filesystem
--   program_options
--   locale
-- Found MyGUI 3.2.2
-- Found SDL2 2.0.7
CMake Warning (dev) at CMakeLists.txt:253 (find_package):
  Policy CMP0074 is not set: find_package uses <PackageName>_ROOT variables.
  Run "cmake --help-policy CMP0074" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.

  Environment variable Bullet_ROOT is set to:

    d:/OpenMW-dev/MSVC2017_64/deps/Bullet

  For compatibility, CMake is ignoring the variable.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found Bullet_BulletCollision 
-- Found Bullet_LinearMath 
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) 
-- Configuring incomplete, errors occurred!
See also "D:/OpenMW-dev/MSVC2017_64/CMakeFiles/CMakeOutput.log".
See also "D:/OpenMW-dev/MSVC2017_64/CMakeFiles/CMakeError.log".
CMakeError.log gives me the following error :

Code: Select all

Determining if the include file pthread.h exists failed with the following output:
Change Dir: D:/OpenMW-dev/MSVC2017_64/CMakeFiles/CMakeTmp

Run Build Command:"C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/MSBuild/15.0/Bin/MSBuild.exe" "cmTC_9bddb.vcxproj" "/p:Configuration=Debug" "/p:Platform=x64" "/p:VisualStudioVersion=15.0"
Microsoft (R) Build Engine version 15.8.169+g1ccb72aefa for .NET Framework

Copyright (C) Microsoft Corporation. All rights reserved.



Build started 2018-10-21 13:02:49.

Project "D:\OpenMW-dev\MSVC2017_64\CMakeFiles\CMakeTmp\cmTC_9bddb.vcxproj" on node 1 (default targets).

PrepareForBuild:

  Creating directory "cmTC_9bddb.dir\Debug\".

  Creating directory "D:\OpenMW-dev\MSVC2017_64\CMakeFiles\CMakeTmp\Debug\".

  Creating directory "cmTC_9bddb.dir\Debug\cmTC_9bddb.tlog\".

InitializeBuildStatus:

  Creating "cmTC_9bddb.dir\Debug\cmTC_9bddb.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.

ClCompile:

  C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\bin\HostX86\x64\CL.exe /c /Zi /W3 /WX- /diagnostics:classic /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_9bddb.dir\Debug\\" /Fd"cmTC_9bddb.dir\Debug\vc141.pdb" /Gd /TC /errorReport:queue "D:\OpenMW-dev\MSVC2017_64\CMakeFiles\CMakeTmp\CheckIncludeFile.c"

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

  Copyright (C) Microsoft Corporation.  All rights reserved.

  

  cl /c /Zi /W3 /WX- /diagnostics:classic /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_9bddb.dir\Debug\\" /Fd"cmTC_9bddb.dir\Debug\vc141.pdb" /Gd /TC /errorReport:queue "D:\OpenMW-dev\MSVC2017_64\CMakeFiles\CMakeTmp\CheckIncludeFile.c"

  CheckIncludeFile.c

  

D:\OpenMW-dev\MSVC2017_64\CMakeFiles\CMakeTmp\CheckIncludeFile.c(1): fatal error C1083: Cannot open include file: 'pthread.h': No such file or directory [D:\OpenMW-dev\MSVC2017_64\CMakeFiles\CMakeTmp\cmTC_9bddb.vcxproj]

Done Building Project "D:\OpenMW-dev\MSVC2017_64\CMakeFiles\CMakeTmp\cmTC_9bddb.vcxproj" (default targets) -- FAILED.



Build FAILED.



"D:\OpenMW-dev\MSVC2017_64\CMakeFiles\CMakeTmp\cmTC_9bddb.vcxproj" (default target) (1) ->

(ClCompile target) -> 

  D:\OpenMW-dev\MSVC2017_64\CMakeFiles\CMakeTmp\CheckIncludeFile.c(1): fatal error C1083: Cannot open include file: 'pthread.h': No such file or directory [D:\OpenMW-dev\MSVC2017_64\CMakeFiles\CMakeTmp\cmTC_9bddb.vcxproj]


    0 Warning(s)

    1 Error(s)


Time Elapsed 00:00:00.23

.

User avatar
AnyOldName3
Posts: 1123
Joined: 26 Nov 2015, 03:25

Re: Building OpenMW on Windows

Post by AnyOldName3 » 21 Oct 2018, 23:53

I guess the first thing to investigate is

Code: Select all

CMake Error at CMakeLists.txt:214 (get_filename_component):
  get_filename_component unknown component
  D:/OpenMW-dev/MSVC2017_64/deps/OSG/lib/osgDB.lib
If you've gone poking in the CMake at some point, it's possible that you've accidentally broken it, in which case, checking out the unmodified version should fix things. Otherwise, something weird is going on.

From googling the issue, it looks like CMake spits out that kind of error when a list of directories/files is given to get_filename_component instead of just the one. For this to have happened, OSGDB_LIBRARY needs to have been set to a list of osgDB.lib files, which means either the FindOpenSceneGraph.cmake file which comes with CMake is broken (and we have some evidence that it's buggy) or that it's finding two OSG setups and for whatever reason sees both as equally valid. Does this sound like something that could be happening based on what you've got on your computer?
AnyOldName3, Master of Shadows

UnPolacoLoco
Posts: 1
Joined: 29 Oct 2018, 17:44

Re: Building OpenMW on Windows

Post by UnPolacoLoco » 30 Oct 2018, 10:08

This issue happened to me too. I've uninstalled CMake and downgraded it to 3.11.4; now all works like a charm.

User avatar
AnyOldName3
Posts: 1123
Joined: 26 Nov 2015, 03:25

Re: Building OpenMW on Windows

Post by AnyOldName3 » 30 Oct 2018, 16:10

If a CMake downgrade fixed things, it might be best to report the issue to them at https://gitlab.kitware.com/cmake/cmake/issues/

It's best if you do it - if I report it, then they'll have to ask me a bunch of follow up questions, and then I'll have to forward those to you and then forward the responses back to them, which is a lot of unnecessary steps. I've tried rerunning this myself on two recent versions of CMake, and couldn't reproduce it, so it's not like I can provide answers to any questions they might have.
AnyOldName3, Master of Shadows

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests