Coder Social home page Coder Social logo

Comments (7)

ThibaultReuille avatar ThibaultReuille commented on August 15, 2024

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,

from dataviz.

btcor avatar btcor commented on August 15, 2024

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* bmp_load(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=]

define LOG(fmt, ...) do { printf(fmt, ##VA_ARGS); } while(false)

                                                  ^

../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=]

define LOG(fmt, ...) do { printf(fmt, ##VA_ARGS); } while(false)

                                                  ^

../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 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 size_t_ {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 size_t
, const size_t
, const size_t_, cl_uint, cl_event* 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 size_t* {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 size_t
, const size_t
, const size_t_, cl_uint, cl_event* 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 size_t* {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 size_t
, const size_t
, const size_t_, cl_uint, cl_event* const, cl_event_)’ [-fpermissive]
void enqueueNDRangeKernel(const CommandQueue& queue,
^
make: *_* [native] Error 1

I would appreciate any guidance you could give me. Thank you.

from dataviz.

eldraco avatar eldraco commented on August 15, 2024

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* bmp_load(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=]

define LOG(fmt, ...) do { printf(fmt, ##VA_ARGS); } while(false)

                                                  ^

../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=]

define LOG(fmt, ...) do { printf(fmt, ##VA_ARGS); } while(false)

                                                  ^

../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 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 size_t_ {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 size_t
, const size_t
, const size_t_, cl_uint, cl_event* 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 size_t* {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 size_t
, const size_t
, const size_t_, cl_uint, cl_event* 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 size_t* {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 size_t
, const size_t
, const size_t_, cl_uint, cl_event* const, cl_event_)’
void enqueueNDRangeKernel(const CommandQueue& queue,
^
Makefile:67: recipe for target 'native' failed
make: *_* [native] Error 1

thanks!
sebas

from dataviz.

ThibaultReuille avatar ThibaultReuille commented on August 15, 2024

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 :
ThibaultReuille/graphiti@16798d2

from dataviz.

eldraco avatar eldraco commented on August 15, 2024

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* bmp_load(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=]

define LOG(fmt, ...) do { printf(fmt, ##VA_ARGS); } while(false)

                                                  ^

../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=]

define LOG(fmt, ...) do { printf(fmt, ##VA_ARGS); } while(false)

                                                  ^

../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

from dataviz.

ThibaultReuille avatar ThibaultReuille commented on August 15, 2024

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,

from dataviz.

eldraco avatar eldraco commented on August 15, 2024

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

from dataviz.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.