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 build command failed - alvr_binding.h: No such file or directory #2

Open
amoshydra opened this issue Nov 24, 2024 · 3 comments
Open

Comments

@amoshydra
Copy link

amoshydra commented Nov 24, 2024

Issue

cmake --build . command failed - alvr_binding.h: No such file or directory

Steps taken

Folders:

name branch commit
alvr-monado monado 7955f8bd06cc2b8070f6a1dad64cbc05c77c7a51
alvr_render master c1a07dfeb4d6bccc68ff5bb0fbdd8cbb75a62936
Monado-ALVR main f9ac791

Error message

[  1%] Built target xrt-external-catch2
[  2%] Built target xrt-external-nanopb
[  4%] Built target xrt-external-imgui
[  5%] Built target xrt-external-imgui-sdl2
[  5%] Built target aux_os
[  6%] Built target aux_generated_bindings
[ 15%] Built target aux_util
[ 18%] Built target aux_math
[ 19%] Built target aux_ogl
[ 20%] Built target aux_os_ble
[ 21%] Built target aux_gstreamer
[ 23%] Built target aux_util_sink
[ 26%] Built target aux_tracking
[ 27%] Built target aux_vive
[ 28%] Built target drv_remote
[ 32%] Built target st_gui
[ 33%] Built target drv_qwerty
[ 34%] Built target aux_util_debug_gui
[ 34%] Built target aux_util_process
[ 37%] Built target aux_vk
[ 37%] Building CXX object src/xrt/drivers/alvr_render2/CMakeFiles/AlvrRender.dir/src/alvr_server/NalParsing.cpp.o
/home/username/Downloads/alvr_render/src/alvr_server/NalParsing.cpp:4:10: fatal error: alvr_binding.h: No such file or directory
    4 | #include "alvr_binding.h"
      |          ^~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [src/xrt/drivers/alvr_render2/CMakeFiles/AlvrRender.dir/build.make:163: src/xrt/drivers/alvr_render2/CMakeFiles/AlvrRender.dir/src/alvr_server/NalParsing.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:3621: src/xrt/drivers/alvr_render2/CMakeFiles/AlvrRender.dir/all] Error 2
make: *** [Makefile:146: all] Error 2

Command history:

cd alvr-monado
rustup default stable
cargo xtask build-server-lib
cd ../Monado-ALVR
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Debug -G "Unix Makefiles"
cmake --build .

Distribution

6.12.1-arch1-1

cmake version 3.31.1
python 3.12.7

@amoshydra
Copy link
Author

on my machine alvr_render/src/alvr_binding.h is symlinked to ../../alvr-monado/build/alvr_server_core/alvr_server_core.h

the folder alvr-monado/build/alvr_server_core is empty

@amoshydra
Copy link
Author

The alvr_server_core is empty due to failure to run cargo xtask build-server-lib.

I tried to run the whole build inside a container in podman following (https://github.com/alvr-org/ALVR/wiki/Building-From-Source#streamer-building).

I manage to build up to 84%, but still getting header not found issue.

[ 41%] Built target drv_pssense
[ 42%] Built target drv_psvr
[ 43%] Built target drv_remote
[ 43%] Built target drv_rokid
[ 46%] Built target drv_rift_s
[ 48%] Built target drv_vive
[ 48%] Built target drv_v4l2
[ 49%] Built target drv_multi
[ 52%] Built target drv_wmr
[ 53%] Built target drv_sample
[ 54%] Built target comp_client
[ 59%] Built target comp_render
[ 62%] Built target comp_util
[ 62%] Built target comp_multi
[ 63%] Built target comp_mock
[ 64%] Built target comp_null
[ 71%] Built target st_oxr
[ 73%] Built target st_prober
[ 74%] Built target st_ovrd
[ 76%] Built target ipc_shared
[ 79%] Built target ipc_client
[ 81%] Built target ipc_server
[ 84%] Built target target_lists
[ 84%] Building C object src/xrt/targets/common/CMakeFiles/target_instance.dir/target_instance.c.o
/home/repos/Monado-ALVR/src/xrt/targets/common/target_instance.c:10:10: fatal error: main/comp_target.h: No such file or directory
   10 | #include "main/comp_target.h"
      |          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [src/xrt/targets/common/CMakeFiles/target_instance.dir/build.make:79: src/xrt/targets/common/CMakeFiles/target_instance.dir/target_instance.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:3596: src/xrt/targets/common/CMakeFiles/target_instance.dir/all] Error 2
make: *** [Makefile:146: all] Error 2

The header can be found under: ./repos/Monado-ALVR/src/xrt/compositor/main/comp_target.h

My setup:

# in host
sudo pacman -S nvidia-container-toolkit
sudo nvidia-ctk cdi generate --output=/etc/cdi/nvidia.yaml

mkdir repos
podman run -it --device nvidia.com/gpu=all -v ./repos:/home/repos --workdir=/home archlinux bash
# in container
pacman -Syu --dbonly mesa --noconfirm
pacman -Syu git less rustup make patch cbindgen cmake eigen llvm-libs libedit --noconfirm
pacman -Syu clang curl nasm pkgconf yasm vulkan-headers libva-mesa-driver unzip ffmpeg libpipewire --noconfirm

cd /home/repos

git clone -b monado https://github.com/alvr-org/ALVR.git alvr-monado
git clone https://github.com/The-personified-devil/alvr_render.git alvr_render
git clone https://github.com/alvr-org/Monado-ALVR.git

cd /home/repos/alvr-monado
rustup default stable

# # Optional?
pacman -Syu cuda --noconfirm
export PATH="/opt/cuda/bin:$PATH"
export LD_LIBRARY_PATH="/opt/cuda/lib64"
# # OK to fail at CUDA stage apparently?
RUST_BACKTRACE=1 cargo xtask prepare-deps --platform linux

RUST_BACKTRACE=1 cargo xtask build-server-lib

cd /home/repos/Monado-ALVR
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Debug -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/home/repos/.local
cmake --build .

@The-personified-devil
Copy link
Collaborator

I appreciate the enthusiasm, but as it stands this is pre-alpha and thus heavily relies on hacks to just make it work on my system, including symlinks and has no thorough build process. Once it's far enough I'll create some ci to automatically make builds for testing purposes.

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