Re: check for deprecated OCaml -custom linked executable
- To: 256900@bugs.debian.org
- Cc: Debian Ocaml Maint ML <debian-ocaml-maint@lists.debian.org>
- Subject: Re: check for deprecated OCaml -custom linked executable
- From: Stéphane Glondu <steph@glondu.net>
- Date: Sun, 07 Sep 2008 16:51:07 +0200
- Message-id: <48C3EA5B.8090509@glondu.net>
- In-reply-to: <20080907130757.GA23516@usha.takhisis.invalid>
- References: <48A85223.3060603@glondu.net> <48A9996A.3030001@inria.fr> <20080820115120.GD12295@yocto.gallu.homelinux.org> <48AC33CE.2000106@inria.fr> <20080907130757.GA23516@usha.takhisis.invalid>
Stefano Zacchiroli wrote:
> As such, we would like to add a lintian check to warn against OCaml
> custom mode executable. They can easily detected by looking for a magic
> number at the end of the file, as described in the forwarded mail from
> upstream.
Libraries can force custom mode executables. Therefore, I think they
should also be checked.
This check is quite easy using the ocamlobjinfo tool: it prints "Force
custom: YES" when given a faulty .cma.
BTW, on my system:
for u in /usr/lib/ocaml/3.10.2/**/*.cma; do ocamlobjinfo $u|sed "s@^@$u:
@"; done|grep 'Force custom: YES'
returns:
/usr/lib/ocaml/3.10.2/bjack/bjack.cma: Force custom: YES
/usr/lib/ocaml/3.10.2/ssl/ssl.cma: Force custom: YES
/usr/lib/ocaml/3.10.2/ssl/ssl_threads.cma: Force custom: YES
Cheers,
--
Stéphane Glondu
Reply to: