Re: [Caml-list] Compiling OCaml under OS X 10.6

2009-09-02 Thread Andres Varon


On Sep 1, 2009, at 12:32 PM, John Whitington wrote:


Hi Folks,

Has anyone managed this? Bytecode seems fine, native not so.

I've tried just ./configure and ./configure -cc gcc -m64 with the  
source bzip of 3.11.1 as suggested in INSTALL. Both compile fine,  
but give:


feast:trunk john$ ocamlopt -c a.ml
feast:trunk john$ ocamlopt -o a a.cmx
ld: warning: in libasmrun.a, file is not of required architecture
Undefined symbols:
 _caml_ml_set_binary_mode, referenced from:
 .L139 in stdlib.a(pervasives.o)
 .L157 in stdlib.a(pervasives.o)
 _camlPervasives__102 in stdlib.a(pervasives.o)
 _camlPervasives__102 in stdlib.a(pervasives.o)
... (several hundred more lines)

This is with XCode 3.2 64-bit (from the Snow Leopard DVD), the gcc  
is i686-apple-darwin10-gcc-4.2.1.


lipo -info libasmrun.a gives:
input file /usr/local/lib/ocaml/libasmrun.a is not a fat file
Non-fat file: /usr/local/lib/ocaml/libasmrun.a is architecture: x86_64

One possibly-salient error from the build:
ld: warning: -read_only_relocs cannot be used with x86_64

Configure log: http://www.coherentpdf.com/configure.txt
make world.opt log: http://www.coherentpdf.com/build.txt



I just installed Snow Leopard in my laptop and the x86_64 ocaml  
appears to work fine. I noticed that in your configure log the gcc  
compiler is still listed at the end as 'gcc', while in mine it is 'gcc  
-m64'. Perhaps you need to cleanup with 'make distclean'  and  
reconfigure before compiling the x86_64 target?





Another question: Can I build a version of OCaml from these sources  
which isn't 64-bit so I can build code which will run on 10.5/10.4?



Previous versions of gcc in Mac OS X allowed you to pass the -mmacosx- 
version-min=10.4 option to target the minimum API that you wanted to  
support. I suppose this still works with the gcc 4.2.1 included in  
XCode 3.2, but haven't tried it yet.


Andres



Cheers,

--
John Whitington
Coherent Graphics Ltd
http://www.coherentpdf.com/

___
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




smime.p7s
Description: S/MIME cryptographic signature
___
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


Re: [Caml-list] can anyone replicate this camlp4 problem?

2009-03-25 Thread Andres Varon


On Mar 25, 2009, at 3:55 PM, Peng Zang wrote:


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi, camlp4 seems to break parsing of object duplication on 3.11.   
Can anyone
replicate this problem?  Is this an known issue?  A quick google  
search did

not reveal anything..


Yeah. I reported the bug here:

http://caml.inria.fr/mantis/view.php?id=4673

Andres



Peng


 Objective Caml version 3.11.0

 # #use topfind;;
 Findlib has been successfully loaded. Additional directives:
   #require package;;  to load a package
   #list;;   to list the available packages
   #camlp4o;;to load camlp4 (standard syntax)
   #camlp4r;;to load camlp4 (revised syntax)
   #predicates p,q,...;;   to set these predicates
   Topfind.reset();; to force that packages will be reloaded
   #thread;; to enable threads

 # #camlp4o;;
 /home/peng/app-data/godi-3.11/lib/ocaml/std-lib/dynlink.cma: loaded
 /home/peng/app-data/godi-3.11/lib/ocaml/std-lib/camlp4: added to  
search path
 /home/peng/app-data/godi-3.11/lib/ocaml/std-lib/camlp4/camlp4o.cma:  
loaded

 Camlp4 Parsing version 3.11.0

 # class functional_point x y = object
 val x = x
 val y = y
 method get_x = x
 method get_y = y
 method move dx dy = { x = x + dx; y = y + dy }
   end;;
   Characters 138-144:
 method move dx dy = { x = x + dx; y = y + dy }
^^
 Warning S: this expression should have type unit.
 Characters 146-156:
 method move dx dy = { x = x + dx; y = y + dy }
^^
 Error: This expression has type bool but is here used with type int
 #
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.7 (GNU/Linux)

iD8DBQFJyoxPfIRcEFL/JewRAg8TAKCjoxTmDmfLxVHa7sXq0tGlt2rKDgCgp/C2
nc4vnKWkTvKXeR4Q0z4XB94=
=IwA+
-END PGP SIGNATURE-

___
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


___
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


Re: [Caml-list] building 64bit ocaml from cvs on mac osx leopard

2009-03-05 Thread Andres Varon
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


___
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


Re: [Caml-list] Re: Portable Ocaml multiprocessing?

2009-01-28 Thread Andres Varon


On Jan 28, 2009, at 5:35 PM, Sylvain Le Gall wrote:


On 28-01-2009, Dmitry Bely dmitry.b...@gmail.com wrote:

There are numerous environments/libraries that support process-based
Ocaml multiprocessing: jocaml, OCamlP3l, OcamlMPI (and probably
others). Do I get it right that all of them are Unix-only?



jocaml and ocamlp3l seems indeed unix only. I think however that there
is no reason that MPI cannot be used on Windows (I assume this is your
question). Maybe it will require some additional work.


OcamlMPI in windows works fine. I have distributed software using  
mpich2 for that platform with no problem, and the same code runs in OS  
X, Linux, and Windows workstations, as well as clusters using a  
variety of operating systems. Very portable.


Andres




Regards,
Sylvain Le Gall

___
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


___
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


Re: [Caml-list] OCaml 3.11.0 release candidate

2008-11-28 Thread Andres Varon

Hello,

On Nov 25, 2008, at 12:09 PM, Damien Doligez wrote:


Dear OCaml users,

We are closing in on version 3.11.0.  A Release Candidate is now  
available.
If there are no show-stoppers in this RC, then 3.11.0 will be  
officially

released next week.

The release candidate is available here:
 http://caml.inria.fr/pub/distrib/ocaml-3.11/ 
(look for 3.11.0+rc1)


I have a question about the behavior of camlp4orf (and family) in  
3.11.0. Now with the availability of native dynlink, it seems like  
camlp4orf and camlp4orf.opt can load external modules inside the core.  
If one looks at their respective help:


file.(cmo|cma) Load this module inside the Camlp4 core
file.cmx   Load this module inside the Camlp4 core

This is a feature I've been looking for to speedup compilation times.  
However, if I try the native version, here is what I get:


samson:src andres$ camlp4orf.opt poyExtension.cmx
Error: don't know what to do with poyExtension.cmx
Use option -help for usage

Is the usage different for the camlp4*.opt preprocessors?

best,

Andres






As usual, we need a few brave souls to try and install it on their
favourite architecture and report the result to me.

Happy hacking,

-- Damien Doligez for the OCaml team.

___
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


___
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


Re: [Caml-list] OCaml 3.11.0 release candidate

2008-11-26 Thread Andres Varon


On Nov 26, 2008, at 12:38 PM, Andres Varon wrote:



On Nov 26, 2008, at 12:05 PM, Xavier Leroy wrote:

So far our tests have compiled and run successfully in most  
platforms

[1] excepting Windows 64 bits (but it's the first time I attempt to
compile in this architecture). I am getting this error message:


There are two problems with Windows 64 that I forgot to fix before
this RC1 release; this is one of them.  A patch is available at

http://gallium.inria.fr/~xleroy/ocaml-3.11rc1-win64.patch



Thanks. This time the compilation went further, but failed with the  
errors below.


Answering myself, the problem is my own specification of the cl  
command line. Shouldn't have added those /I options. Clearly I'm not  
comfortable in this environment ...


best,

Andres






[EMAIL PROTECTED] ~/ocaml-3.11.0+rc1
$ make -f Makefile.nt  world

make[1]: Entering directory `/home/andres/ocaml-3.11.0+rc1/stdlib'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/andres/ocaml-3.11.0+rc1/stdlib'
for i in win32unix systhreads str num win32graph dynlink bigarray;  
do make -f Ma

kefile.nt  -C otherlibs/$i all; done
make[1]: Entering directory `/home/andres/ocaml-3.11.0+rc1/ 
otherlibs/win32unix'
cl /nologo -D_CRT_SECURE_NO_DEPRECATE /I 'C:/Program Files/ 
Microsoft Platform SD
K/Include/crt'  /I 'C:/Program Files/Microsoft Platform SDK/ 
Include' /Ox /MD -I.

./../byterun  -I../unix -c accept.c
accept.c
accept.c(58) : error C2146: syntax error : missing ';' before  
identifier 'fd'

make[1]: *** [accept.obj] Error 2
make[1]: Leaving directory `/home/andres/ocaml-3.11.0+rc1/otherlibs/ 
win32unix'
make[1]: Entering directory `/home/andres/ocaml-3.11.0+rc1/ 
otherlibs/systhreads'


cl /nologo -D_CRT_SECURE_NO_DEPRECATE /I 'C:/Program Files/ 
Microsoft Platform SD
K/Include/crt'  /I 'C:/Program Files/Microsoft Platform SDK/ 
Include' /Ox /MD -I.

./../byterun  -c win32.c
win32.c
win32.c(217) : error C2037: left of 'mutex' specifies undefined  
struct/union 'ch

annel'
win32.c(225) : error C2037: left of 'mutex' specifies undefined  
struct/union 'ch

annel'
win32.c(228) : error C2037: left of 'mutex' specifies undefined  
struct/union 'ch

annel'
win32.c(231) : error C2037: left of 'mutex' specifies undefined  
struct/union 'ch

annel'
win32.c(231) : error C2198: 'WaitForSingleObject' : too few  
arguments for call t

hrough pointer-to-function
win32.c(236) : error C2037: left of 'mutex' specifies undefined  
struct/union 'ch

annel'
win32.c(236) : warning C4022: 'WaitForSingleObject' : pointer  
mismatch for actua

l parameter 1
win32.c(236) : error C2198: 'WaitForSingleObject' : too few  
arguments for call t

hrough pointer-to-function
win32.c(248) : error C2037: left of 'mutex' specifies undefined  
struct/union 'ch

annel'
win32.c(248) : error C2198: 'ReleaseMutex' : too few arguments for  
call through

pointer-to-function
win32.c(328) : error C2065: 'caml_channel_mutex_free' : undeclared  
identifier
win32.c(328) : warning C4047: '=' : 'int' differs in levels of  
indirection from

'void (__cdecl *)(channel *)'
win32.c(329) : error C2065: 'caml_channel_mutex_lock' : undeclared  
identifier
win32.c(329) : warning C4047: '=' : 'int' differs in levels of  
indirection from

'void (__cdecl *)(channel *)'
win32.c(330) : error C2065: 'caml_channel_mutex_unlock' :  
undeclared identifier
win32.c(330) : warning C4047: '=' : 'int' differs in levels of  
indirection from

'void (__cdecl *)(channel *)'
win32.c(331) : error C2065: 'caml_channel_mutex_unlock_exn' :  
undeclared identif

ier
win32.c(331) : warning C4047: '=' : 'int' differs in levels of  
indirection from

'void (__cdecl *)(void)'
make[1]: *** [win32_b.obj] Error 2
make[1]: Leaving directory `/home/andres/ocaml-3.11.0+rc1/otherlibs/ 
systhreads'
make[1]: Entering directory `/home/andres/ocaml-3.11.0+rc1/ 
otherlibs/str'
cl /nologo -D_CRT_SECURE_NO_DEPRECATE /I 'C:/Program Files/ 
Microsoft Platform SD
K/Include/crt'  /I 'C:/Program Files/Microsoft Platform SDK/ 
Include' /Ox /MD -I.

./../byterun   -c strstubs.c
strstubs.c
strstubs.c(294) : warning C4047: 'initializing' : 'backtrack_stack  
*' differs in

levels of indirection from 'int'
strstubs.c(345) : error C2065: 'res' : undeclared identifier
strstubs.c(346) : error C2143: syntax error : missing ';' before  
'type'
strstubs.c(347) : error C2143: syntax error : missing ';' before  
'type'
strstubs.c(348) : error C2143: syntax error : missing ';' before  
'type'
strstubs.c(349) : error C2143: syntax error : missing ';' before  
'type'

strstubs.c(351) : error C2065: 'n' : undeclared identifier
strstubs.c(352) : error C2065: 'i' : undeclared identifier
strstubs.c(353) : error C2065: 'group' : undeclared identifier
strstubs.c(353) : warning C4047: '=' : 'int' differs in levels of  
indirection fr

om 're_group *'
strstubs.c(354) : error C2223: left of '-start' must point to  
struct/union
strstubs.c(354) : error C2223: left of '-end' must point to struct/ 
union
strstubs.c(358

Re: [Caml-list] OCaml 3.11.0 release candidate

2008-11-26 Thread Andres Varon


On Nov 26, 2008, at 12:05 PM, Xavier Leroy wrote:


So far our tests have compiled and run successfully in most platforms
[1] excepting Windows 64 bits (but it's the first time I attempt to
compile in this architecture). I am getting this error message:


There are two problems with Windows 64 that I forgot to fix before
this RC1 release; this is one of them.  A patch is available at

http://gallium.inria.fr/~xleroy/ocaml-3.11rc1-win64.patch

The CVS release branch contains this fix.


The patch was successful and OCaml has compiled cleanly.

best,

Andres




Regards,

- Xavier Leroy


___
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


Re: [Caml-list] What does Jane Street use/want for an IDE? What about you?

2008-10-20 Thread Andres Varon


On Oct 20, 2008, at 9:37 AM, Mark Shinwell wrote:


On Mon, Oct 20, 2008 at 09:19:40AM -0400, Kuba Ober wrote:

I have questions to the kind folks at Jane Street,
and others who use OCaml for commercial/non-research
development: what do you guys use for your development
environment?


vim in an xterm for me :)


What are killer features you dream of?


Something along the lines of Jun Furuse's ocamlspotter work, with good
editor integration, is probably highest on my list at the moment.


Being a vim user myself, good editor integration is also very  
important to me. My wish list has only one killer feature: smart  
autocompletion, that would really increase the productivity of new  
programmers and would make it easier to learn new modules.


Andres




Mark

___
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


___
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


Re: [Caml-list] ocamlopt performance in 3.11

2008-10-17 Thread Andres Varon


On Oct 17, 2008, at 5:59 AM, David Allsopp wrote:

Pleased to say that I've got my 3 current projects compiled and  
running

under 3.11+beta1

Unfortunately for one of the projects, its reference run (a
computationally intensive, repeatable operation the speed of which  
interests
me) has gone from repeatedly taking ~38 seconds in 3.10.2 to ~46  
seconds in
3.11.0+beta1. The other two projects don't have as easy a way for me  
to
calibrate speed (they spend most of their time blocked on I/O  
anyway!).


Has anything apart from the linker changed much in the 3.11 code  
generator

and has anyone else noticed a performance drop in any other programs?


The Changes list do mention a number of important changes in the  
runtime system.


For most of my programs the bottleneck functions are implemented in C.  
For one of the few cases where OCaml is taking care of the core loop,  
ocaml 3.11.0beta1 produce a consistently slower native executable than  
3.10.2 by a very small factor (around 0.5%). I have not timed in  
Windows, and I run Windows inside a virtual machine, so I'm not sure  
if the differences I will observe there are just an artifact of that  
setup.


Andres

My setup:

System Software Overview:

  System Version: Mac OS X 10.5.5 (9F33)
  Kernel Version: Darwin 9.5.0
  XCode: 3.1.1

Hardware Overview:

  Model Name: Mac Pro
  Model Identifier: MacPro2,1
  Processor Name: Quad-Core Intel Xeon
  Processor Speed: 3 GHz
  Number Of Processors: 2
  Total Number Of Cores: 8
  L2 Cache (per processor): 8 MB
  Memory: 16 GB
  Bus Speed: 1.33 GHz







David

(Machine setup: Windows XP SP3 + MinGW/gcc 3.4.4 running on an Intel  
Core

Duo T7200 @ 2GHz with 2GB RAM)

___
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


___
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


Re: [Caml-list] OCaml version 3.11.0+beta1

2008-10-16 Thread Andres Varon


On Oct 16, 2008, at 5:58 AM, David Allsopp wrote:


Both the MSVC and MinGW ports seem to have an error in the Makefile -
they're linking against tk83.dll and tcl83.dll - the OCaml 3.10.2  
line to

link against tk84.lib and tcl84.lib is commented out.

Changing the Makefile to link against tk84.dll and tcl84.dll seems  
to fix

the problem.


Did you manage to do it with *.dll or *.lib? I don't have those dll's  
and have been unable to compile the MinGW port with a setup that  
succeeded since 3.09.3. I keep getting:


Cannot export tcl84_NULL_THUNK_DATA: symbol not found

Could it be a path issue? Could you please show me an example of the a  
path that you are using successfully?



Andres

___
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


Re: [Caml-list] OCaml version 3.11.0+beta1

2008-10-16 Thread Andres Varon


On Oct 16, 2008, at 12:22 PM, Andres Varon wrote:



On Oct 16, 2008, at 5:58 AM, David Allsopp wrote:


Both the MSVC and MinGW ports seem to have an error in the Makefile -
they're linking against tk83.dll and tcl83.dll - the OCaml 3.10.2  
line to

link against tk84.lib and tcl84.lib is commented out.

Changing the Makefile to link against tk84.dll and tcl84.dll seems  
to fix

the problem.


Did you manage to do it with *.dll or *.lib? I don't have those  
dll's and have been unable to compile the MinGW port with a setup  
that succeeded since 3.09.3. I keep getting:


Cannot export tcl84_NULL_THUNK_DATA: symbol not found

Could it be a path issue? Could you please show me an example of the  
a path that you are using successfully?


Let me clarify what I'm asking: I have in config/Makefile

TK_ROOT=c:/tcl

Do you write your paths somehow differently there? In all honesty I  
don't think that this is a wrongly written path (there are no  
complains of not finding the libraries), but I'm clueless and I don't  
have enough experience in Windows.


best,

Andres





Andres


___
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


Re: [Caml-list] OCaml version 3.11.0+beta1

2008-10-16 Thread Andres Varon


On Oct 16, 2008, at 12:31 PM, Andres Varon wrote:

Changing the Makefile to link against tk84.dll and tcl84.dll seems  
to fix

the problem.


Did you manage to do it with *.dll or *.lib? I don't have those  
dll's and have been unable to compile the MinGW port with a setup  
that succeeded since 3.09.3. I keep getting:


Cannot export tcl84_NULL_THUNK_DATA: symbol not found

Could it be a path issue? Could you please show me an example of  
the a path that you are using successfully?




To answer myself: the path is not anymore lib/tcl84.lib but bin/ 
tcl84.dll and correspondingly to tk. Sorry for the noise.


Andres

___
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


Re: [Caml-list] OCaml version 3.11.0+beta1

2008-10-15 Thread Andres Varon


On Oct 15, 2008, at 9:40 AM, Damien Doligez wrote:


Dear OCaml Users,

We are pleased to celebrate the birthday of Friedrich Nietzsche
by releasing OCaml version 3.11.0+beta1.  We need YOU to test
it thoroughly and report any problems you might have.  Does
your favorite software work with it?



Thanks for the good work. I would like to know exactly what  
architectures support the native Dynlink? I did not see this  
information in the release notes.


I need to update configure scripts to include it or not in the link  
step because dynlink.cmxa is needed by camlp4fulllib.cmxa, but now I  
realize that it's not just a matter of having OCaml = 3.11.


many thanks again,

Andres




It is available as a source release only (plus documentation),
from this address:
 http://caml.inria.fr/pub/distrib/ocaml-3.11/ 

It is also available from our CVS server at:
 http://camlcvs.inria.fr/ 
Use tag ocaml3110beta1 to get the beta release, and tag
release311 to track the bug fixes between this and the
final release of 3.11.0.

Have fun and PLEASE send us some feedback, positive or negative.


-- The OCaml team.


- Camlp5 HOW-TO 

Camlp5 version 5.09 does not work with OCaml 3.11.0+beta1 out of the
box.  A new version compatible with OCaml 3.11.0 should be released
very soon.  In the meantime you can use the following commands (in the
root directory of the Camlp5 5.09 sources) to compile Camlp5 5.09 with
OCaml 3.11.0+beta1.  Note that you will need to provide the path name
to a copy of the OCaml 3.11.0+beta1 sources at the line labelled
HERE.


cp -R ocaml_stuff/3.11 ocaml_stuff/3.11.0
cp ocaml_src/main/ast2pt.ml_3.11 ocaml_src/main/ast2pt.ml_3.11.0
ed main/ast2pt.ml -EOF
 g/OCAML_3_11/s// OR OCAML_3_11_0/
 wq
