Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 17 Oct 2019, 12:07
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
Should *.la libraries be stripped?
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [13 Posts]  
Author Message
musher0

Joined: 04 Jan 2009
Posts: 14404
Location: Gatineau (Qc), Canada

PostPosted: Thu 26 May 2016, 11:00    Post subject:  Should *.la libraries be stripped?  

Hello all.

After I've compiled an application, I routinely do a < strip --stip-unneeded > on the resulting
executable and *.so libraries.

Can we strip big *.la libraries as well? I read somewhere that we should leave those as
they are. Is that true? Why would that be?

Thanks in advance for any insight.

BFN.

_________________
musher0
~~~~~~~~~~
Je suis né pour aimer et non pas pour haïr. (Sophocle) /
I was born to love and not to hate. (Sophocles)
Back to top
View user's profile Send private message 
amigo

Joined: 02 Apr 2007
Posts: 2647

PostPosted: Fri 27 May 2016, 02:06    Post subject:  

You must be thinking of the *.a archives. *.la files are simple text files which can't be stripped.
Back to top
View user's profile Send private message 
musher0

Joined: 04 Jan 2009
Posts: 14404
Location: Gatineau (Qc), Canada

PostPosted: Sat 28 May 2016, 00:33    Post subject:  

Thanks, amigo. I'll study it more. BFN.
_________________
musher0
~~~~~~~~~~
Je suis né pour aimer et non pas pour haïr. (Sophocle) /
I was born to love and not to hate. (Sophocles)
Back to top
View user's profile Send private message 
Geoffrey


Joined: 30 May 2010
Posts: 2377
Location: Queensland

PostPosted: Sat 28 May 2016, 02:44    Post subject:  

I think the la files are used to statically link, you should be able to remove those and any other DEV files.

I usually split the packages once compiled to separate DEV, DOC, NLS, if you are using "new2dir make install" or "make DESTDIR=/PATH/TO/PACKAGE/FOLDER install"
then just drag the created package output folder to this script(splitpkg.sh)

Note: "new2dir make install" will strip unneeded, where "make DESTDIR=/PATH/TO/PACKAGE/FOLDER install" doesn't,
so "strip --strip-unneeded" will have to be performed on the resulting binaries and lib files.
splitpkg.tar.gz
Description 
gz

 Download 
Filename  splitpkg.tar.gz 
Filesize  942 Bytes 
Downloaded  116 Time(s) 

_________________
Carolina: Recent Repository Additions

Back to top
View user's profile Send private message 
01micko


Joined: 11 Oct 2008
Posts: 8714
Location: qld

PostPosted: Sat 28 May 2016, 20:05    Post subject:  

Sorry @musher0 for my misleading tired post which caused the confusion. I'll edit it.
_________________
Puppy Linux Blog - contact me for access
Back to top
View user's profile Send private message Visit poster's website 
musher0

Joined: 04 Jan 2009
Posts: 14404
Location: Gatineau (Qc), Canada

PostPosted: Sat 28 May 2016, 20:21    Post subject:  

01micko wrote:
Sorry @musher0 for my misleading tired post which caused the confusion. I'll edit it.
Oh, hi, 01micko!

No-no, it has nothing to do with the libabiword snafu in the last slacko devx. But thanks
for showing up! Smile

The reason I initiated this thread is that I compiled the most recent "sox" (aka Sound
Exchange) utility, and there's are big a and la libraries in there after compilation. I was
wondering what to do with them -- if it would damage anything if I tried to strip them.
(BTW, sox works fine with those libs as they are.)

BFN.

_________________
musher0
~~~~~~~~~~
Je suis né pour aimer et non pas pour haïr. (Sophocle) /
I was born to love and not to hate. (Sophocles)
Back to top
View user's profile Send private message 
01micko


Joined: 11 Oct 2008
Posts: 8714
Location: qld

PostPosted: Sat 28 May 2016, 20:32    Post subject:  

Hi musher0

Before you run ./configure run ./configure --help and look at the options to see if something like '--disable-static' is available. You may have to type '--disable-static=yes' or '--enable-static=no'. If you are not going to make use of programs that link in the static library then there is no use having it.

Cheers!

_________________
Puppy Linux Blog - contact me for access
Back to top
View user's profile Send private message Visit poster's website 
musher0

Joined: 04 Jan 2009
Posts: 14404
Location: Gatineau (Qc), Canada

PostPosted: Sat 28 May 2016, 20:35    Post subject:  

Geoffrey wrote:
I think the la files are used to statically link, you should be able to remove those and any other DEV files.

I usually split the packages once compiled to separate DEV, DOC, NLS, if you are using "new2dir make install" or "make DESTDIR=/PATH/TO/PACKAGE/FOLDER install"
then just drag the created package output folder to this script(splitpkg.sh)

Note: "new2dir make install" will strip unneeded, where "make DESTDIR=/PATH/TO/PACKAGE/FOLDER install" doesn't,
so "strip --strip-unneeded" will have to be performed on the resulting binaries and lib files.
Hi Geoffrey.

