[PD-dev] building fluid~ on Linux (was: [PD] fluid~ for Pd-Vanilla - test version)

Lucas Cordiviola lucarda27 at hotmail.com
Fri Jan 8 11:13:11 CET 2021


> sh linuxdep32.sh
> rm linuxdep32
> ~~~
>
> However, the crucial part is that the included libfluidsynth.so should
> not be "tainted" with support for all kinds of things. This means, you
> can't take the one shipped by the distro.
Why not?


> but according to the snippet, I'd suppose something like this:
>
> ---
> define forLinux
>
> ifeq ($(firstword $(subst -, ,$(shell $(CC) -dumpmachine))), i686)
>          $(shell /bin/sh scripts/linuxdep32.sh)
>          else
>          $(shell /bin/sh scripts/linuxdep32.sh)
> endif
>
> endef
>
> ---
>

But then how do you know *where* to copy the .so files. I mean the 
output dir for fluid~.

I still don't know if its possible to do the "for files .." from inside 
the makefile. That will be cool : "for filename in foo cp $filename  
$installdir"

Now that i write this there might it sounds possible pass an argument to 
the script:

$(shell /bin/sh scripts/linuxdep32.sh $installdir)

had to check if this script runs after fluid~ was built.


> However, the above detection fails for arm7 and it'll wrongly executes
> scripts/linuxdep64.sh. I think instead of an if-else, it could detect
> the arch and execute the appropriate script with arch in the name.


Can you check what gives info you an arm7 ik you do:

make allvars


> Another thing about scripts/linuxdep*.sh script. I think they should
> call cp with the -d flag. Without it, it creates three full copies of
> the same .so file. With -d symlinks are preserved.
We can test that but the symlinks are in the original folder. May be 
they are needed as is.

> Thing is I don't feel yet
> sufficiently confident with these matters, but am happy to learn.
  Me to. :)

There is something i'm worried: I think this linux aproach does not 
loads sf3. as far from what i read (never used sound fonts or 
fluidsynth) the sf3 can have compressed audio files with 
FLAC/Vorvis/etc. These dependencies are there on the win and mac versions.

more:

My first shoot to compile on debian buster was

apt-cache search fluidsynth

I got that and a -dev pkg which i installed.

then the [fluid~] object didn't load saying:

fluid~.pd_linux: undefined symbol: fluid_synth_key_pressure

So then I compiled the latest fluidsynth and it worked.

Now I didn't get fluidsynth*2* whith apt-cache. Why you get the 
fluidsynth*2* pkg?


--

Mensaje telepatico asistido por maquinas.

On 1/8/2021 6:16 AM, Roman Haefeli wrote:
> I took the liberty to move this over to pd-dev
>
> On Fri, 2021-01-08 at 03:48 -0300, Alexandre Torres Porres wrote:
>> Em qui., 7 de jan. de 2021 às 20:07, Roman Haefeli <
>> reduzent at gmail.com> escreveu:
>>> On Thu, 2021-01-07 at 00:14 -0300, Alexandre Torres Porres wrote:
>>>
>>>> we still need to sort this for linux,
>>> Since you seem you got it sorted (and I figured out how to compile
>>> fluidsynth with no additional deps)
>> how did that go?
> I just updated pd-fluidsynth repo to get your and Lucas' most recent
> changes. I didn't have to modify anything for the build process to
> work.
>
> ~~~sh
> cd pd-fluidsynth
> make pkglibdir=$HOME/pd-src/workspace/Linux-arm7-32
> make pkglibdir=$HOME/pd-src/workspace/Linux-arm7-32 install
> cd $HOME/pd-src/workspace/Linux-arm7-32/fluid~
> sh linuxdep32.sh
> rm linuxdep32
> ~~~
>
> However, the crucial part is that the included libfluidsynth.so should
> not be "tainted" with support for all kinds of things. This means, you
> can't take the one shipped by the distro.
>
>>   Can you describe the steps and put it in our readme (with a PR)?
> You mean what steps were necessary to compile fluidsynth? I didn't have
> to do anything suprising or special. I just had  to figure out how to
> disable everything by reading the docs about building. This is what I
> came up with (I hope it is correct and complete):
>
> ~~~sh
> git clone https://github.com/FluidSynth/fluidsynth/
> cd fluidsynth
> mkdir build
> cd build
> cmake -Denable-libsndfile=off -Denable-jack=off -Denable-alsa=off -Denable-oss=off -Denable-pulseaudio=off -Denable-ladspa=off -Denable-aufile=off  -Denable-network=off  -Denable-ipv6=off -Denable-getopt=off -Denable-sdl2=off ..
> make
> sudo make install
> ~~~
>
> After this, I compiled fluid~ with steps from above.
>
> Regarding the makefile of pd-fluidsynth, I don't understand the purpose
> of this section:
>
> ---
> define forLinux
>
> ifeq ($(firstword $(subst -, ,$(shell $(CC) -dumpmachine))), i686)
>          datafiles += scripts/linuxdep32.sh
>          else
>          datafiles += scripts/linuxdep64.sh
> endif
>
> endef
> ---
>
> Depending on which arch is detected, it'll add one or the other script
> in the build result. I think what this is meant to do is to _execute_
> the arch specific script, so that libraries get included. I'm not yet
> familiar with makefiles to tell you just right away how this is done,
> but according to the snippet, I'd suppose something like this:
>
> ---
> define forLinux
>
> ifeq ($(firstword $(subst -, ,$(shell $(CC) -dumpmachine))), i686)
>          $(shell /bin/sh scripts/linuxdep32.sh)
>          else
>          $(shell /bin/sh scripts/linuxdep32.sh)
> endif
>
> endef
> ---
>
> In order to include the additional dynamic libraries, you'd add
> 'libfluidsynth.so*' to 'datafiles'.
>
> However, the above detection fails for arm7 and it'll wrongly executes
> scripts/linuxdep64.sh. I think instead of an if-else, it could detect
> the arch and execute the appropriate script with arch in the name. If
> the scripts for several archs turn out to be the same, they could be
> symlinked. Just an idea.
>
> Another thing about scripts/linuxdep*.sh script. I think they should
> call cp with the -d flag. Without it, it creates three full copies of
> the same .so file. With -d symlinks are preserved.
>
> I realize it's a lot of suggestions. Sorry for that. So maybe a PR
> would be easier for you to digest. Thing is I don't feel yet
> sufficiently confident with these matters, but am happy to learn.
>
> Roman
>
>
>
>
>
>
> _______________________________________________
> Pd-dev mailing list
> Pd-dev at lists.iem.at
> https://lists.puredata.info/listinfo/pd-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20210108/fa575745/attachment-0001.html>


More information about the Pd-dev mailing list