KhronosGroup / KhronosGroup/OpenXR-Hpp

Building test preparation failed on Debian/GNU/Linux

Open
#54 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
50
Forks
23
PR merge metrics
No merged PRs in 30d

Description

Before making the test, I had some difficulty to prepare the source tree :

```
antoine@pcantoine:~/AndroidStudioProjects/Bille2_VR/OpenXR-Hpp$ mkdir build
antoine@pcantoine:~/AndroidStudioProjects/Bille2_VR/OpenXR-Hpp$ cd build/
antoine@pcantoine:~/AndroidStudioProjects/Bille2_VR/OpenXR-Hpp/build$ cmake ..
-- Build tests: ON
-- Skip using ezvcpkg: OFF
-- EZVCPKG v0.1 starting up
Website: https://github.com/jherico/ezvcpkg
-- EZVCPKG_BASEDIR envrionment variable not found and basedir not set, using default /home/antoine/.ezvcpkg
-- EZVCPKG initializing
commit: f990dfaa5ba82155f95b75021453c075816fd4be
repository: https://github.com/microsoft/vcpkg.git
local dir: /home/antoine/.ezvcpkg/f990dfaa5ba82155f95b75021453c075816fd4be
-- EZVCPKG Building/Verifying packages gtest
CMake Error at scripts/cmake/vcpkg_execute_build_process.cclang-16make:136 (message):
Command failed: /home/antoine/.ezvcpkg/f990dfaa5ba82155f95b75021453c075816fd4be/downloads/tools/cmake-3.14.0-linux/cmake-3.14.0-Linux-x86_64/bin/cmake --build . --config Debug --target install -- -v
Working Directory: /home/antoine/.ezvcpkg/f990dfaa5ba82155f95b75021453c075816fd4be/buildtrees/gtest/x64-linux-dbg
See logs for more information:
/home/antoine/.ezvcpkg/f990dfaa5ba82155f95b75021453c075816fd4be/buildtrees/gtest/install-x64-linux-dbg-out.log

Call Stack (most recent call first):
scripts/cmake/vcpkg_build_cmake.cmake:96 (vcpkg_execute_build_process)
scripts/cmake/vcpkg_install_cmake.cmake:24 (vcpkg_build_cmake)
ports/gtest/portfile.cmake:29 (vcpkg_install_cmake)
scripts/ports.cmake:74 (include)

wiping build trees
-- EZVCPKG done
CMake Warning at /home/antoine/.ezvcpkg/f990dfaa5ba82155f95b75021453c075816fd4be/scripts/buildsystems/vcpkg.cmake:107 (message):
There are no libraries installed for the Vcpkg triplet x64-linux.
Call Stack (most recent call first):
/usr/share/cmake-3.25/Modules/CMakeDetermineSystem.cmake:124 (include)
CMakeLists.txt:38 (project)

-- The C compiler identification is GNU 12.2.0
-- The CXX compiler identification is GNU 12.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.11.2", minimum required is "3")
-- Could NOT find OpenXR (missing: OpenXR_DIR)
CMake Error at /usr/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find the requested OpenXR components, try setting
OPENXR_SDK_SRC_DIR and/or OPENXR_SDK_BUILD_DIR (missing:
OPENXR_OPENXR_INCLUDE_DIR OPENXR_loader_LIBRARY)
Call Stack (most recent call first):
/usr/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
cmake/FindOpenXR.cmake:321 (find_package_handle_standard_args)
/home/antoine/.ezvcpkg/f990dfaa5ba82155f95b75021453c075816fd4be/scripts/buildsystems/vcpkg.cmake:266 (_find_package)
CMakeLists.txt:53 (find_package)

-- Configuring incomplete, errors occurred!
See also "/home/antoine/AndroidStudioProjects/Bille2_VR/OpenXR-Hpp/build/CMakeFiles/CMakeOutput.log".
```

The VCPKG deployment had a problem :

antoine@pcantoine:~/.ezvcpkg/f990dfaa5ba82155f95b75021453c075816fd4be$ ./vcpkg install gtest

==>

```
The following packages will be built and installed:
gtest[core]:x64-linux
Starting package 1/1: gtest:x64-linux
Building package gtest[core]:x64-linux...
-- Using cached /home/antoine/.ezvcpkg/f990dfaa5ba82155f95b75021453c075816fd4be/downloads/google-googletest-b6cd405286ed8635ece71c72f118e659f4ade3fb.tar.gz
-- Extracting source /home/antoine/.ezvcpkg/f990dfaa5ba82155f95b75021453c075816fd4be/downloads/google-googletest-b6cd405286ed8635ece71c72f118e659f4ade3fb.tar.gz
-- Applying patch /home/antoine/.ezvcpkg/f990dfaa5ba82155f95b75021453c075816fd4be/ports/gtest/0002-Fix-z7-override.patch
-- Using source at /home/antoine/.ezvcpkg/f990dfaa5ba82155f95b75021453c075816fd4be/buildtrees/gtest/src/59f4ade3fb-b1f973195c
-- Configuring x64-linux-dbg
-- Configuring x64-linux-rel
-- Building x64-linux-dbg
CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:136 (message):
Command failed: /home/antoine/.ezvcpkg/f990dfaa5ba82155f95b75021453c075816fd4be/downloads/tools/cmake-3.14.0-linux/cmake-3.14.0-Linux-x86_64/bin/cmake --build . --config Debug --target install -- -v
Working Directory: /home/antoine/.ezvcpkg/f990dfaa5ba82155f95b75021453c075816fd4be/buildtrees/gtest/x64-linux-dbg
See logs for more information:
/home/antoine/.ezvcpkg/f990dfaa5ba82155f95b75021453c075816fd4be/buildtrees/gtest/install-x64-linux-dbg-out.log

Call Stack (most recent call first):
scripts/cmake/vcpkg_build_cmake.cmake:96 (vcpkg_execute_build_process)
scripts/cmake/vcpkg_install_cmake.cmake:24 (vcpkg_build_cmake)
ports/gtest/portfile.cmake:29 (vcpkg_install_cmake)
scripts/ports.cmake:74 (include)

Error: Building package gtest:x64-linux failed with: BUILD_FAILED
Please ensure you're using the latest portfiles with `.\vcpkg update`, then
submit an issue at https://github.com/Microsoft/vcpkg/issues including:
Package: gtest:x64-linux
Vcpkg version: 2019.07.18-unknownhash

Additionally, attach any relevant sections from the log files above.
```

Manually compiling, I've found a compiler error about an uninitialized variable ( int dummy) :

antoine@pcantoine:~/.ezvcpkg/f990dfaa5ba82155f95b75021453c075816fd4be$ joe /home/antoine/.ezvcpkg/f990dfaa5ba82155f95b75021453c075816fd4be/buildtrees/gtest/src/59f4ade3fb-b1f973195c/googletest/src/gtest-death-test.cc

```
// Make sure AddressSanitizer does not tamper with the stack here.
GTEST_ATTRIBUTE_NO_SANITIZE_ADDRESS_
static bool StackGrowsDown() {
int dummy;
bool result;
StackLowerThanAddress(&dummy, &result);
return result;
}
# endif // GTEST_HAS_CLONE
```

I fixed this :

```
// Make sure AddressSanitizer does not tamper with the stack here.
GTEST_ATTRIBUTE_NO_SANITIZE_ADDRESS_
static bool StackGrowsDown() {
int dummy = 0;
bool result;
StackLowerThanAddress(&dummy, &result);
return result;
}
# endif // GTEST_HAS_CLONE
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with CMakeLists.txt, cmake/FindOpenXR.cmake, and the gtest installation log to separate the dependency build failure from the missing OpenXR configuration. Review googletest/src/gtest-death-test.cc for the reported uninitialized variable; the issue is resolved when test preparation configures and builds successfully on Debian without the manual workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp
Domain
build-system, testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.