Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] A step short of -noautolink?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2003-04-17 (23:42)
From: Greg Kimberly <lists@g...>
Subject: [Caml-list] A step short of -noautolink?
I'm new to caml so apologies if this is too obvious.

I've installed Gerd Stolpmann's intriguing ocamlnet package. It and the 
required prerequisites (e.g. findlib) installed with only one problem on my 
RedHat 8 system. The one problem is that prerequisite package pcre-ocaml 
(version 5.02.0) contains a .cma file that refers to the pcre library. On 
RedHat 8 the pre-installed version of libpcre is 3.9-5 (it is in /lib/), 
while pcre-ocaml v5.02 needs a newer libpcre (I downloaded 4.1 and 
installed it in /usr/local/lib/).

So far, so good. Unfortunately, the default build for the examples fails 
because the examples implicitly include pcre.cma which contains linker 
directives which cause the /lib/ to be linked- which is the 
wrong version. At this point I can see two possible fixes:

Upgrade the version of libpcre in /lib - not good in the general case as it 
might cause compatiblility problems elsewhere

Use -noautolink in the example makefile to suppress the inclusion of the 
linker directive -lpcre which has been inherited from pcre.cma

This is the solution I'm using but it seems non-optimal to throw away all 
included linker directives just to remove one unwanted dependency. Is there 
some better way to deal with this issue that I'm overlooking? Is there some 
way to tell camlc to ignore a particular inherited directive from a .cma?

This concern may seem pedantic, but I find that figuring out how to do 
these sorts of things efficiently when starting to use a development 
environment makes life a lot easier down the road.



To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: