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

static library name scheme issue #439

Closed
yuzibo opened this issue Apr 11, 2024 · 2 comments
Closed

static library name scheme issue #439

yuzibo opened this issue Apr 11, 2024 · 2 comments

Comments

@yuzibo
Copy link

yuzibo commented Apr 11, 2024

When I was trying to package on Debian, I got one warning like:

I: libbisect-ppx-ocaml-dev: unstripped-static-library (bisect__Runtime.o) [usr/lib/ocaml/bisect_ppx/runtime/bisect.a]
I: libbisect-ppx-ocaml-dev: unstripped-static-library (bisect_common.o) [usr/lib/ocaml/bisect_ppx/common/bisect_common.a]
I: libbisect-ppx-ocaml-dev: unstripped-static-library (bisect_ppx__Exclude.o bisect_ppx__Exclude_lexer.o bisect_ppx__Exclude_parser.o bisect_ppx
__Exclusions.o bisect_ppx__Instrument.o bisect_ppx__Register.o) [usr/lib/ocaml/bisect_ppx/bisect_ppx.a]

Background:

N:
I: unstripped-static-library
N:
N:   The package installs an unstripped static library.
N:
N:   Please note, that static libraries have to be stripped with the --strip-debug option. You will probably also want to use
N:   --remove-section=.comment --remove-section=.note to avoid the static-library-has-unneeded-section tag.
N:
N:   dh_strip (after debhelper/9.20150811) will do this automatically for you.
N:
N:   Visibility: info
N:   Show-Always: no
N:   Check: libraries/static

In Debian, there is one helper scripts called dh_strip to strip some unnecessary options in the library(static and dynamic), but there is some gap for use in practice, there is the code:

if ($fn =~ m/\/lib[^\/]*\.a$/ && $fn !~ m/.*_g\.a$/) {
		# Is it a binary file, or something else (maybe a linker
		# script on Hurd, for example? I don't use file, because
		# file returns a variety of things on static libraries.
		if (-B $fn) {
			push @static_libs, $fn;
			return;
		}
	}

So we can see, why the warning info was generated. The tool will look for a static library with lib- prefix, like libstatic-library.a and so I'm in the middle of a dilemma.

My sponsor suggests me to fix the issue(include another one) and so I open the issue.

@glondu
Copy link

glondu commented Apr 15, 2024

I don't think this is the right place to report this issue, as explained in https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1068651#29

@yuzibo
Copy link
Author

yuzibo commented Apr 16, 2024

yeah, thanks, I will close the issue.

@yuzibo yuzibo closed this as completed Apr 16, 2024
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

2 participants