Gentoo Archives: gentoo-user

From: Alan McKinnon <alan.mckinnon@×××××.com>
To: gentoo-user@l.g.o
Cc: walt <w41ter@×××××.com>
Subject: Re: [gentoo-user] Re: Building static libraries
Date: Tue, 15 Dec 2009 06:04:42
Message-Id: 200912142225.46376.alan.mckinnon@gmail.com
In Reply to: [gentoo-user] Re: Building static libraries by walt
1 On Monday 14 December 2009 20:28:21 walt wrote:
2 > Renat Golubchyk wrote:
3 > > As you said, you really are confused. :-) Maybe I wasn't clear enough.
4 > > Anyway, I've written a program, and I need it as a statically linked
5 > > binary. In order to link statically the linker (ld) needs all the used
6 > > libraries in static form, i.e. as a .a and not as a .so file. Since
7 > > portage does not build static libraries by default I need a way to tell
8 > > portage that I really do want to have .a files built.
9 > >
10 > > I do _not_ want to create a Gentoo package, at least not at this stage
11 > > of development.
12 >
13 > Still confused :o(
14
15 Yes, I'm not surprised. you read the OPs post upside down. He does not want to
16 *generate* static binaries, he wants to *use* them. Presumably he has written
17 an app (that possibly must be distributed as a contained unit) that must
18 statically link the libs it uses. Those libs would have been put there by
19 portage, but he needs portage to build .a's, not only .so's
20 >
21 > Portage is for building Gentoo packages -- if you don't want to build a
22 > Gentoo package then why is portage involved? You can compile and link
23 > your program with any flags you want to, so as to get static binaries.
24
25 OP,
26
27 I'm not sure why you have a problem. A quick search on my box shows that most
28 libs (of the small number I checked) have .a and .so
29
30 Please post emerge --info and details of which libs you know at this point you
31 do need.
32
33 --
34 alan dot mckinnon at gmail dot com

Replies

Subject Author
Re: [gentoo-user] Re: Building static libraries Renat Golubchyk <ragermany@×××.net>