Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

target 'install-strip' doesn't strip lib/liblink-grammar.so.5.4.3 #645

Closed
yurivict opened this issue Jan 22, 2018 · 12 comments
Closed

target 'install-strip' doesn't strip lib/liblink-grammar.so.5.4.3 #645

yurivict opened this issue Jan 22, 2018 · 12 comments

Comments

@yurivict
Copy link

Normally, stripping is expected for gnutools-based projects.

@linas
Copy link
Member

linas commented Jan 22, 2018

Is there a suggested fix? I've never heard of this before...

@yurivict
Copy link
Author

yurivict commented Jan 22, 2018

GNU docs say that this is a default behavior:

Users that need stripped binaries may invoke the install-strip target to do that.[1]

Not sure what the right fix would be, but something prevents this default behavior.

[1] https://www.gnu.org/prep/standards/html_node/Standard-Targets.html

@ampli
Copy link
Member

ampli commented Jan 23, 2018

I tried make install-strip` on Dedora 27.
The install library is stripped as needed (the shown time confirmed it is from this install-strip try and not another one):

$ ls -lt /usr/local/lib/liblink-grammar.*                                                                                                       LG (master % u=)
-rw-r--r-- 1 root root 654284 Jan 24 00:29 /usr/local/lib/liblink-grammar.a
-rwxr-xr-x 1 root root   1012 Jan 24 00:29 /usr/local/lib/liblink-grammar.la
lrwxrwxrwx 1 root root     24 Jan 24 00:29 /usr/local/lib/liblink-grammar.so -> liblink-grammar.so.5.4.3
lrwxrwxrwx 1 root root     24 Jan 24 00:29 /usr/local/lib/liblink-grammar.so.5 -> liblink-grammar.so.5.4.3
-rwxr-xr-x 1 root root 356568 Jan 24 00:29 /usr/local/lib/liblink-grammar.so.5.4.3
$ file /usr/local/lib/liblink-grammar.so.5.4.3                                                                                                  LG (master % u=)
/usr/local/lib/liblink-grammar.so.5.4.3: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=88dcafd21d627311a0c3bfefae84819f96b8a934, stripped

This is the relevant output from make -n install-strip that shows that the Makefile is set to do that:

list2=; for p in $list; do \
  if test -f $p; then \
    list2="$list2 $p"; \
  else :; fi; \
done; \
test -z "$list2" || { \
  echo " /usr/bin/mkdir -p '/usr/local/lib'"; \
  /usr/bin/mkdir -p "/usr/local/lib" || exit 1; \
  echo " /bin/sh ../libtool   --mode=install /usr/bin/install -c -s $list2 '/usr/local/lib'"; \
  /bin/sh ../libtool   --mode=install /usr/bin/install -c -s $list2 "/usr/local/lib"; \

This is the relevant output from the make install-strip:

libtool: install: /usr/bin/install -c .libs/liblink-grammar.so.5.4.3 /usr/local/lib/liblink-grammar.so.5.4.3
libtool: install: strip --strip-unneeded /usr/local/lib/liblink-grammar.so.5.4.3
```
According to https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=41904 there was once such a bug in `automake` that got fixed after 1.4.2.

Could you please post the relevant output of `make [-n] install-strip` on your system?


@yurivict
Copy link
Author

Making install in link-grammar
gmake[5]: Entering directory '/usr/ports/textproc/link-grammar/work/link-grammar-5.4.3/link-grammar'
gmake[6]: Entering directory '/usr/ports/textproc/link-grammar/work/link-grammar-5.4.3/link-grammar'
gmake[7]: Entering directory '/usr/ports/textproc/link-grammar/work/link-grammar-5.4.3/link-grammar'
 /usr/local/bin/gmkdir -p '/usr/ports/textproc/link-grammar/work/stage/usr/local/lib'
 /bin/sh ../libtool   --mode=install /usr/bin/install -c -s  liblink-grammar.la '/usr/ports/textproc/link-grammar/work/stage/usr/local/lib'
libtool: install: /usr/bin/install -c .libs/liblink-grammar.so.5.4.3 /usr/ports/textproc/link-grammar/work/stage/usr/local/lib/liblink-grammar.so.5.4.3
libtool: install: (cd /usr/ports/textproc/link-grammar/work/stage/usr/local/lib && { ln -s -f liblink-grammar.so.5.4.3 liblink-grammar.so.5 || { rm -f liblink-grammar.so.5 && ln -s liblink-grammar.so.5.4.3 liblink-grammar.so.5; }; })
libtool: install: (cd /usr/ports/textproc/link-grammar/work/stage/usr/local/lib && { ln -s -f liblink-grammar.so.5.4.3 liblink-grammar.so || { rm -f liblink-grammar.so && ln -s liblink-grammar.so.5.4.3 liblink-grammar.so; }; })
libtool: install: /usr/bin/install -c .libs/liblink-grammar.lai /usr/ports/textproc/link-grammar/work/stage/usr/local/lib/liblink-grammar.la
libtool: install: /usr/bin/install -c .libs/liblink-grammar.a /usr/ports/textproc/link-grammar/work/stage/usr/local/lib/liblink-grammar.a
libtool: install: chmod 644 /usr/ports/textproc/link-grammar/work/stage/usr/local/lib/liblink-grammar.a
libtool: install: ranlib /usr/ports/textproc/link-grammar/work/stage/usr/local/lib/liblink-grammar.a
libtool: warning: remember to run 'libtool --finish /usr/local/lib'
 /usr/local/bin/gmkdir -p '/usr/ports/textproc/link-grammar/work/stage/usr/local/include/link-grammar'
 /usr/bin/install -c -m 644 link-features.h link-includes.h dict-common/dict-api.h dict-common/dict-structures.h '/usr/ports/textproc/link-grammar/work/stage/usr/local/include/link-grammar'

@ampli
Copy link
Member

ampli commented Jan 24, 2018

Can it be it is actually a problem with the automake version on your system?
The -s flag is given in the install of liblink-grammar.la (in which it doesn't matter).
However, no -s is given in the dynamic lib install, and also no strip command is issued after it.

I use automake 1.15. Which version do you use?

@yurivict
Copy link
Author

I have automake-1.15.1, which is the latest.

@yurivict
Copy link
Author

A lot of ports on FreeBSD use install-strip, and it does work. I just verified that expat-2.2.5 gets stripped with install-strip and doesn't without it.

@ampli
Copy link
Member

ampli commented Jan 24, 2018

To find an example that works fine may be a step toward finding the reason of the problem here.
Could you please post the same make output for expat, so we can see how the stripping is done in that case?

@yurivict
Copy link
Author

I will ask on the automake ML first. IMO, they will likely know the answer right away. If this fails, will post the expat output here.

@linas
Copy link
Member

linas commented Feb 16, 2018

What's the status on this?

@linas
Copy link
Member

linas commented Mar 6, 2018

Is this resolved, or still an issue?

@linas
Copy link
Member

linas commented Apr 23, 2018

Closing; additional data needed to proceed with any fix.

@linas linas closed this as completed Apr 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants