refs: dk/Prima-OpenGL#8
Hello,
My Prima::OpenGL is caught between Prima's way to pick up libraries using pkg-config, and hardcoded paths of OpenGL.
Since there are so many libraries that do not come with native xcode, Prima prefers to use pkg-config everywhere, also on MacOSX, which is provided by homebrew. Homebrew also provides libX11 etc libraries that are not compatible with native ones from /opt/X11/lib. If one builds an application that is linked with both, there occur all kinds of strange effects, including coredumps.
I tried to hack around Makefile.PL but couldn't get far:
- glversion.c coredumps if compiled with both AGL,OpenGL, and glut, so disabling the 2 first works, kind of:
delete @$found_libs{qw(GL GLU AGL)} if $interface_lib eq 'FREEGLUT';
- after that, there are compile errors like this:
cc -c -I/opt/homebrew/include -I/usr/X11R6/include -I/opt/X11/include -I. -g -pipe -fno-strict-aliasing -fstack-protector-strong -DPERL_USE_SAFE_PUTENV -Wno-error=implicit-function-declaration -Os -DVERSION=\"0.7101\" -DXS_VERSION=\"0.7101\" -iwithsysroot "/System/Library/Perl/5.34/darwin-thread-multi-2level/CORE" -DHAVE_VER -DHAVE_FREEGLUT -Wno-deprecated-declarations -DHAVE_GLX -DHAVE_FREEGLUT -DHAVE_FREEGLUT_H -DGL_GLEXT_LEGACY lib/OpenGL/Array.c -o lib/OpenGL/Array.o
lib/OpenGL/Array.xs:24:1: error: unknown type name 'GLint'
24 | GLint FBO_MAX = -1;
at which point I stopped because I couldn't pinpoint the problem quickly.
Anyway, you're welcome to test it with homebrew, Prima, and Prima-OpenGL.
refs: dk/Prima-OpenGL#8
Hello,
My Prima::OpenGL is caught between Prima's way to pick up libraries using pkg-config, and hardcoded paths of OpenGL.
Since there are so many libraries that do not come with native xcode, Prima prefers to use pkg-config everywhere, also on MacOSX, which is provided by homebrew. Homebrew also provides libX11 etc libraries that are not compatible with native ones from /opt/X11/lib. If one builds an application that is linked with both, there occur all kinds of strange effects, including coredumps.
I tried to hack around Makefile.PL but couldn't get far:
delete @$found_libs{qw(GL GLU AGL)} if $interface_lib eq 'FREEGLUT';at which point I stopped because I couldn't pinpoint the problem quickly.
Anyway, you're welcome to test it with homebrew, Prima, and Prima-OpenGL.