caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* building 64bit ocaml from cvs on mac osx leopard
@ 2009-03-05 15:00 Joel Reymont
       [not found] ` <006201c99da4$8c51d3a0$a4f57ae0$@com>
  0 siblings, 1 reply; 14+ messages in thread
From: Joel Reymont @ 2009-03-05 15:00 UTC (permalink / raw)
  To: O'Caml Mailing List

Does it actually work?

./configure -cc "gcc -m64"
./build/fastworld.sh
...
boot/ocamlrun ./ocamlopt -nostdlib -c -nopervasives -I stdlib -o
stdlib/pervasives.cmx stdlib/pervasives.ml
/var/folders/pc/pcNEaYn32RW2i++8ZQvErU+++TM/-Tmp-/camlasmce9dc3.s:
602:junk `@PLT' after expression
...
         jmp     _camlPervasives__$5e_136@PLT
...

What am I doing wrong?

     Thanks, Joel

---
http://tinyco.de




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

* Re: [Caml-list] building 64bit ocaml from cvs on mac osx leopard
       [not found] ` <006201c99da4$8c51d3a0$a4f57ae0$@com>
@ 2009-03-05 15:39   ` Joel Reymont
  2009-03-05 16:08     ` Andres Varon
  2009-03-05 18:12     ` Ashish Agarwal
  0 siblings, 2 replies; 14+ messages in thread
From: Joel Reymont @ 2009-03-05 15:39 UTC (permalink / raw)
  To: David Allsopp; +Cc: O'Caml Mailing List


On Mar 5, 2009, at 3:10 PM, David Allsopp wrote:

> Have you tried building the normal way (./configure -cc "gcc -m64"  
> && make
> world bootstrap opt opt.opt install)? fastbuild.sh is experimental  
> IFAIK


Makes no difference.

make libraryopt
cd stdlib; make allopt
../boot/ocamlrun ../ocamlopt -warn-error A -nostdlib -g `./Compflags  
pervasives.cmx` -c pervasives.ml
/var/folders/pc/pcNEaYn32RW2i++8ZQvErU+++TM/-Tmp-/camlasm1dfba1.s: 
602:junk `@PLT' after expression
/var/folders/pc/pcNEaYn32RW2i++8ZQvErU+++TM/-Tmp-/camlasm1dfba1.s: 
633:junk `@PLT' after expression
...
File "pervasives.ml", line 1, characters 0-1:
Error: Assembler error, input left in file /var/folders/pc/ 
pcNEaYn32RW2i++8ZQvErU+++TM/-Tmp-/camlasm1dfba1.s
make[2]: *** [pervasives.cmx] Error 2
make[1]: *** [libraryopt] Error 2
make: *** [opt] Error 2

---
http://tinyco.de
Mac, C++, OCaml




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

* Re: [Caml-list] building 64bit ocaml from cvs on mac osx leopard
  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-05 18:12     ` Ashish Agarwal
  1 sibling, 2 replies; 14+ messages in thread
From: Andres Varon @ 2009-03-05 16:08 UTC (permalink / raw)
  To: Joel Reymont; +Cc: O'Caml Mailing List

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.

Andres

On Mar 5, 2009, at 10:39 AM, Joel Reymont wrote:

>
> On Mar 5, 2009, at 3:10 PM, David Allsopp wrote:
>
>> Have you tried building the normal way (./configure -cc "gcc -m64"  
>> && make
>> world bootstrap opt opt.opt install)? fastbuild.sh is experimental  
>> IFAIK
>
>
> Makes no difference.
>
> make libraryopt
> cd stdlib; make allopt
> ../boot/ocamlrun ../ocamlopt -warn-error A -nostdlib -g `./Compflags  
> pervasives.cmx` -c pervasives.ml
> /var/folders/pc/pcNEaYn32RW2i++8ZQvErU+++TM/-Tmp-/camlasm1dfba1.s: 
> 602:junk `@PLT' after expression
> /var/folders/pc/pcNEaYn32RW2i++8ZQvErU+++TM/-Tmp-/camlasm1dfba1.s: 
> 633:junk `@PLT' after expression
> ...
> File "pervasives.ml", line 1, characters 0-1:
> Error: Assembler error, input left in file /var/folders/pc/ 
> pcNEaYn32RW2i++8ZQvErU+++TM/-Tmp-/camlasm1dfba1.s
> make[2]: *** [pervasives.cmx] Error 2
> make[1]: *** [libraryopt] Error 2
> make: *** [opt] Error 2
>
> ---
> http://tinyco.de
> Mac, C++, OCaml
>
>
>
> _______________________________________________
> Caml-list mailing list. Subscription management:
> http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> Archives: http://caml.inria.fr
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs


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

* Re: [Caml-list] building 64bit ocaml from cvs on mac osx leopard
  2009-03-05 16:08     ` Andres Varon
@ 2009-03-05 16:30       ` Joel Reymont
  2009-03-06 10:40       ` Joel Reymont
  1 sibling, 0 replies; 14+ messages in thread
From: Joel Reymont @ 2009-03-05 16:30 UTC (permalink / raw)
  To: Andres Varon; +Cc: O'Caml Mailing List


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.


I wonder if the OCaml team will move to git at some point in the future.

GitHub is an excellent free platform for hosting open source projects.

They make no requirements as to the license so the OCaml license  
should be perfectly fine.

---
http://tinyco.de
Mac, C++, OCaml




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

* Re: [Caml-list] building 64bit ocaml from cvs on mac osx leopard
  2009-03-05 15:39   ` [Caml-list] " Joel Reymont
  2009-03-05 16:08     ` Andres Varon
@ 2009-03-05 18:12     ` Ashish Agarwal
  2009-03-05 18:27       ` Joel Reymont
  2009-03-06  8:18       ` Nicolas Pouillard
  1 sibling, 2 replies; 14+ messages in thread
From: Ashish Agarwal @ 2009-03-05 18:12 UTC (permalink / raw)
  To: Joel Reymont; +Cc: David Allsopp, O'Caml Mailing List

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

I just did a fresh install and it is working fine for me when I use the
normal method. The ocamlbuild method seems to compile fine, but make install
gives some error. I checked ocamlbuild's log file and the last line says
"Compilation successful", but when I do make install it says "cp: ocamlc: No
such file or directory", although I verified that _build/ocamlc does exist.
This seems like a different error than yours.

On Thu, Mar 5, 2009 at 10:39 AM, Joel Reymont <joelr1@gmail.com> wrote:

>
> On Mar 5, 2009, at 3:10 PM, David Allsopp wrote:
>
>  Have you tried building the normal way (./configure -cc "gcc -m64" && make
>> world bootstrap opt opt.opt install)? fastbuild.sh is experimental IFAIK
>>
>
>
> Makes no difference.
>
> make libraryopt
> cd stdlib; make allopt
> ../boot/ocamlrun ../ocamlopt -warn-error A -nostdlib -g `./Compflags
> pervasives.cmx` -c pervasives.ml
> /var/folders/pc/pcNEaYn32RW2i++8ZQvErU+++TM/-Tmp-/camlasm1dfba1.s:602:junk
> `@PLT' after expression
> /var/folders/pc/pcNEaYn32RW2i++8ZQvErU+++TM/-Tmp-/camlasm1dfba1.s:633:junk
> `@PLT' after expression
> ...
> File "pervasives.ml", line 1, characters 0-1:
> Error: Assembler error, input left in file
> /var/folders/pc/pcNEaYn32RW2i++8ZQvErU+++TM/-Tmp-/camlasm1dfba1.s
> make[2]: *** [pervasives.cmx] Error 2
> make[1]: *** [libraryopt] Error 2
> make: *** [opt] Error 2
>
> ---
> http://tinyco.de
> Mac, C++, OCaml
>
>
>
>
> _______________________________________________
> Caml-list mailing list. Subscription management:
> http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> Archives: http://caml.inria.fr
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
>

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

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

* Re: [Caml-list] building 64bit ocaml from cvs on mac osx leopard
  2009-03-05 18:12     ` Ashish Agarwal
@ 2009-03-05 18:27       ` Joel Reymont
  2009-03-06  8:17         ` Nicolas Pouillard
  2009-03-06  8:18       ` Nicolas Pouillard
  1 sibling, 1 reply; 14+ messages in thread
From: Joel Reymont @ 2009-03-05 18:27 UTC (permalink / raw)
  To: Ashish Agarwal; +Cc: David Allsopp, O'Caml Mailing List

Ashish,

I'm not getting the previous error anymore and my issue is the same as  
yours now.

Reason?

SANITIZE: a total of 749 files that should probably not be in your  
source
   tree has been found. A script shell file "_build/sanitize.sh" is  
being
   created. Check this script and run it to remove unwanted files or  
use other
   options (such as defining hygiene exceptions or using the -no-hygiene
   option).
IMPORTANT: I cannot work with leftover compiled files.
ERROR: Leftover Ocaml compilation files:

On Mar 5, 2009, at 6:12 PM, Ashish Agarwal wrote:

> I just did a fresh install and it is working fine for me when I use  
> the
> normal method. The ocamlbuild method seems to compile fine, but make  
> install
> gives some error. I checked ocamlbuild's log file and the last line  
> says
> "Compilation successful", but when I do make install it says "cp:  
> ocamlc: No
> such file or directory", although I verified that _build/ocamlc does  
> exist.
> This seems like a different error than yours.

---
http://tinyco.de
Mac, C++, OCaml




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

* Re: [Caml-list] building 64bit ocaml from cvs on mac osx leopard
  2009-03-05 18:27       ` Joel Reymont
@ 2009-03-06  8:17         ` Nicolas Pouillard
  2009-03-06  9:13           ` Joel Reymont
  2009-03-06 11:08           ` Joel Reymont
  0 siblings, 2 replies; 14+ messages in thread
From: Nicolas Pouillard @ 2009-03-06  8:17 UTC (permalink / raw)
  To: Joel Reymont; +Cc: Ashish Agarwal, O'Caml Mailing List

Excerpts from Joel Reymont's message of Thu Mar 05 19:27:01 +0100 2009:
> Ashish,
> 
> I'm not getting the previous error anymore and my issue is the same as  
> yours now.
> 
> Reason?
> 
> SANITIZE: a total of 749 files that should probably not be in your  

I recall that moving from one build procedure to another requires
a full clean (make clean ; ./build/distclean.sh).

-- 
Nicolas Pouillard


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

* Re: [Caml-list] building 64bit ocaml from cvs on mac osx leopard
  2009-03-05 18:12     ` Ashish Agarwal
  2009-03-05 18:27       ` Joel Reymont
@ 2009-03-06  8:18       ` Nicolas Pouillard
  1 sibling, 0 replies; 14+ messages in thread
From: Nicolas Pouillard @ 2009-03-06  8:18 UTC (permalink / raw)
  To: Ashish Agarwal; +Cc: Joel Reymont, O'Caml Mailing List

Excerpts from Ashish Agarwal's message of Thu Mar 05 19:12:23 +0100 2009:
> I just did a fresh install and it is working fine for me when I use the
> normal method. The ocamlbuild method seems to compile fine, but make install
> gives some error. I checked ocamlbuild's log file and the last line says
> "Compilation successful", but when I do make install it says "cp: ocamlc: No
> such file or directory", although I verified that _build/ocamlc does exist.
> This seems like a different error than yours.


When using the ocamlbuild procedure, the installation is done via
./build/install.sh.

BTW what were your errors with the `make' procedure?

> 
> On Thu, Mar 5, 2009 at 10:39 AM, Joel Reymont <joelr1@gmail.com> wrote:
> 
> >
> > On Mar 5, 2009, at 3:10 PM, David Allsopp wrote:
> >
> >  Have you tried building the normal way (./configure -cc "gcc -m64" && make
> >> world bootstrap opt opt.opt install)? fastbuild.sh is experimental IFAIK
> >>
> >
> >
> > Makes no difference.
> >
> > make libraryopt
> > cd stdlib; make allopt
> > ../boot/ocamlrun ../ocamlopt -warn-error A -nostdlib -g `./Compflags
> > pervasives.cmx` -c pervasives.ml
> > /var/folders/pc/pcNEaYn32RW2i++8ZQvErU+++TM/-Tmp-/camlasm1dfba1.s:602:junk
> > `@PLT' after expression
> > /var/folders/pc/pcNEaYn32RW2i++8ZQvErU+++TM/-Tmp-/camlasm1dfba1.s:633:junk
> > `@PLT' after expression
> > ...
> > File "pervasives.ml", line 1, characters 0-1:
> > Error: Assembler error, input left in file
> > /var/folders/pc/pcNEaYn32RW2i++8ZQvErU+++TM/-Tmp-/camlasm1dfba1.s
> > make[2]: *** [pervasives.cmx] Error 2
> > make[1]: *** [libraryopt] Error 2
> > make: *** [opt] Error 2
> >
> > ---
> > http://tinyco.de
> > Mac, C++, OCaml
> >
> >
> >
> >
> > _______________________________________________
> > Caml-list mailing list. Subscription management:
> > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> > Archives: http://caml.inria.fr
> > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> > Bug reports: http://caml.inria.fr/bin/caml-bugs
> >

-- 
Nicolas Pouillard


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

* Re: [Caml-list] building 64bit ocaml from cvs on mac osx leopard
  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
  1 sibling, 1 reply; 14+ messages in thread
From: Joel Reymont @ 2009-03-06  9:13 UTC (permalink / raw)
  To: Nicolas Pouillard; +Cc: Ashish Agarwal, O'Caml Mailing List


On Mar 6, 2009, at 8:17 AM, Nicolas Pouillard wrote:

> I recall that moving from one build procedure to another requires
> a full clean (make clean ; ./build/distclean.sh).


./build/distclean && ./configure ... && ./build/fastworld.sh

SANITIZE: a total of 749 files that should probably not be in your  
source
   tree has been found. A script shell file "_build/sanitize.sh" is  
being
   created. Check this script and run it to remove unwanted files or  
use other
   options (such as defining hygiene exceptions or using the -no-hygiene
   option).
IMPORTANT: I cannot work with leftover compiled files.

Once ./_build/sanitize.sh is run, the error is the same as when  
running regular make.

./build/fastworld.sh
...
mkdir asmrun
cp -pf /Users/joelr/Work/ocaml/asmrun/libasmrun.a asmrun/libasmrun.a
cp -p asmrun/libasmrun.a stdlib/libasmrun.a
boot/ocamlrun ./ocamlopt -nostdlib -c -nopervasives -I stdlib -o  
stdlib/pervasives.cmx stdlib/pervasives.ml
/var/folders/pc/pcNEaYn32RW2i++8ZQvErU+++TM/-Tmp-/camlasm6081f1.s: 
602:junk `@PLT' after expression
/var/folders/pc/pcNEaYn32RW2i++8ZQvErU+++TM/-Tmp-/camlasm6081f1.s: 
633:junk `@PLT' after expression
...
/var/folders/pc/pcNEaYn32RW2i++8ZQvErU+++TM/-Tmp-/camlasm6081f1.s: 
2432:junk `@PLT' after expression
File "stdlib/pervasives.ml", line 1, characters 0-1:
Error: Assembler error, input left in file /var/folders/pc/ 
pcNEaYn32RW2i++8ZQvErU+++TM/-Tmp-/camlasm6081f1.s
Exit code 2 while executing this command:
   boot/ocamlrun ./ocamlopt -nostdlib -c -nopervasives -I stdlib -o  
stdlib/pervasives.cmx stdlib/pervasives.ml

And the error?

view /var/folders/pc/pcNEaYn32RW2i++8ZQvErU+++TM/-Tmp-/camlasm6081f1.s  
+2432

         movq    _camlPervasives__1@GOTPCREL(%rip), %rdi
         movq    _caml_register_named_value@GOTPCREL(%rip), %rax
         call    _caml_c_call@PLT
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


---
http://tinyco.de
Mac, C++, OCaml




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

* Re: [Caml-list] building 64bit ocaml from cvs on mac osx leopard
  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
  1 sibling, 1 reply; 14+ messages in thread
From: Joel Reymont @ 2009-03-06 10:40 UTC (permalink / raw)
  To: Andres Varon, Nicolas Pouillard; +Cc: O'Caml Mailing List


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}`

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


---
http://tinyco.de
Mac, C++, OCaml




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

* Re: [Caml-list] building 64bit ocaml from cvs on mac osx leopard
  2009-03-06  8:17         ` Nicolas Pouillard
  2009-03-06  9:13           ` Joel Reymont
@ 2009-03-06 11:08           ` Joel Reymont
  1 sibling, 0 replies; 14+ messages in thread
From: Joel Reymont @ 2009-03-06 11:08 UTC (permalink / raw)
  To: Nicolas Pouillard; +Cc: Ashish Agarwal, O'Caml Mailing List

I was able to build a 64-bit OCaml after adjusting asmcomp/amd64/ 
emit.mlp and using the regular build process, e.g.

make world
make bootstrap
make opt
make opt.opt

The Camlp4 build issue is still there with fastworld.sh.

	Thanks, Joel

---
http://tinyco.de
Mac, C++, OCaml




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

* Re: [Caml-list] building 64bit ocaml from cvs on mac osx leopard
  2009-03-06  9:13           ` Joel Reymont
@ 2009-03-06 14:08             ` nicolas.pouillard
  0 siblings, 0 replies; 14+ messages in thread
From: nicolas.pouillard @ 2009-03-06 14:08 UTC (permalink / raw)
  To: Joel Reymont; +Cc: Ashish Agarwal, O'Caml Mailing List

Excerpts from Joel Reymont's message of Fri Mar 06 10:13:32 +0100 2009:
> 
> On Mar 6, 2009, at 8:17 AM, Nicolas Pouillard wrote:
> 
> > I recall that moving from one build procedure to another requires
> > a full clean (make clean ; ./build/distclean.sh).
> 
> 
> ./build/distclean && ./configure ... && ./build/fastworld.sh

The full clean is (make clean ; ./build/distclean.sh) not just
./build/distclean.sh.

-- 
Nicolas Pouillard


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

* Re: [Caml-list] building 64bit ocaml from cvs on mac osx leopard
  2009-03-06 10:40       ` Joel Reymont
@ 2009-03-06 14:22         ` nicolas.pouillard
  2009-03-06 14:48           ` Joel Reymont
  0 siblings, 1 reply; 14+ messages in thread
From: nicolas.pouillard @ 2009-03-06 14:22 UTC (permalink / raw)
  To: Joel Reymont; +Cc: Andres Varon, O'Caml Mailing List

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


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

* Re: [Caml-list] building 64bit ocaml from cvs on mac osx leopard
  2009-03-06 14:22         ` nicolas.pouillard
@ 2009-03-06 14:48           ` Joel Reymont
  0 siblings, 0 replies; 14+ messages in thread
From: Joel Reymont @ 2009-03-06 14:48 UTC (permalink / raw)
  To: nicolas.pouillard; +Cc: Andres Varon, O'Caml Mailing List

make clean && build/distclean.sh && configure ... && build/fastworld.sh

^^^^ builds without an issue, again once emit.mlp is fixed.

On Mar 6, 2009, at 2:22 PM, nicolas.pouillard wrote:

>> + 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

---
http://tinyco.de
Mac, C++, OCaml




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

end of thread, other threads:[~2009-03-06 14:48 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-05 15:00 building 64bit ocaml from cvs on mac osx leopard 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
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

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