caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] OCaml on zLinux
@ 2013-06-07 14:18 Alain Frisch
  2013-06-07 15:54 ` Stéphane Glondu
  2013-07-03 15:49 ` Richard W.M. Jones
  0 siblings, 2 replies; 9+ messages in thread
From: Alain Frisch @ 2013-06-07 14:18 UTC (permalink / raw)
  To: caml-list

Dear all,

Does anyone have any experience running OCaml on the zLinux operating 
system (i.e. Linux on IBM System z)?  I suspect that the bytecode system 
would work fine, but it would be great to get confirmation of it.


Alain

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

* Re: [Caml-list] OCaml on zLinux
  2013-06-07 14:18 [Caml-list] OCaml on zLinux Alain Frisch
@ 2013-06-07 15:54 ` Stéphane Glondu
  2013-07-03 15:49 ` Richard W.M. Jones
  1 sibling, 0 replies; 9+ messages in thread
From: Stéphane Glondu @ 2013-06-07 15:54 UTC (permalink / raw)
  To: caml-list

Le 07/06/2013 16:18, Alain Frisch a écrit :
> Does anyone have any experience running OCaml on the zLinux operating
> system (i.e. Linux on IBM System z)?  I suspect that the bytecode system
> would work fine, but it would be great to get confirmation of it.

It compiles, and the test suite seems to pass on the Debian s390 and
s390x ports. Build logs are available at:

  https://buildd.debian.org/status/package.php?p=ocaml&suite=experimental

Same for most of the software written in OCaml that is packaged in Debian.


Cheers,

-- 
Stéphane

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

* Re: [Caml-list] OCaml on zLinux
  2013-06-07 14:18 [Caml-list] OCaml on zLinux Alain Frisch
  2013-06-07 15:54 ` Stéphane Glondu
@ 2013-07-03 15:49 ` Richard W.M. Jones
  2013-07-04  1:08   ` Francois Berenger
  1 sibling, 1 reply; 9+ messages in thread
From: Richard W.M. Jones @ 2013-07-03 15:49 UTC (permalink / raw)
  To: Alain Frisch; +Cc: caml-list

On Fri, Jun 07, 2013 at 04:18:41PM +0200, Alain Frisch wrote:
> Dear all,
> 
> Does anyone have any experience running OCaml on the zLinux
> operating system (i.e. Linux on IBM System z)?  I suspect that the
> bytecode system would work fine, but it would be great to get
> confirmation of it.

Yes, I have run OCaml (bytecode only of course!) on RHEL 6
on a real s/390x system.

Native code compilation would be great :-)

Rich.

-- 
Richard Jones
Red Hat

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

* Re: [Caml-list] OCaml on zLinux
  2013-07-03 15:49 ` Richard W.M. Jones
@ 2013-07-04  1:08   ` Francois Berenger
  2013-07-04  6:44     ` Michel Mauny
  0 siblings, 1 reply; 9+ messages in thread
From: Francois Berenger @ 2013-07-04  1:08 UTC (permalink / raw)
  To: caml-list

On 07/04/2013 12:49 AM, Richard W.M. Jones wrote:
> On Fri, Jun 07, 2013 at 04:18:41PM +0200, Alain Frisch wrote:
>> Dear all,
>>
>> Does anyone have any experience running OCaml on the zLinux
>> operating system (i.e. Linux on IBM System z)?  I suspect that the
>> bytecode system would work fine, but it would be great to get
>> confirmation of it.
>
> Yes, I have run OCaml (bytecode only of course!) on RHEL 6
> on a real s/390x system.
>
> Native code compilation would be great :-)

I think there is a bytecode to C compiler somewhere.
But I am not sure about its state in fact.

F.


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

* Re: [Caml-list] OCaml on zLinux
  2013-07-04  1:08   ` Francois Berenger
@ 2013-07-04  6:44     ` Michel Mauny
  2013-07-04 21:38       ` Richard W.M. Jones
  0 siblings, 1 reply; 9+ messages in thread
From: Michel Mauny @ 2013-07-04  6:44 UTC (permalink / raw)
  To: Francois Berenger; +Cc: caml-list

Hi,

Francois Berenger écrit/writes [04/07/2013 03:08] :

> I think there is a bytecode to C compiler somewhere.

It's named OCamlCC and is available as an OPAM package:

  opam install ocamlcc

or get the source at:

  https://github.com/ocaml-bytes/ocamlcc

> But I am not sure about its state in fact.

Works out of the box, and has good performances. It does not support
yet dynamic loading, though.

No known bug, but reports, comments and contributions (through github) are welcome.

Best,

-- 
Michel Mauny

ENSTA ParisTech

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

* Re: [Caml-list] OCaml on zLinux
  2013-07-04  6:44     ` Michel Mauny
@ 2013-07-04 21:38       ` Richard W.M. Jones
  2013-07-05  7:09         ` Michel Mauny
  0 siblings, 1 reply; 9+ messages in thread
From: Richard W.M. Jones @ 2013-07-04 21:38 UTC (permalink / raw)
  To: Michel Mauny; +Cc: Francois Berenger, caml-list

On Thu, Jul 04, 2013 at 08:44:36AM +0200, Michel Mauny wrote:
> Works out of the box, and has good performances. It does not support
> yet dynamic loading, though.
> 
> No known bug, but reports, comments and contributions (through github) are welcome.

