<div style="color:black;font: 10pt Arial, Helvetica, sans-serif;">
<div><span style="font-size: small; font-family: helvetica, arial;">for a simpler example of </span><span style="font-family: helvetica, arial; font-size: small;">the changing-rpath mehod</span><span style="font-size: small; font-family: helvetica, arial;">, purest_json also distributes shared libs on osx (recursively through the dependencies) </span><span style="font-size: 10pt;">https://github.com/residuum/PuRestJson</span></div>

<div><span style="font-size: 10pt;"><br>
</span></div>

<div><span style="font-size: 10pt;">of course that relies on using homebrew, which afaik only ships 1 arch in its binaries (and now they removed options like "--universal" for formulas too :-/)</span></div>

<div><span style="font-size: 10pt;">but modifying its dependencies.sh file could still work on another directory that you build universals into yourself.</span></div>

<div><span style="font-size: 10pt;"><br>
</span></div>

<div>-seb</div>
<span style="font-size: small; font-family: helvetica, arial;">
<div><span style="font-size: small; font-family: helvetica, arial;"><br>
</span></div>

<div><span style="font-size: small; font-family: helvetica, arial;">----------</span></div>
Message: 3</span><br>

<div style="font-family:helvetica,arial;font-size:10pt;color:black"><font size="2">
<div dir="ltr">Date: Wed, 4 May 2022 02:37:32 +0200<br>
</div>

<div dir="ltr">From: Dan Wilcox <<a ymailto="mailto:danomatika@gmail.com" href="mailto:danomatika@gmail.com">danomatika@gmail.com</a>><br>
</div>

<div dir="ltr">To: Roman Haefeli <<a ymailto="mailto:reduzent@gmail.com" href="mailto:reduzent@gmail.com">reduzent@gmail.com</a>><br>
</div>

<div dir="ltr">Cc: pd-dev <<a ymailto="mailto:pd-dev@lists.iem.at" href="mailto:pd-dev@lists.iem.at">pd-dev@lists.iem.at</a>><br>
</div>

<div dir="ltr">Subject: Re: [PD-dev] building fluidsynth~ (was: building fluid~ on<br>
</div>

<div dir="ltr">    Linux)<br>
</div>

<div dir="ltr">Message-ID: <<a ymailto="mailto:C5C66392-A7B9-4D3D-A0E7-D8E930DCBC2C@gmail.com" href="mailto:C5C66392-A7B9-4D3D-A0E7-D8E930DCBC2C@gmail.com">C5C66392-A7B9-4D3D-A0E7-D8E930DCBC2C@gmail.com</a>><br>
</div>

<div dir="ltr">Content-Type: text/plain; charset="us-ascii"<br>
</div>

<div dir="ltr"><br>
</div>

<div dir="ltr">(fixing subject line I forgot in previous email)<br>
</div>

<div dir="ltr"><br>
</div>

<div dir="ltr">I forgot to mention that my response was directed more for macOS and possibly Windows where asking people to use a package manager is a bit more of a stretch as opposed to Linux. In general, dependent libs are packaged with the program itself and sometimes dynamic linking can be problematic, ie. on macOS you often have to (re)set the rpath in a built lib. That dance in avoided by simply statically linking at the expense of binary size. I'm not saying it's the best solution, but it may be more maintainable and usable in the case of a dynamically-loaded Pd external.<br>
</div>

<div dir="ltr"><br>
</div>

<div dir="ltr">OTOH I believe GEM provides dynamic libs along with the externals on macOS but this most probably requires fiddling with the rpath, basically overriding the search path for the lib to it's found in a different, non-system location.<br>
</div>

<div dir="ltr"><br>
</div>

<div dir="ltr">For Windows, if I recall correctly, you generally just need to place the dlls next to whatever is using them.<br>
</div>

<div dir="ltr"><br>
</div>

<div dir="ltr">As for mixing static and dynamic linking, I believe that's not a problem as long as the dynamic libs are found.<br>
</div>

<div dir="ltr"><br>
</div>

<div dir="ltr">> On May 4, 2022, at 12:06 AM, <a ymailto="mailto:pd-dev-request@lists.iem.at" href="mailto:pd-dev-request@lists.iem.at">pd-dev-request@lists.iem.at</a> wrote:<br>
</div>

<div dir="ltr">> <br>
</div>

<div dir="ltr">> Message: 2<br>
</div>

<div dir="ltr">> Date: Tue, 03 May 2022 23:53:26 +0200<br>
</div>

<div dir="ltr">> From: Roman Haefeli <<a ymailto="mailto:reduzent@gmail.com" href="mailto:reduzent@gmail.com">reduzent@gmail.com</a> <mailto:<a ymailto="mailto:reduzent@gmail.com" href="mailto:reduzent@gmail.com">reduzent@gmail.com</a>>><br>
</div>

<div dir="ltr">> To: <a ymailto="mailto:pd-dev@lists.iem.at" href="mailto:pd-dev@lists.iem.at">pd-dev@lists.iem.at</a> <mailto:<a ymailto="mailto:pd-dev@lists.iem.at" href="mailto:pd-dev@lists.iem.at">pd-dev@lists.iem.at</a>><br>
</div>

<div dir="ltr">> Subject: Re: [PD-dev] Pd-dev Digest, Vol 204, Issue 11<br>
</div>

<div dir="ltr">> Message-ID: <<a ymailto="mailto:0ab1d4fbc2d4d0f609870c1b5f06178a0fdc6a23.camel@gmail.com" href="mailto:0ab1d4fbc2d4d0f609870c1b5f06178a0fdc6a23.camel@gmail.com">0ab1d4fbc2d4d0f609870c1b5f06178a0fdc6a23.camel@gmail.com</a> <mailto:<a ymailto="mailto:0ab1d4fbc2d4d0f609870c1b5f06178a0fdc6a23.camel@gmail.com" href="mailto:0ab1d4fbc2d4d0f609870c1b5f06178a0fdc6a23.camel@gmail.com">0ab1d4fbc2d4d0f609870c1b5f06178a0fdc6a23.camel@gmail.com</a>>><br>
</div>

<div dir="ltr">> Content-Type: text/plain; charset="utf-8"<br>
</div>

<div dir="ltr">> <br>
</div>

<div dir="ltr">> On Tue, 2022-05-03 at 23:29 +0200, Dan Wilcox wrote:<br>
</div>

<div dir="ltr">>> My two cents: I have tried in the past to bundle dynamic libs<br>
</div>

<div dir="ltr">>> generated/downloaded by homebrew into app distributions to run on<br>
</div>

<div dir="ltr">>> other systems and *always* run into problems. It hs always been<br>
</div>

<div dir="ltr">>> simpler to statically link, either to the home-brew lib or by<br>
</div>

<div dir="ltr">>> building the lib(s) myself using a script or makefile. For longer<br>
</div>

<div dir="ltr">>> term projects, I generally prefer to automate building the lib<br>
</div>

<div dir="ltr">>> statically then linking it directly into the program.<br>
</div>

<div dir="ltr">> <br>
</div>

<div dir="ltr">> THanks for your insight.<br>
</div>

<div dir="ltr">> <br>
</div>

<div dir="ltr">> Please forgive the noob question, but do I have static builds of all<br>
</div>

<div dir="ltr">> the dependencies available for that to work? And if I don't, do I have<br>
</div>

<div dir="ltr">> to compile the dependencies  and make sure they're built statically<br>
</div>

<div dir="ltr">> (which isn't always obvious to me with the various build systems). <br>
</div>

<div dir="ltr">> <br>
</div>

<div dir="ltr">> Roman<br>
</div>

<div dir="ltr"><br>
</div>

<div dir="ltr">--------<br>
</div>

<div dir="ltr">Dan Wilcox<br>
</div>

<div dir="ltr">@danomatika <<a href="http://twitter.com/danomatika" target="_blank">http://twitter.com/danomatika</a>><br>
</div>

<div dir="ltr">danomatika.com <<a href="http://danomatika.com/" target="_blank">http://danomatika.com/</a>><br>
</div>

<div dir="ltr">robotcowboy.com <<a href="http://robotcowboy.com/" target="_blank">http://robotcowboy.com/</a>><br>
</div>

<div dir="ltr"><br>
</div>

<div dir="ltr"><br>
</div>

<div dir="ltr"><br>
</div>

<div dir="ltr">-------------- next part --------------<br>
</div>

<div dir="ltr">An HTML attachment was scrubbed...<br>
</div>

<div dir="ltr">URL: <<a href="http://lists.puredata.info/pipermail/pd-dev/attachments/20220504/01af5a67/attachment.htm" target="_blank">http://lists.puredata.info/pipermail/pd-dev/attachments/20220504/01af5a67/attachment.htm</a>><br>
</div>

<div dir="ltr"><br>
</div>

<div dir="ltr">------------------------------<br>
</div>

<div dir="ltr"><br>
</div>

<div dir="ltr">Subject: Digest Footer<br>
</div>

<div dir="ltr"><br>
</div>

<div dir="ltr">_______________________________________________<br>
</div>

<div dir="ltr">Pd-dev mailing list<br>
</div>

<div dir="ltr"><a ymailto="mailto:Pd-dev@lists.iem.at" href="mailto:Pd-dev@lists.iem.at">Pd-dev@lists.iem.at</a><br>
</div>

<div dir="ltr"><a href="https://lists.puredata.info/listinfo/pd-dev" target="_blank">https://lists.puredata.info/listinfo/pd-dev</a><br>
</div>

<div dir="ltr"><br>
</div>

<div dir="ltr"><br>
</div>

<div dir="ltr">------------------------------<br>
</div>

<div dir="ltr"><br>
</div>

<div dir="ltr">End of Pd-dev Digest, Vol 204, Issue 13<br>
</div>

<div dir="ltr">***************************************<br>
</div>
</font></div>
</div>