favreau / bullet

Automatically exported from code.google.com/p/bullet
0 stars 0 forks source link

Fix broken GLUT detection for cmake under Linux #438

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
$ cd bullet-2.76
$ cmake . -G "Unix Makefiles"

then I see a lot of "used as include directory in ..." lines, and the
last one contains:

"-- Configuring incomplete, errors occurred!"

Wow, that was certainly informative, right? I scroll up to see if there
is any error-looking message. I found this:

"CMake Error: The following variables are used in this project, but they
are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the
CMake files:
GLUT_INCLUDE_DIR (ADVANCED)
  used as include directory in directory ..."

Ok... how do I set them? Or test them correctly? Maybe there's something
else?  Above it was this warning:
"Policy CMP0015 is not set: ... This warning is for project developers.
... "
Ok, not a warning for me then. Why is it showing me warnings targeted
for project developers?

Above it I found:
"
This command specifies the relative path

   C:/MinGW/lib

 as a link directory.
"
That is strange... I'm on a GNU/Linux system, why is the build system
hard-coding Windows paths for MinGW? Maybe it misidentified my system as
being a MinGW system?

Right above I see this:

"
OPENGL FOUND
/usr/lib64/libGLU.so/usr/lib64/libGL.so/usr/lib64/libSM.so/usr/lib64/libICE.so/u
sr/lib64/libX11.so/usr/lib64/libXext.so
"

Good, OpenGL was found. And it is funny because I renamed
/usr/include/GL to /usr/include/GL.ori right before trying to build
Bullet, so it should be unusable; but at least it was found. Clearly the
better error reporting in the Bullet build scripts is stealing all other
physics engines' users. At least it could try to build the library and
give up on building demos applications.

On a serious note: it's now cool to bash autoconf and automake, but
people forget that the "popular" alternatives suck even more.

Original issue reported on code.google.com by erwin.coumans on 6 Oct 2010 at 4:27

GoogleCodeExporter commented 9 years ago
It seems Daniel used an old Bullet version, so we need to check if this hasn't 
been fixed already in Bullet 2.77.

Original comment by erwin.coumans on 6 Oct 2010 at 4:39

GoogleCodeExporter commented 9 years ago
Same thing still happens with 2.77.
Hopefully you are not missing the point (pasting my interim e-mail here already 
loses the context).

Sure, Bullet should build on a system without OpenGL. But still, I can have 
cmake fail miserably in a dozen other different ways, not all of them are 
artificial. Not even Kitware can use cmake properly.

The autoconf script runs without trying to detect OpenGL, but the makefiles try 
to build GL-using code regardless of any OpenGL detection.

Original comment by danielko...@gmail.com on 6 Oct 2010 at 5:18

GoogleCodeExporter commented 9 years ago
Hi Daniel,

We will also fix/add OpenGL detection in autoconf/automake

If you know other non-artificial ways where CMake fails to build Bullet, please 
report them in this issue.
Thanks,
Erwin

Original comment by erwin.coumans on 6 Oct 2010 at 5:47

GoogleCodeExporter commented 9 years ago
Both build system issues should be fixed in latest trunk, svn revision 2224

When OpenGL/GLUT is not found, it will skip the graphics demos. CMake will 
still build the non-graphical HelloWorld demo (output to console).
Example output:

cmake .. -G "Unix Makefiles"

OPENCL NOT FOUND
OPENGL FOUND
/usr/lib/libGLU.so/usr/lib/libGL.so/usr/lib/libX11.so
GLUT NOT FOUND
-- Configuring done
-- Generating done
-- Build files have been written to: /home/username/dev/bullet-2.77/cmake_make

Original comment by erwin.coumans on 6 Oct 2010 at 11:09

GoogleCodeExporter commented 9 years ago

Original comment by erwin.coumans on 6 Oct 2010 at 11:42