[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#256900: Ocaml compiled programs cannot be stripped



Hello,

On Mon, Aug 18, 2008 at 05:46:50PM +0200, Xavier Leroy wrote:
> > First, a few reminders:
> > 
> > http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=256900
> > http://caml.inria.fr/pub/ml-archives/caml-list/2004/07/181268104b59b10ed1624cb92ed996c4.fr.html
> > 
> > Is there any news on this issue? It seems it is still on topic in OCaml
> > 3.10.2...
> 
> The plan of action that Sylvain Le Gall discussed with me a while ago
> was to track down the OCaml packages that use "ocamlc -custom" and fix
> them to use shared libraries instead.  Many mature Caml sources still
> use the -custom option although it is no longer necessary.  I can
> provide assistance tracking down the mixed bytecode/native executables
> that are a problem.
> 
> To summarize, my take on this issue is:
> 
> 1- "ocamlc -custom" is deprecated and packages that use it should be fixed.
> 

If this option is deprecated, i think we should handle it so for all
debian package. See at the end of the mail for a proposed way of doing
thing.

> 2- If this isn't practical, it's not a big deal that a couple of
>    executables cannot be stripped.  Other packagers (e.g. RedHat and
>    Mandriva) have had no problems in the past turning stripping off on
>    a case-by-case basis.

This is actually what is done for package that cannot be stripped (we
can use dh_strip -X ZZZ to avoid stripping an executable).

The solution we discussed was to find a test that can tell us what
binaries are "ocamlc -custom" executable. If we can find them, we can
warn packager that it should be rebuild without the deprecated option.
To detect these files we must have a very simple script, lets call it
"ocaml-custom-detect". The best option is that this script will be
written using "sh" or "perl" (maybe having an ocaml executable is
also be ok, we must see what is the easiest way). 

Once we have "ocaml-custom-detect", we can:
- add a policy rules telling that building executable using "-custom" is
  an ERROR
- provide a test for this policy rules to "lintian" (Debian package
  policy checker)

I think this script could help also other packager (like Fedora and
Freebsd).

At OCaml Meeting, Xavier Leroy told me that there was a way to detect
it. 

Can M. Leroy provides us with more details for detection?

Regards
Sylvain Le Gall




Reply to: