caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Re: [Caml-list] [rpi] opam switch to get ocamlopt on RPi with raspbian
@ 2013-05-22 14:39 Florent Monnier
  2013-05-22 14:49 ` Alain Frisch
  0 siblings, 1 reply; 8+ messages in thread
From: Florent Monnier @ 2013-05-22 14:39 UTC (permalink / raw)
  To: Caml List

2013/5/22, Anil Madhavapeddy:
> On 22 May 2013, at 12:30, Florent Monnier wrote:
[...]
>> So I thought to try to:
>> opam switch 4.00.1
>
> 4.00.1 (released) is not the same as 4.01.  Try:
>
> $ opam switch 4.01.0dev+trunk
>
> ...which will give you a trunk compiler with all of the ARM fixes included.
> Benedikt has committed several more fixes since the original one, so trunk
> is generally in much better shape.  These changes will be in OCaml-4.1 when
> it's released.


So this is what I tryed, but got this error:

pi@raspberrypi ~ $ opam switch 4.01.0dev+trunk
[...]
boot/ocamlrun boot/ocamlc -nostdlib -I boot -strict-sequence -w
+33..39 -warn-error A -I utils -I parsing -I typing -I bytecomp -I
asmcomp -I driver -I toplevel -c asmcomp/closure.ml
boot/ocamlrun boot/ocamlc -nostdlib -I boot -strict-sequence -w
+33..39 -warn-error A -I utils -I parsing -I typing -I bytecomp -I
asmcomp -I driver -I toplevel -c asmcomp/cmmgen.mli
boot/ocamlrun boot/ocamlc -nostdlib -I boot -strict-sequence -w
+33..39 -warn-error A -I utils -I parsing -I typing -I bytecomp -I
asmcomp -I driver -I toplevel -c asmcomp/cmmgen.ml
make[2]: Leaving directory `/home/pi/.opam/4.01.0dev+trunk/build/ocaml'
make[1]: Leaving directory `/home/pi/.opam/4.01.0dev+trunk/build/ocaml'
### stderr ###
...[truncated]
be selected if the type becomes unknown.
File "asmcomp/cmmgen.ml", line 458, characters 23-35:
Warning 40: Record_float was selected from type Types.record_representation.
It is not visible in the current scope, and will not
be selected if the type becomes unknown.
File "asmcomp/cmmgen.ml", line 1:
Error: Error-enabled warnings (2 occurrences)
make[2]: *** [asmcomp/cmmgen.cmo] Error 2
make[1]: *** [opt-core] Error 2
make: *** [world.opt] Error 2


-- 
Thanks in advance

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

* Re: [Caml-list] [rpi] opam switch to get ocamlopt on RPi with raspbian
  2013-05-22 14:39 [Caml-list] [rpi] opam switch to get ocamlopt on RPi with raspbian Florent Monnier
@ 2013-05-22 14:49 ` Alain Frisch
  2013-05-22 14:57   ` Daniel Bünzli
  2013-05-22 17:15   ` Florent Monnier
  0 siblings, 2 replies; 8+ messages in thread
From: Alain Frisch @ 2013-05-22 14:49 UTC (permalink / raw)
  To: Florent Monnier, Caml List

The trunk was temporarily broken.  Please try again!  (if OPAM gets a 
copy on the trunk only once in a while, you might need to wait a little 
longer)

-- Alain

On 05/22/2013 04:39 PM, Florent Monnier wrote:
> 2013/5/22, Anil Madhavapeddy:
>> On 22 May 2013, at 12:30, Florent Monnier wrote:
> [...]
>>> So I thought to try to:
>>> opam switch 4.00.1
>>
>> 4.00.1 (released) is not the same as 4.01.  Try:
>>
>> $ opam switch 4.01.0dev+trunk
>>
>> ...which will give you a trunk compiler with all of the ARM fixes included.
>> Benedikt has committed several more fixes since the original one, so trunk
>> is generally in much better shape.  These changes will be in OCaml-4.1 when
>> it's released.
>
>
> So this is what I tryed, but got this error:
>
> pi@raspberrypi ~ $ opam switch 4.01.0dev+trunk
> [...]
> boot/ocamlrun boot/ocamlc -nostdlib -I boot -strict-sequence -w
> +33..39 -warn-error A -I utils -I parsing -I typing -I bytecomp -I
> asmcomp -I driver -I toplevel -c asmcomp/closure.ml
> boot/ocamlrun boot/ocamlc -nostdlib -I boot -strict-sequence -w
> +33..39 -warn-error A -I utils -I parsing -I typing -I bytecomp -I
> asmcomp -I driver -I toplevel -c asmcomp/cmmgen.mli
> boot/ocamlrun boot/ocamlc -nostdlib -I boot -strict-sequence -w
> +33..39 -warn-error A -I utils -I parsing -I typing -I bytecomp -I
> asmcomp -I driver -I toplevel -c asmcomp/cmmgen.ml
> make[2]: Leaving directory `/home/pi/.opam/4.01.0dev+trunk/build/ocaml'
> make[1]: Leaving directory `/home/pi/.opam/4.01.0dev+trunk/build/ocaml'
> ### stderr ###
> ...[truncated]
> be selected if the type becomes unknown.
> File "asmcomp/cmmgen.ml", line 458, characters 23-35:
> Warning 40: Record_float was selected from type Types.record_representation.
> It is not visible in the current scope, and will not
> be selected if the type becomes unknown.
> File "asmcomp/cmmgen.ml", line 1:
> Error: Error-enabled warnings (2 occurrences)
> make[2]: *** [asmcomp/cmmgen.cmo] Error 2
> make[1]: *** [opt-core] Error 2
> make: *** [world.opt] Error 2
>
>


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

* Re: [Caml-list] [rpi] opam switch to get ocamlopt on RPi with raspbian
  2013-05-22 14:49 ` Alain Frisch
@ 2013-05-22 14:57   ` Daniel Bünzli
  2013-05-22 16:18     ` Marek Kubica
  2013-05-22 17:15   ` Florent Monnier
  1 sibling, 1 reply; 8+ messages in thread
From: Daniel Bünzli @ 2013-05-22 14:57 UTC (permalink / raw)
  To: Florent Monnier; +Cc: Caml List, Alain Frisch

Le mercredi, 22 mai 2013 à 15:49, Alain Frisch a écrit :
> The trunk was temporarily broken. Please try again! (if OPAM gets a  
> copy on the trunk only once in a while, you might need to wait a little  
> longer)

Note Florent that this won't change anything to our original problem. To compile ocaml (camlp4 to be precise) on a raspberry pi you need to increase and activate the swap as suggested in my previous message.  

Best,

Daniel



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

* Re: [Caml-list] [rpi] opam switch to get ocamlopt on RPi with raspbian
  2013-05-22 14:57   ` Daniel Bünzli
@ 2013-05-22 16:18     ` Marek Kubica
  2013-05-22 16:48       ` Daniel Bünzli
  0 siblings, 1 reply; 8+ messages in thread
From: Marek Kubica @ 2013-05-22 16:18 UTC (permalink / raw)
  To: Caml List

On Wed, 22 May 2013 15:57:35 +0100
Daniel Bünzli <daniel.buenzli@erratique.ch> wrote:

> Le mercredi, 22 mai 2013 à 15:49, Alain Frisch a écrit :
> > The trunk was temporarily broken. Please try again! (if OPAM gets
> > a copy on the trunk only once in a while, you might need to wait a
> > little longer)
> 
> Note Florent that this won't change anything to our original problem.
> To compile ocaml (camlp4 to be precise) on a raspberry pi you need to
> increase and activate the swap as suggested in my previous message.  

No need to increase swap, I built 4.00.1+rpi (the 4.00.1 with the ARM
patch for the RPi) on a 512 MB Raspberry Pi with the default 100 MB
swap that Raspbian creates.

regards,
Marek

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

* Re: [Caml-list] [rpi] opam switch to get ocamlopt on RPi with raspbian
  2013-05-22 16:18     ` Marek Kubica
@ 2013-05-22 16:48       ` Daniel Bünzli
  2013-05-22 17:30         ` Florent Monnier
  0 siblings, 1 reply; 8+ messages in thread
From: Daniel Bünzli @ 2013-05-22 16:48 UTC (permalink / raw)
  To: Marek Kubica; +Cc: Caml List

Le mercredi, 22 mai 2013 à 17:18, Marek Kubica a écrit :
> No need to increase swap, I built 4.00.1+rpi (the 4.00.1 with the ARM
> patch for the RPi) on a 512 MB Raspberry Pi with the default 100 MB
> swap that Raspbian creates.

I don't know if that changed recently but a few month ago there was no swap in the raspbian distributed from raspberrypi.org (to avoid wearing the sdcard).  

Besides if you actually read the segfault that was in Florent's initial message, it's exactly the one that occurs when the system gets out of memory during camlp4's compilation.  

Best,

Daniel



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

* Re: [Caml-list] [rpi] opam switch to get ocamlopt on RPi with raspbian
  2013-05-22 14:49 ` Alain Frisch
  2013-05-22 14:57   ` Daniel Bünzli
@ 2013-05-22 17:15   ` Florent Monnier
  1 sibling, 0 replies; 8+ messages in thread
From: Florent Monnier @ 2013-05-22 17:15 UTC (permalink / raw)
  To: Caml List

2013/05/22, Alain Frisch:
> The trunk was temporarily broken.  Please try again!  (if OPAM gets a
> copy on the trunk only once in a while, you might need to wait a little
> longer)

Here is the error that I get now:

pi@raspberrypi ~ $ opam switch 4.01.0dev+trunk

+ ./boot/ocamlrun boot/myocamlbuild byte_stdlib_mixed_mode ocamlc
lex/ocamllex camlp4/Camlp4/Camlp4Ast.partial.ml
camlp4/boot/camlp4boot.byte camlp4/Camlp4.cmo camlp4/Camlp4Top.cmo
camlp4/camlp4prof.byte camlp4/mkcamlp4.byte camlp4/camlp4.byte
camlp4/camlp4fulllib.cma camlp4/camlp4boot.byte camlp4/camlp4boot.cma
camlp4/camlp4r.byte camlp4/camlp4r.cma camlp4/camlp4rf.byte
camlp4/camlp4rf.cma camlp4...[truncated]

+ ./boot/ocamlrun boot/myocamlbuild native_stdlib_mixed_mode ocamlopt
lex/ocamllex ocamlbuild/ocamlbuildlib.cmxa
ocamlbuild/ocamlbuildlightlib.cmxa ocamlbuild/ocamlbuild.native
ocamlbuild/ocamlbuildlight.native
+ STDLIB_MODULES=Pervasives,Arg,Array,Buffer,Char,Digest,Filename,Format,Hashtbl,Lazy,Lexing,List,Map,Printexc,Printf,Scanf,Set,String,Sys,Parsing,Int32,Int64,Nativeint,Obj,Queue,Sort,Stream,Stack

+ ./boot/ocamlrun boot/myocamlbuild -ignore
Pervasives,Arg,Array,Buffer,Char,Digest,Filename,Format,Hashtbl,Lazy,Lexing,List,Map,Printexc,Printf,Scanf,Set,String,Sys,Parsing,Int32,Int64,Nativeint,Obj,Queue,Sort,Stream,Stack
native_stdlib_mixed_mode ocamlopt lex/ocamllex
camlp4/Camlp4/Camlp4Ast.partial.ml camlp4/boot/camlp4boot.byte
camlp4/Camlp4.cmx camlp4/Camlp4Top.cmx camlp4/camlp4prof.native
ca...[truncated]
Killed
make[1]: *** [camlp4opt] Error 137
make: *** [world.opt] Error 2


Maybe Opam could provide binary packages for RPi?

-- 
Cheers

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

* Re: [Caml-list] [rpi] opam switch to get ocamlopt on RPi with raspbian
  2013-05-22 16:48       ` Daniel Bünzli
@ 2013-05-22 17:30         ` Florent Monnier
  2013-05-22 17:49           ` Daniel Bünzli
  0 siblings, 1 reply; 8+ messages in thread
From: Florent Monnier @ 2013-05-22 17:30 UTC (permalink / raw)
  To: Caml List

2013/05/22, Daniel Bünzli:
> Le mercredi, 22 mai 2013 à 17:18, Marek Kubica a écrit :
>> No need to increase swap, I built 4.00.1+rpi (the 4.00.1 with the ARM
>> patch for the RPi) on a 512 MB Raspberry Pi with the default 100 MB
>> swap that Raspbian creates.
>
> I don't know if that changed recently but a few month ago there was no swap
> in the raspbian distributed from raspberrypi.org (to avoid wearing the
> sdcard).
>
> Besides if you actually read the segfault that was in Florent's initial
> message, it's exactly the one that occurs when the system gets out of memory
> during camlp4's compilation.

In /boot/config I put:
gpu_mem_512=192
My swap is twice the RAM (512 * 2) which is what was adviced to my by
the other RPi users in my LUG.

Should I reduce the GPU memory?
Or remove the swap?

--

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

* Re: [Caml-list] [rpi] opam switch to get ocamlopt on RPi with raspbian
  2013-05-22 17:30         ` Florent Monnier
@ 2013-05-22 17:49           ` Daniel Bünzli
  0 siblings, 0 replies; 8+ messages in thread
From: Daniel Bünzli @ 2013-05-22 17:49 UTC (permalink / raw)
  To: Florent Monnier; +Cc: Caml List



Le mercredi, 22 mai 2013 à 18:30, Florent Monnier a écrit :

> In /boot/config I put:
> gpu_mem_512=192
> My swap is twice the RAM (512 * 2) which is what was adviced to my by
> the other RPi users in my LUG.
>  
> Should I reduce the GPU memory?
> Or remove the swap?

Again, follow the instructions here, it will work perfectly:

https://github.com/OCamlPro/opam/issues/493#issuecomment-13950204

No need to touch the GPU memory. Set the swap size to something like 2G to compile ocaml and then set it back to the value it was initially (I'm sorry I don't have a system under hand to clearly state what variable but I think the variable to edit should something like CONF_SWAPSIZE=2048).  

Check the status with something like:  

 swapon -s  
 free -h  
  
Best,

Daniel



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

end of thread, other threads:[~2013-05-22 17:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-22 14:39 [Caml-list] [rpi] opam switch to get ocamlopt on RPi with raspbian Florent Monnier
2013-05-22 14:49 ` Alain Frisch
2013-05-22 14:57   ` Daniel Bünzli
2013-05-22 16:18     ` Marek Kubica
2013-05-22 16:48       ` Daniel Bünzli
2013-05-22 17:30         ` Florent Monnier
2013-05-22 17:49           ` Daniel Bünzli
2013-05-22 17:15   ` Florent Monnier

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