OCaml Forge
SCM

Detail: [#1373] Cross compilation, ocamlc.opt and ocamlopt.opt

Bugs: Browse | Download .csv | Monitor

[#1373] Cross compilation, ocamlc.opt and ocamlopt.opt

Date:
2014-02-11 11:00
Priority:
3
State:
Open
Submitted by:
Alexis Bernadet (axiles)
Assigned to:
Nobody (None)
Hardware:
None
Resolution:
Awaiting Response
Severity:
normal
Version:
v1.1
Component:
None
Operating System:
None
Product:
None
 
URL:
Summary:
Cross compilation, ocamlc.opt and ocamlopt.opt

Detailed description
Let's suppose we want to use ocaml-autoconf do do cross compilation on a system that has:

- ocamlc, ocamlopt, etc ...
- ocamlc.opt, ocamlopt.opt, etc ...
- i686-w64-mingw32-ocamlc, i686-w64-mingw32-ocamlopt

But it does not have i686-w64-mingw32-ocamlc.opt and i686-w64-mingw32-ocamlopt.opt
(for example the Debian package mingw-ocaml does not provides these two).

With the currrent version of ocaml-autoconf, when we do

./configure --host=i686-w64-mingw32

It finds i686-w64-mingw32-ocamlc
It does not find i686-w64-mingw32-ocamlc.opt
It finds ocamlc.opt

And then it decides to give the value ocamlc.opt to the variable OCAMLC (instead of i686-w64-mingw32-ocamlc).

A way to fix it is to check that OCAMLC and OCAMLCDOTOPT (resp. OCAMLOPTDOTOPT) belongs to the same OCaml installation.

The current version only checks that they have the same version number. I suggest that it also check that the library path is the same.


Followup

Message
Date: 2014-02-11 13:40
Sender: Richard Jones

The patch seems reasonable. I don't have a way to test this however.

Attached Files:

Attachments:
cross_opt.patch
ocaml.m4

Changes:

Field Old Value Date By
File Added249: ocaml.m42014-02-11 11:00axiles
File Added250: cross_opt.patch2014-02-11 11:00axiles