How plausible is writing an 'ocamlopt' wrapper that would just work?

Rich.

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

* Re: [Caml-list] OCaml on zLinux
  2013-07-04 21:38       ` Richard W.M. Jones
@ 2013-07-05  7:09         ` Michel Mauny
  2013-07-05  7:55           ` David Allsopp
  0 siblings, 1 reply; 9+ messages in thread
From: Michel Mauny @ 2013-07-05  7:09 UTC (permalink / raw)
  To: caml-list

Hi,

Richard W.M. Jones écrit/writes [04/07/2013 23:38] :
> On Thu, Jul 04, 2013 at 08:44:36AM +0200, Michel Mauny wrote:
>> Works out of the box, and has good performances. It does not support
>> yet dynamic loading, though.
>>
>> No known bug, but reports, comments and contributions (through github) are welcome.
> 
> How plausible is writing an 'ocamlopt' wrapper that would just work?

For those who don't know OCamlCC, its primary usage is the following:

  ocamlcc main.byte

where main.byte is a bytecode executable produced by ocamlc. OCamlCC
first translates main.byte to a C file that #includes the OCaml
runtime, and calls gcc (or whatever C compiler you specified at config
time or using the -cc option) on it and produces an executable file
(a.out).

See the man page, or the OUD 2012 page for our short paper, slides and
presentation on a preliminary version of OCamlCC for more info:

   http://oud.ocaml.org/2012/#program

Back to the original question, it's easy to write a script that would
take a list of .ml files, compile them with ocamlc, and call ocamlcc
on the bytecode. One could probably be smarter in mimicking the
behavior of ocamlc to have separate compilation, and calling ocamlcc
at link time.

We will probably extend ocamlcc argument processing to OCaml source
files (.ml, .mli), and compile them with ocamlc.

Now, I don't think it would be a good idea to call this ocamlopt,
since ocamlcc is an extension of ocamlc compilation chain, whereas
ocamlopt is not.

Best,

-- 
Michel Mauny

ENSTA ParisTech

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

* RE: [Caml-list] OCaml on zLinux
  2013-07-05  7:09         ` Michel Mauny
@ 2013-07-05  7:55           ` David Allsopp
  2013-07-05 15:50             ` Michel Mauny
  0 siblings, 1 reply; 9+ messages in thread
From: David Allsopp @ 2013-07-05  7:55 UTC (permalink / raw)
  To: caml-list

Michel Mauny wrote:
<snip>
> 
> Now, I don't think it would be a good idea to call this ocamlopt, since
> ocamlcc is an extension of ocamlc compilation chain, whereas ocamlopt is
> not.

Is there not a case for being able to call it ocamlopt on architectures where there isn't an actual native code compiler, though? It would seem on the surface to allow OCaml to claim native code compilation on all architectures the compiler can be built on - even if on some presumably the native performance will not be as good as on others.

Are there (m)any cases where you'd want to use ocamlcc instead of ocamlopt on architectures which support the latter?


David

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

* Re: [Caml-list] OCaml on zLinux
  2013-07-05  7:55           ` David Allsopp
@ 2013-07-05 15:50             ` Michel Mauny
  0 siblings, 0 replies; 9+ messages in thread
From: Michel Mauny @ 2013-07-05 15:50 UTC (permalink / raw)
  Cc: caml-list

David Allsopp écrit/writes [05/07/2013 09:55] :
> Michel Mauny wrote:

>> Now, I don't think it would be a good idea to call this ocamlopt, since
>> ocamlcc is an extension of ocamlc compilation chain, whereas ocamlopt is
>> not.
> 
> Is there not a case for being able to call it ocamlopt on architectures where there isn't an actual native code compiler, though? It would seem on the surface to allow OCaml to claim native code compilation on all architectures the compiler can be built on - even if on some presumably the native performance will not be as good as on others.

It would be more honest to claim native code compilation through a
compilation route made of ocamlc + ocamlcc. Calling this ocamlopt
would let think that a set of source files together with their
Makefile would just work, and this is not true. Options are different,
intermediate files are different, features are different, etc.

Having the same features as ocamlopt is an interesting goal, but it's
too early to wrap ocamlcc in something called ocamlopt.

And I'm still not sure it's a good idea at all :-)

> Are there (m)any cases where you'd want to use ocamlcc instead of
> ocamlopt on architectures which support the latter?

One case could be the distribution of software as a single bytecode
executable (no source) that could be changed into native code by
OCamlCC on any architecture where ocamlc is supported.

- Michel

-- 
Michel Mauny

ENSTA ParisTech

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

end of thread, other threads:[~2013-07-05 15:50 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-07 14:18 [Caml-list] OCaml on zLinux Alain Frisch
2013-06-07 15:54 ` Stéphane Glondu
2013-07-03 15:49 ` Richard W.M. Jones
2013-07-04  1:08   ` Francois Berenger
2013-07-04  6:44     ` Michel Mauny
2013-07-04 21:38       ` Richard W.M. Jones
2013-07-05  7:09         ` Michel Mauny
2013-07-05  7:55           ` David Allsopp
2013-07-05 15:50             ` Michel Mauny

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).