Problem Compiling of_v0.10.1 on Linux - conflicting declaration error

This is my first time trying to get OF working on my linux machine. I was following the instructions on the site but I ended up with a compilation error, saying there is a conflicting typedef declaration.

The only place I deviated from the instructions was modifying install_dependencies.sh. I changed libgl1-mesa-dev${XTAG} to libgl1-mesa-dev because I got a package not found error on the first attempt. Link to relevant issue on github. I don’t think this is related to the compiling error but I thought I’d mention it just in case.

Any help would be much appricated. I might try v0.10.0 later today if I have the time.

Link to Full Error

Abridged Error:

violet@dark-velour:~/dev/of_v0.10.1_linux64gcc6_release/scripts/linux$ ./compileOF.sh -j6
HOST_OS=Linux
checking pkg-config libraries:   cairo zlib gstreamer-app-1.0 gstreamer-1.0 gstreamer-video-1.0 gstreamer-base-1.0 libudev freetype2 fontconfig sndfile openal libcurl glfw3 rtaudio libpulse-simple alsa gl glu glew gtk+-3.0 libmpg123 
with PKG_CONFIG_LIBDIR=
HOST_OS=Linux
checking pkg-config libraries:   cairo zlib gstreamer-app-1.0 gstreamer-1.0 gstreamer-video-1.0 gstreamer-base-1.0 libudev freetype2 fontconfig sndfile openal libcurl glfw3 rtaudio libpulse-simple alsa gl glu glew gtk+-3.0 libmpg123 
with PKG_CONFIG_LIBDIR=
Compiling /home/violet/dev/of_v0.10.1_linux64gcc6_release/libs/openFrameworks/app/ofMainLoop.cpp
// removed extra g++ lines
g++ -g3 -DDEBUG -Wall -Werror=return-type -std=c++14 -DGCC_HAS_REGEX -DOF_USING_GTK -DOF_USING_MPG123 -pthread -D_REENTRANT -pthread -I/usr/include/gstreamer-1.0 -I/usr/include/orc-0.4 -I/usr/include/gstreamer-1.0 -I/usr/include/AL -I/usr/include/x86_64-linux-gnu -I/usr/include/rtaudio -I/usr/include/alsa -I/usr/include/libdrm -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/home/violet/dev/of_v0.10.1_linux64gcc6_release/libs/fmodex/include -I/home/violet/dev/of_v0.10.1_linux64gcc6_release/libs/glm/include -I/home/violet/dev/of_v0.10.1_linux64gcc6_release/libs/glm/include/glm -I/home/violet/dev/of_v0.10.1_linux64gcc6_release/libs/glm/include/glm/simd -I/home/violet/dev/of_v0.10.1_linux64gcc6_release/libs/glm/include/glm/gtc -I/home/violet/dev/of_v0.10.1_linux64gcc6_release/libs/glm/include/glm/detail -I/home/violet/dev/of_v0.10.1_linux64gcc6_release/libs/glm/include/glm/gtx -I/home/violet/dev/of_v0.10.1_linux64gcc6_release/libs/json/include -I/home/violet/dev/of_v0.10.1_linux64gcc6_release/libs/kiss/include -I/home/violet/dev/of_v0.10.1_linux64gcc6_release/libs/pugixml/include -I/home/violet/dev/of_v0.10.1_linux64gcc6_release/libs/tess2/include -I/home/violet/dev/of_v0.10.1_linux64gcc6_release/libs/utf8/include -I/home/violet/dev/of_v0.10.1_linux64gcc6_release/libs/utf8/include/utf8 -I/home/violet/dev/of_v0.10.1_linux64gcc6_release/libs/openFrameworks -I/home/violet/dev/of_v0.10.1_linux64gcc6_release/libs/openFrameworks/app -I/home/violet/dev/of_v0.10.1_linux64gcc6_release/libs/openFrameworks/3d -I/home/violet/dev/of_v0.10.1_linux64gcc6_release/libs/openFrameworks/gl -I/home/violet/dev/of_v0.10.1_linux64gcc6_release/libs/openFrameworks/utils -I/home/violet/dev/of_v0.10.1_linux64gcc6_release/libs/openFrameworks/communication -I/home/violet/dev/of_v0.10.1_linux64gcc6_release/libs/openFrameworks/video -I/home/violet/dev/of_v0.10.1_linux64gcc6_release/libs/openFrameworks/math -I/home/violet/dev/of_v0.10.1_linux64gcc6_release/libs/openFrameworks/types -I/home/violet/dev/of_v0.10.1_linux64gcc6_release/libs/openFrameworks/sound -I/home/violet/dev/of_v0.10.1_linux64gcc6_release/libs/openFrameworks/events -I/home/violet/dev/of_v0.10.1_linux64gcc6_release/libs/openFrameworks/graphics  -MMD -MP -MF /home/violet/dev/of_v0.10.1_linux64gcc6_release/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/app/ofAppNoWindow.d -MT/home/violet/dev/of_v0.10.1_linux64gcc6_release/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/app/ofAppNoWindow.o -o /home/violet/dev/of_v0.10.1_linux64gcc6_release/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/app/ofAppNoWindow.o -c /home/violet/dev/of_v0.10.1_linux64gcc6_release/libs/openFrameworks/app/ofAppNoWindow.cpp
In file included from /home/violet/dev/of_v0.10.1_linux64gcc6_release/libs/openFrameworks/utils/ofConstants.h:212:0,
                 from /home/violet/dev/of_v0.10.1_linux64gcc6_release/libs/openFrameworks/app/ofMainLoop.h:3,
                 from /home/violet/dev/of_v0.10.1_linux64gcc6_release/libs/openFrameworks/app/ofMainLoop.cpp:8:
