Compile fails on Ubuntu 10.04 LTS/gcc 4.4.3 for of v0072

Greetings,

I’m getting compile errors when trying to build of v0072 on Ubuntu 10.04 LTS.
Both the tar ball and github repository source generate errors but they are different (see below).

Thanks,
Mark

===============================================================
of_v0072_linux64_release.tar.gz produces:

compiling object for …/…/…/openFrameworks/graphics/ofCairoRenderer.cpp
mkdir -p obj/Debug/openFrameworks/graphics
g++ -g3 -Wall -fexceptions -I…/…/…/FreeImage/include -I…/…/…/assimp/include -I…/…/…/assimp/include/Compiler -I…/…/…/fmodex/include -I…/…/…/freetype/include -I…/…/…/freetype/include/freetype2 -I…/…/…/freetype/include/freetype2/freetype -I…/…/…/freetype/include/freetype2/freetype/internal -I…/…/…/freetype/include/freetype2/freetype/internal/services -I…/…/…/freetype/include/freetype2/freetype/config -I…/…/…/kiss/include -I…/…/…/portaudio/include -I…/…/…/rtAudio/include -I…/…/…/tess2/include -I…/…/…/poco/include -I…/…/…/glu/include -I…/…/…/openFrameworks/ -I…/…/…/openFrameworks/events -I…/…/…/openFrameworks/3d -I…/…/…/openFrameworks/utils -I…/…/…/openFrameworks/video -I…/…/…/openFrameworks/sound -I…/…/…/openFrameworks/math -I…/…/…/openFrameworks/types -I…/…/…/openFrameworks/gl -I…/…/…/openFrameworks/communication -I…/…/…/openFrameworks/graphics -I…/…/…/openFrameworks/app -pthread -I/usr/include/gstreamer-0.10 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2 -pthread -D_REENTRANT -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libpng12 -DOF_USING_GTK -DOF_USING_MPG123 -MMD -MP -MFobj/Debug/openFrameworks/graphics/ofCairoRenderer.d -MTobj/Debug/openFrameworks/graphics/ofCairoRenderer.o -o obj/Debug/openFrameworks/graphics/ofCairoRenderer.o -c …/…/…/openFrameworks/graphics/ofCairoRenderer.cpp
In file included from …/…/…/openFrameworks/math/ofVec2f.h:5,
from …/…/…/openFrameworks/math/ofVec3f.h:3,
from …/…/…/openFrameworks/math/ofMatrix4x4.h:13,
from …/…/…/openFrameworks/graphics/ofCairoRenderer.h:10,
from …/…/…/openFrameworks/graphics/ofCairoRenderer.cpp:1:
…/…/…/openFrameworks/utils/ofConstants.h:141:21: warning: glxew.h: No such file or directory
…/…/…/openFrameworks/graphics/ofCairoRenderer.cpp: In member function ‘virtual void ofCairoRenderer::setBlendMode(ofBlendMode)’:
…/…/…/openFrameworks/graphics/ofCairoRenderer.cpp:612: error: ‘CAIRO_OPERATOR_MULTIPLY’ was not declared in this scope
…/…/…/openFrameworks/graphics/ofCairoRenderer.cpp:617: error: ‘CAIRO_OPERATOR_SCREEN’ was not declared in this scope
…/…/…/openFrameworks/graphics/ofCairoRenderer.cpp:622: error: ‘CAIRO_OPERATOR_DIFFERENCE’ was not declared in this scope
…/…/…/openFrameworks/graphics/ofCairoRenderer.cpp: At global scope:
…/…/…/openFrameworks/graphics/ofCairoRenderer.cpp:10: warning: ‘void helper_quadratic_to(cairo_t*, double, double, double, double)’ defined but not used
make: *** [obj/Debug/openFrameworks/graphics/ofCairoRenderer.o] Error 1
there has been a problem compiling Debug OF library
please report this problem in the forums
chown: cannot access `…/…/lib/linux64/*’: No such file or directory

===============================================================
openframeworks-openFrameworks-0071-624-gcef7ff3.zip produces:

creating …/…/lib/linux64/libopenFrameworks.a
mkdir -p …/…/lib/linux64
ar -r “…/…/lib/linux64/libopenFrameworks.a” obj/Release/openFrameworks/events/ofEvents.o obj/Release/openFrameworks/3d/of3dUtils.o obj/Release/openFrameworks/3d/ofCamera.o obj/Release/openFrameworks/3d/ofMesh.o obj/Release/openFrameworks/3d/ofNode.o obj/Release/openFrameworks/3d/ofEasyCam.o obj/Release/openFrameworks/utils/ofUtils.o obj/Release/openFrameworks/utils/ofFileUtils.o obj/Release/openFrameworks/utils/ofURLFileLoader.o obj/Release/openFrameworks/utils/ofLog.o obj/Release/openFrameworks/utils/ofSystemUtils.o obj/Release/openFrameworks/utils/ofThread.o obj/Release/openFrameworks/video/ofDirectShowGrabber.o obj/Release/openFrameworks/video/ofQuickTimeGrabber.o obj/Release/openFrameworks/video/ofQtUtils.o obj/Release/openFrameworks/video/ofGstVideoPlayer.o obj/Release/openFrameworks/video/ofVideoPlayer.o obj/Release/openFrameworks/video/ofVideoGrabber.o obj/Release/openFrameworks/video/ofQuickTimePlayer.o obj/Release/openFrameworks/video/ofGstVideoGrabber.o obj/Release/openFrameworks/video/ofGstUtils.o obj/Release/openFrameworks/sound/ofPASoundStream.o obj/Release/openFrameworks/sound/ofOpenALSoundPlayer.o obj/Release/openFrameworks/sound/ofFmodSoundPlayer.o obj/Release/openFrameworks/sound/ofRtAudioSoundStream.o obj/Release/openFrameworks/sound/ofSoundStream.o obj/Release/openFrameworks/sound/ofBaseSoundStream.o obj/Release/openFrameworks/sound/ofBaseSoundPlayer.o obj/Release/openFrameworks/sound/ofSoundPlayer.o obj/Release/openFrameworks/math/ofVec4f.o obj/Release/openFrameworks/math/ofMatrix3x3.o obj/Release/openFrameworks/math/ofMatrix4x4.o obj/Release/openFrameworks/math/ofMath.o obj/Release/openFrameworks/math/ofQuaternion.o obj/Release/openFrameworks/math/ofVec2f.o obj/Release/openFrameworks/types/ofColor.o obj/Release/openFrameworks/types/ofBaseTypes.o obj/Release/openFrameworks/types/ofRectangle.o obj/Release/openFrameworks/types/ofPoint.o obj/Release/openFrameworks/gl/ofVbo.o obj/Release/openFrameworks/gl/ofShader.o obj/Release/openFrameworks/gl/ofTexture.o obj/Release/openFrameworks/gl/ofVboMesh.o obj/Release/openFrameworks/gl/ofFbo.o obj/Release/openFrameworks/gl/ofGLRenderer.o obj/Release/openFrameworks/gl/ofLight.o obj/Release/openFrameworks/gl/ofMaterial.o obj/Release/openFrameworks/communication/ofSerial.o obj/Release/openFrameworks/communication/ofArduino.o obj/Release/openFrameworks/graphics/ofCairoRenderer.o obj/Release/openFrameworks/graphics/ofPixels.o obj/Release/openFrameworks/graphics/ofTrueTypeFont.o obj/Release/openFrameworks/graphics/ofImage.o obj/Release/openFrameworks/graphics/ofPath.o obj/Release/openFrameworks/graphics/ofBitmapFont.o obj/Release/openFrameworks/graphics/ofPolyline.o obj/Release/openFrameworks/graphics/ofGraphics.o obj/Release/openFrameworks/graphics/ofTessellator.o obj/Release/openFrameworks/app/ofAppRunner.o obj/Release/openFrameworks/app/ofAppGlutWindow.o
ar: creating …/…/lib/linux64/libopenFrameworks.a
make: *** No rule to make target `Release’. Stop.
there has been a problem compiling the projectGenerator
please report this problem in the forums

have you run the install_dependencies script?
your second log indicates a strange version of the github sources, you should try with the 0072 zip: https://github.com/openframeworks/openFrameworks/zipball/0072 or if that fails, with the current develop branch.

Hello,

Sorry for the delay, I’ve been way too busy with another project, got behind on this OF build problem.

I’ve updated my source to the latest from github but have run into a slightly different problem.

  1. The “scripts/linux/ubuntu/install_dependencies.sh” script complains about not finding “libjack-jackd2-dev”, so I comment it out and the script runs OK. Not sure what will impact.

  2. The same script also fails when trying to start the project generator:
    make: *** No rule to make target `Release’. Stop.
    there has been a problem compiling the projectGenerator
    please report this problem in the forums

When trying to build the examples:
./buildAllExamples.sh

building + QuaternionArcballExample
make: *** No rule to make target `Debug’. Stop.
error compiling QuaternionArcballExample

Thanks,
Mark

  1. well I think this is simple - your ubuntu is so old (5 releases back) that that packaged didn’t exist back then. maybe you’ll get sound problems, if so, that’s where i’d look first.
  2. did the install_dependencies script successfully compile the OF library itself? this error sounds like what happens when the OF library is not yet compiled

Ubuntu 10.04.4LTS is still supported, I build lots of DSOs for 3D apps, and other code development just fine, compilers are all current. Next year I plan to upgrade the whole studio to “Ubuntu V12” but this version of OF is giving me problems; I had a previous version working months ago, but can’t remember if I built or downloaded the bin/libs all ready pre-built.

