I would like to install ubuntu on a G4 Macintosh and run openFrameworks programs on it. DOes somebody have experience with this ?
you’ll need to compile the libraries that come in libs. the dependencies should work without problem. the only thing that is not going to work is fmod, since there’s no ppc linux version
Hello, I’m trying to install oF in a Debian iBookG4 (PPC) enviorment.
I can install all dependencies without problems, but I have troubles with compilation.
I ran install_dependencies.sh script as user and as root with the same results.
After I tryied to follow manually the instructions of the script to see where the error occurs, here are my steps:
$ su
# aptitude install (all dependencies)
# cd (oF path)/libs/openFrameworksCompiled/project/linux
# make Debug
# make Release
Errors occurs after make Release:
# make Release
echo "creating dependencies"
creating dependencies
mkdir -p obj/Release/openFrameworks/app
g++ -march=native -mtune=native -finline-functions -funroll-all-loops -O3 -Wall -fexceptions -I../../../FreeImage/include -I../../../fmodex/include -I../../../freetype/include -I../../../freetype/include/freetype2 -I../../../freetype/include/freetype2/freetype -I../../../freetype/include/freetype2/freetype/config -I../../../glee/include -I../../../glu/include -I../../../glut/include -I../../../gstappsink/include -I../../../gstappsink/include/gst -I../../../gstappsink/include/gst/app -I../../../poco/include -I../../../poco/include/Poco -I../../../poco/include/Poco/Util -I../../../poco/include/Poco/Net -I../../../poco/include/Poco/Dynamic -I../../../poco/include/Poco/SAX -I../../../poco/include/Poco/XML -I../../../poco/include/Poco/DOM -I../../../poco/include/CppUnit -I../../../quicktime/include -I../../../rtAudio/include -I../../../videoInput/include -I../../../openFrameworks/ -I../../../openFrameworks/utils -I../../../openFrameworks/communication -I../../../openFrameworks/app -I../../../openFrameworks/video -I../../../openFrameworks/graphics -I../../../openFrameworks/sound -I../../../openFrameworks/events `pkg-config gstreamer-0.10 gstreamer-video-0.10 gstreamer-base-0.10 libudev libavcodec libavformat libavutil --cflags` -MM -MT obj/Release/openFrameworks/app/ofAppGlutWindow.d ../../../openFrameworks/app/ofAppGlutWindow.cpp > obj/Release/openFrameworks/app/ofAppGlutWindow.d
cc1plus: error: unrecognized command line option "-march=native"
cc1plus: error: bad value (ppc7450) for -mtune= switch
make: *** [obj/Release/openFrameworks/app/ofAppGlutWindow.d] Error 1
Can anybody help me to solve this issue?
no, the libraries included in the OF distribution are compiled for x86 or amd64 so it won’t work with ppc. You could try downloading yourself the libraries in the libs directory from the web, like freetype, freeimage, rtaudio… and compiling them yourself.
Hello arturo, thank you for your quick reply.
Now I see my error and I’m trying to solve it.
Here is a little report of what I’m doing:
I browsed libs directory and searched for the libraries.
I found these packages on debian ppc repositories:
libfreeimage-dev libfreetype6-dev glee-dev
Inside them I’ve found:
libfreeimage.a libfreetype.a libglee.a
Files that I can copy inside libs/LIBNAME/lib/linuxppc (I suppose).
This library is present in debian ppc repository but without the .a file, (only .so):
poco
These libraries are missing in the debian repo, and I have to manually compile them (I suppose):
gstappsink, rtaudio
These libraries are not required for linux enviorments (I suppose):
glu, glut, quicktime, videoinput
So I can Ignore them.
Finally, as you said, this library has not ppc support:
fmodex
My idea is to write a script that downloads useful .deb files from the repo, compile missing libraries (poco, gstappsink, rtaudio) and copy .a files inside libs/LIBNAME/lib/linuxppc. After that I want to modify install_dependencies.sh script to add ppc architecture support.
Do you think that this is a good idea? I want to know if I’m doing things right before go on
yeah that seems correct, the only thing i would recommend is to also compile poco since having it as a dynamic library will give you problems with paths. then you’ll need to remove the dependencies with fmod but that’s easy, post if you get further and i’ll tell you how
Perfect, I just started to compile, but I’m not really an expert and sometimes I have doubts…
… for example, I compiled RtAudio, and it gived me a RtAudio.o file.
In order to make a static library, I read that I have to use the ar command.
It’s the first time I used it and I called it in this way:
ar rcs libRtAudio.a RtAudio.o
It’s good?
And… RtAudio should be compiled with Alsa support, isn’t it?
Thank you very much!
Ok, I have all libs now.
Each one is located in it’s own linuxppc subdirectory and I’m waiting new instructions to delete fmod dependencies.
I wrote a script that installs all, so you can see exactly what I do to make things work.
If you think that it can be useful to create a Linux PPC port, feel free to use/modify this script, or, if you need precompiled ppc libraries, I can compile them all.
#!/bin/bash
#This script downloads, compiles and installs all the
#libraries needed to work with openframeworks on a PPC
#Debian system.
#It is important to locate it in 'OFDIR/scripts/linux/debian'.
#Written by Francesco Aggazio and released with NO WARRANTY,
#use at your own risk.
#aggatron@gmail.com
#[http://elettrofonesi.blogspot.com](http://elettrofonesi.blogspot.com)
mkdir -p oFlibPPC/deb
mkdir oFlibPPC/src
SCRIPTDIR=$(pwd)
TMPDIR=$SCRIPTDIR/oFlibPPC
LIBDIR=$SCRIPTDIR/../../../libs
mkdir $LIBDIR/FreeImage/lib/linuxppc
mkdir $LIBDIR/freetype/lib/linuxppc
mkdir $LIBDIR/glee/lib/linuxppc
mkdir $LIBDIR/rtAudio/lib/linuxppc
mkdir $LIBDIR/gstappsink/lib/linuxppc
mkdir $LIBDIR/poco/lib/linuxppc
#Precompiled libraries
cd $TMPDIR/deb
aptitude download libfreeimage-dev libfreetype6-dev glee-dev
dpkg-deb -x libfreeimage-dev* FreeImage/
dpkg-deb -x libfreetype6-dev* freetype/
dpkg-deb -x glee-dev* glee/
mv FreeImage/usr/lib/libfreeimage.a $LIBDIR/FreeImage/lib/linuxppc
mv freetype/usr/lib/libfreetype.a $LIBDIR/freetype/lib/linuxppc
mv glee/usr/lib/libglee.a $LIBDIR/glee/lib/linuxppc/libGlee.a
#libRtAudio
cd $TMPDIR/src
wget [http://www.music.mcgill.ca/~gary/rtaudio/release/rtaudio-4.0.7.tar.gz](http://www.music.mcgill.ca/~gary/rtaudio/release/rtaudio-4.0.7.tar.gz)
tar -zxf rtaudio-4.0.7.tar.gz
cd rtaudio-4.0.7
./configure
cd tests
make
cd Release
ar rcs libRtAudio.a RtAudio.o
mv libRtAudio.a $LIBDIR/rtAudio/lib/linuxppc
#gstappsink
cd $LIBDIR/gstappsink
mv lib/linux/liboFappsink.a lib/linux/liboFappsink.a.bak
cp include/gst/app/gstappsink.h .
make
mv lib/linux/liboFappsink.a lib/linuxppc/liboFappsink.a
mv lib/linux/liboFappsink.a.bak lib/linux/liboFappsink.a
#libpoco
cd $TMPDIR/src
wget [http://downloads.sourceforge.net/project/poco/sources/poco-1.4.0/poco-1.4.0.tar.gz](http://downloads.sourceforge.net/project/poco/sources/poco-1.4.0/poco-1.4.0.tar.gz)
tar -zxf poco-1.4.0.tar.gz
cd poco-1.4.0/build/config
sed 's/'"LINKMODE = SHARED"'/'"LINKMODE = STATIC"'/' Linux > Lonux
mv Lonux Linux
rm Lonux
cd ../../
./configure
make
mv lib/Linux/ppc/libPocoFoundation.a $LIBDIR/poco/lib/linuxppc
mv lib/Linux/ppc/libPocoNet.a $LIBDIR/poco/lib/linuxppc
mv lib/Linux/ppc/libPocoUtil.a $LIBDIR/poco/lib/linuxppc
mv lib/Linux/ppc/libPocoXML.a $LIBDIR/poco/lib/linuxppc
#Remove junk
cd $SCRIPTDIR
rm -R oFlibPPC/
echo "Done!"
arturo I miss you
hey!
sorry have been all week super busy working in the new version of OF. in this new version there’s a swappable sound player and you shouldn’t need to change anything in the core to get rid of FMOD so better to wait till this is released.
i don’t have a PPC machine to test or maintain the script but will include it in the distribution in an unmaintained folder with other distributions, i don’t use frequently, as a guide for people wanting to install OF in those.
btw, if you want to test it in 0062 is as simple as:
in ofMain.h remove the include for ofSoundPlayer.h
in ofAppRunner.h commment the line that calls ofCloseFmod
in the project settings remove the library, for linux makefiles delete
the whole fmod directory in libs since it autodetects the libraries from
the file system.