Article View: fa.caml
Article #102Re: problem compiling native ocaml hello world on minix3
From: r0ller
Date: Thu, 10 Jan 2013 12:27
Date: Thu, 10 Jan 2013 12:27
92 lines
3645 bytes
3645 bytes
Hi All, I read somewhere that linking may be an issue on certain platforms so I thought it's worth giving what the ocamlopt -verbose option reveals. Here it is: + as -o 'smallest.o' 'smallest.s' + as -o '/tmp/camlstartup219145.o' '/tmp/camlstartupbc831e.s' + gcc -o 'smallest' '-L/usr/local/lib/ocaml' '/tmp/camlstartup219145.o' '/usr/local/lib/ocaml/std_exit.o' 'smallest.o' '/usr/local/lib/ocaml/stdlib.a' '/usr/local/lib/ocaml/libasmrun.a' -lm If noone can help here, could you please, direct me to another ocaml forum where such questions can be discussed? Thanks®ards, r0ller On Wednesday, January 9, 2013 11:36:05 AM UTC+1, r0l...@freemail.hu wrote: > Hi All, > > > > The strange thing is that when compiling it like: > > > > ocamlc smallest.ml -o smallest > > > > everything works fine but not with ocamlopt. I get the binary executable and it indeed prints: hello, world. Could anyone please, tell me why? > > > > Regards, > > r0ller > > > > On Monday, January 7, 2013 4:16:58 PM UTC+1, r0l...@freemail.hu wrote: > > > Hi All, > > > > > > > > > > > > I'm trying to make ocaml compiler (4.00.1) work on minix (current 3.2.1) and managed to get to point 3) and 4) of the INSTALL intsructions. According to point 3) make bootstrap reports success and make opt (point 4) worked fine as well. However, point 5) that is make opt.opt gives linking errors. Nevertheless, as far as I could understand, this should not pose any problem as then I only miss the optimized compiler versions that is the ones ending in .opt and they're missing indeed. Still, when trying to compile a hello world program called smallest.ml like: > > > > > > > > > > > > print_string "hello, world\n" > > > > > > > > > > > > by executing 'ocamlopt -S smallest.ml -o smallest', I get roughly the same linking errors I got when make opt.opt failed (see at the end). I also must admit that I'm not an ocaml expert at all I just need it to compile a program written in ocaml. Thanks for your help in advance! > > > > > > > > > > > > Best regards, > > > > > > r0ller
Technical Details
Message-ID:
<94c0188f-c8fb-4eac-a741-3b4903d778aa@googlegroups.com>Path:
arc1-ca.pugleaf.net!k2ni5538qap.0!nntp.google.com!p13no2427350qai.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mailReferences:
<f6d15b53-af87-4105-ac55-6d7e5c5d534c@googlegroups.com> <73edb160-364b-4a5b-b5f5-4ed0ab006c83@googlegroups.com>Show Full Headers
Complete Article Headers
X-Google-Thread: c0fe4b917e,1aebcf1dc6eeef24
X-Google-Attributes: gidc0fe4b917e,public,usenet
X-Google-NewGroupId: yes
X-Google-Language: ENGLISH,ASCII-7-bit
X-Received: by 10.224.189.78 with SMTP id dd14mr8880660qab.0.1357820873611;
Thu, 10 Jan 2013 04:27:53 -0800 (PST)
Received: by 10.49.15.100 with SMTP id w4mr13013568qec.26.1357820873499; Thu,
10 Jan 2013 04:27:53 -0800 (PST)
Path: arc1-ca.pugleaf.net!k2ni5538qap.0!nntp.google.com!p13no2427350qai.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups: fa.caml
Date: Thu, 10 Jan 2013 04:27:53 -0800 (PST)
In-Reply-To: <73edb160-364b-4a5b-b5f5-4ed0ab006c83@googlegroups.com>
Complaints-To: groups-abuse@google.com
Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=84.3.92.117; posting-account=1tym9AoAAABKxcWqTDQq8MFzsJ5_fvrj
NNTP-Posting-Host: 84.3.92.117
References: <f6d15b53-af87-4105-ac55-6d7e5c5d534c@googlegroups.com> <73edb160-364b-4a5b-b5f5-4ed0ab006c83@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <94c0188f-c8fb-4eac-a741-3b4903d778aa@googlegroups.com>
Subject: Re: problem compiling native ocaml hello world on minix3
From: r0ller@freemail.hu
Injection-Date: Thu, 10 Jan 2013 12:27:53 +0000
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable