horde3d / Horde3D

Horde3D is a small 3D rendering and animation engine. It is written in an effort to create an engine being as lightweight and conceptually clean as possible.
http://horde3d.org/
1.55k stars 308 forks source link

Won't build on Void Linux #203

Closed niansa closed 2 years ago

niansa commented 2 years ago

Hey, I am experiencing issues building on void linux:

[  4%] Built target project_glfw
[  6%] Built target Horde3DOverlays
[  7%] Built target Horde3DTerrain
[  9%] Built target SampleFramework
[ 10%] Generating project_glfw-prefix/lib/libglfw3.a
Building GLFW
[ 10%] Built target GLFW_LIBRARY_EXTERN
[ 23%] Built target Horde3D
[ 24%] Built target Horde3DUtils
make[2]: *** No rule to make target 'project_glfw-prefix/lib/libglfw3.a', needed by 'Binaries/Linux/Release/Terrain'.  Stop.
make[1]: *** [CMakeFiles/Makefile2:790: Extensions/Terrain/Sample/CMakeFiles/Terrain.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

glfw-devel is definitely installed.

algts commented 2 years ago

Hello. What version of Horde3D are you using (release version/master/develop branches)? What cmake version do you use? Did glfw compile successfully? Do you see generated .a file in 'project_glfw-prefix/lib/'? Do you see this problem only with terrain sample or with other samples as well? Please try to disable terrain extension (HORDE3D_BUILD_TERRAIN) and build again.

niansa commented 2 years ago

Hello. What version of Horde3D are you using (release version/master/develop branches)?

master branch

What cmake version do you use?

cmake version 3.22.1

Did glfw compile successfully?

Seems like it?

Do you see generated .a file in 'project_glfw-prefix/lib/'?

Yes. To be specific, in 'project_glfw-prefix/lib64/'

Do you see this problem only with terrain sample or with other samples as well?

All samples

Please try to disable terrain extension (HORDE3D_BUILD_TERRAIN) and build again.

No change

algts commented 2 years ago

Hello. Well, it seems that the problem is that the file is generated to unexpected path, specifically to "project_glfw-prefix/lib64/". I'll try to replicate the issue, but I don't have machine with void linux installed, debian-based distros do not seem to have this problem. As a workaround, you can try to use glfw from your package manager by unsetting HORDE3D_FORCE_DOWNLOAD_GLFW option and setting GLFW_LIBRARY_PATH manually.

algts commented 2 years ago

Hello. Can you please modify line 52 in FindGLFW.cmake file from CMAKE_ARGS -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> -DGLFW_BUILD_DOCS:BOOL=OFF -DGLFW_BUILD_EXAMPLES:BOOL=OFF -DGLFW_BUILD_TESTS:BOOL=OFF to CMAKE_ARGS -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> -DCMAKE_INSTALL_LIBDIR:PATH=lib -DGLFW_BUILD_DOCS:BOOL=OFF -DGLFW_BUILD_EXAMPLES:BOOL=OFF -DGLFW_BUILD_TESTS:BOOL=OFF

Does it help? It seems that for some reason in void linux CMAKE_INSTALL_LIBDIR defaults to lib64, while on debian-based distros it defaults to lib.

niansa commented 2 years ago

Yep, that helped! Thanks a lot :D

algts commented 2 years ago

Should be fixed by #204. It seems that the issue comes from new cmake versions and not distro. Please reopen if issue persists.