The libjack issue isn’t a problem for me, I don’t use it.

It does appear the OF libs are being built, there’s problems (from what I can tell without digging too terribly deep) with the way the linux64 templates aren’t showing up in the example folders.

Here’s the contents of the libs folder:

  
sirius:~/work/openFrameworks/libs/openFrameworksCompiled/lib/linux64> pwd  
/home/mstory/work/openFrameworks/libs/openFrameworksCompiled/lib/linux64  
sirius:~/work/openFrameworks/libs/openFrameworksCompiled/lib/linux64> ls -al   
total 60344  
drwxr-xr-x 2 mstory mstory     4096 2012-12-08 19:42 .  
drwxr-xr-x 9 mstory mstory     4096 2012-12-03 17:02 ..  
-rw-r--r-- 1 mstory mstory       72 2012-12-03 17:02 .gitignore  
-rw-r--r-- 1 mstory mstory  3966182 2012-12-08 19:42 libopenFrameworks.a  
-rw-r--r-- 1 mstory mstory 57741456 2012-12-08 19:42 libopenFrameworksDebug.a  
sirius:~/work/openFrameworks/libs/openFrameworksCompiled/lib/linux64>   
  

For one of the 3D examples:

  
sirius:~/work/openFrameworks/examples/3d/advanced3dExample> pwd  
/home/mstory/work/openFrameworks/examples/3d/advanced3dExample  
sirius:~/work/openFrameworks/examples/3d/advanced3dExample> ls -al   
total 16  
drwxr-xr-x  4 mstory mstory 4096 2012-12-03 17:02 .  
drwxr-xr-x 15 mstory mstory 4096 2012-12-03 17:02 ..  
drwxr-xr-x  3 mstory mstory 4096 2012-12-03 17:02 bin  
drwxr-xr-x  2 mstory mstory 4096 2012-12-03 17:02 src  
sirius:~/work/openFrameworks/examples/3d/advanced3dExample> ls -al src/  
total 52  
drwxr-xr-x 2 mstory mstory 4096 2012-12-03 17:02 .  
drwxr-xr-x 4 mstory mstory 4096 2012-12-03 17:02 ..  
-rw-r--r-- 1 mstory mstory  243 2012-12-03 17:02 Grid.cpp  
-rw-r--r-- 1 mstory mstory  206 2012-12-03 17:02 Grid.h  
-rw-r--r-- 1 mstory mstory  419 2012-12-03 17:02 main.cpp  
-rw-r--r-- 1 mstory mstory  754 2012-12-03 17:02 OrthoCamera.cpp  
-rw-r--r-- 1 mstory mstory  272 2012-12-03 17:02 OrthoCamera.h  
-rw-r--r-- 1 mstory mstory 3361 2012-12-03 17:02 Swarm.cpp  
-rw-r--r-- 1 mstory mstory  592 2012-12-03 17:02 Swarm.h  
-rw-r--r-- 1 mstory mstory 8224 2012-12-03 17:02 testApp.cpp  
-rw-r--r-- 1 mstory mstory 1258 2012-12-03 17:02 testApp.h  
sirius:~/work/openFrameworks/examples/3d/advanced3dExample>   
sirius:~/work/openFrameworks/examples/3d/advanced3dExample> ll bin/  
total 4  
drwxr-xr-x 2 mstory mstory 4096 2012-12-03 17:02 data  
sirius:~/work/openFrameworks/examples/3d/advanced3dExample> ll bin/data/  
total 0  
sirius:~/work/openFrameworks/examples/3d/advanced3dExample>   
  

