ocaml pcre problem

19 views
Skip to first unread message

thumper

unread,
Aug 18, 2009, 7:42:45 PM8/18/09
to wikitrust-devel
I'm trying to compile a fresh GODI installation on a 64-bit ubuntu
machine. I've run into some errors doing so:
1. When selecting the godi packages needed by WikiTrust, somehow "app-
felix" got selected, but it doesn't compile. I was able to get around
this by de-selecting this package.

2. The WikiTrust README says to "make all-godi" for OcamlLdaLibs, but
there is no such target. "make all" works, but only if the godi
installation was owned by me.

3. Running "make all" in the WikiTrust directory, I get a PCRE error
that I don't understand:
=====================
ocamlfind ocamlc -dtypes -package
unix,str,vec,mapmin,hashtbl_bounded,fileinfo,intvmap,extlib,mysql,netsys,netclient,camlzip,xml-
light,json-wheel,sexplib.syntax -syntax camlp4o -linkpkg -o
downloadwp -I ../../batch/analysis -I ../../analysis -g evalwiki.cma
online_types.cmo online_log.cmo online_db.cmo online_revision.cmo
db_page.cmo online_page.cmo event_feed.cmo online_command_line.cmo
updater.cmo tmpfile.cmo wikipedia_api.cmo downloadwp.ml
Error on dynamically loaded library: /home/godi/lib/ocaml/pkg-lib/
stublibs/dllpcre_stubs.so: /home/godi/lib/ocaml/pkg-lib/stublibs/
dllpcre_stubs.so: undefined symbol: pcre_free
=====================
I have "GODI_BASEPKG_PCRE=yes" in my godi.conf, so I don't understand
why there is a problem. Oddly, if I say "make allopt" then the
compile succeeds.

Ian Pye

unread,
Aug 18, 2009, 8:07:59 PM8/18/09
to wikitru...@googlegroups.com
On Tue, Aug 18, 2009 at 4:42 PM, thumper<thum...@gmail.com> wrote:
>
> I'm trying to compile a fresh GODI installation on a 64-bit ubuntu
> machine.  I've run into some errors doing so:
> 1. When selecting the godi packages needed by WikiTrust, somehow "app-
> felix" got selected, but it doesn't compile.  I was able to get around
> this by de-selecting this package.
>
> 2. The WikiTrust README says to "make all-godi" for OcamlLdaLibs, but
> there is no such target.  "make all" works, but only if the godi
> installation was owned by me.
>
> 3. Running "make all" in the WikiTrust directory, I get a PCRE error
> that I don't understand:
> =====================
> ocamlfind ocamlc -dtypes -package
> unix,str,vec,mapmin,hashtbl_bounded,fileinfo,intvmap,extlib,mysql,netsys,netclient,camlzip,xml-
> light,json-wheel,sexplib.syntax  -syntax camlp4o -linkpkg -o
> downloadwp -I ../../batch/analysis -I ../../analysis -g evalwiki.cma
> online_types.cmo online_log.cmo online_db.cmo online_revision.cmo
> db_page.cmo online_page.cmo event_feed.cmo online_command_line.cmo
> updater.cmo tmpfile.cmo wikipedia_api.cmo downloadwp.ml
> Error on dynamically loaded library: /home/godi/lib/ocaml/pkg-lib/
> stublibs/dllpcre_stubs.so: /home/godi/lib/ocaml/pkg-lib/stublibs/
> dllpcre_stubs.so: undefined symbol: pcre_free

I'm thinking this means that the library libpcre isn't being found by
the linker (this is presumably where the function pcre_free is
defined). Does adding the flag -cclib -lpcre make a difference?

thumper

unread,
Aug 18, 2009, 10:51:42 PM8/18/09
to wikitrust-devel

> I'm thinking this means that the library libpcre isn't being found by
> the linker (this is presumably where the function pcre_free is
> defined). Does adding the flag -cclib -lpcre make a difference?

I tried adding this, and it doesn't make a difference.

The same error is reported elsewhere on the web, for example:
http://article.gmane.org/gmane.comp.lang.ocaml.godi/191

That led me to try:
$ pcre-config --libs
-L/home/godi/lib -lpcre

and trying "strings /home/godi/lib/libpcre.so | grep pcre_free" gives
me a result.


I found some advice to try the system pcre, here:
https://lists.ocamlcore.org/pipermail/batteries-devel/2009-April/000789.html
I hadn't done that originally because it failed, but I just tried
installing the "libpcre3-dev" package and then reinstalled godi and
that worked! So, I guess there's some problem with the ocaml-pcre
package.
Reply all
Reply to author
Forward
0 new messages