EOF
ed top/rprint.ml -EOF
 g/OCAML_3_11/s// OR OCAML_3_11_0/
 wq
EOF
./configure --transitional
make steal OCAML_SRC=path-to-ocaml-source-dir  # HERE
make core
make bootstrap_sources
./configure --transitional
make world.opt

That's all.  Now you can make install as usual.

___
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


___
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


Re: [Caml-list] OCaml version 3.11.0+beta1

2008-10-15 Thread Andres Varon


On Oct 15, 2008, at 11:04 AM, Alain Frisch wrote:


Andres Varon wrote:
Thanks for the good work. I would like to know exactly what  
architectures support the native Dynlink? I did not see this  
information in the release notes.


The native Dynlink is known to work under Linux x86, Linux AMD64,  
Win32 (mingw/msvc ports). It has been lightly tested under Win64,  
some flavors of BSDs and also the Cygwin port.


Great, thanks for the info. Is there a set of tests that I can run? I  
would like to see how it works in Mac OS X which is my primary  
development environment and the second most important among our users.


One more question: is it always compiled? or is dynlink.cmxa simply  
not available in some architectures? if yes, what are those?


Andres



-- Alain



___
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


Re: [Caml-list] OCaml version 3.11.0+beta1

2008-10-15 Thread Andres Varon


On Oct 15, 2008, at 11:22 AM, Daniel Bünzli wrote:


The native Dynlink is known to work under Linux x86, Linux AMD64,  
Win32 (mingw/msvc ports). It has been lightly tested under Win64,  
some flavors of BSDs and also the Cygwin port.


And on macosx ? It seems here on 10.5.5 that only dynlink.cma and  
dynlink.cmi for bytecode get installed. So I guess there's no  
support. What about the future ?


It was installed here: Mac OS X 10.5.5 x86.  Maybe this is an issue  
that I mentioned before in the list and got no response?: At least one  
cmxa only get installed if you make opt.opt. camlp4fulllib.cmxa was  
not installed with only make opt (which led to broken installations  
that would not let my apps compile).


Andres




Thanks,

Daniel

___
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


___
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


Re: [Caml-list] OCaml version 3.11.0+beta1

2008-10-15 Thread Andres Varon


On Oct 15, 2008, at 11:37 AM, Alain Frisch wrote:


Andres Varon wrote:
One more question: is it always compiled? or is dynlink.cmxa simply  
not available in some architectures? if yes, what are those?


As far as I can tell, dynlink.cmxa is always compiled. You will get  
error when ocamlopt -shared on those architecture where natdynlink  
is not supported.


OK. Would you recommend that configure scripts use this test to verify  
if the functionality is supported?


Andres






-- Alain



___
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


Re: [Caml-list] OCaml version 3.11.0+beta1

2008-10-15 Thread Andres Varon


On Oct 15, 2008, at 11:32 AM, Alain Frisch wrote:


Daniel Bünzli wrote:
And on macosx ? It seems here on 10.5.5 that only dynlink.cma and  
dynlink.cmi for bytecode get installed. So I guess there's no  
support. What about the future ?


Native dynlink used to work on Mac OS X  10.5 (x86 only). The new  
linker in 10.5 does not support linking shared libraries with non- 
PIC code. It is still possible to use the old linker, called  
ld_classic, but some libraries (like X11) does not work, so this has  
been disabled in the configure script.





The clean solution to make natdynlink work on recent Mac OS X systems
(beside convincing Apple to support the old behavior of their linker  
in their new implementation) is to change OCaml's x86 backend so  
that it produces only PIC code (this has been done for the AMD64  
port). I don't think there is currently any plan to work on that.


Ouch, this makes it almost a dead end for us. I can offer some time to  
help in this effort, working in the port, or providing feedback. The  
native dynlink and toplevel are, at least to me, the killer features  
in 3.11, but adding another hole for Mac OS X intel (in addition to  
not supporting x86_64) does not seem like the best choice for an  
increasingly popular architecture.


Again, thanks for the good work!

Andres




Alain

___
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


___
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


[Caml-list] camlp4fulllib.cmxa without make opt.opt

2008-08-13 Thread Andres Varon

Hello Everyone,

I am getting every now and then a user having troubles compiling my  
applications because the file camlp4fulllib.cmxa is missing in their  
OCaml install. It seems like the ocaml distro's Makefile only build  
and install the camlp4 native  tools and libraries if make opt.opt is  
run. Unfortunately the compilation instructions say that make opt.opt  
is optional (many sysadmins don't do the optional step).


Shouldn't I expect that library to be part of the make opt  build? Or  
is it a bug in the Makfile? I couldn't find anything about it in the  
bug tracking system.


best,

Andres

___
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


Re: [Caml-list] memory usage

2008-07-16 Thread Andres Varon



On Jul 16, 2008, at 2:07 PM, Jean Krivine wrote:

Good news, I just tested the patch and it works great with my  
application!

I just had to modify the module random since a call to (Random.int
max_int) may raise and exception (it is made for 32 bits integers).
So I guess that modification should be included in the patch.


I don't think that's a good idea. You have to use Random.int64 to get  
a 64 bit random integer. The Random.int function will return an  
integer between 0 and 2^30. Check the Random module documentation here:


http://caml.inria.fr/pub/docs/manual-ocaml/libref/Random.html

I wouldn't play with a random number generator unless I know exactly  
what I'm doing. Your results depend on it! (well, your messed-up-by- 
andres compiler could already have issues ... :-(, for what I use it I  
can verify the result with a 32 bit binary or a 64 bit linux binary,  
if you can, then do the same!).



Andres



Thanks a lot Andres.
Jean

On Wed, Jul 16, 2008 at 12:27 PM, Jean Krivine
[EMAIL PROTECTED] wrote:

Great thanks!

J

On Wed, Jul 16, 2008 at 10:16 AM, Andres Varon [EMAIL PROTECTED]  
wrote:


On Jul 15, 2008, at 3:38 PM, Jean Krivine wrote:


I'd be glad to try the patch if you could post it somewhere!


I have posted it in:

http://research.amnh.org/~avaron/ocaml/

best,

Andres


J

On Tue, Jul 15, 2008 at 3:31 PM, Andres Varon [EMAIL PROTECTED]  
wrote:


Hello Jean,

There is no 64-bit native OCaml compiler for Mac OS X intel.  I  
have a

patch
that works in Leopard, but did not compile opt.opt in Tiger,  
meaning that

something is not OK,  so I did not offer it to the community. The
bootstrap
went fine, findlib and godi compiled OK too. I can post the  
patches

somewhere if you want to give it a shot.

My memory intensive application runs fine in Leopard with this  
compiler.

But
the binaries do not execute in Tiger (I found that other people  
had the

same
trouble copying a 64 bit apps from Leopard to Tiger and the  
other way

around, but didn't look into it).

If you want it ... I can post it, maybe someone can cleanup my  
job? All

that
would be needed after patching is:

./configure -host x86_64-apple-darwin -prefix /opt/ocaml/ 
experimental


(The prefix I always add for my ocaml-modified comilers).

best,

Andres

On Jul 15, 2008, at 1:06 PM, Jean Krivine wrote:


Dear all

I downloaded the last version of ocaml (3.10.2) but I must  
confess I
don't know what option I should pass to the compiler to make a  
binary

that uses 64 bits.
I tried naively ocamlopt -ccopt -arch -ccopt x86_64 but that  
doesn't

work. Any idea?



On Fri, Jul 11, 2008 at 6:01 PM, Richard Jones  
[EMAIL PROTECTED] wrote:


On Fri, Jul 11, 2008 at 03:49:26PM -0400, Jean Krivine wrote:


I am trying to run a stochastic simulator (written in ocaml)  
on a huge

data set and I have the following error message:


I can confirm that OCaml works fine with huge datasets, on 64  
bit

platforms anyway.


sim(9595) malloc: *** mmap(size=1048576) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
Fatal error: out of memory.

My system:

Mac Pro running OS X 10.5.4
Processor:  2 x 2.8 GHz Quad-Core Intel Xeon
Memory:  10 GB 800 MHz DDR2 FB-DIMM

Does someone know what happened? Do you have any idea of any  
parameter

I could tune in order to avoid that?


Is the compiler 32 bits or 64 bits on this machine?  Try doing:

$ ocaml
# Sys.word_size ;;

It should print out either '32' or '64'.

Also run your program under whatever the OS X equivalent of  
'strace'

is (ktrace?) to find out exactly why the mmap call fails.

OCaml = 3.10.2 on Linux suffers a nasty problem with its use  
of mmap

and randomized address spaces
(https://bugzilla.redhat.com/show_bug.cgi?id=445545#c9) but it  
doesn't

seem like this is the same issue.

Rich.

--
Richard Jones
Red Hat

___
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



___
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










___
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


Re: [Caml-list] memory usage

2008-07-15 Thread Andres Varon

Hello Jean,

There is no 64-bit native OCaml compiler for Mac OS X intel.  I have a  
patch that works in Leopard, but did not compile opt.opt in Tiger,  
meaning that something is not OK,  so I did not offer it to the  
community. The bootstrap went fine, findlib and godi compiled OK too.  
I can post the patches somewhere if you want to give it a shot.


My memory intensive application runs fine in Leopard with this  
compiler. But the binaries do not execute in Tiger (I found that other  
people had the same trouble copying a 64 bit apps from Leopard to  
Tiger and the other way around, but didn't look into it).


If you want it ... I can post it, maybe someone can cleanup my job?  
All that would be needed after patching is:


./configure -host x86_64-apple-darwin -prefix /opt/ocaml/experimental

(The prefix I always add for my ocaml-modified comilers).

best,

Andres

On Jul 15, 2008, at 1:06 PM, Jean Krivine wrote:


Dear all

I downloaded the last version of ocaml (3.10.2) but I must confess I
don't know what option I should pass to the compiler to make a binary
that uses 64 bits.
I tried naively ocamlopt -ccopt -arch -ccopt x86_64 but that doesn't
work. Any idea?



On Fri, Jul 11, 2008 at 6:01 PM, Richard Jones [EMAIL PROTECTED]  
wrote:

On Fri, Jul 11, 2008 at 03:49:26PM -0400, Jean Krivine wrote:
I am trying to run a stochastic simulator (written in ocaml) on a  
huge

data set and I have the following error message:


I can confirm that OCaml works fine with huge datasets, on 64 bit
platforms anyway.


sim(9595) malloc: *** mmap(size=1048576) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
Fatal error: out of memory.

My system:

Mac Pro running OS X 10.5.4
Processor:  2 x 2.8 GHz Quad-Core Intel Xeon
Memory:  10 GB 800 MHz DDR2 FB-DIMM

Does someone know what happened? Do you have any idea of any  
parameter

I could tune in order to avoid that?


Is the compiler 32 bits or 64 bits on this machine?  Try doing:

$ ocaml
# Sys.word_size ;;

It should print out either '32' or '64'.

Also run your program under whatever the OS X equivalent of 'strace'
is (ktrace?) to find out exactly why the mmap call fails.

OCaml = 3.10.2 on Linux suffers a nasty problem with its use of mmap
and randomized address spaces
(https://bugzilla.redhat.com/show_bug.cgi?id=445545#c9) but it  
doesn't

seem like this is the same issue.

Rich.

--
Richard Jones
Red Hat

___
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



___
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


___
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


Re: [Caml-list] Re: Building a universal binary on OS X?

2008-05-25 Thread Andres Varon


On May 24, 2008, at 3:31 AM, Michel Schinz wrote:


Alan Schmitt [EMAIL PROTECTED] writes:

[...]


My goal is to be able to compile the OS GUI version of Unison on a
single machine. Right now, using my intel-based notebook, I'm able to
compile a version that runs both on 10.4 and 10.5, but only on intel.


[...]

I think I remember an old message addressing this, but I have not  
been

able to find it.


You might be referring to this message:

http://thread.gmane.org/gmane.comp.lang.caml.general/38930

The cute trick consists in building a PPC version of OCaml on a PPC
machine, and then copying it over to your Intel machine. It will run
fine (albeit slowly) under Rosetta, and generate PPC executables.


Actually you can cross compile it in your intel mac, this is what I  
use to configure it:


./configure -cc gcc -mmacosx-version-min=10.4 -arch ppc -isysroot / 
Developer/SDKs/MacOSX10.4u.sdk -prefix /opt/ocaml/3.10.2/tiger/ppc - 
host powerpc-apple-darwin8.11.0


Then use the standard make world; make opt;  

Andres




Michel.

___
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


___
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