<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body>
    <p>
      <blockquote type="cite">
        <pre class="moz-quote-pre" wrap="">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.</pre>
      </blockquote>
      Why not?</p>
    <p><br>
    </p>
    <blockquote type="cite">
      <pre class="moz-quote-pre" wrap="">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</pre>
      <p>---</p>
    </blockquote>
    <br>
    <p>But then how do you know *where* to copy the .so files. I mean
      the output dir for fluid~.</p>
    <p>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"</p>
    <p>Now that i write this there might it sounds possible pass an
      argument to the script:</p>
    <pre class="moz-quote-pre" wrap="">$(shell /bin/sh scripts/linuxdep32.sh $installdir)

</pre>
    <p class="moz-quote-pre" wrap="">had to check if this script runs
      after fluid~ was built.<br>
    </p>
    <br>
    <blockquote type="cite">
      <pre class="moz-quote-pre" wrap="">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.</pre>
    </blockquote>
    <p><br>
    </p>
    <p>Can you check what gives info you an arm7 ik you do:</p>
    <p>make allvars</p>
    <p><br>
    </p>
    <p>
      <blockquote type="cite">
        <pre class="moz-quote-pre" wrap="">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.</pre>
      </blockquote>
      We can test that but the symlinks are in the original folder. May
      be they are needed as is.<br>
    </p>
    <p>
      <blockquote type="cite">
        <pre class="moz-quote-pre" wrap="">Thing is I don't feel yet
sufficiently confident with these matters, but am happy to learn.
</pre>
      </blockquote>
       Me to. :)</p>
    <p>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.</p>
    <p>more:</p>
    <p>My first shoot to compile on debian buster was <br>
    </p>
    <p>apt-cache search fluidsynth</p>
    <p>I got that and a -dev pkg which i installed.</p>
    <p>then the [fluid~] object didn't load saying:</p>
    <pre>fluid~.pd_linux: undefined symbol: fluid_synth_key_pressure

</pre>
    <p>So then I compiled the latest fluidsynth and it worked.</p>
    <p>Now I didn't get fluidsynth*2* whith apt-cache. Why you get the
      fluidsynth*2* pkg?</p>
    <p><br>
    </p>
    <p>--<br>
    </p>
    <pre class="moz-signature" cols="72">Mensaje telepatico asistido por maquinas.</pre>
    <div class="moz-cite-prefix">On 1/8/2021 6:16 AM, Roman Haefeli
      wrote:<br>
    </div>
    <blockquote type="cite" cite="mid:fd4653d3d336dd06f64e406de07057a7c0e242a0.camel@gmail.com">
      <pre class="moz-quote-pre" wrap="">I took the liberty to move this over to pd-dev

On Fri, 2021-01-08 at 03:48 -0300, Alexandre Torres Porres wrote:
</pre>
      <blockquote type="cite">
        <pre class="moz-quote-pre" wrap="">Em qui., 7 de jan. de 2021 às 20:07, Roman Haefeli <
<a class="moz-txt-link-abbreviated" href="mailto:reduzent@gmail.com">reduzent@gmail.com</a>> escreveu:
</pre>
        <blockquote type="cite">
          <pre class="moz-quote-pre" wrap="">On Thu, 2021-01-07 at 00:14 -0300, Alexandre Torres Porres wrote:

</pre>
          <blockquote type="cite">
            <pre class="moz-quote-pre" wrap="">we still need to sort this for linux,
</pre>
          </blockquote>
          <pre class="moz-quote-pre" wrap="">
Since you seem you got it sorted (and I figured out how to compile
fluidsynth with no additional deps)
</pre>
        </blockquote>
        <pre class="moz-quote-pre" wrap="">
how did that go?
</pre>
      </blockquote>
      <pre class="moz-quote-pre" wrap="">
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.

</pre>
      <blockquote type="cite">
        <pre class="moz-quote-pre" wrap=""> Can you describe the steps and put it in our readme (with a PR)?
</pre>
      </blockquote>
      <pre class="moz-quote-pre" wrap="">
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 <a class="moz-txt-link-freetext" href="https://github.com/FluidSynth/fluidsynth/">https://github.com/FluidSynth/fluidsynth/</a>
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





</pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
Pd-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Pd-dev@lists.iem.at">Pd-dev@lists.iem.at</a>
<a class="moz-txt-link-freetext" href="https://lists.puredata.info/listinfo/pd-dev">https://lists.puredata.info/listinfo/pd-dev</a>
</pre>
    </blockquote>
  </body>
</html>