Closed eldraco closed 10 years ago
Hi Sebas,
Can you provide more info about your error : $ g++ --version
It also looks like the build error is not complete, can you attach the full one ?
Thanks,
I'm having the same issue. I am running Ubuntu and my g++ version is: g++ (Ubuntu 4.8.2-19ubuntu1) 4.8.2
I am getting the following warnings and error messages:
( cd ../raindance && make )
make[1]: Entering directory /home/moloch/dataviz/raindance' --- Packing raindance resources --- ./pack.sh make[1]: Leaving directory
/home/moloch/dataviz/raindance'
--- Packing Resources ---
./pack.sh
--- Compiling release version for Linux ---
g++ -W -Wall -ansi -Wno-missing-field-initializers -O3 -Wno-deprecated -std=c++11 python2.7-config --cflags | sed s/"-mno-fused-madd"//g
-I./ -I../ -I../raindance/Lib/glm-0.9.5.4 Main.cc -o graphiti python2.7-config --ldflags
-lm -lglut -lGL -lGLU -lGLEW -lOpenCL
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]
In file included from ../raindance/Core/Headers.hh:46:0,
from ../raindance/Raindance.hh:3,
from Graphiti.hh:3,
from Main.cc:5:
../raindance/Lib/stb_image.c: In function ‘stbi_uc* bmpload(stbi, int, int, int_, int)’:
../raindance/Lib/stb_image.c:2950:38: warning: variable ‘fake_a’ set but not used [-Wunused-but-set-variable]
unsigned int mr=0,mg=0,mb=0,ma=0, fake_a=0;
^
In file included from ../raindance/Core/Headers.hh:85:0,
from ../raindance/Raindance.hh:3,
from Graphiti.hh:3,
from Main.cc:5:
../raindance/Core/OpenCL.hh: In member function ‘void OpenCL::detect()’:
../raindance/Core/Log.hh:8:54: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘std::vectorOpenCL::Platform*::size_type {aka unsigned int}’ [-Wformat=]
^
../raindance/Core/OpenCL.hh:186:9: note: in expansion of macro ‘LOG’ LOG("[OpenCL] %lu platform(s) and %lu device(s) detected.\n", m_Platforms.size(), m_Devices.size()); ^ ../raindance/Core/Log.hh:8:54: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘std::vectorOpenCL::Device*::size_type {aka unsigned int}’ [-Wformat=]
^
../raindance/Core/OpenCL.hh:186:9: note: in expansion of macro ‘LOG’ LOG("[OpenCL] %lu platform(s) and %lu device(s) detected.\n", m_Platforms.size(), mDevices.size()); ^ In file included from Graphiti.hh:29:0, from Main.cc:5: Views/Particles/ParticleView.hh: In member function ‘virtual void ParticleView::idle()’: Views/Particles/ParticleView.hh:185:111: error: invalid conversion from ‘long unsigned int’ to ‘const sizet {aka const unsigned int_}’ [-fpermissive] m_OpenCL.enqueueNDRangeKernel(_m_Queue, _m_RepulsionK, 1, NULL, &numParticles, NULL, 0, NULL, NULL); ^ In file included from Views/Particles/ParticleView.hh:4:0, from Graphiti.hh:29, from Main.cc:5: ../raindance/Core/OpenCL.hh:371:10: error: initializing argument 5 of ‘void OpenCL::enqueueNDRangeKernel(const OpenCL::CommandQueue&, const OpenCL::Kernel&, cl_uint, const sizet, const sizet, const sizet, cl_uint, _clevent* const, _cl_event)’ [-fpermissive] void enqueueNDRangeKernel(const CommandQueue& queue, ^ In file included from Graphiti.hh:29:0, from Main.cc:5: Views/Particles/ParticleView.hh:186:109: error: invalid conversion from ‘long unsigned int_’ to ‘const sizet* {aka const unsigned int}’ [-fpermissive] m_OpenCL.enqueueNDRangeKernel(_m_Queue, _m_AttractionK, 1, NULL, &numForces, NULL, 0, NULL, NULL); ^ In file included from Views/Particles/ParticleView.hh:4:0, from Graphiti.hh:29, from Main.cc:5: ../raindance/Core/OpenCL.hh:371:10: error: initializing argument 5 of ‘void OpenCL::enqueueNDRangeKernel(const OpenCL::CommandQueue&, const OpenCL::Kernel&, cl_uint, const sizet, const sizet, const sizet, cl_uint, _clevent* const, _cl_event_)’ [-fpermissive] void enqueueNDRangeKernel(const CommandQueue& queue, ^ In file included from Graphiti.hh:29:0, from Main.cc:5: Views/Particles/ParticleView.hh:187:110: error: invalid conversion from ‘long unsigned int’ to ‘const sizet* {aka const unsigned int}’ [-fpermissive] m_OpenCL.enqueueNDRangeKernel(_m_Queue, _m_MovementK, 1, NULL, &numParticles, NULL, 0, NULL, NULL); ^ In file included from Views/Particles/ParticleView.hh:4:0, from Graphiti.hh:29, from Main.cc:5: ../raindance/Core/OpenCL.hh:371:10: error: initializing argument 5 of ‘void OpenCL::enqueueNDRangeKernel(const OpenCL::CommandQueue&, const OpenCL::Kernel&, cl_uint, const sizet, const sizet, const sizet, cl_uint, _clevent* const, _cl_event)’ [-fpermissive] void enqueueNDRangeKernel(const CommandQueue& queue, ^ make: _\ [native] Error 1
I would appreciate any guidance you could give me. Thank you.
Hi! yes, here is more info.
Linux 3.14-1-686-pae #1 SMP Debian 3.14.12-1 (2014-07-11) i686 GNU/Linux ii gcc 4:4.9.1-1 i386 GNU C compiler ii g++ 4:4.9.1-1 i386 GNU C++ compiler
make
( cd ../raindance && make )
make[1]: Entering directory '/home/sebas/calipso/aplics/traffic-analisis/dataviz/raindance'
--- Packing raindance resources ---
./pack.sh
make[1]: Leaving directory '/home/sebas/calipso/aplics/traffic-analisis/dataviz/raindance'
--- Packing Resources ---
./pack.sh
--- Compiling release version for Linux ---
g++ -W -Wall -ansi -Wno-missing-field-initializers -O3 -Wno-deprecated -std=c++11 python2.7-config --cflags | sed s/"-mno-fused-madd"//g
-I./ -I../ -I../raindance/Lib/glm-0.9.5.4 Main.cc -o graphiti python2.7-config --ldflags
-lm -lglut -lGL -lGLU -lGLEW -lOpenCL
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
In file included from ../raindance/Core/Headers.hh:46:0,
from ../raindance/Raindance.hh:3,
from Graphiti.hh:3,
from Main.cc:5:
../raindance/Lib/stb_image.c: In function ‘stbi_uc* bmpload(stbi, int, int, int_, int)’:
../raindance/Lib/stb_image.c:2950:38: warning: variable ‘fake_a’ set but not used [-Wunused-but-set-variable]
unsigned int mr=0,mg=0,mb=0,ma=0, fake_a=0;
^
In file included from ../raindance/Core/Headers.hh:85:0,
from ../raindance/Raindance.hh:3,
from Graphiti.hh:3,
from Main.cc:5:
../raindance/Core/OpenCL.hh: In member function ‘void OpenCL::detect()’:
../raindance/Core/Log.hh:8:54: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘std::vectorOpenCL::Platform*::size_type {aka unsigned int}’ [-Wformat=]
^
../raindance/Core/OpenCL.hh:186:9: note: in expansion of macro ‘LOG’ LOG("[OpenCL] %lu platform(s) and %lu device(s) detected.\n", m_Platforms.size(), m_Devices.size()); ^ ../raindance/Core/Log.hh:8:54: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘std::vectorOpenCL::Device*::size_type {aka unsigned int}’ [-Wformat=]
^
../raindance/Core/OpenCL.hh:186:9: note: in expansion of macro ‘LOG’ LOG("[OpenCL] %lu platform(s) and %lu device(s) detected.\n", m_Platforms.size(), mDevices.size()); ^ In file included from Graphiti.hh:29:0, from Main.cc:5: Views/Particles/ParticleView.hh: In member function ‘virtual void ParticleView::idle()’: Views/Particles/ParticleView.hh:185:111: error: invalid conversion from ‘long unsigned int’ to ‘const sizet {aka const unsigned int_}’ [-fpermissive] m_OpenCL.enqueueNDRangeKernel(_m_Queue, _m_RepulsionK, 1, NULL, &numParticles, NULL, 0, NULL, NULL); ^ In file included from Views/Particles/ParticleView.hh:4:0, from Graphiti.hh:29, from Main.cc:5: ../raindance/Core/OpenCL.hh:371:10: note: initializing argument 5 of ‘void OpenCL::enqueueNDRangeKernel(const OpenCL::CommandQueue&, const OpenCL::Kernel&, cl_uint, const sizet, const sizet, const sizet, cl_uint, _clevent* const, _cl_event)’ void enqueueNDRangeKernel(const CommandQueue& queue, ^ In file included from Graphiti.hh:29:0, from Main.cc:5: Views/Particles/ParticleView.hh:186:109: error: invalid conversion from ‘long unsigned int_’ to ‘const sizet* {aka const unsigned int}’ [-fpermissive] m_OpenCL.enqueueNDRangeKernel(_m_Queue, _m_AttractionK, 1, NULL, &numForces, NULL, 0, NULL, NULL); ^ In file included from Views/Particles/ParticleView.hh:4:0, from Graphiti.hh:29, from Main.cc:5: ../raindance/Core/OpenCL.hh:371:10: note: initializing argument 5 of ‘void OpenCL::enqueueNDRangeKernel(const OpenCL::CommandQueue&, const OpenCL::Kernel&, cl_uint, const sizet, const sizet, const sizet, cl_uint, _clevent* const, _cl_event_)’ void enqueueNDRangeKernel(const CommandQueue& queue, ^ In file included from Graphiti.hh:29:0, from Main.cc:5: Views/Particles/ParticleView.hh:187:110: error: invalid conversion from ‘long unsigned int’ to ‘const sizet* {aka const unsigned int}’ [-fpermissive] m_OpenCL.enqueueNDRangeKernel(_m_Queue, _m_MovementK, 1, NULL, &numParticles, NULL, 0, NULL, NULL); ^ In file included from Views/Particles/ParticleView.hh:4:0, from Graphiti.hh:29, from Main.cc:5: ../raindance/Core/OpenCL.hh:371:10: note: initializing argument 5 of ‘void OpenCL::enqueueNDRangeKernel(const OpenCL::CommandQueue&, const OpenCL::Kernel&, cl_uint, const sizet, const sizet, const sizet, cl_uint, _clevent* const, _cl_event)’ void enqueueNDRangeKernel(const CommandQueue& queue, ^ Makefile:67: recipe for target 'native' failed make: _\ [native] Error 1
thanks! sebas
Hi sebas !
I wasn't able to repro the error but I think I understand what's happening. I've used an "unsigned long" to store a "size_t" variable. This causes the error messages that you see when you try to compile in 32 bits.
Please pull the last version of the repository, hopefully the error will be gone. Also, let me know if this fixed it so we can close the issue.
Relevant commit : https://github.com/ThibaultReuille/graphiti/commit/16798d25d5a3d462914c89ea306ce7b49cc91d03
Hi ThibaultReuille! Thanks for your work. I still have the compilation issue. 1- I downloaded a fresh copy of the git repository: git clone https://github.com/opendns/dataviz.git --recursive dataviz On branch master 776335e
dataviz/graphiti ab12c93 (one more than the fix)
2- cd dataviz/graphiti
3- make
make
make
( cd ../raindance && make )
make[1]: Entering directory '/home/xxxxxx/xx/traffic-analisis/dataviz/raindance'
--- Packing Raindance resources ---
./pack.sh
--- Packing Shaders
--- Packing Shaders/Primitives
--- Packing Shaders/Widgets
--- Packing Shaders/Charts
--- Packing Textures
--- Packing Textures/Shapes
make[1]: Leaving directory /home/xxxxxx/xx/traffic-analisis/dataviz/raindance'
--- Packing OpenGraphiti resources ---
./pack.sh
--- Compiling release version for Linux ---
g++ -W -Wall -ansi -Wno-missing-field-initializers -O3 -Wno-deprecated -std=c++11 python2.7-config --cflags | sed s/"-mno-fused-madd"//g
-I./ -I../ -I../raindance/Lib/glm-0.9.5.4 Main.cc -o graphiti python2.7-config --ldflags
-lm -lglut -lGL -lGLU -lGLEW -lOpenCL
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
In file included from ../raindance/Core/Headers.hh:47:0,
from ../raindance/Raindance.hh:3,
from Graphiti.hh:3,
from Main.cc:5:
../raindance/Lib/stb_image.c: In function ‘stbi_uc* bmpload(stbi, int, int, int_, int)’:
../raindance/Lib/stb_image.c:2950:38: warning: variable ‘fake_a’ set but not used [-Wunused-but-set-variable]
unsigned int mr=0,mg=0,mb=0,ma=0, fake_a=0;
^
In file included from ../raindance/Core/Headers.hh:89:0,
from ../raindance/Raindance.hh:3,
from Graphiti.hh:3,
from Main.cc:5:
../raindance/Core/OpenCL.hh: In member function ‘void OpenCL::detect()’:
../raindance/Core/Log.hh:8:54: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘std::vectorOpenCL::Platform*::size_type {aka unsigned int}’ [-Wformat=]
^
../raindance/Core/OpenCL.hh:186:9: note: in expansion of macro ‘LOG’ LOG("[OpenCL] %lu platform(s) and %lu device(s) detected.\n", m_Platforms.size(), m_Devices.size()); ^ ../raindance/Core/Log.hh:8:54: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘std::vectorOpenCL::Device*::size_type {aka unsigned int}’ [-Wformat=]
^
../raindance/Core/OpenCL.hh:186:9: note: in expansion of macro ‘LOG’ LOG("[OpenCL] %lu platform(s) and %lu device(s) detected.\n", m_Platforms.size(), m_Devices.size()); ^ In file included from ./Views/Space/SpaceWidgets.hh:7:0, from ./Views/Space/SpaceNode.hh:6, from Views/Space/SpaceView.hh:24, from Graphiti.hh:15, from Main.cc:5: ../raindance/Core/HUD/Widgets/TimelineWidget.hh: In member function ‘virtual void TimelineWidget::draw(Context, glm::mat4, glm::mat4, glm::mat4)’: ../raindance/Core/HUD/Widgets/TimelineWidget.hh:144:105: warning: ‘mode’ may be used uninitialized in this function [-Wmaybe-uninitialized] m_EventIcon->draw(context, viewProjection * model * transformation.state(), color, mode); ^ In file included from ../raindance/Core/Geometry.hh:4:0, from ../raindance/Core/Context.hh:7, from ../raindance/Raindance.hh:4, from Graphiti.hh:3, from Main.cc:5: ../raindance/Core/Buffer.hh: In member function ‘virtual void CloudView::onSetAttribute(const string&, VariableType, const string&)’: ../raindance/Core/Buffer.hh:128:31: warning: ‘result’ may be used uninitialized in this function [-Wmaybe-uninitialized] memcpy(data, &m_Data[offset \ size], size); ^ In file included from Views/World/WorldView.hh:7:0, from Graphiti.hh:20, from Main.cc:5: ../raindance/Core/PointCloud.hh:220:6: note: ‘result’ was declared here ID result; ^
Tell me if I can test more stuff. Also I tried to run it on a virtual Kali, but it keep telling me that there is not enough virtual memory, even with 2GB of ram.
thanks sebas
Hey Sebas,
I'm confused, I don't see the error. The build log only shows a couple of warning messages which don't affect the compilation. Is your build log complete ?
Cheers,
And that was my mistake. Since exactly these two lines ID result; ^ were the last message of the compilation I wrongly assumed that the compilation failed. You were right, it is now working. Sorry and thanks! sebas
On debian with all the dependencies installed (including opencl-headers)
Linux 3.14-1-686-pae #1 SMP Debian 3.14.12-1 (2014-07-11) i686 GNU/Linux
cd dataviz/graphiti make (...) In file included from Views/Particles/ParticleView.hh:4:0, from Graphiti.hh:29, from Main.cc:5: ../raindance/Core/OpenCL.hh:371:10: note: initializing argument 5 of ‘void OpenCL::enqueueNDRangeKernel(const OpenCL::CommandQueue&, const OpenCL::Kernel&, cl_uint, const sizet, const sizet, const sizet, cl_uint, _clevent const_, _cl_event_)’ void enqueueNDRangeKernel(const CommandQueue& queue, ^ Makefile:67: recipe for target 'native' failed make: ** [native] Error 1
Thanks! sebas