[baseline][osg] Prefer GLVND libraries#28089
[baseline][osg] Prefer GLVND libraries#28089dg0yt wants to merge 15 commits intomicrosoft:masterfrom
Conversation
|
Hm, now osg build step doesn't find And the configure step probably also doesn't find the headers: |
|
Now tested with both opengl-registry and mesa installed before osg: It is just a matter of preferring GLVND libraries. osg is stuck at cmake_minimum_required(VERSION 2.8.0) but needs to use the new CMP0072 behaviour. |
|
Hmm that policy affects windows? Seems like a cmake bug to me since glvnd isn't available on windows. |
|
https://gitlab.kitware.com/cmake/cmake/-/blob/master/Modules/FindOpenGL.cmake#L157 doesn't even search for libs it also doesn't set |
|
Yeah, I got the wrong port when I meant to test with mesa :-( |
37c1c13 to
01dba92
Compare
ports/osg/vcpkg.json
Outdated
There was a problem hiding this comment.
At this point I'm only trying to reproduce the CI installation order, by comparing CI config and cache logs.
I still need to reproduce the original issue.
There was a problem hiding this comment.
Looking closer again:
--- config.pr.txt
+++ config.ci.txt
@@ -x +x @@
-- Found OpenGL: opengl32
--- Could NOT find EGL (missing: EGL_LIBRARY)
+-- Found ZLIB: optimized;D:/installed/x64-windows-static-md/lib/zlib.lib;debug;D:/installed/x64-windows-static-md/debug/lib/zlibd.lib (found version "1.2.13")
+-- Found EGL: D:/installed/x64-windows-static-md/lib/libEGL.lib
-- Performing Test GL_HEADER_HAS_GLINT64
--- Performing Test GL_HEADER_HAS_GLINT64 - Failed
+-- Performing Test GL_HEADER_HAS_GLINT64 - Success
-- Performing Test GL_HEADER_HAS_GLUINT64
--- Performing Test GL_HEADER_HAS_GLUINT64 - FailedThere is an extra ZLIB for the full CI, coming from the wrapper in port egl, not from osg's primitive FindEGL.cmake.
That wrapper changes CMAKE_REQUIRED_LIBRARIES before taking a backup. Is this intentional? This probably puts the vcpkg include dir into every following test, via ZLIB::ZLIB.
vcpkg/ports/egl/vcpkg-cmake-wrapper.cmake
Lines 22 to 30 in e46521d
There was a problem hiding this comment.
before taking a backup.
that is probably an accident.
There was a problem hiding this comment.
Also you want to depend on egl instead of angle in this case then
There was a problem hiding this comment.
Also you want to depend on
eglinstead ofanglein this case then
Doesn't matter ATM. Again, it is just for reproducing full CI context.
osg is stuck at cmake_minimum_required(VERSION 2.8.0).
There was a problem hiding this comment.
This is a new experimental fast check for PR issues. Please let us know if this bot is helpful!
PRs must add only one version and must not modify any published versions
When making any changes to a library, the version or port-version in vcpkg.json or CONTROL must be modified.
error: checked-in files for osg have changed but the version was not updated
version: 3.6.5#19
old SHA: bcc0ad3dac22833ea35fde8b207ec76d2838eabd
new SHA: 9fb8f8f9eb17b5ebd52dd267a170b7f9e59c41df
Did you remember to update the version or port version?
Use --overwrite-version to bypass this check
***No files were updated***
|
hmm have you tried |
|
No, I'm still learning MSVC ;-) It is a pity that the include path is not logged. |
to match the name provided by mesa
There was a problem hiding this comment.
This is a new experimental fast check for PR issues. Please let us know if this bot is helpful!
PRs must add only one version and must not modify any published versions
When making any changes to a library, the version or port-version in vcpkg.json or CONTROL must be modified.
error: checked-in files for osg have changed but the version was not updated
version: 3.6.5#19
old SHA: bcc0ad3dac22833ea35fde8b207ec76d2838eabd
new SHA: 6da44a73ec56b8f85a8ac7a3fe29f0de5c52dbff
Did you remember to update the version or port version?
Use --overwrite-version to bypass this check
***No files were updated***
After committing all other changes, the version database must be updated
git add -u && git commit
git checkout 163fe7bd3d67c41200617caaa245b5ba2ba854e6 -- versions
./vcpkg x-add-version --allDiff
diff --git a/versions/baseline.json b/versions/baseline.json
index 1e012bd..2f82011 100644
--- a/versions/baseline.json
+++ b/versions/baseline.json
@@ -4818,7 +4818,7 @@
},
"mesa": {
"baseline": "22.1.7",
- "port-version": 0
+ "port-version": 1
},
"meschach": {
"baseline": "1.2b",
@@ -5498,7 +5498,7 @@
},
"opengl": {
"baseline": "2022-10-08",
- "port-version": 0
+ "port-version": 1
},
"opengl-registry": {
"baseline": "2022-09-29",
diff --git a/versions/m-/mesa.json b/versions/m-/mesa.json
index 9151abe..5907cb7 100644
--- a/versions/m-/mesa.json
+++ b/versions/m-/mesa.json
@@ -1,5 +1,10 @@
{
"versions": [
+ {
+ "git-tree": "7e29ce205a462289948c62291e69076c8cbcdc08",
+ "version": "22.1.7",
+ "port-version": 1
+ },
{
"git-tree": "7febde5a35ffc0cc975e25219121f5dc7048e0ef",
"version": "22.1.7",
diff --git a/versions/o-/opengl.json b/versions/o-/opengl.json
index baed0ae..40cfb45 100644
--- a/versions/o-/opengl.json
+++ b/versions/o-/opengl.json
@@ -1,5 +1,10 @@
{
"versions": [
+ {
+ "git-tree": "219274163ae6b1d5c5629cb77ded47d3e44632ad",
+ "version-date": "2022-10-08",
+ "port-version": 1
+ },
{
"git-tree": "ea1726ace2d45bcfda85af4b7ef80c579bbbccca",
"version-date": "2022-10-08",| endif() | ||
|
|
||
| if(VCPKG_TARGET_IS_WINDOWS AND "opengl" IN_LIST FEATURES) | ||
| # Avoid collision with opengl32 lib from port opengl. |
There was a problem hiding this comment.
hmm consider comparing exported symbols for both. I think they should be identical.
There was a problem hiding this comment.
I can't look at the MSVC version.
But IIUC they even rely on mingw's import lib for linking their tests on mingw:
https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/src/gallium/targets/libgl-gdi/meson.build#L53-55
And the mingw and mesa symbols for lib opengl32 look very similar indeed.
|
#27279 has a libglvnd port if you need it. |
ports/opengl/gl.pc.in
Outdated
|
|
||
| Name: OpenGL | ||
| Description: OpenGL library and headers. | ||
| Name: gl |
There was a problem hiding this comment.
libGL != OpenGL . Historically libGL also contained GLX (GL on X) extensions on linux. https://gitlab.freedesktop.org/glvnd/libglvnd
There was a problem hiding this comment.
Okay.
It leaves some inconsistency because depending on this port provides opengl.pc and glu.pc for windows, but nothing similar is done for windows (not even printing a message to install some system package).
Are there any consumers for opengl.pc?
| if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW) | ||
| vcpkg_get_windows_sdk(WINDOWS_SDK) | ||
|
|
||
| function(copy_from_windows_sdk WINDOWS_SDK) |
There was a problem hiding this comment.
Personally I think this port should install nothing. The WinSDK needs to be externally provided and be made part of the ABI hash
There was a problem hiding this comment.
Personally I think this port should install nothing.
I agree.
The WinSDK needs to be externally provided and be made part of the ABI hash
This either requires a general change to the tool, but a customization of the triplet such as an SDK version check would have the same effect. In that way, it is alreay possible now. So can't the copying to the vcpkg install tree be omitted already now?
The current copying doesn't make the SDK part of the ABI hash either. It probably solves a problem for consumers of pure exports, but not for users of any proper form of vcpkg integration which could switch from a cached artifact using one SDK version to a fresh rebuild using another SDK version as soon as any ABI hash input changes.
Fixes an osg build error, occuring in vcpkg CI. Cf. #28087. (But this PR doesn't resolve the issue that "
#include <GL/gl.h>is ambiguous on case-insensitve file systems".)