caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: nicolas.pouillard <nicolas.pouillard@gmail.com>
To: Joel Reymont <joelr1@gmail.com>
Cc: Andres Varon <avaron@gmail.com>,
	O'Caml Mailing List <caml-list@yquem.inria.fr>
Subject: Re: [Caml-list] building 64bit ocaml from cvs on mac osx leopard
Date: Fri, 06 Mar 2009 15:22:41 +0100	[thread overview]
Message-ID: <1236349160-sup-4296@ausone.inria.fr> (raw)
In-Reply-To: <F6C1C0B8-DB21-498B-9BAD-8E4F70D04103@gmail.com>

Excerpts from Joel Reymont's message of Fri Mar 06 11:40:13 +0100 2009:
> 
> On Mar 5, 2009, at 4:08 PM, Andres Varon wrote:
> 
> > I don't think that it compiles the way it is now. It seems to me  
> > that there was a version merge error and asmcomp/amd64/emit.mlp has  
> > repeated definitions  of emit_call and emit_jump.
> 
> 
> Here's the offending part of asmcomp/amd64/emit.mlp.
> 
> The two load_symbol_addr are equivalent and the only difference in the  
> rest is the Mac OSX check. /More after the code/
> 
> let emit_call s =
>    if !Clflags.dlcode && not macosx
>    then `call    {emit_symbol s}@PLT`
>    else `call    {emit_symbol s}`
> 
> let emit_jump s =
>    if !Clflags.dlcode && not macosx
>    then `jmp     {emit_symbol s}@PLT`
>    else `jmp     {emit_symbol s}`
> 
> let load_symbol_addr s =
>    if !Clflags.dlcode
>    then `movq    {emit_symbol s}@GOTPCREL(%rip)`
>    else if !pic_code
>    then `leaq    {emit_symbol s}(%rip)`
>    else `movq    ${emit_symbol s}`
> 
> 
> let emit_call s =
>    if !Clflags.dlcode
>    then `call    {emit_symbol s}@PLT`
>    else `call    {emit_symbol s}`
> 
> let emit_jump s =
>    if !Clflags.dlcode
>    then `jmp     {emit_symbol s}@PLT`
>    else `jmp     {emit_symbol s}`
> 
> let load_symbol_addr s =
>    if !Clflags.dlcode
>    then `movq    {emit_symbol s}@GOTPCREL(%rip)`
>    else if !pic_code
>    then `leaq    {emit_symbol s}(%rip)`
>    else `movq    ${emit_symbol s}`

The second part of this code have to be removed,
this is an undesirable behavior of merging some CVS branches.

However the CVS HEAD is not supposed to be as stable as the ocaml3110 branch.

> On my system dlcode is true and so is macosx so it should note be  
> taking the PLT branch. There's also this ocamlbuild rule for building  
> asmcomp/emit.ml from asmcomp/amd64/emit.mlp
> 
> let emit_mlp = "asmcomp"/C.arch/(if ccomptype = "msvc" then  
> "emit_nt.mlp" else "emit.mlp") in
> rule "emit.mlp"
>    ~prod:"asmcomp/emit.ml"
>    ~deps:[emit_mlp; "tools/cvt_emit.byte"]
>    begin fun _ _ ->
>      Cmd(S[ocamlrun; P"tools/cvt_emit.byte"; Sh "<"; P emit_mlp;
>            Sh">"; Px"asmcomp/emit.ml"])
>    end;;
> 
> I believe the issue is that distclean.sh does not remove ocamlopt in  
> the root of the ocaml source distribution. I was able to get past the  
> PLT error once I removed ocamlopt from the root of the tree and  
> modified asmcomp/amd64/emit.mlp to remove the second set of emit_call  
> and emit_jump functions that do not include Mac OSX checks.
> 
> I got a different error from fastworld.sh now and it does not seem to  
> be related to 64 bits.
> 
> + boot/ocamlyacc -v ocamldoc/odoc_text_parser.mly
> 5 shift/reduce conflicts.
> + ./ocamlc.opt -nostdlib -c -g -w Ale -warn-error Ale -I toplevel -pp  
> 'boot/ocamlrun camlp4/boot/camlp4boot.byte' -I camlp4 -I stdlib -I  
> camlp4/Camlp4Top -I camlp4/build -o camlp4/Camlp4Top/Top.cmo camlp4/ 
> Camlp4Top/Top.ml
> File "camlp4/Camlp4Top/Top.ml", line 37, characters 4-26:
> Error: Unbound value Toploop.print_location

This last error is rather strange, and I can't reproduce it, maybe it's
another strange build state error?

-- 
Nicolas Pouillard


  reply	other threads:[~2009-03-06 14:23 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-05 15:00 Joel Reymont
     [not found] ` <006201c99da4$8c51d3a0$a4f57ae0$@com>
2009-03-05 15:39   ` [Caml-list] " Joel Reymont
2009-03-05 16:08     ` Andres Varon
2009-03-05 16:30       ` Joel Reymont
2009-03-06 10:40       ` Joel Reymont
2009-03-06 14:22         ` nicolas.pouillard [this message]
2009-03-06 14:48           ` Joel Reymont
2009-03-05 18:12     ` Ashish Agarwal
2009-03-05 18:27       ` Joel Reymont
2009-03-06  8:17         ` Nicolas Pouillard
2009-03-06  9:13           ` Joel Reymont
2009-03-06 14:08             ` nicolas.pouillard
2009-03-06 11:08           ` Joel Reymont
2009-03-06  8:18       ` Nicolas Pouillard

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=1236349160-sup-4296@ausone.inria.fr \
    --to=nicolas.pouillard@gmail.com \
    --cc=avaron@gmail.com \
    --cc=caml-list@yquem.inria.fr \
    --cc=joelr1@gmail.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;
as well as URLs for NNTP newsgroup(s).