/usr/include/GL/glext.h:12066:105: error: conflicting declaration 'typedef void (* PFNGLFRAGMENTLIGHTFVSGIXPROC)(GLenum, GLenum, const GLfloat*)'
 GLFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, const GLfloat *params);
                                                                              ^
In file included from /home/violet/dev/of_v0.10.1_linux64gcc6_release/libs/openFrameworks/utils/ofConstants.h:210:0,
                 from /home/violet/dev/of_v0.10.1_linux64gcc6_release/libs/openFrameworks/app/ofMainLoop.h:3,
                 from /home/violet/dev/of_v0.10.1_linux64gcc6_release/libs/openFrameworks/app/ofMainLoop.cpp:8:
/usr/include/GL/glew.h:16092:28: note: previous declaration as 'typedef void (* PFNGLFRAGMENTLIGHTFVSGIXPROC)(GLenum, GLenum, GLfloat*)'
 typedef void (GLAPIENTRY * PFNGLFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, GLfloat* params);
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/violet/dev/of_v0.10.1_linux64gcc6_release/libs/openFrameworks/utils/ofConstants.h:212:0,
                 from /home/violet/dev/of_v0.10.1_linux64gcc6_release/libs/openFrameworks/app/ofMainLoop.h:3,
                 from /home/violet/dev/of_v0.10.1_linux64gcc6_release/libs/openFrameworks/app/ofMainLoop.cpp:8:
/usr/include/GL/glext.h:12068:103: error: conflicting declaration 'typedef void (* PFNGLFRAGMENTLIGHTIVSGIXPROC)(GLenum, GLenum, const GLint*)'
 FNGLFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, const GLint *params);
                                                                              ^
In file included from /home/violet/dev/of_v0.10.1_linux64gcc6_release/libs/openFrameworks/utils/ofConstants.h:210:0,
                 from /home/violet/dev/of_v0.10.1_linux64gcc6_release/libs/openFrameworks
// removed lots of extra print out

what distro are you running?

Zorin OS 15 it’s based on Ubuntu 18.04. From my experienced most of the changes are cosmetic.

Not sure if this is related to your issue but I had problems building 0.10.1 on Ubuntu too, solved by using the nightly build OF version. May be you can give it a try and see if it helps

Thanks for the tip! I used the nightly and it seemed to have worked. But I had the same problem when I tried 0.9.8 from the archive. Also I noticed the linux links for 0.10.0 are broken.

1 Like