On Fri, 2021-01-08 at 07:13 -0300, Lucas Cordiviola wrote:
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?
Because:
ldd /usr/lib/x86_64-linux-gnu/libfluidsynth.so.2 linux-vdso.so.1 (0x00007ffca270b000) libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f4536a8b000) libgmodule-2.0.so.0 => /lib/x86_64-linux-gnu/libgmodule-2.0.so.0 (0x00007f4536a85000) libjack.so.0 => /lib/x86_64-linux-gnu/libjack.so.0 (0x00007f4536a39000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f4536a16000) libasound.so.2 => /lib/x86_64-linux-gnu/libasound.so.2 (0x00007f453691b000) libpulse-simple.so.0 => /lib/x86_64-linux-gnu/libpulse-simple.so.0 (0x00007f4536914000) libsndfile.so.1 => /lib/x86_64-linux-gnu/libsndfile.so.1 (0x00007f4536895000) libSDL2-2.0.so.0 => /lib/x86_64-linux-gnu/libSDL2-2.0.so.0 (0x00007f4536740000) libdbus-1.so.3 => /lib/x86_64-linux-gnu/libdbus-1.so.3 (0x00007f45366ef000) libreadline.so.8 => /lib/x86_64-linux-gnu/libreadline.so.8 (0x00007f453669f000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f4536550000) libinstpatch-1.0.so.2 => /lib/x86_64-linux-gnu/libinstpatch-1.0.so.2 (0x00007f4536495000) libgobject-2.0.so.0 => /lib/x86_64-linux-gnu/libgobject-2.0.so.0 (0x00007f4536433000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f4536241000) libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f45361ce000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f45361c8000) librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f45361bd000) libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f4535fdc000) libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f4535fbf000) /lib64/ld-linux-x86-64.so.2 (0x00007f4536cae000) libpulse.so.0 => /lib/x86_64-linux-gnu/libpulse.so.0 (0x00007f4535f6a000) libpulsecommon-13.99.so => /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-13.99.so (0x00007f4535ee8000) libFLAC.so.8 => /lib/x86_64-linux-gnu/libFLAC.so.8 (0x00007f4535eaa000) libogg.so.0 => /lib/x86_64-linux-gnu/libogg.so.0 (0x00007f4535e9d000) libvorbis.so.0 => /lib/x86_64-linux-gnu/libvorbis.so.0 (0x00007f4535e6d000) libvorbisenc.so.2 => /lib/x86_64-linux-gnu/libvorbisenc.so.2 (0x00007f4535dc2000) libX11.so.6 => /lib/x86_64-linux-gnu/libX11.so.6 (0x00007f4535c85000) libXext.so.6 => /lib/x86_64-linux-gnu/libXext.so.6 (0x00007f4535c70000) libXcursor.so.1 => /lib/x86_64-linux-gnu/libXcursor.so.1 (0x00007f4535c63000) libXinerama.so.1 => /lib/x86_64-linux-gnu/libXinerama.so.1 (0x00007f4535c5e000) libXi.so.6 => /lib/x86_64-linux-gnu/libXi.so.6 (0x00007f4535c4a000) libXrandr.so.2 => /lib/x86_64-linux-gnu/libXrandr.so.2 (0x00007f4535c3d000) libXss.so.1 => /lib/x86_64-linux-gnu/libXss.so.1 (0x00007f4535c38000) libXxf86vm.so.1 => /lib/x86_64-linux-gnu/libXxf86vm.so.1 (0x00007f4535c31000) libwayland-egl.so.1 => /lib/x86_64-linux-gnu/libwayland-egl.so.1 (0x00007f4535c2c000) libwayland-client.so.0 => /lib/x86_64-linux-gnu/libwayland-client.so.0 (0x00007f4535c1b000) libwayland-cursor.so.0 => /lib/x86_64-linux-gnu/libwayland-cursor.so.0 (0x00007f4535c0e000) libxkbcommon.so.0 => /lib/x86_64-linux-gnu/libxkbcommon.so.0 (0x00007f4535bcc000) libsystemd.so.0 => /lib/x86_64-linux-gnu/libsystemd.so.0 (0x00007f4535b1d000) libtinfo.so.6 => /lib/x86_64-linux-gnu/libtinfo.so.6 (0x00007f4535aed000) libffi.so.7 => /lib/x86_64-linux-gnu/libffi.so.7 (0x00007f4535ae1000) libxcb.so.1 => /lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f4535ab5000) libwrap.so.0 => /lib/x86_64-linux-gnu/libwrap.so.0 (0x00007f4535aa9000) libasyncns.so.0 => /lib/x86_64-linux-gnu/libasyncns.so.0 (0x00007f45358a3000) libapparmor.so.1 => /lib/x86_64-linux-gnu/libapparmor.so.1 (0x00007f453588e000) libXrender.so.1 => /lib/x86_64-linux-gnu/libXrender.so.1 (0x00007f4535684000) libXfixes.so.3 => /lib/x86_64-linux-gnu/libXfixes.so.3 (0x00007f453567a000) liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007f4535651000) liblz4.so.1 => /lib/x86_64-linux-gnu/liblz4.so.1 (0x00007f4535630000) libgcrypt.so.20 => /lib/x86_64-linux-gnu/libgcrypt.so.20 (0x00007f4535512000) libXau.so.6 => /lib/x86_64-linux-gnu/libXau.so.6 (0x00007f453550c000) libXdmcp.so.6 => /lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f4535502000) libnsl.so.1 => /lib/x86_64-linux-gnu/libnsl.so.1 (0x00007f45354e5000) libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007f45354c9000) libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 (0x00007f45354a6000) libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007f453548c000)
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
variable (file) target.arch = arm variable (file) target.triplet = arm linux gnueabihf
and gcc -dumpmachine gives me:
arm-linux-gnueabihf
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.
My point is exactly to preserve them. They are not technically needed, but I'd like to preserve them just to not bloat the package unnecessarily. Simply using cp turns symlinks into separate copies.
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.
Well spotted. I haven't tried sf3. This means flac and vorbis shouldn't be disabled when building fluidsynth. This also means more libraries need to be shipped.
These dependencies are there on the win and mac versions.
Ok, good to know. Would be good to have same support for all platforms.
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?
Ah, I see. Ubuntu 20.04 and Debian Buster ship different versions of fluidsynth.
Roman