It appears the Makefiles didn’t end up in the examples src dirs, that’s why the script generates that particular error:

  
sirius:~/work/openFrameworks/examples> find . | grep -i make | grep -v android | grep -v ios  
./3d/modelNoiseExample/addons.make  
./utils/dirListExample/addons.make  
./addons/xmlSettingsExample/addons.make  
./addons/opencvExample/addons.make  
./addons/svgExample/addons.make  
./addons/oscChatSystemExample/addons.make  
./addons/networkTcpClientExample/addons.make  
./addons/assimpExample/addons.make  
./addons/networkUdpReceiverExample/addons.make  
./addons/3DModelLoaderExample/addons.make  
./addons/allAddonsExample/addons.make  
./addons/vectorGraphicsExample/addons.make  
./addons/oscSenderExample/addons.make  
./addons/oscReceiveExample/addons.make  
./addons/networkUdpSenderExample/addons.make  
./addons/networkTcpServerExample/addons.make  
./addons/threadedImageLoaderExample/addons.make  
./addons/opencvHaarFinderExample/addons.make  
./graphics/polylineBlobsExample/addons.make  
  

ha, yeah, the makefiles in the examples are not there yet because the project generator puts them in the appropriate place when running it to “generate the examples”.
now you should compile and run the PG to generate the examples’ makefiles, does that work?
failing that, you can just manually put the makefile and config.make from /media/windata/Visuals/Coding/openFrameworks/scripts/linux/template/linux64 into an example’s folder (same level as addons.make)

Hello,

I’m getting closer, I copied a Makefile and config.make, but getting a OpenGL related error:

  
g++ -o bin/src obj/x86_64Release/./main.o obj/x86_64Release/./testApp.o obj/x86_64Release/./OrthoCamera.o obj/x86_64Release/./Swarm.o obj/x86_64Release/./Grid.o   -Wl,-rpath=./libs  ../../../../libs/openFrameworksCompiled/lib/linux64/libopenFrameworks.a   ../../../../libs/poco/lib/linux64/libPocoNet.a ../../../../libs/poco/lib/linux64/libPocoXML.a ../../../../libs/poco/lib/linux64/libPocoUtil.a ../../../../libs/poco/lib/linux64/libPocoFoundation.a ../../../../libs/freetype/lib/linux64/libfreetype.a ../../../../libs/kiss/lib/linux64/libkiss.a ../../../../libs/portaudio/lib/linux64/libportaudio.a ../../../../libs/rtAudio/lib/linux64/libRtAudio.a ../../../../libs/tess2/lib/linux64/libtess2.a -L../../../../libs/fmodex/lib/linux64 -L../../../../libs/freetype/lib/linux64 -L../../../../libs/kiss/lib/linux64 -L../../../../libs/openFrameworksCompiled/lib/linux64 -L../../../../libs/poco/lib/linux64 -L../../../../libs/portaudio/lib/linux64 -L../../../../libs/rtAudio/lib/linux64 -L../../../../libs/tess2/lib/linux64 -lfmodex -pthread -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0   -lmpg123  -lglut -lGL -lasound -lopenal -lsndfile -lvorbis -lFLAC -logg -lfreeimage  
../../../../libs/openFrameworksCompiled/lib/linux64/libopenFrameworks.a(ofCamera.o): In function `ofCamera::begin(ofRectangle)':  
ofCamera.cpp:(.text+0x6ed): undefined reference to `gluPerspective'  
../../../../libs/openFrameworksCompiled/lib/linux64/libopenFrameworks.a(ofAppRunner.o): In function `ofSetVerticalSync(bool)':  
ofAppRunner.cpp:(.text+0x325): undefined reference to `__glewXGetCurrentDisplay'  
../../../../libs/openFrameworksCompiled/lib/linux64/libopenFrameworks.a(ofAppRunner.o): In function `ofSetupOpenGL(ofPtr<ofAppBaseWindow>, int, int, int)':  
ofAppRunner.cpp:(.text+0x5ca): undefined reference to `glewExperimental'  
ofAppRunner.cpp:(.text+0x5d0): undefined reference to `glewInit'  
ofAppRunner.cpp:(.text+0x5e0): undefined reference to `glewGetErrorString'  
../../../../libs/openFrameworksCompiled/lib/linux64/libopenFrameworks.a(ofTexture.o): In function `ofTexture::draw(ofVec3f const&, ofVec3f const&, ofVec3f const&, ofVec3f const&)':  
ofTexture.cpp:(.text+0x2b8): undefined reference to `__glewActiveTexture'  
../../../../libs/openFrameworksCompiled/lib/linux64/libopenFrameworks.a(ofTexture.o): In function `ofTexture::drawSubsection(float, float, float, float, float, float, float, float, float)':  
ofTexture.cpp:(.text+0x4f0): undefined reference to `__glewActiveTexture'  
../../../../libs/openFrameworksCompiled/lib/linux64/libopenFrameworks.a(ofTexture.o): In function `ofTexture::loadData(void*, int, int, int)':  
ofTexture.cpp:(.text+0x2136): undefined reference to `gluBuild2DMipmaps'  
../../../../libs/openFrameworksCompiled/lib/linux64/libopenFrameworks.a(ofGLRenderer.o): In function `ofGLRenderer::setBlendMode(ofBlendMode)':  
ofGLRenderer.cpp:(.text+0x235): undefined reference to `__glewBlendEquation'  
ofGLRenderer.cpp:(.text+0x262): undefined reference to `__glewBlendEquation'  
ofGLRenderer.cpp:(.text+0x283): undefined reference to `__glewBlendEquation'  
ofGLRenderer.cpp:(.text+0x2a4): undefined reference to `__glewBlendEquation'  
../../../../libs/openFrameworksCompiled/lib/linux64/libopenFrameworks.a(ofGLRenderer.o): In function `ofGLRenderer::drawString(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, float, float, float, ofDrawBitmapMode)':  
ofGLRenderer.cpp:(.text+0x639): undefined reference to `gluProject'  
../../../../libs/openFrameworksCompiled/lib/linux64/libopenFrameworks.a(ofGLRenderer.o): In function `ofGLRenderer::setupScreenPerspective(float, float, ofOrientation, bool, float, float, float)':  
ofGLRenderer.cpp:(.text+0x1a8f): undefined reference to `gluPerspective'  
ofGLRenderer.cpp:(.text+0x1ae8): undefined reference to `gluLookAt'  
collect2: ld returned 1 exit status  
make: *** [bin/src] Error 1  
  

Thanks,
Mark

hm, no idea. could be a package issue, but if your install_dependencies ran correctly this should work. maybe the older gl package versions you have installed aren’t compatible? :-/
Hopefully arturoc knows more…

try adding -lGLEW -lglu in you USER_LDFLAGS variable in config.make

…/…/…/openFrameworks/utils/ofConstants.h:141:21: fatal error: glxew.h: No such file or directory

i’ve got the previous pb

sovled it that way : line 141

replaced that :

  
  
		#include <glxew.h>  

with that :

  
  
		#include <GL/glxew.h>  
	  

I dunno if it helps but I’ve had issues with Lucid a while back as well. I solved it by fixing the Makefile. Can’t remember exactly what it was but I recall something with the order in gcc. I’ve attached my custom makefile. Use it with make -f Makefile.lucid Debug.

Rg,

Arnaud

P.S. Had to pack the file into a tgz.

Makefile.lucid.tgz