From: David Allsopp <dra-news@metastack.com>
To: "Soegtrop, Michael" <michael.soegtrop@intel.com>,
"caml-list@inria.fr" <caml-list@inria.fr>
Subject: RE: [Caml-list] Flexdll circular dependency fix uses system provided flexdll.h [was: opam-cross-windows]
Date: Sun, 26 Jun 2016 15:17:40 +0000 [thread overview]
Message-ID: <E51C5B015DBD1348A1D85763337FB6D9F065D5DC@Remus.metastack.local> (raw)
In-Reply-To: <0F7D3B1B3C4B894D824F5B822E3E5A172CF1B59F@IRSMSX102.ger.corp.intel.com>
Michael Soegtrop wrote:
> Dear David,
>
> > Indeed - it means you *do* have a system installation of flexdll!
>
> You are right:
>
> $ which flexlink
> /usr/bin/flexlink
>
> $ find /usr -name "flexdll.h"
> /usr/include/flexdll.h
>
> I was just checking the flexdll.h, and it is at a place where the mingw
> gcc doesn't find it, but of cause flexlink itself is in the path, so it is
> found by the cross build and messes it up.
>
> The following "fixes" it:
>
> sed -i "s|FLEXLINK_CMD=flexlink|FLEXLINK_CMD=../flexdll/flexlink|"
> config/Makefile
This isn't a great way - better is to override the detection of FLEXDIR a few lines later (the FLEXDIR:= line):
sed -I "s|FLEXDIR:=.*|FLEXDIR=|" config/Makefile
> I think the makefile should be made such, that the build local flexlink is
> prefered, if it is there.
Actually, I reviewed the original PR (https://github.com/ocaml/ocaml/pull/388) and contrary to what I'd said previously, I think this is a bug. The solution, however, is to ensure that IFLEXDIR is better set-up if the submodule has been initialised (see, in particular, https://github.com/ocaml/ocaml/blob/trunk/Makefile.nt#L24-L30). I'll have a proper look and open a PR.
> One more question: how is this supposed to work with a native Cygwin
> build? For doing my initial native Cygwin build of ocaml, which I then use
> to build opam, I use a normal configure make process, but I do it twice
> and build flexlink in between. I didn't find a way to convince configure
> that flexlink is there, when it isn't, and obviously I need to do
> configure before I do make. Also a make flexlink results in a "nothing to
> do" after configure.
>
> ./configure -no-shared-libs
> make world.opt
> make install
> < make + install flexlink >
> ./configure
> make world
> make opt
> make opt.opt
> make install
>
> Thanks for the help!
The bootstrapping stuff is for the native ports only - it was far too much (risky) work to put it into the Unix Makefiles as well (I also, even with the recent change of licence to LGPL, have no interest in the Cygwin port of OCaml, I'm afraid!)
My hope was that when I (or someone else) finally unify the two build processes so that the native Windows ports begin with ./configure that Cygwin would pick-up the bootstrapping of flexdll "for free", but for now it would involve maintaining the changes on two separate build paths, which runs a high risk of bitrot...
David
next prev parent reply other threads:[~2016-06-26 15:17 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-25 14:09 Soegtrop, Michael
2016-06-25 16:13 ` David Allsopp
2016-06-25 16:31 ` Soegtrop, Michael
2016-06-25 16:52 ` David Allsopp
2016-06-25 18:13 ` Soegtrop, Michael
2016-06-25 18:35 ` David Allsopp
2016-06-26 12:57 ` Soegtrop, Michael
2016-06-26 15:17 ` David Allsopp [this message]
2016-06-26 17:26 ` Soegtrop, Michael
2016-06-26 18:04 ` David Allsopp
2016-06-27 11:15 ` Soegtrop, Michael
2016-06-27 11:26 ` David Allsopp
2016-06-27 12:01 ` Soegtrop, Michael
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=E51C5B015DBD1348A1D85763337FB6D9F065D5DC@Remus.metastack.local \
--to=dra-news@metastack.com \
--cc=caml-list@inria.fr \
--cc=michael.soegtrop@intel.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