Opened 5 years ago

Closed 3 years ago

Last modified 3 years ago

#11739 closed bug (fixed)

Cannot find GL/glut.h

Reported by: TheNavigator Owned by: bonefish
Priority: normal Milestone: R1
Component: Kits/OpenGL Kit Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

While trying to fix Box2D's recipe I couldn't get it to build because it can't find glut.h.

Change History (14)

comment:1 Changed 5 years ago by waddlesplash

GLUT is currently in-tree, but isn't in the build because everything GL-related is supposed to be in the "mesa" packages. So the only "Haiku" part of this ticket is to remove GLUT from the tree, everything else belongs in an issue at HaikuPorts.

comment:2 Changed 5 years ago by anevilyak

Priority: blockernormal

comment:3 Changed 5 years ago by pulkomandy

waddlesplash: I thought you said you would stop commenting on things you don't know about. GLUT is included in the build, there is a libGLUT.so in the Haiku install, but the headers are missing. GLUT should not be part of the Mesa package, it is a separate project. And since GLUT is dead, there is little use in outsourcing it.

We should include the GLUT headers so the library we provide can be used.

comment:4 Changed 5 years ago by waddlesplash

Right, but I do know about this, as I ported some OpenGL apps that use GLUT. And from what I remember of their autoconf output, it stated that it failed to find the headers and the library, not just the headers.

Also, Mesa maintains a version of GLUT, so do we have any reasons that we can't upstream our port (or obtain permission from Access Co. to use the BeOS port) and use that?

Last edited 5 years ago by waddlesplash (previous) (diff)

comment:5 Changed 5 years ago by pulkomandy

Our port is already the BeOS one, anyway, at least for the gcc2 version. "maintains" is a bold word for the Mesa code, the last code change there was done in 2011, since then there were only 4 buildsystem changes. Also one of the commits there is "Remove support for GCC older than 3.3.0", so I don't think we have any chance of upstreaming anything there as long as we need gcc2 support.

~> catattr SYS:PACKAGE_FILE /system/lib/libglut.so 
/system/lib/libglut.so : string : haiku-r1~alpha4_pm_hrev48547-1-x86_gcc2.hpkg
~> catattr SYS:PACKAGE_FILE /system/lib/x86/libglut.so 
/system/lib/x86/libglut.so : string : haiku_x86-r1~alpha4_pm_hrev48547-1-x86_gcc2.hpkg

When I say the lib is available, it's because I checked it was. so what you remember is wrong, or these autoconf scripts were broken. In either case this takes only a few seconds to check and I did it before commenting here (and even before I asked TheNavigator to open a ticket here).

comment:6 Changed 4 years ago by diver

Until this is fixed, here's a workaround:

mkdir -p /system/non-packaged/develop/headers/GL
wget http://cgit.haiku-os.org/haiku/plain/headers/libs/glut/GL/glut.h -O /system/non-packaged/develop/headers/GL/glut.h

comment:7 Changed 4 years ago by waddlesplash

Component: - GeneralBuild System
Owner: changed from nobody to bonefish

comment:8 Changed 4 years ago by michaelvoliveira

Come on, guys. all the mesa libs was installed by HaikuDepots and no one has glut.h

If is in the tree, why not in the main build? This is a regression!

http://cgit.haiku-os.org/haiku/plain/headers/libs/glut/GL/glut.h

comment:9 Changed 3 years ago by waddlesplash

Resolution: fixed
Status: newclosed

Fixed in hrev50459.

comment:10 Changed 3 years ago by diver

Includes in glut.h seem to have extra GL/ in their path.

hp billardgl

waiting for build package billardgl-1.75-1 to be activated
Building ...
g++ -c -pipe -Wall -W -DNO_DEBUG -I/usr/X11R6/include  -o Anzeige.o Anzeige.cpp
In file included from /sources/BillardGL-1.75/Anzeige.cpp:10:
/boot/system/develop/headers/GL/glut.h:12: GL/gl.h: No such file or directory
/boot/system/develop/headers/GL/glut.h:13: GL/glu.h: No such file or directory

comment:11 Changed 3 years ago by waddlesplash

Includes in glut.h seem to have extra GL/ in their path.

I'm not sure why that's happening. As you can see in the glut.h header, it includes the files using <GL/gl.h> and <GL/glu.h>. I tried some of the GLUT samples from https://www.opengl.org/archives/resources/code/samples/glut_examples/examples/examples.html using just gcc file.c -lGL -lglut and they compiled and ran just fine.

Last edited 3 years ago by waddlesplash (previous) (diff)

comment:12 Changed 3 years ago by waddlesplash

Are you sure the recipe specified devel:libGL in BUILD_REQURIES?

comment:13 Changed 3 years ago by bonefish

Component: Build SystemKits/OpenGL Kit

comment:14 Changed 3 years ago by diver

That was it, thanks!

Note: See TracTickets for help on using tickets.