[lfs-dev] More on static libs

Ken Moffat zarniwhoop at ntlworld.com
Thu Mar 12 18:06:07 PDT 2015


On Thu, Mar 12, 2015 at 07:12:17PM -0500, Bruce Dubbs wrote:
> Ken Moffat wrote:
> >On Thu, Mar 12, 2015 at 05:32:21PM -0500, Bruce Dubbs wrote:
> >>
> >>There are lots of ways to make mistakes, but I can't really see how someone
> >>can link a static library into one of the LFS packages without really going
> >>far from the book and changing a Makefile or similar.  I suppose removing a
> >>.so file may revert back to the complementary .a file.
> >>
> >Long while since I've managed it (on x86_64, which is where all my
> >development used to happen, most static libs lack -fPIC so they will
> >not link into a shared lib).  But on i686: in one case (bzip2) I
> >missed the solib version change when I was making the symlink, which
> >effectively matches your suggestion.  Before that, I had screwed up
> >a symlink with one of the files we moved into /lib - that is the more
> >general sort of error, and I'm fairly sure that I later saw someone
> >reporting what turned out to be the same problem on support.
> >
> >Also, making static libs unavailable even on i686 guards against a
> >future change accidentally pulling one in.
> 
> So you are suggesting that we move all /usr/lib/*.a files at the end of each
> package?
> 
I'm considering that.  I've now finished updating my scripts for
something else (kde), so I'm nearly ready to start a second build in
qemu.  Looking at my first build, I missed the --disable-static in
libtool, although I added a comment: I expect this time I'll see the
test failures.  What I'm also going to do is hide ALL the static
libs after each package in chroot.

And for the moment, this is with the 7.7 versions of everything.

Meanwhile, I see that in binutils and automake I already only renamed
the static libs back to .a for the testsuites, not at
the beginning of the package as I had supposed.  Will dispose of
them again before the installs, to be certain - can you say
"paranoid" ?

ĸen
-- 
Nanny Ogg usually went to bed early. After all, she was an old lady.
Sometimes she went to bed as early as 6 a.m.


More information about the lfs-dev mailing list