public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
From: David Allsopp <David.Allsopp@cl.cam.ac.uk>
To: "cygwin-apps@cygwin.com" <cygwin-apps@cygwin.com>
Subject: RE: [ITA] ocaml 4.14.0
Date: Wed, 24 Aug 2022 09:28:46 +0000	[thread overview]
Message-ID: <a19339964c45426b9c0c8aa1ecb6849f@metastack.com> (raw)
Message-ID: <20220824092846.oqtmh-3ZM2Thm0uZkfcLHYskS070Ndxkme8dRvimGpA@z> (raw)
In-Reply-To: <YwXtXMIKyveycWcJ@calimero.vinschen.de>

Corinna Vinschen wrote:
> On Aug 23 20:00, David Allsopp wrote:
> > Jon Turney wrote:
> > > I'm confused here: /usr/lib/ocaml/camlheaderd[di] look like
> > > executables (according to file etc.)
> > >
> > > If they genuinely aren't, then perhaps they shouldn't have execute
> > > permission (which is I think what is causing them to be caught by
> > > that piece of code in cygport...)
> >
> > ocamlc won't care about the executable bit, but these files are _data_
> > and so it will care if they end up with a .exe extension, because they
> > are open'd not exec'd.
> >
> > The files themselves form the start of executables produced by ocamlc.
> > For both Cygwin and native Windows, it's a tiny C program responsible
> > for locating ocamlrun (on Unix, it's just a shebang line) and the
> > bytecode itself gets appended.
> 
> Why is ocaml for Cygwin not produing shebang files as well?  After all,
> we're trying to be as Unix-compatible as possible.

I'm not 100% that this is the correct history, but I think it's down to being able to start the programs from outside a Cygwin bash prompt - i.e. the programs emitted want to have a .exe by default and it's strange to have ".exe" files with a shebang header (at least from outside Cygwin).

This part of OCaml is actually old enough (late nineties) that this executable was also used on "real" Unix systems where shebang didn't work properly :)

It is possible to configure Cygwin OCaml to use shebang headers (although at the moment only by changing Makefile.config after running configure)

All best,


David

  reply	other threads:[~2022-08-24  9:28 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-04  2:03 William Hu
2022-07-04 17:03 ` Jon Turney
2022-07-05  0:42   ` William Hu
2022-07-05 19:44     ` Jon Turney
2022-07-13  2:56       ` William Hu
2022-07-13 15:41         ` David Allsopp
2022-07-14  3:36           ` William Hu
2022-07-14 14:56             ` David Allsopp
2022-07-15  3:20               ` William Hu
2022-07-16 14:22           ` Jon Turney
2022-07-23 16:38             ` William Hu
2022-07-31 14:52               ` Jon Turney
2022-08-07  2:26                 ` William Hu
2022-08-23 20:00             ` David Allsopp
2022-08-24  9:20               ` Corinna Vinschen
2022-08-24  9:28                 ` David Allsopp [this message]
2022-08-24  9:28                   ` David Allsopp
2022-08-24 10:04                   ` Corinna Vinschen
2022-07-16 14:05         ` Jon Turney
2022-07-17 20:56           ` William Hu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a19339964c45426b9c0c8aa1ecb6849f@metastack.com \
    --to=david.allsopp@cl.cam.ac.uk \
    --cc=cygwin-apps@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).