Personal tools
You are here: Home documentation developer Building-pd-extended-64bit-Ubuntu-Intrepid
Views

===== Building pd-extended for 64 bit Ubuntu Intrepid =====

This is a quick guide on building an amd64 pd-extended package for Ubuntu 8.10 Intrepid Ibex 64 bit as there is currently no 64bit .deb package available. It was based off of the BuildingPdExtended, GettingPdSource, and 64BitLinux instructions on making a package for Ubuntu 8.04 Hardy Heron.

This package is not a *true* pd-extended build but Pd-Vanilla 0.42.4 with all of the pd-extended externals so [import]? is not available (sorry), read below ...

March 1 2009 Dan Wilcox

http://danomatika.com | http://robotcowboy.com

works almost flawlessly with **ubuntu 9.10** (karmic koala) as well: just had to remove the ttf-bitstream-vera dependency (is now ttf-dejavu, bitstream vera comes with gem anyway) in the control file of the deb and repackage it:

  • mkdir -p unpack/DEBIAN build && dpkg -x Pd-0.40.3-extended_amd64.deb unpack/ && dpkg -e Pd-0.40.3-extended_amd64.deb unpack/DEBIAN/

  • {your editor} unpack/DEBIAN/control

  • dpkg -b unpack/ build/

for one reason or another, pix_image doesn't work with the packaged GEM. To get it working, I just replaced Gem.pd_linux with the one found in the karmic-repositories - this is a really ugly solution, but it seems to work.

cheers, t.


1 Get the Source


First we need to download the source files to build the package. Open your terminal, make a folder to work in and change directory to it. I made one on my desktop::

  • mkdir ~/Desktop/pd-build && cd ~/Desktop/pd-build

**pd-extended**

Download the 0.40.3 pd-extended code::

This will take some time ...

**pd**

Download the source package for Pd-Vanilla 0.42.4, extract it, and use it to replace the Pd core source in the Pd-0.40.3-extended folder. I did this as the 0.41 pd-extended core does not (as yet) have the 64 bit table bug resolved (tables are only read half way). Hopefully in the near future this step will not be necessary.

::

**Gem**

The pd-extended source tarball does not come with Gem, so you can grab it from the pd-extended autobuilds with rsync and place it in the Pd-0.40.3-extended folder::

  • rsync -av --delete rsync://128.238.56.50/distros/pd-extended/Gem Pd-0.40.3-extended/


2 Prepare


Here is a list of source file changes that need to be made in order for all externals to compile correctly on Intrepid.

**pdp**

The version of pdp included in the pd-extended source package calls the open function to create a new file but does not specific the permission of this file which the libc in Intrepid wants. You need to add this to the function arguments in the specific file::

  • gedit Pd-0.40.3-extended/externals/pdp/modules/generic/pdp_rawout.c

Goto line 141 and add ", 0666" after "O_CREAT" so

