cuinjune / Ofelia

A real-time cross-platform creative coding tool for multimedia development
GNU General Public License v3.0
369 stars 21 forks source link

ofelia install on Raspbian Stretch #12

Open mbncr opened 5 years ago

mbncr commented 5 years ago

Hey :) Is there any documentation about installation on Raspbian? I'm running into some issues that look similar to what was described in this thread. Here's where I'm at so far : I've installed the package via PD, and used the install_dependencies script present in the Debian distro folder. Ofelia is missing in all examples installed. I can't find ofelia.pd_linux to check if other specific elements are missing. Alternatively, any tip on a working Rpi 3B+ configuration other than Raspbian Stretch (can't downgrade to Jessie) wiil be helpful.

Thanks !

cuinjune commented 5 years ago

Hi, I just updated ofelia to 2.3.0 (it will appear shortly on Deken) and also updated the README.

Could you follow the setup guide and try to build ofelia external on your system?

By the way, the correct external binary on Raspbian OS is ofelia.l_arm and not ofelia.pd_linux.

mbncr commented 5 years ago

Thank you, that was fast ! So, found the 2.3.0 in Deken, basic setup did not work : Ofelia still absent, Tried the install_dependencies script found in the Debian folder (no explicit Raspbian folder in that update, maybe I took the wrong one). Everything went smooth until the last line :

If you are running a version of debian greated than 8 OF needs to install poco libraries in the system with the following packages: Reading package lists... Done Building dependency tree
Reading state information... Done libpoco-dev is already the newest version (1.7.6+dfsg1-5+deb9u1). 0 upgraded, 0 newly installed, 0 to remove and 31 not upgraded. cp: cannot create regular file '/home/pi/ofelia/scripts/debian/../../../addons/ofxPoco/addon_config.mk': No such file or directory

Tried again, no luck, don't know where this addon is supposed to be copied.

Just to document, here's the result for the dependencies check :

*edit : https://pastebin.com/P7nB5GQt

cuinjune commented 5 years ago

@mbncr I'm not sure why it's not working on your system. It might be that you need to configure the Raspberry Pi so you can use openFrameworks.

Could you please try the steps in Configure the Raspberry Pi section from this link? https://openframeworks.cc/setup/raspberrypi/raspberry-pi-getting-started/

If it still doesn't work, you can continue to the next steps (download openFrameworks) from the link to see if you can build any OF example.

Please let me know how it goes. Thanks!

mbncr commented 5 years ago

Thanks for the updates ! So Pd still can't load Ofelia library or fully open the examples. Tried the step by step with a fresh 32G micro SD, Stretch Desktop, up to date.

To sum up :

OF/addons/ofxOfelia/LinuxExternal make

Most errors there seem related to ofBindings.cpp

/home/pi/openFrameworks/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:304 : la recette pour la cible « /home/pi/openFrameworks/addons/ofxOfelia/LinuxExternal/obj/linuxarmv6l/Release/addons/ofxLua/src/bindings/linuxarm/ofBindings.o » a échouée make[1]: [/home/pi/openFrameworks/addons/ofxOfelia/LinuxExternal/obj/linuxarmv6l/Release/addons/ofxLua/src/bindings/linuxarm/ofBindings.o] Erreur 1 make[1] : on quitte le répertoire « /home/pi/openFrameworks/addons/ofxOfelia/LinuxExternal » /home/pi/openFrameworks/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:124 : la recette pour la cible « Release » a échouée make: [Release] Erreur 2

Tried running the standalone example, no luck either.

Hope this helps :)

cuinjune commented 5 years ago

I will try to find a solution as soon as possible. It would be useful if you can find more information about the error though.

mbncr commented 5 years ago

Sure, should I run 'make' again and copy/paste the log?

cuinjune commented 5 years ago

Just a second, I will release the ofxOfelia v2.3.1 in 30 minutes. Please delete the previous one and download the new one when it's available.


ADDED:

  1. Please download ofxOfelia v2.3.1, unzip it and rename the folder to ofxOfelia.
  2. Delete the previous OF/addons/ofxOfelia folder and copy the new one to the directory.
  3. cd to OF/addons/ofxOfelia/LinuxExternal and then run make to build the external.
  4. If the error happens again, please copy and paste the log please.

Thank you!

mbncr commented 5 years ago

So, got an error, here's the log

*edit - Log can be found here : https://pastebin.com/HDiyFKqz

cuinjune commented 5 years ago

Thank you for the log. It seems like you are using openFrameworks 0.10.0 which is not the latest version. I'm sorry I should have mentioned this but the instruction link I gave you is a bit old so it uses 0.10.0 in the description but you need to change them to 0.10.1.

So below the Download openFrameworks section, the correct commands should be

cd
wget https://openframeworks.cc/versions/v0.10.1/of_v0.10.1_linuxarmv6l_release.tar.gz
mkdir openFrameworks
tar vxfz of_v0.10.1_linuxarmv6l_release.tar.gz -C openFrameworks --strip-components 1

Or, you can just download it through this link, unzip it and rename the folder to openFrameworks.

The rest of the steps are identical to my last comment.

I'm sorry for the inconvenience. Please delete the previous openFrameworks folder and try again. It will work this time.

mbncr commented 5 years ago

Almost there. :) This time, it compiled properly, offering me two options to run. I get an error on both methods : First :

pi@raspberrypi:~/openFrameworks/addons/ofxOfelia/LinuxExternal/bin $ ./ofelia.l_arm Segmentation fault

Second :

pi@raspberrypi:~/openFrameworks/addons/ofxOfelia/LinuxExternal $ make RunReleaseHOST_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 gtk+-3.0 with PKG_CONFIG_LIBDIR= Segmentation fault /home/pi/openFrameworks/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:197: recipe for target 'RunRelease' failed make: *** [RunRelease] Error 139

I'm sure I missed something obvious. After seeing this error, I've flashed the SD, and reinstalled everything fresh. I can upload an image if it is more helpful.

cuinjune commented 5 years ago

You need to copy the generated ofelia.l_arm file to the external/ofelia folder and overwrite the previous one. And then try to create ofelia object in Pd.

mbncr commented 5 years ago

I got the file to be generated, placed it in the /ofelia folder, but it hasn't worked as of now. Maybe there is a specific absolute path I should use? I'll try again from a fresh distro in a couple days :)

cuinjune commented 5 years ago

You can check the externals search path from Pd -> Preferences -> Path. ofelia folder should be located inside the path in order for pd to search it. Please try opening the ofelia/help-intro.pd patch to see if [ofelia] object is created successfully.

Also, you can try running the LinuxExample project with the following command to see if it works.

cd openFrameworks/addons/ofxOfelia/LinuxExample
make && make RunRelease
mbncr commented 5 years ago

Thanks for your help. Still can't figure it out. I've done all of the above. Any attempt at make RunRelease, even using the LinuxExample command above ends up with a segmentation faultfollowed by recipe for target 'RunRelease' failed

In pd, I've tried linking default location (in my case /home/pi/ofelia), tried isolating the folder from the rest (/home/pi/extra/ofelia) tried linking/openFrameworks/addon/ofxOfelia, also tried moving the whole ofeliafolder (with updated ofelia.l_arm) to my default pd extra folder (/usr/lib/pd/extra). Of course, each time resetting the project to leave no duplicates. In all cases, ofelia.l_arm is the latest version generated

cuinjune commented 5 years ago

So you could at least build LinuxExample (not LinuxExternal) using make but it crashes with a segmentation fault as soon as you run the project using make RunRelease?

Also, do you see any error message (other than "can't create object") in the pd or Terminal console when you create [ofelia] object on a patch?

mbncr commented 5 years ago

So you could at least build LinuxExample (not LinuxExternal) using make but it crashes with a segmentation fault as soon as you run the project using make RunRelease?

That's exactly it.

Also, do you see any error message (other than "can't create object") in the pd or Terminal console when you create [ofelia] object on a patch?

With Log set to All, here's all I'm getting from pd

------------------ done with main ---------------------- Connection from 'pd' to 'pd-gui' on 127.0.0.1:36368 Default font: DejaVu Sans Mono Loading plugin: /usr/lib/puredata/tcl/pd_deken.tcl The Pd window filtered 4 lines ofelia: can't load library ofelia ... couldn't create ... you might be able to track this down from the Find menu. The Pd window filtered 13 lines