Open michdolan opened 4 years ago
Would you be able to check if this problem still exists with the new 2020 images I've released today? They have changed quite a bit...
It exists in aswf/ocio-ci:2020
(which is the same digest as 2020.3
correct?). I used the above mentioned workaround to resolve it.
I can confirm that this also an issue with the aswf/ci-ocio:2021
Docker image. With the following test CMakeLists.txt
:
project(foo)
find_package(GLEW)
message(STATUS "GLEW_LIBRARIES is ${GLEW_LIBRARIES}")
message(STATUS "GLEW_INCLUDE_DIRS is ${GLEW_INCLUDE_DIRS}")
message(STATUS "GLEW_FOUND is ${GLEW_FOUND}")
you get:
-- Found GLEW: /usr/local/lib64/cmake/glew/glew-config.cmake
-- GLEW_LIBRARIES is
-- GLEW_INCLUDE_DIRS is
-- GLEW_FOUND is TRUE
but if you remove /usr/local/lib64/cmake/glew/glew-config.cmake
from the container, instead:
-- Found GLEW: /usr/local/include (found version "2.1.0")
-- GLEW_LIBRARIES is /usr/local/lib64/libGLEW.so
-- GLEW_INCLUDE_DIRS is /usr/local/include
-- GLEW_FOUND is TRUE
which allows the OpenGL apps and test suite to link correctly (not finding GLEW_INCLUDE_DIRS is not a problem since -I/usr/local/include presumably comes from somewhere else, but not finding the GLEW libraries causes linking errors).
It looks like this is the last thing needed to get OpenGL builds/runs using the Amazon CodeBuild infrastructure, so it would be great to figure this out.
Here is the code of glew-config.cmake which does not create the 'usual' variables. It only defines GLEW::GLEW
.
Here is the cmake issue 19662 (fixed) related to GLEW to enhance the variables to have the missing GLEW_LIBRARIES and GLEW_INCLUDE_DIRS.
Thanks @hodoulp ! Do you think we should apply this patch in the docker images? I'm OK either way.
@aloysbaillet The change is now in OCIO but if other projects need GLEW I think it's worth centralizing the change in the docker scripts.
While moving OCIO CI to GH Actions I encountered a linking error with the GLEW install in the
aswf/ci-base:2020
images. When configuring a build with CMake within this container, GLEW is found through the default FindGLEW.cmake module with the following output:-- Found GLEW: /usr/local/lib64/cmake/glew/glew-config.cmake
In the
aswf/ci-base:2019
the same configure step finds GLEW at:-- Found GLEW: /usr/local/include
The 2019 result links properly, but the 2020 result results in the following linking error during the OCIO build:
I worked around the failure by deleting the GLEW CMake config before running
cmake
with:sudo rm -rf /usr/local/lib64/cmake/glew
Following that, the find module behaves identically to the 2019 container.