Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
static linking with portage
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
defer-
Tux's lil' helper
Tux's lil' helper


Joined: 11 Jun 2007
Posts: 140
Location: Finland

PostPosted: Tue Jul 02, 2013 4:04 pm    Post subject: static linking with portage Reply with quote

Some people seems to think static linking as better practice than dynamic linking. So is it hard to set portage to link statically everything it compiles? AFAIK dynamically linked binaries should be a bit smaller in size and sometimes a bit slower in execution. What is your opinion, dynamic or static linking?

http://harmful.cat-v.org/software/dynamic-linking/
_________________
https://github.com/defer-
Back to top
View user's profile Send private message
Naib
Advocate
Advocate


Joined: 21 May 2004
Posts: 4336
Location: Removed by Neddy

PostPosted: Tue Jul 02, 2013 8:25 pm    Post subject: Reply with quote

its not so much portage, but the build process of each package.
if you were to make a patch file for each package out there to statically link and then use portage to merge that patch the sure...

but why? you would end up with so much duplication in binary data it would be expensive.
_________________
the table is made from wood. forget what you learnt, the table is made from carbon. forget what you learnt, the table is made from protons. forget what you learnt, the table is made from quarks. forget what you learnt, the table is good for shagging on
Back to top
View user's profile Send private message
The Doctor
Veteran
Veteran


Joined: 27 Jul 2010
Posts: 1600

PostPosted: Tue Jul 02, 2013 8:31 pm    Post subject: Reply with quote

There is the static and static-libs use flags, but they can do weird things. For example, root stops being able to display graphs.

I'd stick with dynamic whenever possible.
_________________
First things first, but not necessarily in that order.
Back to top
View user's profile Send private message
defer-
Tux's lil' helper
Tux's lil' helper


Joined: 11 Jun 2007
Posts: 140
Location: Finland

PostPosted: Tue Jul 02, 2013 9:27 pm    Post subject: Reply with quote

Yeah i also have understood it that way there would be more disk usage. Some people argue that the static binaries dont grow much larger. Like people from cat-v and suckless. Suckless is planning stali distro with static binaries. I had understood its about CFLAGS or make config to build static binaries, not about patches?

I didnt get it what you meant about root dont be able to display graphs. I really dont need any graphs at all in my system if i got the context right.
_________________
https://github.com/defer-
Back to top
View user's profile Send private message
The Doctor
Veteran
Veteran


Joined: 27 Jul 2010
Posts: 1600

PostPosted: Tue Jul 02, 2013 9:29 pm    Post subject: Reply with quote

By root I mean the graphing software developed by CERN, not the root user of the computer. Sorry for the confusion.
_________________
First things first, but not necessarily in that order.
Back to top
View user's profile Send private message
Hu
Watchman
Watchman


Joined: 06 Mar 2007
Posts: 9271

PostPosted: Wed Jul 03, 2013 2:15 am    Post subject: Reply with quote

Static binaries use more memory because they lose the ability to share library pages among all the processes using that library. I recommend using static linking only when the program must be run in an environment where dynamic linking does not work.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum