caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Circular dependency between Ocaml and FlexDLL
@ 2016-03-29 12:10 Pang, Wai (CA-CIB)
  2016-03-29 13:26 ` David Allsopp
  0 siblings, 1 reply; 4+ messages in thread
From: Pang, Wai (CA-CIB) @ 2016-03-29 12:10 UTC (permalink / raw)
  To: caml-list

[-- Attachment #1: Type: text/plain, Size: 2631 bytes --]

Hi All,

I am trying to build the latest version of Ocaml and FlexDLL on windows using msvc toolchain.
There appears to be a circular dependencies on these two packages.

OCaml build required Flexdll as specified  in the README.win32 file

set FLEXDLLDIR=%PFPATH%\flexdll

And the FlexDLL build requires ocamlopt from the ocaml package to build flexlink.exe

ocamlopt -g -w -105 -o flexlink.exe -cclib "-link version.res" version.ml coff.ml cmdline.ml create_dll.ml reloc.ml

How do we compile ocaml if we don't have binary of flexlink? Also are they really completely backwards compatible so that we can use
"any" older version of flexlink to compile the latest ocaml package to produce ocamlopt and then use ocamlopt to build the latest version of flexlink?
Do we than recompile ocaml package to use the newly build flexlink?

We have an old version of ocaml packages which is independent of flexlink 3.10. Can we use this version to compile the latest version of flexlink and then use this to compile a newer version of ocaml?

Wai
This email does not create a legal relationship between any member of the Crédit Agricole group and the recipient or constitute investment advice. The content of this email (including any attachments) is intended solely for the addressee and access by any other person is not authorised. It may contain information which is confidential, privileged or otherwise protected from disclosure. If you are not the intended recipient of this email, (i) you should send it back to us and delete it from your system, and (ii) you are prohibited from retaining, distributing, disclosing or using (in whole or part) any of its content. Email communication may be logged and archived, monitored and/or disclosed to third parties.

Crédit Agricole Corporate and Investment Bank is authorised by the Autorité de Contrôle Prudentiel et de Résolution (ACPR) and supervised by the ACPR and the Autorité des Marchés Financiers (AMF) in France and subject to limited regulation by the Financial Conduct Authority and the Prudential Regulation Authority. Details about the extent of our regulation by the Financial Conduct Authority and the Prudential Regulation Authority are available from us on request. Crédit Agricole Corporate and Investment Bank is incorporated in France with limited liability and registered in England and Wales. Registration number: FC008194. Registered office: Broadwalk House, 5 Appold Street, London, EC2A 2DA
Please refer to http://www.ca-cib.com/group-overview/dodd-frank-otc-derivatives.htm for any Dodd-Frank Disclosure for U.S. Persons pursuant to CFTC Regulation 23.431

[-- Attachment #2: Type: text/html, Size: 7016 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [Caml-list] Circular dependency between Ocaml and FlexDLL
  2016-03-29 12:10 [Caml-list] Circular dependency between Ocaml and FlexDLL Pang, Wai (CA-CIB)
@ 2016-03-29 13:26 ` David Allsopp
  2016-03-31  7:36   ` Pang, Wai (CA-CIB)
  0 siblings, 1 reply; 4+ messages in thread
From: David Allsopp @ 2016-03-29 13:26 UTC (permalink / raw)
  To: Pang, Wai (CA-CIB), caml-list

[-- Attachment #1: Type: text/plain, Size: 4357 bytes --]

It is necessary/advisable to have the FlexDLL C objects compiled with the same C compiler as ocamlopt is using (this is compulsory for Visual Studio 2015; I think that previous version’s might be interchangeable) and you can build those without ocamlopt (make CHAINS=whatever support). flexlink is much less coupled – you can mix versions.

In the past, I used flexlink.exe from Alain’s latest binary distribution and compiled the FlexDLL objects from sources, allowing OCaml to be compiled and then once OCaml was compiled, recompiled and replaced flexlink.exe from source. A purist would then recompile OCaml again, but flexlink is just a linker, so I never bothered!

It’s not (yet) documented, but in 4.03 you can bootstrap it with OCaml:

1.       Ensure FlexDLL sources are in flexdll/ in the OCaml build tree

a.       If you're building from a git clone, issue git submodule update --init

b.       If you're building from a sources tarball, issue git clone https://github.com/alainfrisch/flexdll.git

2.       Follow usual configuration steps in config/

3.       make -f Makefile.nt flexdll world opt opt.opt install

flexlink.exe (and the .manifest files for the MSVC ports) are installed to bin. flexlink.exe will be a bytecode executable unless opt.opt is compiled. The correct .o/.obj files are installed to lib. Note that FlexDLL 0.35 or later is required for this, so you can't yet use a FlexDLL sources tarball.


David


From: caml-list-request@inria.fr [mailto:caml-list-request@inria.fr] On Behalf Of Pang, Wai (CA-CIB)
Sent: 29 March 2016 13:11
To: caml-list@inria.fr
Subject: [Caml-list] Circular dependency between Ocaml and FlexDLL

Hi All,

I am trying to build the latest version of Ocaml and FlexDLL on windows using msvc toolchain.
There appears to be a circular dependencies on these two packages.

OCaml build required Flexdll as specified  in the README.win32 file

set FLEXDLLDIR=%PFPATH%\flexdll

And the FlexDLL build requires ocamlopt from the ocaml package to build flexlink.exe

ocamlopt -g -w -105 -o flexlink.exe -cclib "-link version.res" version.ml coff.ml cmdline.ml create_dll.ml reloc.ml

How do we compile ocaml if we don’t have binary of flexlink? Also are they really completely backwards compatible so that we can use
“any” older version of flexlink to compile the latest ocaml package to produce ocamlopt and then use ocamlopt to build the latest version of flexlink?
Do we than recompile ocaml package to use the newly build flexlink?

We have an old version of ocaml packages which is independent of flexlink 3.10. Can we use this version to compile the latest version of flexlink and then use this to compile a newer version of ocaml?

Wai
This email does not create a legal relationship between any member of the Crédit Agricole group and the recipient or constitute investment advice. The content of this email (including any attachments) is intended solely for the addressee and access by any other person is not authorised. It may contain information which is confidential, privileged or otherwise protected from disclosure. If you are not the intended recipient of this email, (i) you should send it back to us and delete it from your system, and (ii) you are prohibited from retaining, distributing, disclosing or using (in whole or part) any of its content. Email communication may be logged and archived, monitored and/or disclosed to third parties.


Crédit Agricole Corporate and Investment Bank is authorised by the Autorité de Contrôle Prudentiel et de Résolution (ACPR) and supervised by the ACPR and the Autorité des Marchés Financiers (AMF) in France and subject to limited regulation by the Financial Conduct Authority and the Prudential Regulation Authority. Details about the extent of our regulation by the Financial Conduct Authority and the Prudential Regulation Authority are available from us on request. Crédit Agricole Corporate and Investment Bank is incorporated in France with limited liability and registered in England and Wales. Registration number: FC008194. Registered office: Broadwalk House, 5 Appold Street, London, EC2A 2DA


Please refer to http://www.ca-cib.com/group-overview/dodd-frank-otc-derivatives.htm for any Dodd-Frank Disclosure for U.S. Persons pursuant to CFTC Regulation 23.431

[-- Attachment #2: Type: text/html, Size: 13000 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [Caml-list] Circular dependency between Ocaml and FlexDLL
  2016-03-29 13:26 ` David Allsopp
@ 2016-03-31  7:36   ` Pang, Wai (CA-CIB)
  2016-04-01  8:37     ` David Allsopp
  0 siblings, 1 reply; 4+ messages in thread
From: Pang, Wai (CA-CIB) @ 2016-03-31  7:36 UTC (permalink / raw)
  To: David Allsopp, caml-list

[-- Attachment #1: Type: text/plain, Size: 1831 bytes --]

Hi David

Thanks for your reply – can you explain what is the different building from git clone and from tar balls. I have never used git clone.
Is github a development build whereas tar balls are stable release builds?

--Wai
This email does not create a legal relationship between any member of the Crédit Agricole group and the recipient or constitute investment advice. The content of this email (including any attachments) is intended solely for the addressee and access by any other person is not authorised. It may contain information which is confidential, privileged or otherwise protected from disclosure. If you are not the intended recipient of this email, (i) you should send it back to us and delete it from your system, and (ii) you are prohibited from retaining, distributing, disclosing or using (in whole or part) any of its content. Email communication may be logged and archived, monitored and/or disclosed to third parties.

Crédit Agricole Corporate and Investment Bank is authorised by the Autorité de Contrôle Prudentiel et de Résolution (ACPR) and supervised by the ACPR and the Autorité des Marchés Financiers (AMF) in France and subject to limited regulation by the Financial Conduct Authority and the Prudential Regulation Authority. Details about the extent of our regulation by the Financial Conduct Authority and the Prudential Regulation Authority are available from us on request. Crédit Agricole Corporate and Investment Bank is incorporated in France with limited liability and registered in England and Wales. Registration number: FC008194. Registered office: Broadwalk House, 5 Appold Street, London, EC2A 2DA
Please refer to http://www.ca-cib.com/group-overview/dodd-frank-otc-derivatives.htm for any Dodd-Frank Disclosure for U.S. Persons pursuant to CFTC Regulation 23.431

[-- Attachment #2: Type: text/html, Size: 11640 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [Caml-list] Circular dependency between Ocaml and FlexDLL
  2016-03-31  7:36   ` Pang, Wai (CA-CIB)
@ 2016-04-01  8:37     ` David Allsopp
  0 siblings, 0 replies; 4+ messages in thread
From: David Allsopp @ 2016-04-01  8:37 UTC (permalink / raw)
  To: Pang, Wai (CA-CIB), caml-list

Pang, Wai (CA-CIB) wrote:
> Thanks for your reply

No problem - but please keep the original message (or at least the relevant parts of it) in your reply as it makes following the thread easier. This list is more tolerant than most of "top-posting" (http://bit.ly/1pPP74T), though your email signature is a little long...

> – can you explain what is the different building
> from git clone and from tar balls. I have never used git clone. 

The tarballs are just snapshots of official versions - they very nearly correspond with tags in the git repository (for example, git checkout 4.02.3 gives you the contents of ocaml-4.02.3.tar.gz plus a few extra bits that aren't included in the release).

The reason to build from git is that you can compile unreleased versions (i.e. the latest development "trunk", experimental branches or beta-branches, such as 4.03). The same is true for FlexDLL.

The benefit of the tarballs and the reason to use them normally is that they are smaller - its age means that the OCaml repository is very large (~140MB) vs a 3MB tarball.

> Is github a development build whereas tar balls are stable release builds?

Sort of - but it's more that GitHub hosts the primary public copy of the source code repository. Git/GitHub = complete history (and development); tarballs = tagged versions (not necessarily stable - http://caml.inria.fr/pub/distrib/ocaml-4.03/ contains beta version releases at the moment)


David

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-04-01  8:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-29 12:10 [Caml-list] Circular dependency between Ocaml and FlexDLL Pang, Wai (CA-CIB)
2016-03-29 13:26 ` David Allsopp
2016-03-31  7:36   ` Pang, Wai (CA-CIB)
2016-04-01  8:37     ` David Allsopp

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 NNTP newsgroup(s).