Method Compile library Pure Data MacOS

Method to compile a Pure Data library on MacOS.
M├ęthode pour compiler une librairie Pure Data sous MacOS.

On MacOSX 10.13.

Example with the percolate library and the source code:
https://sourceforge.net/projects/fork-percolate/  (1 2020)
PeRColate is an open-source distribution of a variety of synthesis and signal processing algorithms...

Method written in March 2021.

Documentation
http://msp.ucsd.edu/Pd_documentation/x6.htm#s6.4


Homebrew install
https://brew.sh


GNU C compiler (gcc) install
Terminal:
Update brew:
pc36:~ g$ brew update
...
pc36:~ g$ brew upgrade
...
Install gcc:
pc36:~ g$ brew info gcc
...
pc36:~ g$ brew install gcc
...
pc36:~ g$ brew cleanup
...


Pd-0.48-1-i386 is installed in the Mac


Create a "FolderPd" folder on the desktop of the Mac
-> /Users/g/Desktop/FolderPd/


Download source code of percolate library:
https://sourceforge.net/projects/fork-percolate/  (1 2020)
    -> PeRColate4PD.tar.gz
        -> PeRColate4PD
Place the folder PeRColate4PD in the FolderPd:
   -> /Users/g/Desktop/FolderPd/PeRColate4PD/


Build percolate library
Terminal:
pc36:~ g$ cd /Users/g/Desktop/FolderPd/PeRColate4PD
pc36:PeRColate4PD g$ make arch="i386 x86_64"
++++ info: using Makefile.pdlibbuilder version 0.6.0
++++ info: using Pd API /Applications/Pd-0.48-1-i386.app/Contents/Resources/src/m_pd.h
++++ info: making target all in lib percolate
++++ info: making src/absmax~.o in lib percolate
...
ld: warning: The i386 architecture is deprecated for macOS (remove from the Xcode build setting: ARCHS)
++++info: target all in lib percolate completed

percolate.pd_darwin is built:
/Users/g/Desktop/FolderPd/PeRColate4PD/percolate.pd_darwin
It is a "fat" version: 32bit & 64bit.

pc36:PeRColate4PD g$ lipo -info percolate.pd_darwin
Architectures in the fat file: percolate.pd_darwin are: i386 x86_64
pc36:PeRColate4PD g$ 

Variations by changing the line: make arch="i386 x86_64"
make arch="i386"   builds a 32bit library.
make arch="x86_64"   builds a 64bit library.
make arch="ppc"   builds a PowerPC library.

In the percolate library, the 9 objects "PhiSM models": bamboo~, cabasa~, guiro~, metashake~, sekere~, shaker~, sleigh~, tamb~, wuter~ do not work. And the munger~ object do not work.
The others are working.


percolate.pd_darwin "fat" (32bit & 64bit):
PercolateMacOS.zip
PeRColate: written for Max/MSP by Dan Trueman and R. Luke DuBois
PeRColate: ported to PD by Olaf Matthes <olaf.matthes@gmx.de>
PeRColate: adapted to Linux by Maurizio Umberto Puxeddu <umbpux@tin.it>
PeRColate: help files ported by Martin Dupras <martin.dupras@uwe.ac.uk>
PeRColate: version: 0.09
PeRColate: compiled: Mar 26 2021, 15:53:12
PeRColate: home: http://www.akustische-kunst.org/puredata/percolate/


A use of the percolate library:
https://github.com/gerardparesys/ARGOPd/tree/master/ExMM/ExMM217-FilterBank



Links:
http://puredata.info 
https://forum.pdpatchrepo.info/topic/12428/64-bit-build-of-percolate-library
https://github.com/pure-data/externals-howto
http://msp.ucsd.edu/Pd_documentation/x6-a.htm
[PD] Hints On How To Compile For Mac PPC On An Intel 


Paresys Accueil 26 4 2021     Valid HTML 4.01 Transitional Paresys Home