I know that I can do a < strip --strip-unneeded > on ELF executables and *.so libs, but...
are you saying that I could also apply a < strip --strip-unneeded > to the a and la files?

Thanks in advance.

BFN.

~~~~~~~~~~~~~~~
PS.
I'm not absolutely clear about your "new2dir" procedure, but I'm keeping it out of the
current discussion to maintain focus.

I'm a bit suspicious about it, actually. I always do the < make install > with the 2nd
option that you mention: "make DESTDIR=/PATH/TO/PACKAGE/FOLDER install".

_________________
musher0
~~~~~~~~~~
Je suis né pour aimer et non pas pour haïr. (Sophocle) /
I was born to love and not to hate. (Sophocles)
Back to top
View user's profile Send private message 
musher0

Joined: 04 Jan 2009
Posts: 14404
Location: Gatineau (Qc), Canada

PostPosted: Sat 28 May 2016, 20:39    Post subject:  

01micko wrote:
Hi musher0

Before you run ./configure run ./configure --help and look at the options to see if something like '--disable-static' is available. You may have to type '--disable-static=yes' or '--enable-static=no'. If you are not going to make use of programs that link in the static library then there is no use having it.

Cheers!
Ah. So all packages do NOT build dynamically by default. I didn't know that. Thanks.
_________________
musher0
~~~~~~~~~~
Je suis né pour aimer et non pas pour haïr. (Sophocle) /
I was born to love and not to hate. (Sophocles)
Back to top
View user's profile Send private message 
01micko


Joined: 11 Oct 2008
Posts: 8714
Location: qld

PostPosted: Sat 28 May 2016, 21:06    Post subject:  

musher0 wrote:
Ah. So all packages do NOT build dynamically by default. I didn't know that. Thanks.


Most do actually; a notable exception is wireless-tools. Some build both by default, some only shared, some (rare) only static.

Anyway, I found a slackbuild that strips ar archives with 'strip --strip-debug' here

Quote:
find . | xargs file | grep "current ar archive" | cut -f 1 -d : | \
xargs strip --strip-debug 2> /dev/null


I suppose it is probably safer.

HTH

_________________
Puppy Linux Blog - contact me for access
Back to top
View user's profile Send private message Visit poster's website 
Geoffrey


Joined: 30 May 2010
Posts: 2377
Location: Queensland

PostPosted: Sat 28 May 2016, 22:01    Post subject:  

musher0 wrote:

I know that I can do a < strip --strip-unneeded > on ELF executables and *.so libs, but...
are you saying that I could also apply a < strip --strip-unneeded > to the a and la files?


Na, I thought I'd mention that the .la .a are part of the DEV files and aren't needed if you only want the the application and the lib files it requires.
Quote:

I'm not absolutely clear about your "new2dir" procedure, but I'm keeping it out of the
current discussion to maintain focus.

"new2dir make install" will install to your system as well as make a directory that a package can be made from,
"make DESTDIR=/Bla install", installs only to the DESTDIR, but I don't always have success with it, sometimes the directory is left empty

http://puppylinux.org/wikka/new2dir

_________________
Carolina: Recent Repository Additions

Back to top
View user's profile Send private message 
Sailor Enceladus

Joined: 22 Feb 2016
Posts: 1565

PostPosted: Sat 28 May 2016, 23:10    Post subject:    

Thanks for that info Geoffrey, new2dir looks pretty handy. I also had the issue where DESTDIR was just ignored when adding it to make install in a certain source. Having the DEV/NLS/DOC separated automatically also sounds convenient for puppy builds.
Back to top
View user's profile Send private message 
version2013

Joined: 08 Sep 2013
Posts: 447
Location: Florida, USA

PostPosted: Sun 16 Jul 2017, 18:29    Post subject:  

Geoffrey wrote:
I think the la files are used to statically link, you should be able to remove those and any other DEV files.

I usually split the packages once compiled to separate DEV, DOC, NLS, if you are using "new2dir make install" or "make DESTDIR=/PATH/TO/PACKAGE/FOLDER install"
then just drag the created package output folder to this script(splitpkg.sh)

Note: "new2dir make install" will strip unneeded, where "make DESTDIR=/PATH/TO/PACKAGE/FOLDER install" doesn't,
so "strip --strip-unneeded" will have to be performed on the resulting binaries and lib files.

I am not sure where the 'splitpkg.sh' originated, but thank you for posting it on the forum.

When I compile and create pet files, I previously used new2dir.
Using new2dir when compiling and packaging 'wine' worked fine.
For some pet files, I needed to manually comment-out the lines in that script for stripping.

At some point, I needed to compile and package some other application.
new2dir would not function correctly with this app.
I needed to find an alternative to new2dir because I still needed the splitting function it has.

I found this forum thread and splitpkg.
Thank you again.
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 1 [13 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
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
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0918s ][ Queries: 13 (0.0176s) ][ GZIP on ]