[PD-dev] building fluidsynth~ (was: building fluid~ on Linux)

Dan Wilcox danomatika at gmail.com
Wed May 4 02:37:32 CEST 2022


(fixing subject line I forgot in previous email)

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.

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.

For Windows, if I recall correctly, you generally just need to place the dlls next to whatever is using them.

As for mixing static and dynamic linking, I believe that's not a problem as long as the dynamic libs are found.

> On May 4, 2022, at 12:06 AM, pd-dev-request at lists.iem.at wrote:
> 
> Message: 2
> Date: Tue, 03 May 2022 23:53:26 +0200
> From: Roman Haefeli <reduzent at gmail.com <mailto:reduzent at gmail.com>>
> To: pd-dev at lists.iem.at <mailto:pd-dev at lists.iem.at>
> Subject: Re: [PD-dev] Pd-dev Digest, Vol 204, Issue 11
> Message-ID: <0ab1d4fbc2d4d0f609870c1b5f06178a0fdc6a23.camel at gmail.com <mailto:0ab1d4fbc2d4d0f609870c1b5f06178a0fdc6a23.camel at gmail.com>>
> Content-Type: text/plain; charset="utf-8"
> 
> On Tue, 2022-05-03 at 23:29 +0200, Dan Wilcox wrote:
>> My two cents: I have tried in the past to bundle dynamic libs
>> generated/downloaded by homebrew into app distributions to run on
>> other systems and *always* run into problems. It hs always been
>> simpler to statically link, either to the home-brew lib or by
>> building the lib(s) myself using a script or makefile. For longer
>> term projects, I generally prefer to automate building the lib
>> statically then linking it directly into the program.
> 
> THanks for your insight.
> 
> Please forgive the noob question, but do I have static builds of all
> the dependencies available for that to work? And if I don't, do I have
> to compile the dependencies  and make sure they're built statically
> (which isn't always obvious to me with the various build systems). 
> 
> Roman

--------
Dan Wilcox
@danomatika <http://twitter.com/danomatika>
danomatika.com <http://danomatika.com/>
robotcowboy.com <http://robotcowboy.com/>



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20220504/01af5a67/attachment-0001.htm>


More information about the Pd-dev mailing list