antoinemine / apron

Apron Numerical Abstract Domain Library
Other
114 stars 33 forks source link

install --strip causing problems on Mac #93

Closed caballa closed 3 months ago

caballa commented 1 year ago

The command option --strip doesn't seem to be recognized on Mac (my version is Ventura 13.2.1). I think install on Mac does not like --.

I think the only place where it's used is here https://github.com/antoinemine/apron/blob/master/Makefile.config.model#L185

I replaced it with -s but then I get this error:

/Library/Developer/CommandLineTools/usr/bin/strip: error: symbols referenced by indirect symbol table entries that can't be stripped in: /Users/jorge/Repos/apron-mine/install-release/lib/libapron.so
___gmpfr_mpfr_get_sj
___gmpfr_out_str
___gmpn_perfect_square_p
___gmpq_add
___gmpq_canonicalize
___gmpq_clear
___gmpq_cmp
___gmpq_cmp_si
___gmpq_div
___gmpq_div_2exp
....

Note that install -s calls strip.

I've found this issue with a similar problem and it seems that we should call strip -u on dynamic libraries.

I believe the issue is that bare strip is too aggressive for a dylib. strip -u seems to work. I'm not sure if -r should also be added. I might suggest adding -u to any dylib crate.

Unfortunately, I don't know how to tell install command to pass the option -u to strip.

antoinemine commented 12 months ago

PR #97 may be related to (and possibly a fix for) this problem.

antoinemine commented 3 months ago

Considered closed by #97.