favreau / bullet

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

Error compiling in Linux #495

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Trying to compile the svn last version I get an error compiling OpenCLClothDemo

What is the expected output? What do you see instead?
[ 93%] Built target AppThreadingDemo
[ 94%] Built target AppMultiThreadedDemo
[ 95%] Built target AppVectorAdd_NVidia
[ 96%] Built target AppParticlesOCL_Nv
[ 97%] Built target BulletSoftBodySolvers_OpenCL_NVidia
[ 97%] Building CXX object 
Demos/OpenCLClothDemo/NVidia/CMakeFiles/AppOpenCLClothDemo_NVidia.dir/__/cl_clot
h_demo.o
In file included from 
/opt/bullet-2.77/Demos/OpenCLClothDemo/cl_cloth_demo.cpp:33:
/opt/bullet-2.77/Demos/OpenCLClothDemo/cloth.h: In member function ‘void 
piece_of_cloth::draw()’:
/opt/bullet-2.77/Demos/OpenCLClothDemo/cloth.h:86: error: ‘glBindBuffer’ 
was not declared in this scope
/opt/bullet-2.77/Demos/OpenCLClothDemo/cloth.h:90: error: ‘glBufferData’ 
was not declared in this scope
/opt/bullet-2.77/Demos/OpenCLClothDemo/cloth.h: In member function ‘void 
piece_of_cloth::create_buffers(int, int)’:
/opt/bullet-2.77/Demos/OpenCLClothDemo/cloth.h:253: error: ‘glGenBuffers’ 
was not declared in this scope
/opt/bullet-2.77/Demos/OpenCLClothDemo/cloth.h:254: error: ‘glBindBuffer’ 
was not declared in this scope
/opt/bullet-2.77/Demos/OpenCLClothDemo/cloth.h:256: error: ‘glBufferData’ 
was not declared in this scope
make[2]: ** 
[Demos/OpenCLClothDemo/NVidia/CMakeFiles/AppOpenCLClothDemo_NVidia.dir/__/cl_clo
th_demo.o] Erro 1
make[1]: ** 
[Demos/OpenCLClothDemo/NVidia/CMakeFiles/AppOpenCLClothDemo_NVidia.dir/all] 
Erro 2
make: ** [all] Erro 2

What version of the product are you using? On what operating system?

Version 2.77 from svn on a Ubuntu 10.04

Please provide any additional information below.

Tried to add #include <GL/glext.h> in non-windows section in gl_win.h header, 
but not worked

Original issue reported on code.google.com by wendellc...@gmail.com on 18 Mar 2011 at 3:01

GoogleCodeExporter commented 9 years ago
The OpenCLClothDemo shouldn't be compiled when using cmake for Linux.

Did you enabled it manually?

If you can fix above problem, can you please send a patch?

Original comment by erwin.coumans on 18 Mar 2011 at 4:10

GoogleCodeExporter commented 9 years ago
Yes, I enabled the Nvidia CL Demos. I'll recompile the package without it and 
so try to compile it individually. It seems to be a problem with the 
conditional compilation restraints.

Original comment by wendellc...@gmail.com on 18 Mar 2011 at 4:45

GoogleCodeExporter commented 9 years ago
The Nvidia CL Demos were only tested under Windows.

If you want to compile it under Unix, you might want to add the needed include 
paths and link libraries. It shouldn't be hard. The definitions are either in 

bullet-trunk\CMakeLists.txt
bullet-trunk\Demos\OpenCLClothDemo\NVidia\CMakeLists.txt

If you do this, could you provide a patch?
Thanks,
Erwin

Original comment by erwin.coumans on 18 Mar 2011 at 6:18

GoogleCodeExporter commented 9 years ago
Yes. I was able to compile and run the CL examples with the revision 2218 
without problem. The last release not compile. If I fix, I,ll provide a patch. 
Thanks for atention.

Original comment by wendellc...@gmail.com on 18 Mar 2011 at 7:05

GoogleCodeExporter commented 9 years ago
latest trunk uses vertex buffer objects (VBO) to keep buffers on GPU 
(OpenGL/OpenCL interop). This feature is only tested on WIndows, so for now 
VBOs are disabled on all platforms.

This should fix your compilation errors.
Thanks for the report!
Erwin

Original comment by erwin.coumans on 19 Mar 2011 at 7:47

GoogleCodeExporter commented 9 years ago
Hello!

I compiled the latest trunk and I get two errors, the old sprintf error in 
cloth.h and a printf error in clstuff.cpp. In both, adding <cstido> in the 
includes sections made it compile but... not run. When I run the example, I get 
a seg fault. Curiously, the old version (rev 2218) is working smooth in my GTS 
250. I'll try to find out what's happening now. Additionally, I get another 
nasty error, but not related with this demo, so I'll open a new thread for it. 
Thanks for replying and if I get this working, I'll report.

Original comment by wendellc...@gmail.com on 21 Mar 2011 at 8:24