lua-users home
lua-l archive

Re: 5.1 beta problem linking luac against .so

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Wed, Nov 23, 2005 at 08:48:14PM +0100, Mike Pall wrote:
> The best idea is _not_ to compile a shared library at all. Just
> link lua (the interpreter) statically. There is no downside to
> it -- it's very small after all. And executables _are_ shared in
> memory, too.
> Ok, you could remove the attribute only for the required symbols.
> But your best bet is to link luac statically and avoid all the
> hassle. We are talking about 150K -- this is 1/1.000.000 of the
> average size harddisk sold nowadays.
150k is a lot when it's repeated over a dozen or more binaries--for example,
a package containing a suite of small tools. ("It's just 150k" is the
mindset that leads to the bloat of a lot of applications today--150k here
and 150k there adds up quickly.)
More importantly, there's the other major benefit of shared libraries:
updating them system-wide doesn't require updating every binary that
uses it. This could be significant, for example, if a security-related
bug was fixed.
I statically link for other reasons (to avoid adding a runtime dependency),
but "there is no downside" is overstating the case. (Many people would
call encouraging static linking to be a "deadly sin". Caught between hells?)
-- 
Glenn Maynard

AltStyle によって変換されたページ (->オリジナル) /