Open roastduck opened 1 year ago
I had a similar issue where the compiler could not properly link to GLEW although it was installed.
I'm working on a cluster without sudo privilege and had to compile glew by hand. However, even after adding it to my envvars it wouldn't be found when compiling.
So I just manually set it in the CMakeLists.txt:
You can set the GLEW_INCLUDE_DIRS and BLEW_LIBRARIES manually before adding these into NGP. For instance you can add these two lines:
set(GLEW_INCLUDE_DIRS "/path-to-your-glew/glew-2.1.0/build/cmake/install/include")
set(GLEW_LIBRARIES "/path-to-your-glew/glew-2.1.0/build/cmake/install/lib/libGLEW.so")
right before L153/154
list(APPEND NGP_INCLUDE_DIRECTORIES ${GLEW_INCLUDE_DIRS})
list(APPEND` NGP_LIBRARIES GL ${GLEW_LIBRARIES} $<TARGET_OBJECTS:glfw_objects>)
This is pretty hacky but worked in my case.
Chiming in that I also encountered the exact same issue, and had to follow the same steps that @vincentcartillier suggested above. This resolved the issue for me.
It's unclear what caused this issue, but uninstalling and reinstalling using apt
was not effective. One thing I do notice is that whenever I install GLEW using sudo apt-get install libglew-dev
, the libGLEW.so
library file appears to be a broken symlink.
System Details: Ubuntu 20.04 cmake 3.21.7 gcc/g++ 9.4.0 NVIDIA RTX A5000 CUDA 11.6
Hi, I am building instant-ngp but it reports linking error against GLEW. In my case, CMake has already found GLEW (GLEW 2.2.0 installed via Spack):
But it is not linked successfully:
(more missing references omitted)
I notice the linking command here does not include
-LGLEW
at all. Is it by design or a bug?The full CMake log is:
Thanks in advance.