On 10/26/23 01:32, Manuel Kuklinski wrote:
Am Mittwoch 25 Oktober 2023 um 6:06:24 -0700, schrieb Jason Bacon 3,7K:Another possibility to consider is that pkgsrc is right and upstream is wrong. Perhaps it actually *should* generate .so files rather than .dylib for loadable modules? It might be easier to patch the code to look for .so, rather than patch the build to generate .dylib. I'm not saying this is the case, just that I would investigate it.Upstream says, they look for .dylib (Top/csmodule.c:707) and never tested the function of csound with bundles, but I just blatantly renamed librtjack.so to librtjack.dylib, et voilà: sound output (after starting jackd, of course) :-) As it seems, you were right; now, as far a I understand, I can rename the .so in lib/csound/plugins64-6.0/ or create a patch for named C file; I'll test the patch first and if I can't yield results, I'll take the re-naming route; will push to wip/csound6181. Thank you for your time! Kind regards.
I don't think renaming a .so to .dylib is a good idea. They are different file types and there may be unforeseen consequences, possibly in future macOS releases, even if though appears to work at first glance.
Loadable modules are opened using dlopen(), so: # fgrep -rl dlopen work/ work//csound-6.18.1/Top/csmodule.c work//csound-6.18.1/Bela/crosscompile-setup.sh work//csound-6.18.1/util/mkdb.c work//csound-6.18.1/doc/csound.tex work//csound-6.18.1/Opcodes/dssi4cs/src/dssi4cs.c work//csound-6.18.1/Opcodes/dssi4cs/src/utils.h work//csound-6.18.1/Opcodes/dssi4cs/src/ladspa.h work//csound-6.18.1/Opcodes/dssi4cs/src/load.cDarwin tarpon.local bacon ~/Pkgsrc/pkgsrc/wip/csound6181 1013: (pkgsrc): vi work//csound-6.18.1/Top/csmodule.c
No guarantee that the library pathnames are constructed in the same source files, but tracing backward from the dlopen() calls should get you there (assuming you can read C code).
Another somewhat ugly, but correct option would be a post-configure SUBST to replace the -bundle flags in all the link.txt files, so that actual dylibs are built. This may require a PLIST tweak as well.
Darwin tarpon.local bacon ~/Pkgsrc/pkgsrc/wip/csound6181 1005: (pkgsrc): fgrep -rl -e -bundle work/
work//csound-6.18.1/cmake-pkgsrc-build/util/CMakeFiles/stdutil.dir/link.txt work//csound-6.18.1/cmake-pkgsrc-build/InOut/CMakeFiles/ipmidi.dir/link.txt work//csound-6.18.1/cmake-pkgsrc-build/InOut/CMakeFiles/rtauhal.dir/link.txt work//csound-6.18.1/cmake-pkgsrc-build/InOut/CMakeFiles/cmidi.dir/link.txt work//csound-6.18.1/cmake-pkgsrc-build/Opcodes/CMakeFiles/doppler.dir/link.txt work//csound-6.18.1/cmake-pkgsrc-build/Opcodes/CMakeFiles/signalflowgraph.dir/link.txt work//csound-6.18.1/cmake-pkgsrc-build/Opcodes/CMakeFiles/padsynth.dir/link.txt work//csound-6.18.1/cmake-pkgsrc-build/Opcodes/CMakeFiles/deprecated.dir/link.txt work//csound-6.18.1/cmake-pkgsrc-build/Opcodes/CMakeFiles/scansyn.dir/link.txt work//csound-6.18.1/cmake-pkgsrc-build/Opcodes/CMakeFiles/lfsr.dir/link.txt work//csound-6.18.1/cmake-pkgsrc-build/Opcodes/CMakeFiles/mixer.dir/link.txt work//csound-6.18.1/cmake-pkgsrc-build/Opcodes/CMakeFiles/arrayops.dir/link.txt work//csound-6.18.1/cmake-pkgsrc-build/Opcodes/CMakeFiles/pvsops.dir/link.txt work//csound-6.18.1/cmake-pkgsrc-build/Opcodes/CMakeFiles/fractalnoise.dir/link.txt work//csound-6.18.1/cmake-pkgsrc-build/Opcodes/CMakeFiles/bformdec2.dir/link.txt work//csound-6.18.1/cmake-pkgsrc-build/Opcodes/CMakeFiles/ampmidid.dir/link.txt work//csound-6.18.1/cmake-pkgsrc-build/Opcodes/CMakeFiles/trigenvsegs.dir/link.txt work//csound-6.18.1/cmake-pkgsrc-build/Opcodes/CMakeFiles/ftsamplebank.dir/link.txt work//csound-6.18.1/cmake-pkgsrc-build/Opcodes/CMakeFiles/control.dir/link.txt work//csound-6.18.1/cmake-pkgsrc-build/Opcodes/CMakeFiles/osc.dir/link.txt work//csound-6.18.1/cmake-pkgsrc-build/Opcodes/CMakeFiles/urandom.dir/link.txt work//csound-6.18.1/Android/BUILDING_ON_ANDROID.txt work//csound-6.18.1/DockerFiles/android/Dockerfile