WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: shared object files not stripping---advice needed  (Read 3699 times)

gordonselfish

  • Guest
shared object files not stripping---advice needed
« on: September 17, 2013, 07:03:41 AM »
Hi

I am following the extns wiki and am doing a post install strip at the point where I have installed to /tmp such that
Code: [Select]
cd /tmp/$W
root@box:/tmp/weechat# find . | xargs file | grep "executable"    | grep ELF | grep "not stripped" | cut -f 1 -d : | xargs strip --strip-u
nneeded 2> /dev/null
root@box:/tmp/weechat# find . | xargs file | grep "shared object" | grep ELF | grep "not stripped" | cut -f 1 -d : | xargs strip -g 2> /de
v/null

Not check the exe is ok
Code: [Select]
file weechat/usr/local/bin/weechat-curses
weechat/usr/local/bin/weechat-curses: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 3.0.21, stripped

as expected now test one of the shared objects....all are un-stripped BTW
Code: [Select]
file weechat/usr/local/lib/weechat/plugins/tcl.so
weechat/usr/local/lib/weechat/plugins/tcl.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, not stripped

QUESTIONS
#######
upstream for weechat wants cmake used and I used it
----Does that make a difference to why so files are not stripping?

Otherwise
What do I do now?
I don't want dev members not liking me for leaving bigger files than necessary in submission

thanks for reading
« Last Edit: September 18, 2013, 08:24:23 PM by gordonselfish »

gordonselfish

  • Guest
Re: shared object files not stripping---advice needed
« Reply #1 on: September 17, 2013, 07:08:58 AM »
hang on why does it show
Quote
for GNU/Linux 3.0.21, stripped

in the file command output when
Code: [Select]
uname -a
Linux box 3.8.10-tinycore #3810 SMP Tue Apr 30 15:45:26 UTC 2013 i686 i686 i386 GNU/Linux

Has something imported from 4.x interfered with cmake etc?

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14850
Re: shared object files not stripping---advice needed
« Reply #2 on: September 17, 2013, 07:19:18 AM »
It depends what it was compiled with..

gordonselfish

  • Guest
Re: shared object files not stripping---advice needed
« Reply #3 on: September 17, 2013, 09:43:54 AM »
do you mean cmake?

otherwise my tce-load list is
Quote
LIST1="compiletc submitqc5 cmake libgcrypt-dev gnutls-dev curl-dev ncursesw-dev ncurses-dev gettext tcl-dev "
for Z in $LIST1
do
   su -c "tce-load -w $Z" tc
   su -c "tce-load -i $Z" tc
done

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: shared object files not stripping---advice needed
« Reply #4 on: September 17, 2013, 10:04:54 AM »
su -c "tce-load -ilw $Z" tc

gordonselfish

  • Guest
Re: shared object files not stripping---advice needed
« Reply #5 on: September 17, 2013, 10:24:02 AM »
 gerald_clark

thanks will do

how about the 2 issues---strip and why 3.0.21?

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: shared object files not stripping---advice needed
« Reply #6 on: September 17, 2013, 10:45:13 AM »
Where there any debug symbols to strip?
Maybe instead of '-g'  use '--strip-unneeded'.
You can't have all symbols stripped or you can't link.

gordonselfish

  • Guest
Re: [SOLVED]shared object files not stripping---advice needed
« Reply #7 on: September 17, 2013, 08:47:24 PM »

Its morning here so will complete the build later. But your suggestion works

If you are still reading this, does it mean the wiki can be amended?
Its based on Jason W's post.

anyhow as I made a backup of my /tmp/weechat I was able to prove the strip occurs
eg
Code: [Select]
file usr/local/lib/weechat/plugins/alias.so
usr/local/lib/weechat/plugins/alias.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, stripped

gordonselfish

  • Guest
Re: [SOLVED]shared object files not stripping---advice needed
« Reply #8 on: September 18, 2013, 08:23:44 PM »
gerald_clark

your tce-load suggestion does not seem to work as expected
Code: [Select]
LIST1="compiletc submitqc5 squashfs-tools-4.x cmake gettext \
libgcrypt-dev gnutls-dev curl-dev ncursesw-dev ncurses-dev  \
tcl-dev perl5 aspell python-dev lua-dev "
for Z in $LIST1
do
   su -c "tce-load -ilw $Z" tc
done
compiletc is already downloaded.
submitqc5 is already downloaded.
squashfs-tools-4.x is already downloaded.
cmake is already downloaded.
gettext is already downloaded.
libgcrypt-dev is already downloaded.
gnutls-dev is already downloaded.
curl-dev is already downloaded.
ncursesw-dev is already downloaded.
ncurses-dev is already downloaded.
tcl-dev is already downloaded.
perl5 is already downloaded.
aspell is already downloaded.
python-dev is already downloaded.
lua-dev is already downloaded

shouldn't it also say installed?

If you have no time to answer, I will go back to my earlier method

thanks for reading

##### below is how it might look
### I have already reported some builds where the tce.installed script in not root:staff but I may have more to check later

Code: [Select]
LIST1="compiletc submitqc5 squashfs-tools-4.x cmake gettext \
libgcrypt-dev gnutls-dev curl-dev ncursesw-dev ncurses-dev  \
tcl-dev perl5 aspell python-dev lua-dev "
for Z in $LIST1
do
    su -c "tce-load -w $Z" tc
     su -c "tce-load -i $Z" tc
done
compiletc is already downloaded.
zlib_base-dev.tcz: OK
util-linux_base-dev.tcz: OK
linux-3.8.3_api_headers.tcz: OK
glibc_base-dev.tcz: OK
e2fsprogs_base-dev.tcz: OK
sed.tcz: OK
pkg-config.tcz: OK
patch.tcz: OK
make.tcz: OK
m4.tcz: OK
grep.tcz: OK
gmp.tcz: OK
mpfr.tcz: OK
mpc.tcz: OK
ppl.tcz: OK
cloog.tcz: OK
binutils.tcz: OK
gcc_libs.tcz: OK
gcc_libs-dev.tcz: OK
gcc_base-dev.tcz: OK
gcc.tcz: OK
gawk.tcz: OK
flex.tcz: OK
findutils.tcz: OK
file.tcz: OK
diffutils.tcz: OK
bison.tcz: OK
compiletc.tcz: OK
submitqc5 is already downloaded.
zsync.tcz: OK
libattr.tcz: OK
libcap.tcz: OK
attr.tcz: OK
acl.tcz: OK
coreutils.tcz: OK
openssl-1.0.0.tcz: OK
wget.tcz: OK
squashfs-tools-4.x.tcz: OK
submitqc5.tcz: OK
squashfs-tools-4.x is already downloaded.
squashfs-tools-4.x is already installed!
cmake is already downloaded.
libiconv.tcz: OK
libidn.tcz: OK
cmake.tcz: OK
gettext is already downloaded.
gettext.tcz: OK
libgcrypt-dev is already downloaded.
libgpg-error-dev.tcz: OK
libgcrypt-dev.tcz: OK
gnutls-dev is already downloaded.
libffi-dev.tcz: OK
libtasn1.tcz: OK
libtasn1-dev.tcz: OK
p11-kit.tcz: OK
p11-kit-dev.tcz: OK
gmp-dev.tcz: OK
nettle.tcz: OK
nettle-dev.tcz: OK
gnutls.tcz: OK
gnutls-dev.tcz: OK
curl-dev is already downloaded.
openssl-1.0.0-dev.tcz: OK
libiconv-dev.tcz: OK
libidn-dev.tcz: OK
libssh2-dev.tcz: OK
curl.tcz: OK
curl-dev.tcz: OK
ncursesw-dev is already downloaded.
ncursesw.tcz: OK
ncursesw-dev.tcz: OK
ncurses-dev is already downloaded.
ncurses-dev.tcz: OK
tcl-dev is already downloaded.
tcl.tcz: OK
tcl-dev.tcz: OK
perl5 is already downloaded.
/etc/sysconfig/tcedir/optional/perl5.tcz: OK
aspell is already downloaded.
aspell-en.tcz: OK
aspell.tcz: OK
python-dev is already downloaded.
readline.tcz: OK
gdbm.tcz: OK
tk.tcz: OK
bzip2-lib.tcz: OK
sqlite3.tcz: OK
python.tcz: OK
touch: cannot touch `/usr/local/tce.installed/python-dev': Permission denied
python-dev.tcz: OK
lua-dev is already downloaded.
touch: cannot touch `/usr/local/tce.installed/readline-dev': Permission denied
readline-dev.tcz: OK
touch: cannot touch `/usr/local/tce.installed/lua': Permission denied
lua.tcz: OK
touch: cannot touch `/usr/local/tce.installed/lua-dev': Permission denied
lua-dev.tcz: OK