caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Link errors with O'Caml 3.09 and Camlidl 1.05
@ 2005-11-21 19:01 Kathleen Fisher
  2005-11-22 11:45 ` [Caml-list] " Damien Bobillot
  0 siblings, 1 reply; 10+ messages in thread
From: Kathleen Fisher @ 2005-11-21 19:01 UTC (permalink / raw)
  To: caml-list; +Cc: Mary Fernandez

We installed O'Caml 3.09 on MacOS 10.4 from the .dmg image, then  
installed
Camlidl with no errors.  When we link our Camlidl test program,
we get the link errors below.  However, when we install OCaml 3.09
from source, compile it, and install Camlidl, we do not get
any link errors.

Can someone explain this behavior?

Thanks!
Kathleen Fisher

/usr/local/bin/ocamlc -I /usr/local/lib/ocaml -cc cc -custom -o test  
test.cmo test_stubs.o test.o test_idl.cmo /usr/local/lib/ocaml/ 
libcamlidl.a
ld: Undefined symbols:
_sprintf$LDBLStub
_fprintf$LDBLStub
_sscanf$LDBLStub
Error while building custom runtime system
make: *** [all] Error 2


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

* Re: [Caml-list] Link errors with O'Caml 3.09 and Camlidl 1.05
  2005-11-21 19:01 Link errors with O'Caml 3.09 and Camlidl 1.05 Kathleen Fisher
@ 2005-11-22 11:45 ` Damien Bobillot
  2005-11-23 15:17   ` [Caml-list] Link errors with O'Caml 3.09 on MacOS Mary Fernandez
  0 siblings, 1 reply; 10+ messages in thread
From: Damien Bobillot @ 2005-11-22 11:45 UTC (permalink / raw)
  To: Kathleen Fisher; +Cc: caml-list, Mary Fernandez

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


Kathleen Fisher wrote :

> We installed O'Caml 3.09 on MacOS 10.4 from the .dmg image, then  
> installed
> Camlidl with no errors.  When we link our Camlidl test program,
> we get the link errors below.  However, when we install OCaml 3.09
> from source, compile it, and install Camlidl, we do not get
> any link errors.
>
> Can someone explain this behavior?
>
> Thanks!
> Kathleen Fisher
>
> /usr/local/bin/ocamlc -I /usr/local/lib/ocaml -cc cc -custom -o  
> test test.cmo test_stubs.o test.o test_idl.cmo /usr/local/lib/ocaml/ 
> libcamlidl.a
> ld: Undefined symbols:
> _sprintf$LDBLStub
> _fprintf$LDBLStub
> _sscanf$LDBLStub

Try to add the following options : -cclib -lSystemStub

-- 
Damien Bobillot


[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 2375 bytes --]

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

* Re: [Caml-list] Link errors with O'Caml 3.09 on MacOS
  2005-11-22 11:45 ` [Caml-list] " Damien Bobillot
@ 2005-11-23 15:17   ` Mary Fernandez
  2005-11-23 15:34     ` Alain Frisch
  0 siblings, 1 reply; 10+ messages in thread
From: Mary Fernandez @ 2005-11-23 15:17 UTC (permalink / raw)
  To: Damien Bobillot; +Cc: Kathleen S Fisher, Caml List

Hi Damien,
Thanks for your quick response.  I have another linking
problem on the Mac O/S 10.4 with O'Caml 3.09.  I'm getting
undefined _caml* symbols (see below).  From the link step,
you can see that I'm using a lot of libraries
(pcre, netstring, pxp, camomile, etc).
Any ideas?
Thanks, Mary

/usr/local/bin/ocamlopt -linkall -o galax-run.opt -I
/usr/local/lib/ocaml/site-lib/pcre -I
/usr/local/lib/ocaml/site-lib/netstring -I
/us\r/local/lib/ocaml/site-lib/pxp-engine -I
/usr/local/lib/ocaml/site-lib/pxp-lex-iso88591 -I
/usr/local/lib/ocaml/site-lib/pxp-lex-utf8 -I
\/usr/local/lib/ocaml/site-lib/camomile nums.cmxa unix.cmxa str.cmxa
pcre.cmxa netstring.cmxa pxp_engine.cmxa pxp_lex_utf8.cmxa
pxp_lex_li\nk_utf8.cmx pxp_lex_iso88591.cmxa pxp_lex_link_iso88591.cmx
bigarray.cmxa camomile.cmxa -cclib -lnums -cclib -lunix -cclib -lstr
-cclib -\lpcre_stubs -cclib -lpcre -ccopt -L/usr/local/lib -ccopt
-L/usr/local/lib/ocaml/site-lib/pcre  galax.cmxa   
toplevel/galax-run.cmx  -I /\usr/local/lib/ocaml/site-lib/pcre -I
/usr/local/lib/ocaml/site-lib/netstring -I
/usr/local/lib/ocaml/site-lib/pxp-engine -I
/usr/local/lib/ocaml/site-lib/camomile ... all my .cmx files ...
ld: Undefined symbols:
_camlAvlTree
_camlBitsvect
_camlByte_labeled_dag
_camlBytesvect
_camlCaseMap
_camlCharEncoding
_camlCharmap
_camlHangul
_camlIMap
_camlISet
_camlLocale
_camlOOChannel
_camlSubText
_camlTbl31
_camlUCS4
_camlUChar
_camlUCharInfo
_camlUCharTbl
_camlUCol
_camlULine
----:**-F1  *shell*          
(Shell:run)--L??--98%---------------------------------------------------------------------------------------                                                                                                                                          

On Tue, 2005-11-22 at 06:45, Damien Bobillot wrote:
> Kathleen Fisher wrote :
> 
> > We installed O'Caml 3.09 on MacOS 10.4 from the .dmg image, then  
> > installed
> > Camlidl with no errors.  When we link our Camlidl test program,
> > we get the link errors below.  However, when we install OCaml 3.09
> > from source, compile it, and install Camlidl, we do not get
> > any link errors.
> >
> > Can someone explain this behavior?
> >
> > Thanks!
> > Kathleen Fisher
> >
> > /usr/local/bin/ocamlc -I /usr/local/lib/ocaml -cc cc -custom -o  
> > test test.cmo test_stubs.o test.o test_idl.cmo /usr/local/lib/ocaml/ 
> > libcamlidl.a
> > ld: Undefined symbols:
> > _sprintf$LDBLStub
> > _fprintf$LDBLStub
> > _sscanf$LDBLStub
> 
> Try to add the following options : -cclib -lSystemStub
-- 
Mary Fernandez <mff@research.att.com>
AT&T Labs - Research


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

* Re: [Caml-list] Link errors with O'Caml 3.09 on MacOS
  2005-11-23 15:17   ` [Caml-list] Link errors with O'Caml 3.09 on MacOS Mary Fernandez
@ 2005-11-23 15:34     ` Alain Frisch
  2006-02-10 13:06       ` Mary Fernandez
  0 siblings, 1 reply; 10+ messages in thread
From: Alain Frisch @ 2005-11-23 15:34 UTC (permalink / raw)
  To: Mary Fernandez; +Cc: Caml List

Mary Fernandez wrote:
> Hi Damien,
> Thanks for your quick response.  I have another linking
> problem on the Mac O/S 10.4 with O'Caml 3.09.  I'm getting
> undefined _caml* symbols (see below).  From the link step,
> you can see that I'm using a lot of libraries
> (pcre, netstring, pxp, camomile, etc).

I suspect that one of the libraries uses the -pack option (probably 
camomile). Unfortunately, this option does not work well under OCaml 
3.09 (with ocamlopt). You can try to apply to OCaml the patch from here:

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

-- Alain


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

* Re: [Caml-list] Link errors with O'Caml 3.09 on MacOS
  2005-11-23 15:34     ` Alain Frisch
@ 2006-02-10 13:06       ` Mary Fernandez
  2006-02-14 12:52         ` Alain Frisch
  2006-02-14 13:00         ` Alain Frisch
  0 siblings, 2 replies; 10+ messages in thread
From: Mary Fernandez @ 2006-02-10 13:06 UTC (permalink / raw)
  To: Alain Frisch; +Cc: Caml List, Chris Rath, Pam Dragosh, Jerome Simeon

Hi Alain,

We reported a bug in November with 3.09 when 
using ocamlopt to compile libraries build with the -pack option.
You said it was fixed by this patch:
http://caml.inria.fr/mantis/view.php?id=3825

Is this patch installed in the current release 3.09.1?
>From the dates in the patch log, it looks like it should be,
but I can't find any doc to be sure, and we are still
getting link errors.

Also, is this patch installed in the binary releases for Linux & MacOS?
It looks like the binary releases for Windows are still 3.09.0.

We want to be sure the patch is installed in all the downloadable
compilers as we can't ask our users to do patches by hand.

Thanks a lot!
Mary

On Wed, 2005-11-23 at 10:34, Alain Frisch wrote:
> Mary Fernandez wrote:
> > Hi Damien,
> > Thanks for your quick response.  I have another linking
> > problem on the Mac O/S 10.4 with O'Caml 3.09.  I'm getting
> > undefined _caml* symbols (see below).  From the link step,
> > you can see that I'm using a lot of libraries
> > (pcre, netstring, pxp, camomile, etc).
> 
> I suspect that one of the libraries uses the -pack option (probably 
> camomile). Unfortunately, this option does not work well under OCaml 
> 3.09 (with ocamlopt). You can try to apply to OCaml the patch from here:
> 
> http://caml.inria.fr/mantis/view.php?id=3825
> 
> -- Alain
-- 
Mary Fernandez <mff@research.att.com>
AT&T Labs - Research


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

* Re: [Caml-list] Link errors with O'Caml 3.09 on MacOS
  2006-02-10 13:06       ` Mary Fernandez
@ 2006-02-14 12:52         ` Alain Frisch
  2006-02-14 13:00         ` Alain Frisch
  1 sibling, 0 replies; 10+ messages in thread
From: Alain Frisch @ 2006-02-14 12:52 UTC (permalink / raw)
  To: Mary Fernandez; +Cc: Caml List, Chris Rath, Pam Dragosh, Jerome Simeon

Hello Marry,

Mary Fernandez wrote:
> Is this patch installed in the current release 3.09.1?

Yes.

> but I can't find any doc to be sure, and we are still
> getting link errors.

Do you get the same errors or different ones?

Another issue with -pack could explain link errors:
http://caml.inria.fr/mantis/view.php?id=3827

When you pack units together with ocamlopt, you must ensure that the 
compiler sees the .cmi files (you must give -I options). This was not 
the case before OCaml 3.09.

I can indeed reproduce link errors with a trivial program using 
Camomile. I guess Camomile's Makefile has to be fixed.


   Alain


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

* Re: [Caml-list] Link errors with O'Caml 3.09 on MacOS
  2006-02-10 13:06       ` Mary Fernandez
  2006-02-14 12:52         ` Alain Frisch
@ 2006-02-14 13:00         ` Alain Frisch
  2006-02-14 14:00           ` Yoriyuki Yamagata
  2006-02-14 14:25           ` Mary Fernandez
  1 sibling, 2 replies; 10+ messages in thread
From: Alain Frisch @ 2006-02-14 13:00 UTC (permalink / raw)
  To: Mary Fernandez; +Cc: Caml List, Chris Rath, Pam Dragosh, Jerome Simeon, yori

Hello again,

Actually, the patch to Camomile's Makefile is trivial. You can simply 
add $(INCLUDES) to line 137:

$(OCAMLOPT) -pack -o camomile.cmx camomileconfig.cmx $(OPTOBJECTS)

(and also to line 134 for cosmetic reasons)

One could argue that OCaml should issue a proper error message when the 
.cmi files are not available.


I put Camomile's developper in Cc: of this mail.

-- Alain


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

* Re: [Caml-list] Link errors with O'Caml 3.09 on MacOS
  2006-02-14 13:00         ` Alain Frisch
@ 2006-02-14 14:00           ` Yoriyuki Yamagata
  2006-02-14 14:25           ` Mary Fernandez
  1 sibling, 0 replies; 10+ messages in thread
From: Yoriyuki Yamagata @ 2006-02-14 14:00 UTC (permalink / raw)
  To: Alain Frisch
  Cc: Mary Fernandez, Chris Rath, Pam Dragosh, Caml List, Jerome Simeon

2006/2/14, Alain Frisch <Alain.Frisch@inria.fr>:
> Hello again,
>
> Actually, the patch to Camomile's Makefile is trivial. You can simply
> add $(INCLUDES) to line 137:
>
> $(OCAMLOPT) -pack -o camomile.cmx camomileconfig.cmx $(OPTOBJECTS)
>
> (and also to line 134 for cosmetic reasons)
>

Thanks, Alain.  I will prepare another release in this weekend.

--
Yamagata Yoriyuki


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

* Re: [Caml-list] Link errors with O'Caml 3.09 on MacOS
  2006-02-14 13:00         ` Alain Frisch
  2006-02-14 14:00           ` Yoriyuki Yamagata
@ 2006-02-14 14:25           ` Mary Fernandez
  1 sibling, 0 replies; 10+ messages in thread
From: Mary Fernandez @ 2006-02-14 14:25 UTC (permalink / raw)
  To: Alain Frisch; +Cc: Caml List, Chris Rath, Pam Dragosh, Jerome Simeon, yori

Thanks, Alain, for the explanation and fix.
Best, Mary
On Tue, 2006-02-14 at 08:00, Alain Frisch wrote:
> Hello again,
> 
> Actually, the patch to Camomile's Makefile is trivial. You can simply 
> add $(INCLUDES) to line 137:
> 
> $(OCAMLOPT) -pack -o camomile.cmx camomileconfig.cmx $(OPTOBJECTS)
> 
> (and also to line 134 for cosmetic reasons)
> 
> One could argue that OCaml should issue a proper error message when the 
> .cmi files are not available.
> 
> 
> I put Camomile's developper in Cc: of this mail.
> 
> -- Alain
-- 
Mary Fernandez <mff@research.att.com>
AT&T Labs - Research


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

* RE: [Caml-list] Link errors with O'Caml 3.09 on MacOS
@ 2006-02-14 13:24 car
  0 siblings, 0 replies; 10+ messages in thread
From: car @ 2006-02-14 13:24 UTC (permalink / raw)
  To: Alain.Frisch, mff; +Cc: caml-list, pdragosh, simeon, yori

Thanks!

I fixed the Makefile in our copy of the Camomile source and rebuilt.  I
was then able to build our application with ocamlopt and the linking
errors went away.

Let's hope the Camomile developer will put this change into the standard
distribution soon.

Chris Rath

-----Original Message-----
From: Alain Frisch [mailto:Alain.Frisch@inria.fr] 
Sent: Tuesday, February 14, 2006 8:00 AM
To: Fernandez,Maria F (Mary)
Cc: Caml List; Rath,Christopher A (Christopher); Dragosh,Pamela L (Pam);
Jerome Simeon; yori@users.sourceforge.net
Subject: Re: [Caml-list] Link errors with O'Caml 3.09 on MacOS

Hello again,

Actually, the patch to Camomile's Makefile is trivial. You can simply 
add $(INCLUDES) to line 137:

$(OCAMLOPT) -pack -o camomile.cmx camomileconfig.cmx $(OPTOBJECTS)

(and also to line 134 for cosmetic reasons)

One could argue that OCaml should issue a proper error message when the 
.cmi files are not available.


I put Camomile's developper in Cc: of this mail.

-- Alain



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

end of thread, other threads:[~2006-02-14 14:25 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-21 19:01 Link errors with O'Caml 3.09 and Camlidl 1.05 Kathleen Fisher
2005-11-22 11:45 ` [Caml-list] " Damien Bobillot
2005-11-23 15:17   ` [Caml-list] Link errors with O'Caml 3.09 on MacOS Mary Fernandez
2005-11-23 15:34     ` Alain Frisch
2006-02-10 13:06       ` Mary Fernandez
2006-02-14 12:52         ` Alain Frisch
2006-02-14 13:00         ` Alain Frisch
2006-02-14 14:00           ` Yoriyuki Yamagata
2006-02-14 14:25           ` Mary Fernandez
2006-02-14 13:24 car

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