public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
From: David Allsopp <David.Allsopp@cl.cam.ac.uk>
To: William Hu <purplearmadillo77@proton.me>,
	Jon Turney <jon.turney@dronecode.org.uk>
Cc: "cygwin-apps@cygwin.com" <cygwin-apps@cygwin.com>
Subject: RE: [ITA] ocaml 4.14.0
Date: Wed, 13 Jul 2022 15:41:18 +0000	[thread overview]
Message-ID: <e60e3f2e19ea4c778aa66ab98e292b1d@metastack.com> (raw)
In-Reply-To: <RdDnq0HUJzw-FZa2mNSMKeFrr84y5J6YK5y_tuyiEOuXkUcZaUIt0SOPB3I1aPbFQ1XDUHkkyKeOOwrJ-1SVFx-wCVP5_vjsaH4nrAx1yLg=@proton.me>

> 1) libcamlrun: Oops, that's another oversight, forgot to look at the old
> patches. The other 3 patches seem unnecessary, but I had trouble linking
> either libcamlrun_shared.so or libcamlrun_shared.dll.a into a program
> (unresolved symbol errors). Added but it possibly needs further patching.
> I'll keep on digging.

What were the missing symbols? With the OCaml 4.10 package, I hit problems with this:

  echo 'print_endline "hello, world"' > hello.ml
  ocamlc -custom -runtime-variant _shared -o hello.exe hello.ml

I think that may be an issue upstream (libasmrun_shared.so IIRC is broken on all platforms - on Cygwin, you can just about to persuade it to get to the same symbol errors because of the extra .dll.a file which gets generated). 

> 1.5) I checked for other differences between the cygports to make sure I
> didn't miss anything else. I made some edits to src_install: I removed
> `dodoc  Updating` since there doesn't seem to be a file named "Updating".
> I also removed symlinking header files to /usr/include.  From what I
> understood, the  OCaml documentation says the headers should "reside in
> the caml/ subdirectory  of the OCaml standard library directory, which is
> returned by the command ocamlc -where (usually /usr/local/lib/ocaml or
> /usr/lib/ocaml)". Obviously the  symlink doesn't move anything, but since
> their location is well documented I  didn't see a reason to have the extra
> symlinks. Please let me know if this is  too large of a change or there's
> a Cygwin (or non-Cygwin) convention that precludes this - I'm still
> getting the hang of this.

> 2) fma on x86: I'm actually getting the same error, but the tests should
> ostensibly pass on Cygwin32. I'll also look into this.

What's the full configuration command and what gets inferred for the build, host and target triplets? fma should work without emulation in Cygwin32 and it should be detecting as failing on Cygwin64 but the emulation should be enabled by default unless you explicitly passed --disable-imprecise-c99-float-ops.

> 3) Interesting - on my machine, the camlheader[di] files had the .exe
> extensions. I did some digging around and found the files are *built*
> without  the .exe suffix, and even *initially installed* without the .exe
> suffix, but  ultimately come out with the .exe suffix. I ran cyport in
> debug mode and apparently the files are being renamed with the suffix
> post-install:
> 
> + case "${exe##*/}" in
> + mv usr/lib/ocaml/camlheaderd usr/lib/ocaml/camlheaderd.exe
> + exe+=.exe
> 
> and did a little more digging and I think these lines in cygport are the
> cause:
> https://github.com/cygwin/cygport/blob/096f27644bd3b28f29d7522e816bebd327c
> f24cb/lib/src_postinst.cygpart#L1010
> 
> On the topic of "testing more thoroughly", I attempted to use ocamlc to
> compile a simple program and it fails with "Cannot find file camlheader"
> but works when I remove the ".exe", so it seems that the presence of the
> .exe suffixes breaks the compiler. Is there a way to prevent cygport from
> adding it?

The camlheader files are data files and definitely mustn't be installed with a .exe extension (nor do they need to be executable).

Incidentally, OCaml 4.12+ is also likely to run into problems if flexlink is older than 0.39 - I just removed the test mark from the flexdll 0.39 package (which I thought I'd done quite some time ago...)

HTH,


David

  reply	other threads:[~2022-07-13 15:40 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 [this message]
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
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=e60e3f2e19ea4c778aa66ab98e292b1d@metastack.com \
    --to=david.allsopp@cl.cam.ac.uk \
    --cc=cygwin-apps@cygwin.com \
    --cc=jon.turney@dronecode.org.uk \
    --cc=purplearmadillo77@proton.me \
    /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).