Compilation of GHOST_XrGraphicsBinding.cc fails with "invalid conversion" error #111820

Closed
opened 2023-09-02 06:00:01 +02:00 by Frank-Carlyle-McLaughlin · 18 comments

System Information
Operating system: Artix Linux
Graphics card: Radeon RX470

Blender Version
Broken: 3.6.2
Worked: 3.6.2

Compiling Blender using Arch Linux's build files always worked for me previously but now fails with the following:

[91/5351] Building CXX object intern/ghost/CMakeFiles/bf_intern_ghost.dir/intern/GHOST_XrGraphicsBinding.cc.o
FAILED: intern/ghost/CMakeFiles/bf_intern_ghost.dir/intern/GHOST_XrGraphicsBinding.cc.o 
/usr/bin/c++ -DHAVE_MEMFD_CREATE -DHAVE_POLL -DNDEBUG -DPREFIX=\"/usr\" -DWITH_GHOST_WAYLAND -DWITH_GHOST_WAYLAND_DYNLOAD -DWITH_GHOST_WAYLAND_LIBDECOR -DWITH_GHOST_X11 -DWITH_INPUT_NDOF -DWITH_OPENGL -DWITH_X11_XF86VMODE -DWITH_X11_XFIXES -DWITH_X11_XINPUT -DWITH_XDND -DWITH_XF86KEYSYM -DWITH_XR_OPENXR -DXR_OS_LINUX -DXR_USE_GRAPHICS_API_OPENGL -DXR_USE_PLATFORM_EGL -DXR_USE_PLATFORM_WAYLAND -DXR_USE_PLATFORM_XLIB -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D__LITTLE_ENDIAN__ -D__MMX__ -D__SSE2__ -D__SSE__ -I/build/blender/src/blender/intern/ghost -I/build/blender/src/blender/intern/clog -I/build/blender/src/blender/source/blender/blenlib -I/build/blender/src/blender/source/blender/imbuf -I/build/blender/src/blender/source/blender/makesdna -I/build/blender/src/blender/extern/xdnd -isystem /build/blender/src/blender/intern/wayland_dynload/extern -isystem /usr/include/libdecor-0 -isystem /build/blender/src/blender/build/intern/ghost/libwayland -isystem /build/blender/src/blender/extern/json/include -isystem /build/blender/src/blender/extern/tinygltf -isystem /build/blender/src/blender/extern/Eigen3 -Wuninitialized -Wredundant-decls -Wall -Wno-invalid-offsetof -Wno-sign-compare -Wlogical-op -Winit-self -Wmissing-include-dirs -Wno-div-by-zero -Wtype-limits -Werror=return-type -Wno-char-subscripts -Wno-unknown-pragmas -Wpointer-arith -Wunused-parameter -Wwrite-strings -Wundef -Wformat-signedness -Wrestrict -Wno-suggest-override -Wuninitialized -Wno-stringop-overread -Wno-stringop-overflow -Wundef -Wmissing-declarations -Wimplicit-fallthrough=5  -fopenmp -msse -pipe -fPIC -funsigned-char -fno-strict-aliasing -ffp-contract=off -msse2 -fmacro-prefix-map="/build/blender/src/blender/"="" -fmacro-prefix-map="/build/blender/src/blender/build/"="" -Wno-maybe-uninitialized -O2 -DNDEBUG -std=c++17 -MD -MT intern/ghost/CMakeFiles/bf_intern_ghost.dir/intern/GHOST_XrGraphicsBinding.cc.o -MF intern/ghost/CMakeFiles/bf_intern_ghost.dir/intern/GHOST_XrGraphicsBinding.cc.o.d -o intern/ghost/CMakeFiles/bf_intern_ghost.dir/intern/GHOST_XrGraphicsBinding.cc.o -c /build/blender/src/blender/intern/ghost/intern/GHOST_XrGraphicsBinding.cc
In file included from /usr/include/epoxy/egl.h:46,
                 from /build/blender/src/blender/intern/ghost/intern/GHOST_ContextEGL.hh:13,
                 from /build/blender/src/blender/intern/ghost/intern/GHOST_XrGraphicsBinding.cc:12:
/build/blender/src/blender/intern/ghost/intern/GHOST_XrGraphicsBinding.cc: In member function ‘virtual void GHOST_XrGraphicsBindingOpenGL::initFromGhostContext(GHOST_Context&)’:
/build/blender/src/blender/intern/ghost/intern/GHOST_XrGraphicsBinding.cc:154:42: error: invalid conversion from ‘void (* (*)(const char*))()’ to ‘PFN_xrEglGetProcAddressMNDX’ {aka ‘void* (*)(const char*)’} [-fpermissive]
  154 |         oxr_binding.egl.getProcAddress = eglGetProcAddress;
      |                                          ^~~~~~~~~~~~~~~~~
      |                                          |
      |                                          void (* (*)(const char*))()

I can compile successfully with "WITH_GHOST_SDL=ON." This began happening after Arch moved from LLVM15 to LLVM 16. I seem to be the only person to have ever encountered this error, so I presume it's something idiosyncratic about my box, but I'm clueless where even to begin looking. I've experimented with compiling with both LLVM15 and LLVM16. I use X11 and not Wayland. The version of Blender that I'm attempting to compile has not changed.

**System Information** Operating system: Artix Linux Graphics card: Radeon RX470 **Blender Version** Broken: 3.6.2 Worked: 3.6.2 Compiling Blender using Arch Linux's build files always worked for me previously but now fails with the following: ``` [91/5351] Building CXX object intern/ghost/CMakeFiles/bf_intern_ghost.dir/intern/GHOST_XrGraphicsBinding.cc.o FAILED: intern/ghost/CMakeFiles/bf_intern_ghost.dir/intern/GHOST_XrGraphicsBinding.cc.o /usr/bin/c++ -DHAVE_MEMFD_CREATE -DHAVE_POLL -DNDEBUG -DPREFIX=\"/usr\" -DWITH_GHOST_WAYLAND -DWITH_GHOST_WAYLAND_DYNLOAD -DWITH_GHOST_WAYLAND_LIBDECOR -DWITH_GHOST_X11 -DWITH_INPUT_NDOF -DWITH_OPENGL -DWITH_X11_XF86VMODE -DWITH_X11_XFIXES -DWITH_X11_XINPUT -DWITH_XDND -DWITH_XF86KEYSYM -DWITH_XR_OPENXR -DXR_OS_LINUX -DXR_USE_GRAPHICS_API_OPENGL -DXR_USE_PLATFORM_EGL -DXR_USE_PLATFORM_WAYLAND -DXR_USE_PLATFORM_XLIB -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D__LITTLE_ENDIAN__ -D__MMX__ -D__SSE2__ -D__SSE__ -I/build/blender/src/blender/intern/ghost -I/build/blender/src/blender/intern/clog -I/build/blender/src/blender/source/blender/blenlib -I/build/blender/src/blender/source/blender/imbuf -I/build/blender/src/blender/source/blender/makesdna -I/build/blender/src/blender/extern/xdnd -isystem /build/blender/src/blender/intern/wayland_dynload/extern -isystem /usr/include/libdecor-0 -isystem /build/blender/src/blender/build/intern/ghost/libwayland -isystem /build/blender/src/blender/extern/json/include -isystem /build/blender/src/blender/extern/tinygltf -isystem /build/blender/src/blender/extern/Eigen3 -Wuninitialized -Wredundant-decls -Wall -Wno-invalid-offsetof -Wno-sign-compare -Wlogical-op -Winit-self -Wmissing-include-dirs -Wno-div-by-zero -Wtype-limits -Werror=return-type -Wno-char-subscripts -Wno-unknown-pragmas -Wpointer-arith -Wunused-parameter -Wwrite-strings -Wundef -Wformat-signedness -Wrestrict -Wno-suggest-override -Wuninitialized -Wno-stringop-overread -Wno-stringop-overflow -Wundef -Wmissing-declarations -Wimplicit-fallthrough=5 -fopenmp -msse -pipe -fPIC -funsigned-char -fno-strict-aliasing -ffp-contract=off -msse2 -fmacro-prefix-map="/build/blender/src/blender/"="" -fmacro-prefix-map="/build/blender/src/blender/build/"="" -Wno-maybe-uninitialized -O2 -DNDEBUG -std=c++17 -MD -MT intern/ghost/CMakeFiles/bf_intern_ghost.dir/intern/GHOST_XrGraphicsBinding.cc.o -MF intern/ghost/CMakeFiles/bf_intern_ghost.dir/intern/GHOST_XrGraphicsBinding.cc.o.d -o intern/ghost/CMakeFiles/bf_intern_ghost.dir/intern/GHOST_XrGraphicsBinding.cc.o -c /build/blender/src/blender/intern/ghost/intern/GHOST_XrGraphicsBinding.cc In file included from /usr/include/epoxy/egl.h:46, from /build/blender/src/blender/intern/ghost/intern/GHOST_ContextEGL.hh:13, from /build/blender/src/blender/intern/ghost/intern/GHOST_XrGraphicsBinding.cc:12: /build/blender/src/blender/intern/ghost/intern/GHOST_XrGraphicsBinding.cc: In member function ‘virtual void GHOST_XrGraphicsBindingOpenGL::initFromGhostContext(GHOST_Context&)’: /build/blender/src/blender/intern/ghost/intern/GHOST_XrGraphicsBinding.cc:154:42: error: invalid conversion from ‘void (* (*)(const char*))()’ to ‘PFN_xrEglGetProcAddressMNDX’ {aka ‘void* (*)(const char*)’} [-fpermissive] 154 | oxr_binding.egl.getProcAddress = eglGetProcAddress; | ^~~~~~~~~~~~~~~~~ | | | void (* (*)(const char*))() ``` I can compile successfully with "WITH_GHOST_SDL=ON." This began happening after Arch moved from LLVM15 to LLVM 16. I seem to be the only person to have ever encountered this error, so I presume it's something idiosyncratic about my box, but I'm clueless where even to begin looking. I've experimented with compiling with both LLVM15 and LLVM16. I use X11 and not Wayland. The version of Blender that I'm attempting to compile has not changed.
Frank-Carlyle-McLaughlin added the
Priority
Normal
Type
Report
Status
Needs Triage
labels 2023-09-02 06:00:02 +02:00

I was able to reproduce this. I have a Dockerfile where I build Blender and I ran into this. The containers I use are Arch-based so that checks out as well. I was able to get around the error by using WITH_GHOST_SDL=ON like you mentioned.

I was able to reproduce this. I have a [Dockerfile](https://github.com/a13xie/blender-docker/blob/master/Dockerfile) where I build Blender and I ran into this. The containers I use are Arch-based so that checks out as well. I was able to get around the error by using `WITH_GHOST_SDL=ON` like you mentioned.
Member

GHOST_XrGraphicsBinding.cc is c plus plus, it probably needs a type casting there.

If nothing else I guess I'll make a patch later on.

happening after Arch moved from LLVM15 to LLVM 16

Probably because the compiler gets more strict.

`GHOST_XrGraphicsBinding.cc` is c plus plus, it probably needs a type casting there. If nothing else I guess I'll make a patch later on. > happening after Arch moved from LLVM15 to LLVM 16 Probably because the compiler gets more strict.
YimingWu self-assigned this 2023-09-04 05:35:19 +02:00
YimingWu added
Module
Core
Status
Needs Info from Developers
and removed
Status
Needs Triage
labels 2023-09-04 05:35:32 +02:00

GHOST_XrGraphicsBinding.cc is c plus plus, it probably needs a type casting there.

If nothing else I guess I'll make a patch later on.

happening after Arch moved from LLVM15 to LLVM 16

Probably because the compiler gets more strict.

I'd be happy to try testing any such patch, if that'd help.

> `GHOST_XrGraphicsBinding.cc` is c plus plus, it probably needs a type casting there. > > If nothing else I guess I'll make a patch later on. > > > happening after Arch moved from LLVM15 to LLVM 16 > > Probably because the compiler gets more strict. I'd be happy to try testing any such patch, if that'd help.
Member
@Frank-Carlyle-McLaughlin Could you test: #111915?

GHOST_XrGraphicsBinding.cc is c plus plus, it probably needs a type casting there.

If nothing else I guess I'll make a patch later on.

happening after Arch moved from LLVM15 to LLVM 16

Probably because the compiler gets more strict.

That would be much appreciated ❤️

I'd happily test it as well.

> `GHOST_XrGraphicsBinding.cc` is c plus plus, it probably needs a type casting there. > > If nothing else I guess I'll make a patch later on. > > > happening after Arch moved from LLVM15 to LLVM 16 > > Probably because the compiler gets more strict. That would be much appreciated ❤️ I'd happily test it as well.

Unfortunately, that patch didn't help me. I tested Arch's official PKGBUILD (which uses LLVM 15) with just that one change. I also tested a few different personal configurations using LLVM 16 (and OSL disabled, but compilation never got that far). I get largely the same result no matter what:

FAILED: intern/ghost/CMakeFiles/bf_intern_ghost.dir/intern/GHOST_XrGraphicsBinding.cc.o 
/usr/bin/c++ -DHAVE_MEMFD_CREATE -DHAVE_POLL -DNDEBUG -DPREFIX=\"/usr\" -DWITH_GHOST_WAYLAND -DWITH_GHOST_WAYLAND_DYNLOAD -DWITH_GHOST_WAYLAND_LIBDECOR -DWITH_GHOST_X11 -DWITH_INPUT_NDOF -DWITH_OPENGL -DWITH_X11_XF86VMODE -DWITH_X11_XFIXES -DWITH_X11_XINPUT -DWITH_XDND -DWITH_XF86KEYSYM -DWITH_XR_OPENXR -DXR_OS_LINUX -DXR_USE_GRAPHICS_API_OPENGL -DXR_USE_PLATFORM_EGL -DXR_USE_PLATFORM_WAYLAND -DXR_USE_PLATFORM_XLIB -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D__LITTLE_ENDIAN__ -D__MMX__ -D__SSE2__ -D__SSE__ -I/build/blender/src/blender/intern/ghost -I/build/blender/src/blender/intern/clog -I/build/blender/src/blender/source/blender/blenlib -I/build/blender/src/blender/source/blender/imbuf -I/build/blender/src/blender/source/blender/makesdna -I/build/blender/src/blender/extern/xdnd -isystem /build/blender/src/blender/intern/wayland_dynload/extern -isystem /usr/include/libdecor-0 -isystem /build/blender/src/blender/build/intern/ghost/libwayland -isystem /build/blender/src/blender/extern/json/include -isystem /build/blender/src/blender/extern/tinygltf -isystem /build/blender/src/blender/extern/Eigen3 -Wuninitialized -Wredundant-decls -Wall -Wno-invalid-offsetof -Wno-sign-compare -Wlogical-op -Winit-self -Wmissing-include-dirs -Wno-div-by-zero -Wtype-limits -Werror=return-type -Wno-char-subscripts -Wno-unknown-pragmas -Wpointer-arith -Wunused-parameter -Wwrite-strings -Wundef -Wformat-signedness -Wrestrict -Wno-suggest-override -Wuninitialized -Wno-stringop-overread -Wno-stringop-overflow -Wundef -Wmissing-declarations -Wimplicit-fallthrough=5  -fopenmp -msse -pipe -fPIC -funsigned-char -fno-strict-aliasing -ffp-contract=off -msse2 -fmacro-prefix-map="/build/blender/src/blender/"="" -fmacro-prefix-map="/build/blender/src/blender/build/"="" -Wno-maybe-uninitialized -O2 -DNDEBUG -std=c++17 -MD -MT intern/ghost/CMakeFiles/bf_intern_ghost.dir/intern/GHOST_XrGraphicsBinding.cc.o -MF intern/ghost/CMakeFiles/bf_intern_ghost.dir/intern/GHOST_XrGraphicsBinding.cc.o.d -o intern/ghost/CMakeFiles/bf_intern_ghost.dir/intern/GHOST_XrGraphicsBinding.cc.o -c /build/blender/src/blender/intern/ghost/intern/GHOST_XrGraphicsBinding.cc
In file included from /usr/include/epoxy/egl.h:46,
                 from /build/blender/src/blender/intern/ghost/intern/GHOST_ContextEGL.hh:13,
                 from /build/blender/src/blender/intern/ghost/intern/GHOST_XrGraphicsBinding.cc:12:
/build/blender/src/blender/intern/ghost/intern/GHOST_XrGraphicsBinding.cc: In member function ‘virtual void GHOST_XrGraphicsBindingOpenGL::initFromGhostContext(GHOST_Context&)’:
/build/blender/src/blender/intern/ghost/intern/GHOST_XrGraphicsBinding.cc:154:80: error: invalid conversion from ‘void (* (*)(const char*))()’ to ‘PFN_xrEglGetProcAddressMNDX’ {aka ‘void* (*)(const char*)’} [-fpermissive]
  154 |         oxr_binding.egl.getProcAddress = static_cast<PFNEGLGETPROCADDRESSPROC>(eglGetProcAddress);
      |                                                                                ^~~~~~~~~~~~~~~~~
      |                                                                                |
      |                                                                                void (* (*)(const char*))()

For what little it's probably worth, I did a bit of poking, and it seems that OpenXR recently made a change involving "eglGetProcAddress" in version 1.0.29 (see f66902f299). I can't figure out a way to link directly to it, but it looks like they added the line

<type category="funcpointer">typedef void *(*<name>PFN_xrEglGetProcAddressMNDX</name>)(const <type>char</type> *name);</type>

and changed an instance of PFNEGLGETPROCADDRESSPROC to PFN_xrEglGetProcAddressMNDX in file "specification/registry/xr.xml", if that's any help at all.

Unfortunately, that patch didn't help me. I tested Arch's official PKGBUILD (which uses LLVM 15) with just that one change. I also tested a few different personal configurations using LLVM 16 (and OSL disabled, but compilation never got that far). I get largely the same result no matter what: ``` FAILED: intern/ghost/CMakeFiles/bf_intern_ghost.dir/intern/GHOST_XrGraphicsBinding.cc.o /usr/bin/c++ -DHAVE_MEMFD_CREATE -DHAVE_POLL -DNDEBUG -DPREFIX=\"/usr\" -DWITH_GHOST_WAYLAND -DWITH_GHOST_WAYLAND_DYNLOAD -DWITH_GHOST_WAYLAND_LIBDECOR -DWITH_GHOST_X11 -DWITH_INPUT_NDOF -DWITH_OPENGL -DWITH_X11_XF86VMODE -DWITH_X11_XFIXES -DWITH_X11_XINPUT -DWITH_XDND -DWITH_XF86KEYSYM -DWITH_XR_OPENXR -DXR_OS_LINUX -DXR_USE_GRAPHICS_API_OPENGL -DXR_USE_PLATFORM_EGL -DXR_USE_PLATFORM_WAYLAND -DXR_USE_PLATFORM_XLIB -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D__LITTLE_ENDIAN__ -D__MMX__ -D__SSE2__ -D__SSE__ -I/build/blender/src/blender/intern/ghost -I/build/blender/src/blender/intern/clog -I/build/blender/src/blender/source/blender/blenlib -I/build/blender/src/blender/source/blender/imbuf -I/build/blender/src/blender/source/blender/makesdna -I/build/blender/src/blender/extern/xdnd -isystem /build/blender/src/blender/intern/wayland_dynload/extern -isystem /usr/include/libdecor-0 -isystem /build/blender/src/blender/build/intern/ghost/libwayland -isystem /build/blender/src/blender/extern/json/include -isystem /build/blender/src/blender/extern/tinygltf -isystem /build/blender/src/blender/extern/Eigen3 -Wuninitialized -Wredundant-decls -Wall -Wno-invalid-offsetof -Wno-sign-compare -Wlogical-op -Winit-self -Wmissing-include-dirs -Wno-div-by-zero -Wtype-limits -Werror=return-type -Wno-char-subscripts -Wno-unknown-pragmas -Wpointer-arith -Wunused-parameter -Wwrite-strings -Wundef -Wformat-signedness -Wrestrict -Wno-suggest-override -Wuninitialized -Wno-stringop-overread -Wno-stringop-overflow -Wundef -Wmissing-declarations -Wimplicit-fallthrough=5 -fopenmp -msse -pipe -fPIC -funsigned-char -fno-strict-aliasing -ffp-contract=off -msse2 -fmacro-prefix-map="/build/blender/src/blender/"="" -fmacro-prefix-map="/build/blender/src/blender/build/"="" -Wno-maybe-uninitialized -O2 -DNDEBUG -std=c++17 -MD -MT intern/ghost/CMakeFiles/bf_intern_ghost.dir/intern/GHOST_XrGraphicsBinding.cc.o -MF intern/ghost/CMakeFiles/bf_intern_ghost.dir/intern/GHOST_XrGraphicsBinding.cc.o.d -o intern/ghost/CMakeFiles/bf_intern_ghost.dir/intern/GHOST_XrGraphicsBinding.cc.o -c /build/blender/src/blender/intern/ghost/intern/GHOST_XrGraphicsBinding.cc In file included from /usr/include/epoxy/egl.h:46, from /build/blender/src/blender/intern/ghost/intern/GHOST_ContextEGL.hh:13, from /build/blender/src/blender/intern/ghost/intern/GHOST_XrGraphicsBinding.cc:12: /build/blender/src/blender/intern/ghost/intern/GHOST_XrGraphicsBinding.cc: In member function ‘virtual void GHOST_XrGraphicsBindingOpenGL::initFromGhostContext(GHOST_Context&)’: /build/blender/src/blender/intern/ghost/intern/GHOST_XrGraphicsBinding.cc:154:80: error: invalid conversion from ‘void (* (*)(const char*))()’ to ‘PFN_xrEglGetProcAddressMNDX’ {aka ‘void* (*)(const char*)’} [-fpermissive] 154 | oxr_binding.egl.getProcAddress = static_cast<PFNEGLGETPROCADDRESSPROC>(eglGetProcAddress); | ^~~~~~~~~~~~~~~~~ | | | void (* (*)(const char*))() ``` For what little it's probably worth, I did a bit of poking, and it seems that OpenXR recently made a change involving "eglGetProcAddress" in version 1.0.29 (see https://github.com/KhronosGroup/OpenXR-SDK-Source/commit/f66902f299e6f50cd8f6ff55c2d591963655ad08). I can't figure out a way to link directly to it, but it looks like they added the line ``` <type category="funcpointer">typedef void *(*<name>PFN_xrEglGetProcAddressMNDX</name>)(const <type>char</type> *name);</type> ``` and changed an instance of `PFNEGLGETPROCADDRESSPROC` to `PFN_xrEglGetProcAddressMNDX` in file "specification/registry/xr.xml", if that's any help at all.
Member

and changed an instance of PFNEGLGETPROCADDRESSPROC to PFN_xrEglGetProcAddressMNDX, if that's any help at all.

Interesting, here on my installation the header still shows as PFNEGLGETPROCADDRESSPROC. I guess maybe blender compilation libs needs an update (Or not, to be compatible with their centos machine...). For now I think if these libs doesn't officially support llvm16 (or like, reporting this issue to OpenXR), we probably will be stuck with this.

> and changed an instance of PFNEGLGETPROCADDRESSPROC to PFN_xrEglGetProcAddressMNDX, if that's any help at all. Interesting, here on my installation the header still shows as `PFNEGLGETPROCADDRESSPROC`. I guess maybe blender compilation libs needs an update (Or not, to be compatible with their centos machine...). For now I think if these libs doesn't officially support llvm16 (or like, reporting this issue to OpenXR), we probably will be stuck with this.

and changed an instance of PFNEGLGETPROCADDRESSPROC to PFN_xrEglGetProcAddressMNDX, if that's any help at all.

Interesting, here on my installation the header still shows as PFNEGLGETPROCADDRESSPROC. I guess maybe blender compilation libs needs an update (Or not, to be compatible with their centos machine...). For now I think if these libs doesn't officially support llvm16 (or like, reporting this issue to OpenXR), we probably will be stuck with this.

There seems to be an instance of that, too. I don't claim to understand any of it! That's just what I got from downloading the sources for both 1.0.28 and 1.0.29, grepping for "eglgetprocaddress," and comparing the results. I was hoping maybe what they did would provide a useful clue -- possibly the "typedef void" bit in the added line.

> > and changed an instance of PFNEGLGETPROCADDRESSPROC to PFN_xrEglGetProcAddressMNDX, if that's any help at all. > > Interesting, here on my installation the header still shows as `PFNEGLGETPROCADDRESSPROC`. I guess maybe blender compilation libs needs an update (Or not, to be compatible with their centos machine...). For now I think if these libs doesn't officially support llvm16 (or like, reporting this issue to OpenXR), we probably will be stuck with this. There seems to be an instance of that, too. I don't claim to understand any of it! That's just what I got from downloading the sources for both 1.0.28 and 1.0.29, grepping for "eglgetprocaddress," and comparing the results. I was hoping maybe what they did would provide a useful clue -- possibly the "typedef void" bit in the added line.

Yup, unfortunately seems like this isn't enough :/

897.7 [34/5272] Building CXX object intern/ghost/CMakeFiles/bf_intern_ghost.dir/intern/GHOST_XrGraphicsBinding.cc.o
897.7 FAILED: intern/ghost/CMakeFiles/bf_intern_ghost.dir/intern/GHOST_XrGraphicsBinding.cc.o 
897.7 /usr/sbin/c++ -DNDEBUG -DPREFIX=\"/usr\" -DWITH_GHOST_X11 -DWITH_INPUT_NDOF -DWITH_OPENGL -DWITH_X11_XF86VMODE -DWITH_X11_XFIXES -DWITH_X11_XINPUT -DWITH_XDND -DWITH_XF86KEYSYM -DWITH_XR_OPENXR -DXR_OS_LINUX -DXR_USE_GRAPHICS_API_OPENGL -DXR_USE_PLATFORM_EGL -DXR_USE_PLATFORM_XLIB -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D__LITTLE_ENDIAN__ -D__MMX__ -D__SSE2__ -D__SSE__ -I/home/builder/.cache/pikaur/build/blender/src/blender/intern/ghost -I/home/builder/.cache/pikaur/build/blender/src/blender/intern/clog -I/home/builder/.cache/pikaur/build/blender/src/blender/source/blender/blenlib -I/home/builder/.cache/pikaur/build/blender/src/blender/source/blender/imbuf -I/home/builder/.cache/pikaur/build/blender/src/blender/source/blender/makesdna -I/home/builder/.cache/pikaur/build/blender/src/blender/extern/xdnd -isystem /home/builder/.cache/pikaur/build/blender/src/blender/extern/json/include -isystem /home/builder/.cache/pikaur/build/blender/src/blender/extern/tinygltf -isystem /home/builder/.cache/pikaur/build/blender/src/blender/extern/Eigen3 -Wuninitialized -Wredundant-decls -Wall -Wno-invalid-offsetof -Wno-sign-compare -Wlogical-op -Winit-self -Wmissing-include-dirs -Wno-div-by-zero -Wtype-limits -Werror=return-type -Wno-char-subscripts -Wno-unknown-pragmas -Wpointer-arith -Wunused-parameter -Wwrite-strings -Wundef -Wformat-signedness -Wrestrict -Wno-suggest-override -Wuninitialized -Wno-stringop-overread -Wno-stringop-overflow -Wundef -Wmissing-declarations -Wimplicit-fallthrough=5 -I /usr/include/python3.11 -fopenmp -msse -pipe -fPIC -funsigned-char -fno-strict-aliasing -ffp-contract=off -msse2 -fmacro-prefix-map="/home/builder/.cache/pikaur/build/blender/src/blender/"="" -fmacro-prefix-map="/home/builder/.cache/pikaur/build/blender/src/blender/build/"="" -Wno-maybe-uninitialized -O2 -DNDEBUG -std=c++17 -MD -MT intern/ghost/CMakeFiles/bf_intern_ghost.dir/intern/GHOST_XrGraphicsBinding.cc.o -MF intern/ghost/CMakeFiles/bf_intern_ghost.dir/intern/GHOST_XrGraphicsBinding.cc.o.d -o intern/ghost/CMakeFiles/bf_intern_ghost.dir/intern/GHOST_XrGraphicsBinding.cc.o -c /home/builder/.cache/pikaur/build/blender/src/blender/intern/ghost/intern/GHOST_XrGraphicsBinding.cc
897.7 In file included from /usr/include/epoxy/egl.h:46,
897.7                  from /home/builder/.cache/pikaur/build/blender/src/blender/intern/ghost/intern/GHOST_ContextEGL.hh:13,
897.7                  from /home/builder/.cache/pikaur/build/blender/src/blender/intern/ghost/intern/GHOST_XrGraphicsBinding.cc:12:
897.7 /home/builder/.cache/pikaur/build/blender/src/blender/intern/ghost/intern/GHOST_XrGraphicsBinding.cc: In member function ‘virtual void GHOST_XrGraphicsBindingOpenGL::initFromGhostContext(GHOST_Context&)’:
897.7 /home/builder/.cache/pikaur/build/blender/src/blender/intern/ghost/intern/GHOST_XrGraphicsBinding.cc:154:80: error: invalid conversion from ‘void (* (*)(const char*))()’ to ‘PFN_xrEglGetProcAddressMNDX’ {aka ‘void* (*)(const char*)’} [-fpermissive]
897.7   154 |         oxr_binding.egl.getProcAddress = static_cast<PFNEGLGETPROCADDRESSPROC>(eglGetProcAddress);
897.7       |                                                                                ^~~~~~~~~~~~~~~~~
897.7       |                                                                                |
897.7       |                                                                                void (* (*)(const char*))()
Yup, unfortunately seems like this isn't enough :/ ``` 897.7 [34/5272] Building CXX object intern/ghost/CMakeFiles/bf_intern_ghost.dir/intern/GHOST_XrGraphicsBinding.cc.o 897.7 FAILED: intern/ghost/CMakeFiles/bf_intern_ghost.dir/intern/GHOST_XrGraphicsBinding.cc.o 897.7 /usr/sbin/c++ -DNDEBUG -DPREFIX=\"/usr\" -DWITH_GHOST_X11 -DWITH_INPUT_NDOF -DWITH_OPENGL -DWITH_X11_XF86VMODE -DWITH_X11_XFIXES -DWITH_X11_XINPUT -DWITH_XDND -DWITH_XF86KEYSYM -DWITH_XR_OPENXR -DXR_OS_LINUX -DXR_USE_GRAPHICS_API_OPENGL -DXR_USE_PLATFORM_EGL -DXR_USE_PLATFORM_XLIB -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D__LITTLE_ENDIAN__ -D__MMX__ -D__SSE2__ -D__SSE__ -I/home/builder/.cache/pikaur/build/blender/src/blender/intern/ghost -I/home/builder/.cache/pikaur/build/blender/src/blender/intern/clog -I/home/builder/.cache/pikaur/build/blender/src/blender/source/blender/blenlib -I/home/builder/.cache/pikaur/build/blender/src/blender/source/blender/imbuf -I/home/builder/.cache/pikaur/build/blender/src/blender/source/blender/makesdna -I/home/builder/.cache/pikaur/build/blender/src/blender/extern/xdnd -isystem /home/builder/.cache/pikaur/build/blender/src/blender/extern/json/include -isystem /home/builder/.cache/pikaur/build/blender/src/blender/extern/tinygltf -isystem /home/builder/.cache/pikaur/build/blender/src/blender/extern/Eigen3 -Wuninitialized -Wredundant-decls -Wall -Wno-invalid-offsetof -Wno-sign-compare -Wlogical-op -Winit-self -Wmissing-include-dirs -Wno-div-by-zero -Wtype-limits -Werror=return-type -Wno-char-subscripts -Wno-unknown-pragmas -Wpointer-arith -Wunused-parameter -Wwrite-strings -Wundef -Wformat-signedness -Wrestrict -Wno-suggest-override -Wuninitialized -Wno-stringop-overread -Wno-stringop-overflow -Wundef -Wmissing-declarations -Wimplicit-fallthrough=5 -I /usr/include/python3.11 -fopenmp -msse -pipe -fPIC -funsigned-char -fno-strict-aliasing -ffp-contract=off -msse2 -fmacro-prefix-map="/home/builder/.cache/pikaur/build/blender/src/blender/"="" -fmacro-prefix-map="/home/builder/.cache/pikaur/build/blender/src/blender/build/"="" -Wno-maybe-uninitialized -O2 -DNDEBUG -std=c++17 -MD -MT intern/ghost/CMakeFiles/bf_intern_ghost.dir/intern/GHOST_XrGraphicsBinding.cc.o -MF intern/ghost/CMakeFiles/bf_intern_ghost.dir/intern/GHOST_XrGraphicsBinding.cc.o.d -o intern/ghost/CMakeFiles/bf_intern_ghost.dir/intern/GHOST_XrGraphicsBinding.cc.o -c /home/builder/.cache/pikaur/build/blender/src/blender/intern/ghost/intern/GHOST_XrGraphicsBinding.cc 897.7 In file included from /usr/include/epoxy/egl.h:46, 897.7 from /home/builder/.cache/pikaur/build/blender/src/blender/intern/ghost/intern/GHOST_ContextEGL.hh:13, 897.7 from /home/builder/.cache/pikaur/build/blender/src/blender/intern/ghost/intern/GHOST_XrGraphicsBinding.cc:12: 897.7 /home/builder/.cache/pikaur/build/blender/src/blender/intern/ghost/intern/GHOST_XrGraphicsBinding.cc: In member function ‘virtual void GHOST_XrGraphicsBindingOpenGL::initFromGhostContext(GHOST_Context&)’: 897.7 /home/builder/.cache/pikaur/build/blender/src/blender/intern/ghost/intern/GHOST_XrGraphicsBinding.cc:154:80: error: invalid conversion from ‘void (* (*)(const char*))()’ to ‘PFN_xrEglGetProcAddressMNDX’ {aka ‘void* (*)(const char*)’} [-fpermissive] 897.7 154 | oxr_binding.egl.getProcAddress = static_cast<PFNEGLGETPROCADDRESSPROC>(eglGetProcAddress); 897.7 | ^~~~~~~~~~~~~~~~~ 897.7 | | 897.7 | void (* (*)(const char*))() ```

On a hunch, I tried compiling without OpenXR using my own LLVM 16 build (i.e., -DWITH_XR_OPENXR=OFF), and it succeeded! Due to #111834, I also compiled it without OpenShadingLanguage (i.e., -DWITH_CYCLES_OSL=OFF), and I encountered no ensuing weirdness with using Cycles otherwise. I then tested a vanilla (i.e., without your patch) build of Arch's official PKGBUILD but with OpenXR downgraded to version 1.0.28 in the compilation chroot, and that also succeeded! Due again to #111834, I had to use the trick of specifying the driver and library path for the prior LLVM 15 version of mesa, but even with OpenXR 1.0.29 actually installed, it otherwise opened and ran fine (although I have no way to test any of OpenXR's special functions, because I have no VR or AR anything). So it appears that there's some kind of incompatibility with the current version of OpenXR (which claims to have made the abovementioned change "to avoid compiler errors"), and the patch doesn't make any difference one way or the other. Hope that helps.

On a hunch, I tried compiling without OpenXR using my own LLVM 16 build (i.e., `-DWITH_XR_OPENXR=OFF`), and it succeeded! Due to #111834, I also compiled it without OpenShadingLanguage (i.e., `-DWITH_CYCLES_OSL=OFF`), and I encountered no ensuing weirdness with using Cycles otherwise. I then tested a vanilla (i.e., without your patch) build of Arch's official PKGBUILD but with OpenXR downgraded to version 1.0.28 in the compilation chroot, and that also succeeded! Due again to #111834, I had to use the trick of specifying the driver and library path for the prior LLVM 15 version of mesa, but even with OpenXR 1.0.29 actually installed, it otherwise opened and ran fine (although I have no way to test any of OpenXR's special functions, because I have no VR or AR anything). So it appears that there's some kind of incompatibility with the current version of OpenXR (which claims to have made the abovementioned change "to avoid compiler errors"), and the patch doesn't make any difference one way or the other. Hope that helps.

@Frank-Carlyle-McLaughlin Thanks for mentioning #111834, I thought WITH_GHOST_SDL=ON was the reason my build was crashing, now I know that it's because of OSL. I'll keep an eye on that report as well.

@Frank-Carlyle-McLaughlin Thanks for mentioning #111834, I thought `WITH_GHOST_SDL=ON` was the reason my build was crashing, now I know that it's because of OSL. I'll keep an eye on that report as well.
Member

@a13xie @Frank-Carlyle-McLaughlin could you guys test again?

@a13xie @Frank-Carlyle-McLaughlin could you guys test again?

I regret to report that compilation still did not succeed, although the error does look a little bit different now:

FAILED: intern/ghost/CMakeFiles/bf_intern_ghost.dir/intern/GHOST_XrGraphicsBinding.cc.o 
/usr/bin/c++ -DHAVE_MEMFD_CREATE -DHAVE_POLL -DNDEBUG -DPREFIX=\"/usr\" -DWITH_GHOST_WAYLAND -DWITH_GHOST_WAYLAND_DYNLOAD -DWITH_GHOST_WAYLAND_LIBDECOR -DWITH_GHOST_X11 -DWITH_INPUT_NDOF -DWITH_OPENGL -DWITH_X11_XF86VMODE -DWITH_X11_XFIXES -DWITH_X11_XINPUT -DWITH_XDND -DWITH_XF86KEYSYM -DWITH_XR_OPENXR -DXR_OS_LINUX -DXR_USE_GRAPHICS_API_OPENGL -DXR_USE_PLATFORM_EGL -DXR_USE_PLATFORM_WAYLAND -DXR_USE_PLATFORM_XLIB -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D__LITTLE_ENDIAN__ -D__MMX__ -D__SSE2__ -D__SSE__ -I/build/blender/src/blender/intern/ghost -I/build/blender/src/blender/intern/clog -I/build/blender/src/blender/source/blender/blenlib -I/build/blender/src/blender/source/blender/imbuf -I/build/blender/src/blender/source/blender/makesdna -I/build/blender/src/blender/extern/xdnd -isystem /build/blender/src/blender/intern/wayland_dynload/extern -isystem /usr/include/libdecor-0 -isystem /build/blender/src/blender/build/intern/ghost/libwayland -isystem /build/blender/src/blender/extern/json/include -isystem /build/blender/src/blender/extern/tinygltf -isystem /build/blender/src/blender/extern/Eigen3 -Wuninitialized -Wredundant-decls -Wall -Wno-invalid-offsetof -Wno-sign-compare -Wlogical-op -Winit-self -Wmissing-include-dirs -Wno-div-by-zero -Wtype-limits -Werror=return-type -Wno-char-subscripts -Wno-unknown-pragmas -Wpointer-arith -Wunused-parameter -Wwrite-strings -Wundef -Wformat-signedness -Wrestrict -Wno-suggest-override -Wuninitialized -Wno-stringop-overread -Wno-stringop-overflow -Wundef -Wmissing-declarations -Wimplicit-fallthrough=5  -fopenmp -msse -pipe -fPIC -funsigned-char -fno-strict-aliasing -ffp-contract=off -msse2 -fmacro-prefix-map="/build/blender/src/blender/"="" -fmacro-prefix-map="/build/blender/src/blender/build/"="" -Wno-maybe-uninitialized -O2 -DNDEBUG -std=c++17 -MD -MT intern/ghost/CMakeFiles/bf_intern_ghost.dir/intern/GHOST_XrGraphicsBinding.cc.o -MF intern/ghost/CMakeFiles/bf_intern_ghost.dir/intern/GHOST_XrGraphicsBinding.cc.o.d -o intern/ghost/CMakeFiles/bf_intern_ghost.dir/intern/GHOST_XrGraphicsBinding.cc.o -c /build/blender/src/blender/intern/ghost/intern/GHOST_XrGraphicsBinding.cc
/build/blender/src/blender/intern/ghost/intern/GHOST_XrGraphicsBinding.cc: In member function ‘virtual void GHOST_XrGraphicsBindingOpenGL::initFromGhostContext(GHOST_Context&)’:
/build/blender/src/blender/intern/ghost/intern/GHOST_XrGraphicsBinding.cc:157:42: error: invalid ‘static_cast’ from type ‘void (* (*)(const char*))()’ to type ‘PFN_xrEglGetProcAddressMNDX’ {aka ‘void* (*)(const char*)’}
  157 |         oxr_binding.egl.getProcAddress = static_cast<PFN_xrEglGetProcAddressMNDX>(
      |                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  158 |             eglGetProcAddress);
      |             ~~~~~~~~~~~~~~~~~~            

I tested this both with Arch's PKGBUILD with only that patch added, and with my own customized build (i.e., with LLVM 16 and no OSL), and got the same thing either way.

For the record, and just to be sure I didn't goof up the implementation, I created and applied the following patch:

--- a/intern/ghost/intern/GHOST_XrGraphicsBinding.cc
+++ b/intern/ghost/intern/GHOST_XrGraphicsBinding.cc
@@ -1,4 +1,6 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* SPDX-FileCopyrightText: 2020-2023 Blender Authors
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later */
 
 /** \file
  * \ingroup GHOST
@@ -142,7 +144,7 @@
 #  if defined(WITH_GHOST_WAYLAND)
         /* #GHOST_SystemWayland */
         oxr_binding.wl.type = XR_TYPE_GRAPHICS_BINDING_OPENGL_WAYLAND_KHR;
-        oxr_binding.wl.display = (struct wl_display *)ctx_egl.m_nativeDisplay;
+        oxr_binding.wl.display = (wl_display *)ctx_egl.m_nativeDisplay;
 #  else
         GHOST_ASSERT(false, "Unexpected State: logical error, unreachable!");
 #  endif /* !WITH_GHOST_WAYLAND */
@@ -151,7 +153,12 @@
 #  if defined(WITH_GHOST_X11)
         /* #GHOST_SystemX11. */
         oxr_binding.egl.type = XR_TYPE_GRAPHICS_BINDING_EGL_MNDX;
-        oxr_binding.egl.getProcAddress = eglGetProcAddress;
+#    if XR_CURRENT_API_VERSION >= XR_MAKE_VERSION(1, 0, 29)
+        oxr_binding.egl.getProcAddress = static_cast<PFN_xrEglGetProcAddressMNDX>(
+            eglGetProcAddress);
+#    else
+        oxr_binding.egl.getProcAddress = static_cast<PFNEGLGETPROCADDRESSPROC>(eglGetProcAddress);
+#    endif
         oxr_binding.egl.display = ctx_egl.getDisplay();
         oxr_binding.egl.config = ctx_egl.getConfig();
         oxr_binding.egl.context = ctx_egl.getContext();
I regret to report that compilation still did not succeed, although the error does look a little bit different now: ``` FAILED: intern/ghost/CMakeFiles/bf_intern_ghost.dir/intern/GHOST_XrGraphicsBinding.cc.o /usr/bin/c++ -DHAVE_MEMFD_CREATE -DHAVE_POLL -DNDEBUG -DPREFIX=\"/usr\" -DWITH_GHOST_WAYLAND -DWITH_GHOST_WAYLAND_DYNLOAD -DWITH_GHOST_WAYLAND_LIBDECOR -DWITH_GHOST_X11 -DWITH_INPUT_NDOF -DWITH_OPENGL -DWITH_X11_XF86VMODE -DWITH_X11_XFIXES -DWITH_X11_XINPUT -DWITH_XDND -DWITH_XF86KEYSYM -DWITH_XR_OPENXR -DXR_OS_LINUX -DXR_USE_GRAPHICS_API_OPENGL -DXR_USE_PLATFORM_EGL -DXR_USE_PLATFORM_WAYLAND -DXR_USE_PLATFORM_XLIB -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D__LITTLE_ENDIAN__ -D__MMX__ -D__SSE2__ -D__SSE__ -I/build/blender/src/blender/intern/ghost -I/build/blender/src/blender/intern/clog -I/build/blender/src/blender/source/blender/blenlib -I/build/blender/src/blender/source/blender/imbuf -I/build/blender/src/blender/source/blender/makesdna -I/build/blender/src/blender/extern/xdnd -isystem /build/blender/src/blender/intern/wayland_dynload/extern -isystem /usr/include/libdecor-0 -isystem /build/blender/src/blender/build/intern/ghost/libwayland -isystem /build/blender/src/blender/extern/json/include -isystem /build/blender/src/blender/extern/tinygltf -isystem /build/blender/src/blender/extern/Eigen3 -Wuninitialized -Wredundant-decls -Wall -Wno-invalid-offsetof -Wno-sign-compare -Wlogical-op -Winit-self -Wmissing-include-dirs -Wno-div-by-zero -Wtype-limits -Werror=return-type -Wno-char-subscripts -Wno-unknown-pragmas -Wpointer-arith -Wunused-parameter -Wwrite-strings -Wundef -Wformat-signedness -Wrestrict -Wno-suggest-override -Wuninitialized -Wno-stringop-overread -Wno-stringop-overflow -Wundef -Wmissing-declarations -Wimplicit-fallthrough=5 -fopenmp -msse -pipe -fPIC -funsigned-char -fno-strict-aliasing -ffp-contract=off -msse2 -fmacro-prefix-map="/build/blender/src/blender/"="" -fmacro-prefix-map="/build/blender/src/blender/build/"="" -Wno-maybe-uninitialized -O2 -DNDEBUG -std=c++17 -MD -MT intern/ghost/CMakeFiles/bf_intern_ghost.dir/intern/GHOST_XrGraphicsBinding.cc.o -MF intern/ghost/CMakeFiles/bf_intern_ghost.dir/intern/GHOST_XrGraphicsBinding.cc.o.d -o intern/ghost/CMakeFiles/bf_intern_ghost.dir/intern/GHOST_XrGraphicsBinding.cc.o -c /build/blender/src/blender/intern/ghost/intern/GHOST_XrGraphicsBinding.cc /build/blender/src/blender/intern/ghost/intern/GHOST_XrGraphicsBinding.cc: In member function ‘virtual void GHOST_XrGraphicsBindingOpenGL::initFromGhostContext(GHOST_Context&)’: /build/blender/src/blender/intern/ghost/intern/GHOST_XrGraphicsBinding.cc:157:42: error: invalid ‘static_cast’ from type ‘void (* (*)(const char*))()’ to type ‘PFN_xrEglGetProcAddressMNDX’ {aka ‘void* (*)(const char*)’} 157 | oxr_binding.egl.getProcAddress = static_cast<PFN_xrEglGetProcAddressMNDX>( | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 158 | eglGetProcAddress); | ~~~~~~~~~~~~~~~~~~ ``` I tested this both with Arch's PKGBUILD with only that patch added, and with my own customized build (i.e., with LLVM 16 and no OSL), and got the same thing either way. For the record, and just to be sure I didn't goof up the implementation, I created and applied the following patch: ``` --- a/intern/ghost/intern/GHOST_XrGraphicsBinding.cc +++ b/intern/ghost/intern/GHOST_XrGraphicsBinding.cc @@ -1,4 +1,6 @@ -/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* SPDX-FileCopyrightText: 2020-2023 Blender Authors + * + * SPDX-License-Identifier: GPL-2.0-or-later */ /** \file * \ingroup GHOST @@ -142,7 +144,7 @@ # if defined(WITH_GHOST_WAYLAND) /* #GHOST_SystemWayland */ oxr_binding.wl.type = XR_TYPE_GRAPHICS_BINDING_OPENGL_WAYLAND_KHR; - oxr_binding.wl.display = (struct wl_display *)ctx_egl.m_nativeDisplay; + oxr_binding.wl.display = (wl_display *)ctx_egl.m_nativeDisplay; # else GHOST_ASSERT(false, "Unexpected State: logical error, unreachable!"); # endif /* !WITH_GHOST_WAYLAND */ @@ -151,7 +153,12 @@ # if defined(WITH_GHOST_X11) /* #GHOST_SystemX11. */ oxr_binding.egl.type = XR_TYPE_GRAPHICS_BINDING_EGL_MNDX; - oxr_binding.egl.getProcAddress = eglGetProcAddress; +# if XR_CURRENT_API_VERSION >= XR_MAKE_VERSION(1, 0, 29) + oxr_binding.egl.getProcAddress = static_cast<PFN_xrEglGetProcAddressMNDX>( + eglGetProcAddress); +# else + oxr_binding.egl.getProcAddress = static_cast<PFNEGLGETPROCADDRESSPROC>(eglGetProcAddress); +# endif oxr_binding.egl.display = ctx_egl.getDisplay(); oxr_binding.egl.config = ctx_egl.getConfig(); oxr_binding.egl.context = ctx_egl.getContext(); ```

Yup, not quite there yet

450.3 FAILED: intern/ghost/CMakeFiles/bf_intern_ghost.dir/intern/GHOST_XrGraphicsBinding.cc.o 
450.3 /usr/sbin/c++ -DNDEBUG -DPREFIX=\"/usr\" -DWITH_GHOST_X11 -DWITH_INPUT_NDOF -DWITH_OPENGL -DWITH_X11_XF86VMODE -DWITH_X11_XFIXES -DWITH_X11_XINPUT -DWITH_XDND -DWITH_XF86KEYSYM -DWITH_XR_OPENXR -DXR_OS_LINUX -DXR_USE_GRAPHICS_API_OPENGL -DXR_USE_PLATFORM_EGL -DXR_USE_PLATFORM_XLIB -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D__LITTLE_ENDIAN__ -D__MMX__ -D__SSE2__ -D__SSE__ -I/home/builder/.cache/pikaur/build/blender/src/blender/intern/ghost -I/home/builder/.cache/pikaur/build/blender/src/blender/intern/clog -I/home/builder/.cache/pikaur/build/blender/src/blender/source/blender/blenlib -I/home/builder/.cache/pikaur/build/blender/src/blender/source/blender/imbuf -I/home/builder/.cache/pikaur/build/blender/src/blender/source/blender/makesdna -I/home/builder/.cache/pikaur/build/blender/src/blender/extern/xdnd -isystem /home/builder/.cache/pikaur/build/blender/src/blender/extern/json/include -isystem /home/builder/.cache/pikaur/build/blender/src/blender/extern/tinygltf -isystem /home/builder/.cache/pikaur/build/blender/src/blender/extern/Eigen3 -Wuninitialized -Wredundant-decls -Wall -Wno-invalid-offsetof -Wno-sign-compare -Wlogical-op -Winit-self -Wmissing-include-dirs -Wno-div-by-zero -Wtype-limits -Werror=return-type -Wno-char-subscripts -Wno-unknown-pragmas -Wpointer-arith -Wunused-parameter -Wwrite-strings -Wundef -Wformat-signedness -Wrestrict -Wno-suggest-override -Wuninitialized -Wno-stringop-overread -Wno-stringop-overflow -Wundef -Wmissing-declarations -Wimplicit-fallthrough=5 -I /usr/include/python3.11 -fopenmp -msse -pipe -fPIC -funsigned-char -fno-strict-aliasing -ffp-contract=off -msse2 -fmacro-prefix-map="/home/builder/.cache/pikaur/build/blender/src/blender/"="" -fmacro-prefix-map="/home/builder/.cache/pikaur/build/blender/src/blender/build/"="" -Wno-maybe-uninitialized -O2 -DNDEBUG -std=c++17 -MD -MT intern/ghost/CMakeFiles/bf_intern_ghost.dir/intern/GHOST_XrGraphicsBinding.cc.o -MF intern/ghost/CMakeFiles/bf_intern_ghost.dir/intern/GHOST_XrGraphicsBinding.cc.o.d -o intern/ghost/CMakeFiles/bf_intern_ghost.dir/intern/GHOST_XrGraphicsBinding.cc.o -c /home/builder/.cache/pikaur/build/blender/src/blender/intern/ghost/intern/GHOST_XrGraphicsBinding.cc
450.3 /home/builder/.cache/pikaur/build/blender/src/blender/intern/ghost/intern/GHOST_XrGraphicsBinding.cc: In member function ‘virtual void GHOST_XrGraphicsBindingOpenGL::initFromGhostContext(GHOST_Context&)’:
450.3 /home/builder/.cache/pikaur/build/blender/src/blender/intern/ghost/intern/GHOST_XrGraphicsBinding.cc:155:42: error: invalid ‘static_cast’ from type ‘void (* (*)(const char*))()’ to type ‘PFN_xrEglGetProcAddressMNDX’ {aka ‘void* (*)(const char*)’}
450.3   155 |         oxr_binding.egl.getProcAddress = static_cast<PFN_xrEglGetProcAddressMNDX>(
450.3       |                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
450.3   156 |             eglGetProcAddress);
450.3       |             ~~~~~~~~~~~~~~~~~~

@Frank-Carlyle-McLaughlin btw, you can get the patch directly from Gitea.

Yup, not quite there yet ``` 450.3 FAILED: intern/ghost/CMakeFiles/bf_intern_ghost.dir/intern/GHOST_XrGraphicsBinding.cc.o 450.3 /usr/sbin/c++ -DNDEBUG -DPREFIX=\"/usr\" -DWITH_GHOST_X11 -DWITH_INPUT_NDOF -DWITH_OPENGL -DWITH_X11_XF86VMODE -DWITH_X11_XFIXES -DWITH_X11_XINPUT -DWITH_XDND -DWITH_XF86KEYSYM -DWITH_XR_OPENXR -DXR_OS_LINUX -DXR_USE_GRAPHICS_API_OPENGL -DXR_USE_PLATFORM_EGL -DXR_USE_PLATFORM_XLIB -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D__LITTLE_ENDIAN__ -D__MMX__ -D__SSE2__ -D__SSE__ -I/home/builder/.cache/pikaur/build/blender/src/blender/intern/ghost -I/home/builder/.cache/pikaur/build/blender/src/blender/intern/clog -I/home/builder/.cache/pikaur/build/blender/src/blender/source/blender/blenlib -I/home/builder/.cache/pikaur/build/blender/src/blender/source/blender/imbuf -I/home/builder/.cache/pikaur/build/blender/src/blender/source/blender/makesdna -I/home/builder/.cache/pikaur/build/blender/src/blender/extern/xdnd -isystem /home/builder/.cache/pikaur/build/blender/src/blender/extern/json/include -isystem /home/builder/.cache/pikaur/build/blender/src/blender/extern/tinygltf -isystem /home/builder/.cache/pikaur/build/blender/src/blender/extern/Eigen3 -Wuninitialized -Wredundant-decls -Wall -Wno-invalid-offsetof -Wno-sign-compare -Wlogical-op -Winit-self -Wmissing-include-dirs -Wno-div-by-zero -Wtype-limits -Werror=return-type -Wno-char-subscripts -Wno-unknown-pragmas -Wpointer-arith -Wunused-parameter -Wwrite-strings -Wundef -Wformat-signedness -Wrestrict -Wno-suggest-override -Wuninitialized -Wno-stringop-overread -Wno-stringop-overflow -Wundef -Wmissing-declarations -Wimplicit-fallthrough=5 -I /usr/include/python3.11 -fopenmp -msse -pipe -fPIC -funsigned-char -fno-strict-aliasing -ffp-contract=off -msse2 -fmacro-prefix-map="/home/builder/.cache/pikaur/build/blender/src/blender/"="" -fmacro-prefix-map="/home/builder/.cache/pikaur/build/blender/src/blender/build/"="" -Wno-maybe-uninitialized -O2 -DNDEBUG -std=c++17 -MD -MT intern/ghost/CMakeFiles/bf_intern_ghost.dir/intern/GHOST_XrGraphicsBinding.cc.o -MF intern/ghost/CMakeFiles/bf_intern_ghost.dir/intern/GHOST_XrGraphicsBinding.cc.o.d -o intern/ghost/CMakeFiles/bf_intern_ghost.dir/intern/GHOST_XrGraphicsBinding.cc.o -c /home/builder/.cache/pikaur/build/blender/src/blender/intern/ghost/intern/GHOST_XrGraphicsBinding.cc 450.3 /home/builder/.cache/pikaur/build/blender/src/blender/intern/ghost/intern/GHOST_XrGraphicsBinding.cc: In member function ‘virtual void GHOST_XrGraphicsBindingOpenGL::initFromGhostContext(GHOST_Context&)’: 450.3 /home/builder/.cache/pikaur/build/blender/src/blender/intern/ghost/intern/GHOST_XrGraphicsBinding.cc:155:42: error: invalid ‘static_cast’ from type ‘void (* (*)(const char*))()’ to type ‘PFN_xrEglGetProcAddressMNDX’ {aka ‘void* (*)(const char*)’} 450.3 155 | oxr_binding.egl.getProcAddress = static_cast<PFN_xrEglGetProcAddressMNDX>( 450.3 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 450.3 156 | eglGetProcAddress); 450.3 | ~~~~~~~~~~~~~~~~~~ ``` @Frank-Carlyle-McLaughlin btw, you can get the patch [directly from Gitea](https://projects.blender.org/blender/blender/pulls/111915.patch).
Member

Well then looks like PFN_xrEglGetProcAddressMNDX is still incorrect then :/

Well then looks like `PFN_xrEglGetProcAddressMNDX` is still incorrect then :/

Try changing static_cast to reinterpret_cast.

Try changing `static_cast` to `reinterpret_cast`.

@a13xie thanks for the tip! I did not know that.

@ChengduLittleA @brecht Tentative success changing static_cast to reinterpret_cast! Arch's PKGBUILD with the patch, as modified with that one change, compiles! I won't be able to test how well it actually runs until this evening, and as noted I don't have the ability to test any kind of VR or AR functionality at all, but the ensuing build does at least launch. I intend to test my own LLVM 16 build this evening, too.

@a13xie thanks for the tip! I did not know that. @ChengduLittleA @brecht Tentative success changing `static_cast` to `reinterpret_cast`! Arch's PKGBUILD with the patch, as modified with that one change, compiles! I won't be able to test how well it actually runs until this evening, and as noted I don't have the ability to test any kind of VR or AR functionality at all, but the ensuing build does at least launch. I intend to test my own LLVM 16 build this evening, too.

My apologies for the delay. I have now tested the patch, substituting reinterpret_cast for static_cast with both Arch's build (LLVM 15) and with my own Arch-derived build (LLVM 16), with OpenXR enabled for both, and compilation succeeds for both! Blender appears to work properly afterwards, although, as noted, I lack any way to test VR or AR functionality, so I can't guarantee there isn't something still subtly broken under the hood. Nevertheless, the patch, as modified, solves my compilation problem perfectly. Thank you!

My apologies for the delay. I have now tested the patch, substituting `reinterpret_cast` for `static_cast` with both Arch's build (LLVM 15) and with my own Arch-derived build (LLVM 16), with OpenXR enabled for both, and compilation succeeds for both! Blender appears to work properly afterwards, although, as noted, I lack any way to test VR or AR functionality, so I can't guarantee there isn't something still subtly broken under the hood. Nevertheless, the patch, as modified, solves my compilation problem perfectly. Thank you!
Blender Bot added
Status
Resolved
and removed
Status
Needs Info from Developers
labels 2023-09-06 15:27:03 +02:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#111820
No description provided.