if (-1 == (pipefd = open(x->x_pipe->s_name, O_WRONLY|O_CREAT))){

becomes

if (-1 == (pipefd = open(x->x_pipe->s_name, O_WRONLY|O_CREAT, 0666))){

Also, this external is missing a compilation flag needed to link in 64 bit. You need to add this flag::

  • gedit Pd-0.40.3-extended/externals/pdp/opengl/Makefile.config

Goto line 9 and add "-fPIC" to the CFLAGS line so

CFLAGS = -DPD -O2 -funroll-loops -fomit-frame-pointer -ffast-math \

becomes

CFLAGS = -DPD -fPIC -O2 -funroll-loops -fomit-frame-pointer -ffast-math \

**gem2pdp**

The gem2pdp external is missing a compilation flag needed to link in 64bit. You need to add this flag::

  • gedit Pd-0.40.3-extended/externals/gem2pdp/Makefile.in

Goto line 16 and add "-fPIC" to the CFLAGS line so

CFLAGS = -DPD -O2 -funroll-loops -fomit-frame-pointer -ffast-math \

becomes

CFLAGS = -DPD -fPIC -O2 -funroll-loops -fomit-frame-pointer -ffast-math \

**cyclone**

The cyclone external is missing a compilation flag needed to link in 64bit. You need to add this flag::

  • gedit Pd-0.40.3-extended/externals/miXed/Makefile.common

Goto line 44 and add "-fPIC" to the DEFINES line so

DEFINES = -DUNIX

becomes

DEFINES = -fPIC -DUNIX

**pdip**

The pdip external is missing a compilation flag needed to link in 64bit. You need to add this flag::

  • gedit Pd-0.40.3-extended/externals/pidip/Makefile.in

Goto line 18 and add "-fPIC" to the PDP_PIDIP_CFLAGS line so

PDP_PIDIP_CFLAGS = $(MPEG4IP_CFLAGS) $(IMLIB_CFLAGS) \

becomes

PDP_PIDIP_CFLAGS = -fPIC $(MPEG4IP_CFLAGS) $(IMLIB_CFLAGS) \


3 Build


**Dev Libraries and Software**

Before you can build the package, you will need to install some development libraries and software::

  • sudo apt-get install build-essential dpkg-dev swig ttf-bitstream-vera x-ttcidfont-conf \ libvorbis-dev libspeex-dev fakeroot libgsl0-dev dssi-dev liblo0-dev freeglut3-dev libimlib2-dev \ libbz2-dev libtheora-dev libmagick9-dev libfftw3-dev libasound2-dev libjack-dev libmp3lame-dev \ libmpeg3-dev libogg-dev libquicktime-dev libsdl1.2-dev libvorbis-dev tcl8.4-dev tk8.4-dev libdv4-dev

As I had already installed some of these libraries before trying to make the pd-extended package, I'm making this list based off of the Debian control file thats is generated when the package is built. There may be some errors, please update this if you find one.

**Build**

Ok, now we can go to the linux package build folder and try to build using the included Makefile:

::

  • cd ~/Desktop/pd-build/Pd-0.40.3-extended/packages/linux_make make install

This will build a package structure in the Pd-0.40.3-extended/packages/linux_make/build folder.

If (in step 1) you opted to use a Pd-vanilla core, then it's likely the install will have messed a bit and installed all the pd-core files to a build/home/.. folder instead of the build/usr/lib/pd folder. This happened to me, so I just moved all those files and placed them in the right location:

::

  • cp -R build/home/YOUR_USERNAME/Desktop/pd-build/Pd-0.40.3-extended/packages/linux_make/build/usr/lib/pd/* build/usr/lib/pd/ rm -R build/home

**Make A .deb Package**

With the build structure created, the debian package can be built::

  • make package

**Package Build Errors?**

If, like me, you get an error similar to this:

dpkg-deb: parse error, in file /home/dano/Desktop/pd-build/Pd-0.40.3-extended/packages/linux_make/build//DEBIAN/control near line 8 \package pd-extended: Depends field, syntax error after reference to package zlib1g make: *** deb Error 2

then there is a comma missing after a dependency. Open the Debian control file, look through the dependency list on line 8, and add the missing comma(s) after the referenced package in the error, in this case "zlib1g"::

  • gedit build/DEBIAN/control

then rerun the following build command (where you can also specify the .deb name)::

  • fakeroot dpkg-deb --build build/ Pd-0.40.3-extended.deb

**Install and Use**

If the package build worked, you should now have a .deb package in ~/Desktop/pd-build/Pd-0.40.3-extended/packages/linux_make/. Don't worry if the version name on the .deb file is not 0.40.3, the package control has that internally along with the "pd-extended" package name.

I ended up with a "Pd-0.40.3-extended_amd64.deb" which is not a *true* pd-extended as it doesn't have the pd-extended core but Pd Vanilla 0.42.4. So it's basically the latest Vanilla with all the externals, which means I can work again at least!


Please Help! --juampablotoledo, Sun, 25 Apr 2010 09:20:25 +0200

Hi, i'm quite a noob building aplications from source, i use Ubuntu Karmic Koala 64 bits and i would like to use PD under this system (my HD has windows 7 and Linux, but i rather use PD under linux, everything works better) but i cant understand the instructions to re-compile your 64b PD version under KK 64bits. I will be greatfull for ever if you can post (or emailme) a more detailed tutorial to compile PD in Ubuntu KK 64b.

My english is not the best, i'm venezuelan, if you can understand spanish let me know. Great work! Your 64b version is more than necesary, thanks for your time.

juampa.blotoledo(gmail)



Powered by IEM Powered by Plone Section 508 WCAG Valid XHTML Valid CSS Usable in any browser