Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMAKE error #59

Open
nmanjofo opened this issue Jun 1, 2016 · 2 comments
Open

CMAKE error #59

nmanjofo opened this issue Jun 1, 2016 · 2 comments

Comments

@nmanjofo
Copy link

nmanjofo commented Jun 1, 2016

I am trying to build the plugin, but CMAKE seems to complain... (I recursively cloned the latest snapshot, set BOOST_INCLUDE_DIR to boost and CMAKE_PREFIX_PATH to jsoncpp)

CMake Error at cmake/SteamVRPaths.cmake:78 (math):
math cannot parse the expression: "-1 + 1": syntax error, unexpected
exp_MINUS, expecting exp_OPENPARENT or exp_NUMBER (1)
Call Stack (most recent call first):
cmake/SteamVRPaths.cmake:139 (_read_openvrpaths_file)
CMakeLists.txt:54 (include)

CMake Error at cmake/SteamVRPaths.cmake:79 (math):
math cannot parse the expression: "-1 - -1": syntax error, unexpected
exp_MINUS, expecting exp_OPENPARENT or exp_NUMBER (1)
Call Stack (most recent call first):
cmake/SteamVRPaths.cmake:139 (_read_openvrpaths_file)
CMakeLists.txt:54 (include)

CMake Error at cmake/SteamVRPaths.cmake:80 (string):
string begin index: -1 is out of range 0 - 6
Call Stack (most recent call first):
cmake/SteamVRPaths.cmake:139 (_read_openvrpaths_file)
CMakeLists.txt:54 (include)

CMake Error at cmake/cmake-3.3.0-modules/WriteCompilerDetectionHeader.cmake:256 (include):
include could not find load file:

D:/knihovny/OSVR-SteamVR/cmake/cmake-3.3.0-modules/CMakeParseArguments.cmake

Call Stack (most recent call first):
src/CMakeLists.txt:11 (include)

CMake Error at cmake/cmake-3.3.0-modules/WriteCompilerDetectionHeader.cmake:257 (include):
include could not find load file:

D:/knihovny/OSVR-SteamVR/cmake/cmake-3.3.0-modules/CMakeCompilerIdDetection.cmake

Call Stack (most recent call first):
src/CMakeLists.txt:11 (include)

CMake Error at cmake/cmake-3.3.0-modules/WriteCompilerDetectionHeader.cmake:441 (compiler_id_detection):
Unknown CMake command "compiler_id_detection".
Call Stack (most recent call first):
src/CMakeLists.txt:12 (write_compiler_detection_header)

@godbyk
Copy link
Contributor

godbyk commented Jun 6, 2016

There are a couple different problems demonstrated here. Let's tackle them one at a time:

  1. First, we're looking for the vrpathreg.exe program and attempting to parse its output. It appears that we're not finding this program on your system. Where does this program live on your computer? (It's usually in C:/Program Files (x86)/Steam/steamapps/common/SteamVR/bin/win32/, but you may have it on another directory.)
    Since we're not finding that program, as a fallback, we attempt to read directly from the openvrpaths.vrpath file. This is usually located in the C:\Users\YOUR_USERNAME\AppData\Local\openvr directory.
  2. The second issue is a bug on my part. I think I've just fixed this in the cleanup branch if you'd like to test it. The cmake/cmake-3.3.0-modules/WriteCompilerDetectionHeader.cmake file was looking in a hard-coded path for a couple of the modules it wanted to include when it should've been looking in the main CMake modules directory. The fix should just be replacing the following two lines:
include(${CMAKE_CURRENT_LIST_DIR}/CMakeParseArguments.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/CMakeCompilerIdDetection.cmake)

with these two lines:

include(CMakeParseArguments)
include(CMakeCompilerIdDetection)

Questions

Your responses to the following questions will help me improve the code that finds the vrpathreg program and parses the information it provides:

  1. Where does the vrpathreg.exe program live on your computer?
  2. When you run that program in a command prompt window, what does it output?
  3. Where does the openvrpaths.vrpath file live on your computer?
  4. What are the contents of that file? (You can open it in Notepad.)

Thanks!

@nmanjofo
Copy link
Author

nmanjofo commented Jun 7, 2016

1

D:\hry\steam\steamapps\common\SteamVR\bin\win64

There are actually two, one in win64, the other in win32.

2

Runtime path = D:\hry\steam\steamapps\common\SteamVR
Config path = D:\hry\steam\config
Log path = D:\hry\steam\logs

3

C:\Users\pc\AppData\Local\openvr

4

{
"config" : [ "D:\hry\steam\config" ],
"external_drivers" : null,
"log" : [ "D:\hry\steam\logs" ],
"runtime" : [
"D:\hry\steam\steamapps\common\SteamVR",
"D:\hry\steam\steamapps\common\SteamVR"
]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants