openFrameworks-RaspberryPi / openFrameworks

This repo has migrated into the openFramworks core! Please go to http://github.com/openFrameworks/openFrameworks for the latest!
http://github.com/openFrameworks/openFrameworks
Other
104 stars 11 forks source link

oF Won't Compile on PandaboardES #64

Closed kalwalt closed 11 years ago

kalwalt commented 11 years ago

i ve already posted the problem on the OF forum http://forum.openframeworks.cc/index.php/topic,11319.0.html but maybe github issue is more efficient for this . I saw in the issues that arturo succesfully used it with Pandaboard (also with PandaboardES?) in particular i would like to know how to setup with PandaboardES and what os have you used (Ubuntu 11.10 or 12.04 or what?) Thanks for the attention Walter

arturoc commented 11 years ago

i've used ubuntu 12.04 you'll need to add the omap4 extas ppa, follow the instructions here:

http://omappedia.org/wiki/PandaBoard_Ubuntu_PPA

then run the install_dependencies script in linux/ubuntu, the install_codecs script in that same folder and the install_dependencies script in linux/ubuntu_omap4

i had to fix something in the boot loader to get openGL to work, i think it was removing the video memory settings but don't remember exactly so if you get any errors please post the error here and i'll look on how to fix it

kalwalt commented 11 years ago

i have supposed that you have used the 12.04 version .... so i will go to install that version and after i will follow your instructions. Sure i will post in any case my result, and of course in case of issues. Thanks!

bakercp commented 11 years ago

(I edited the title of this issue to make it a little clearer.)

Meach commented 11 years ago

Hello, I am in the same situation/board as kalwalt. Yesterday I started with a fresh installation of Ubuntu 12.04 and I had some issues following arturoc guidelines. I used the develop-raspberry branch, as advised by bakercp on the forum.

First time I run install_dependencies.sh in linux/ubuntu, I had this error:

makefileCommon/configure.core.platform.make:37: ** This makefile does not support your architecture. Stop. there has been a problem compiling Debug OF library please report this problem in the forums chown: cannot access obj': No such file or directory chown: cannot access../../lib//': No such file or directory

So I went to check makefileCommon/configure.core.platform.make and I tried to add armv7l architecture in the file: else ifeq ($(PLATFORM_ARCH),armv7l) PLATFORM_LIB_SUBPATH=linuxarmv7l

Once done I run again install_dependencies and got this:

Compiling ../../..//libs/openFrameworks/app/ofAppEGLWindow.cpp mkdir -p linuxarmv7l/obj/Debug/libs/openFrameworks/app g++ -g3 -march=armv7-a -funsafe-math-optimizations -mfpu=vfp -mfloat-abi=hard -fPIC -ftree-vectorize -Wno-psabi -pipe -DTARGET_NO_SOUND -DTARGET_NO_GLUT -DTARGET_NO_GLU -DTARGET_NO_X11 -DTARGET_OPENGLES -DTARGET_OPENGLES2 -DTARGET_RASPBERRY_PI -DSTANDALONE -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE -DSTDC_CONSTANT_MACROS -DSTDC_LIMIT_MACROS -DTARGET_POSIX -DHAVE_LIBOPENMAX=2 -DOMX -DOMX_SKIP64BIT -DUSE_EXTERNAL_OMX -DHAVE_LIBBCM_HOST -DUSE_EXTERNAL_LIBBCM_HOST -DUSE_VCHIQ_ARM -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I../../../addons/ofxRaspberryPi/src -pthread -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/gstreamer-0.10 -I/usr/include/libxml2 -I../../../libs/FreeImage/include -I../../../libs/cairo/include -I../../../libs/cairo/include/pixman-1 -I../../../libs/cairo/include/cairo -I../../../libs/cairo/include/libpng15 -I../../../libs/freetype/include -I../../../libs/freetype/include/freetype2 -I../../../libs/freetype/include/freetype2/freetype -I../../../libs/freetype/include/freetype2/freetype/internal -I../../../libs/freetype/include/freetype2/freetype/internal/services -I../../../libs/freetype/include/freetype2/freetype/config -I../../../libs/kiss/include -I../../../libs/poco/include -I../../../libs/poco/include/Poco -I../../../libs/poco/include/CppUnit -I../../../libs/tess2/include -I../../../libs/openFrameworks -I../../../libs/openFrameworks/app -I../../../libs/openFrameworks/types -I../../../libs/openFrameworks/communication -I../../../libs/openFrameworks/video -I../../../libs/openFrameworks/events -I../../../libs/openFrameworks/graphics -I../../../libs/openFrameworks/3d -I../../../libs/openFrameworks/utils -I../../../libs/openFrameworks/gl -I../../../libs/openFrameworks/sound -I../../../libs/openFrameworks/math -MMD -MP -MFlinuxarmv7l/obj/Debug/libs/openFrameworks/app/ofAppEGLWindow.d -MTlinuxarmv7l/obj/Debug/libs/openFrameworks/app/ofAppEGLWindow.o -o linuxarmv7l/obj/Debug/libs/openFrameworks/app/ofAppEGLWindow.o -c ../../..//libs/openFrameworks/app/ofAppEGLWindow.cpp

:0:0: warning: "_FORTIFY_SOURCE" redefined [enabled by default] :0:0: note: this is the location of the previous definition In file included from ../../../libs/openFrameworks/math/ofVec2f.h:5:0, from ../../../libs/openFrameworks/math/ofVec3f.h:3, from ../../../libs/openFrameworks/types/ofPoint.h:3, from ../../..//libs/openFrameworks/app/ofBaseApp.h:3, from ../../..//libs/openFrameworks/app/ofAppEGLWindow.h:29, from ../../..//libs/openFrameworks/app/ofAppEGLWindow.cpp:26: ../../../libs/openFrameworks/utils/ofConstants.h:68:0: warning: "TARGET_OPENGLES" redefined [enabled by default] :0:0: note: this is the location of the previous definition In file included from ../../../libs/openFrameworks/math/ofVec2f.h:5:0, from ../../../libs/openFrameworks/math/ofVec3f.h:3, from ../../../libs/openFrameworks/types/ofPoint.h:3, from ../../..//libs/openFrameworks/app/ofBaseApp.h:3, from ../../..//libs/openFrameworks/app/ofAppEGLWindow.h:29, from ../../..//libs/openFrameworks/app/ofAppEGLWindow.cpp:26: ../../../libs/openFrameworks/utils/ofConstants.h:152:31: fatal error: bcm_host.h: No such file or directory compilation terminated. make: **\* [linuxarmv7l/obj/Debug/libs/openFrameworks/app/ofAppEGLWindow.o] Error 1 there has been a problem compiling Debug OF library please report this problem in the forums chown: cannot access `obj': No such file or directory chown: cannot access`../../lib//*': No such file or directory And now I don't have idea how to solve this. Is this same error you were refering to Arturoc? Cheers!
bakercp commented 11 years ago

hi @Meach are you using the master or develop branch? If you're not, recommend using the develop-raspberrypi branch. the 'bcm_host.h' reference is a raspberry pi specific header (Broadcom Host), and it should be ifdef'd out in ofConstants, which I believe is not treated correctly in the master but is fixed in develop.

Additionally, it looks like the master armv7l platform config is just a copy of the armv6l (RPI file, which explains a lot of problems ...)

All that to say -- switch to develop-raspberrypi branch!

in your openFrameworks directory,

git checkout develop-raspberrypi
bakercp commented 11 years ago

In the next day or two, as soon as I get keyboard input working, and we merge the latest makefile changes, I'm going to make the develop branch the master branch, so this shouldn't be an issue for people starting up.

Good luck and let us know if it works!

Meach commented 11 years ago

Hi bakercp, I was actually using the develop-raspberrypi branch as you advised us on the forum.

But yeah as soon as I get home I will give it a try to remove the bcm_host.h reference. I keep you posted

kalwalt commented 11 years ago

Hi Meach and all, my error was a bit different , referred most to the linking process and lib not matching. But if you launch the script CompileOF.sh ? do you have the same result? Actually i have problem to install Ubuntu 12.04 on the SD-card, i'm fighting with my card reader . I have already done this but with my old computer..... ( i hadn't all this troubles with it!) Anyway i hope to solve this and to start to develop my projects on it!

Meach commented 11 years ago

I give a second try, removing the 'bcm_host.h' reference and then it is all the following that are not found in 'constant.h':

include "GLES/gl.h"

#include "GLES/glext.h" 
#include "GLES2/gl2.h"
#include "GLES2/gl2ext.h"
#include "EGL/egl.h"
#include "EGL/eglext.h"

Btw, @kalwalt launching the script 'compileOf.sh' gives same results ('install_dependencies.sh' is calling it as I understand).

And removing those reference bring a tremendous amount of error :).

kalwalt commented 11 years ago

and If you install the only the dependencies from install_dependencies.sh and after install_dependencies script in linux/ubuntu_omap4 and finally build the OF libs?

Meach commented 11 years ago

I can give it a try but to what I remember the install_dependencies in linux/ubuntu_omap4 only contain "apt-get install" stuff

Meach commented 11 years ago

Hello,

I give it a try today and hurray, oF is compiling! I had to change one thing in linux/ubuntu/install_dependencies.sh though: I replaced libfreetype-dev by libfreetype6-dev as apt-get was not finding this package.

Then I tried the project generator in apps/devApps/projectGenerator but get some linking problems:

Linking console executable: bin/projectGenerator_DEBUG g++: error: obj/debug/addons/ofxXmlSettings/libs/tinyxml.o: No such file or directory g++: error: obj/debug/addons/ofxXmlSettings/libs/tinyxmlerror.o: No such file or directory g++: error: obj/debug/addons/ofxXmlSettings/libs/tinyxmlparser.o: No such file or directory g++: error: ../../../libs/openFrameworksCompiled/lib/win_cb/openFrameworksDebug.lib: No such file or directory

Do I need to change something in the build settings of code blocks?

kalwalt commented 11 years ago

also good news for me! OF compile fine : debug and release lib compiled fine without any issue . but when i try to build the videoplayer example i got this linking error : cannot find -lportaudio . I have libportaudio2 installed on my PandaboardES under /usr/lib/arm-linux-gnueabihf/libportaudio.so.2 but i think he is searching the static lib that should be in OF libs? as a note i used Makefile and config.make from apps/devApps/projectGenerator

to Meach: i hadn't that issue with freetype as i remember, and for the projectGenerator maybe you have to install other packages... but i will see tomorrow. now it is too late for me. I want also post some info on how to build an sd-card and other info for Pandaboard stuff that will be useful.

kalwalt commented 11 years ago

just a quick note: i can see inside my develop-raspberrypi/libs/portaudio that there are two folder /include and /lib , instead in the github repository thera is only the /include folder

EDit: deleting the static lib do nothing. it seems that gcc don't find libportaudio. I launch also a sudo ldconfig but doesn't change...so i suppose the makefile do not the right stuff or i need the staic portaudio lib in a folder like /linuxarmv7

danzeeeman commented 11 years ago

so for the Rpi we are using the system libs for portaudio and I think @aturoc was doing the same with the panda

On Tue, Dec 11, 2012 at 6:34 PM, Walter Perdan notifications@github.comwrote:

just a quick note: i can see inside my develop-raspberrypi/libs/portaudio that there are two folder /include and /lib , instead in the github repository thera is only the /include folder

— Reply to this email directly or view it on GitHubhttps://github.com/openFrameworks-RaspberryPi/openFrameworks/issues/64#issuecomment-11269978.

"I believe in science. Unlike mathematical theorems, scientific results can't be proved. They can only be tested again and again, until only a fool would not believe them.

I cannot prove that electrons exist, but I believe fervently in their existence. And if you don't believe in them, I have a high voltage cattle prod I'm willing to apply as an argument on their behalf. Electrons speak for themselves."

-- Seth Lloyd: Quantum Mechanical Engineer, MIT

/.

kalwalt commented 11 years ago

Urrah!!! i get the videoExample working on my Pandaboard! but i used those step:

1)makefile and config.make from projectGenerator 2)i build libportaudio.a static lib from source with cmake ( and remember to rename it libportaudio_static.a to libportaudio.a) 3)create a folder in libs/portaudio/lib/linuxarmv7l put your libportaudio.a here. 4)create that folders in export/linuxarmv7l/libs ( otherwise you get errors because OF copy the libs here) 5) make your example and thatha!!

this is temporary because i think @arturoc used another solution. but let me say : I'm very happy for this!!

arturoc commented 11 years ago

the package you need to install to get portaudio is portaudio19-dev not libportaudio2 so that's probably what you were missing

kalwalt commented 11 years ago

thanks @arturoc im going to check this !

kalwalt commented 11 years ago

installing portaudio19-dev solved the problem (because install also the staic lib)! but in my install_dependencies.sh portaudio19-dev is missed. so maybe i have a previous version.

danzeeeman commented 11 years ago

are you on the develop-raspberrypi branch? I added it to the dependencies script last week.

On Wed, Dec 12, 2012 at 7:05 AM, Walter Perdan notifications@github.comwrote:

installing portaudio19-dev solve the problem (because install also the staic lib)! but in my install_dependencies.sh portaudio19-dev is missed. so maybe i have a previous version.

— Reply to this email directly or view it on GitHubhttps://github.com/openFrameworks-RaspberryPi/openFrameworks/issues/64#issuecomment-11286462.

"I believe in science. Unlike mathematical theorems, scientific results can't be proved. They can only be tested again and again, until only a fool would not believe them.

I cannot prove that electrons exist, but I believe fervently in their existence. And if you don't believe in them, I have a high voltage cattle prod I'm willing to apply as an argument on their behalf. Electrons speak for themselves."

-- Seth Lloyd: Quantum Mechanical Engineer, MIT

/.

kalwalt commented 11 years ago

There isn't in my script maybe because i download it after your commits. but as i can see there is on github repo, so no problem. Also i tested the videoGrabberExample. it works fine !

Meach commented 11 years ago

Ok, using config.make and makefile files copied into the videoGrabberExample works as well. Thank you all!

bakercp commented 11 years ago

@kalwalt @Meach hey -- glad this is working for you all! Would you all be willing to write a getting started guide (similar to this https://github.com/openFrameworks-RaspberryPi/openFrameworks/wiki/Raspberry-Pi-Getting-Started) for the Pandaboard? I'm assuming much of the RPI guide can be cut and pasted, but it would be very helpful to have one dedicated to the Pandaboard. I would do it, but I don't have a Pandaboard ... and it's nice to share the work :)

Meach commented 11 years ago

@bakercp, yes sure I would be glad to help one way or another. I will contact you soon to start this ;) Cheers!

kalwalt commented 11 years ago

@bakercp ,yes you red in miy mind. i was asking for this! Are there some guidelines to follow? and how we can edit the wiki?

bakercp commented 11 years ago

Hi @Meach and @kalwalt I started a page for you all to work here:

https://github.com/openFrameworks-RaspberryPi/openFrameworks/wiki/PandaBoard

I'd recommend coordinating your efforts -- perhaps one can write the first draft, then the second can test it?

Meach commented 11 years ago

Thanks for that @bakercp, I am starting copy-pasting things, making the template first. Then will start filling it.

kalwalt commented 11 years ago

ok we will do our best!