Open eriklovlie opened 6 years ago
I'm not a dune/jbuilder expert but this workaround seems to work for now:
(jbuild_version 1)
(executable
((name yoyo)
(ocamlopt_flags (-cclib -lGL))
(libraries (core_extended tgls.tgl4 tsdl))
(preprocess (pps (ppx_jane)))
))
Normally the libraries are automatically configured using the gl
package-config package.
Could you maybe try to give me the output of:
pkg-config --libs gl
and if the package doesn't exist, does it maybe live under a different names (see the output of pkg-config --list-all
) ?
It seems this package doesn't exist on fedora 28:
$ pkg-config --list-all | grep -i gl
libglvnd libglvnd - Vendor-neutral OpenGL dispatch library vendor interface
xcb-glx XCB GLX - XCB GLX Extension
sdl2 sdl2 - Simple DirectMedia Layer is a cross-platform multimedia library designed to provide low level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, and 2D video framebuffer.
egl egl - Mesa EGL library
glesv2 glesv2 - Mesa OpenGL ES 2.0 library
glproto GLProto - GL extension headers
Doh! It is in mesa-libGL-devel
:
$ dnf repoquery -l mesa-libGL-devel-0:18.0.5-3.fc28.x86_64
Last metadata expiration check: 0:01:02 ago on Mon 17 Sep 2018 07:58:51 PM CEST.
/usr/include/GL/gl.h
/usr/include/GL/gl_mangle.h
/usr/include/GL/glcorearb.h
/usr/include/GL/glext.h
/usr/include/GL/glx.h
/usr/include/GL/glx_mangle.h
/usr/include/GL/glxext.h
/usr/include/GL/internal
/usr/include/GL/internal/dri_interface.h
/usr/lib64/libglapi.so
/usr/lib64/pkgconfig/dri.pc
/usr/lib64/pkgconfig/gl.pc
Things are working after installing mesa-libGL-devel and then reinstalling tgls.
Ah ! Thanks for the info. I guess the package should maybe declare depexts, though formally they are not needed to compile the package.
Tried to get one of my projects to build on a new computer, but for some reason it failed due to not being linked to libGL. Then I tried the tgls example program "trigl4.ml" and this had the same issue:
I tried to pass "-lGL" directly and it then worked:
Relevant information: