* [Caml-list] Problem using pcre on Debian @ 2002-02-22 10:44 Johann Spies 2002-02-22 11:30 ` Remi VANICAT ` (3 more replies) 0 siblings, 4 replies; 16+ messages in thread From: Johann Spies @ 2002-02-22 10:44 UTC (permalink / raw) To: caml-list There is no Debian package for pcre so I compiled one in /usr/local/src and installed it to /usr/local/lib/ocaml/pcre. The compilation went without a problem after I removed the comment to use STATIC=1 in the Makefile. I also copied META to the installation directory. Now when try to use it in the toplevel the following happens: ------------------------------------- $ ledit ocaml Objective Caml version 3.04 # #use "ocamlfind";; 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) Topfind.reset();; to force that packages will be reloaded - : unit = () # #require "pcre";; Loading /usr/local/lib/ocaml/pcre/pcre.cma The external function `pcre_exec_wrapper_bc' is not available # #list;; [I removed the other lines:] pcre (version: 4.18-2) # let s = "Dit lyk nou so";; - : string = "Dit lyk nou so" # let ss =Pcre.split s;; Reference to undefined global `Pcre' ================================================ Any remedy? I could use an older version of pcre in the same way. Johann -- Johann Spies Telefoon: 021-808 4036 Informasietegnologie, Universiteit van Stellenbosch "The LORD bless thee, and keep thee; The LORD make his face shine upon thee, and be gracious unto thee; The LORD lift up his countenance upon thee, and give thee peace." Numbers 6:24-26 ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Caml-list] Problem using pcre on Debian 2002-02-22 10:44 [Caml-list] Problem using pcre on Debian Johann Spies @ 2002-02-22 11:30 ` Remi VANICAT 2002-02-22 14:08 ` Johann Spies 2002-02-22 12:59 ` Stefano Zacchiroli ` (2 subsequent siblings) 3 siblings, 1 reply; 16+ messages in thread From: Remi VANICAT @ 2002-02-22 11:30 UTC (permalink / raw) To: caml-list Johann Spies <jspies@sun.ac.za> writes: > There is no Debian package for pcre so I compiled one in > /usr/local/src and installed it to /usr/local/lib/ocaml/pcre. > > The compilation went without a problem after I removed the comment to > use STATIC=1 in the Makefile. I also copied META to the installation > directory. > > Now when try to use it in the toplevel the following happens: > ------------------------------------- > $ ledit ocaml > Objective Caml version 3.04 > > # #use "ocamlfind";; > 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) > Topfind.reset();; to force that packages will be reloaded > > - : unit = () > # #require "pcre";; > Loading /usr/local/lib/ocaml/pcre/pcre.cma > The external function `pcre_exec_wrapper_bc' is not available Which ocaml debian package are your using ? if you are using 3.04-9 (from unstable, only in incoming the last time I check) the you have to make (as root) ocaml-ldconf -a /usr/local/lib/ocaml/pcre/ to add the dll support for pcre. (this will work only in there is a *.so file in the /usr/local/lib/ocaml/pcre/ directory.) if there is no *.so, you will have to make a custom toplevel (with ocamlmktop, I believe that findlib have some support for it). -- Rémi Vanicat vanicat@labri.u-bordeaux.fr http://dept-info.labri.u-bordeaux.fr/~vanicat ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Caml-list] Problem using pcre on Debian 2002-02-22 11:30 ` Remi VANICAT @ 2002-02-22 14:08 ` Johann Spies 2002-02-22 14:57 ` Remi VANICAT 0 siblings, 1 reply; 16+ messages in thread From: Johann Spies @ 2002-02-22 14:08 UTC (permalink / raw) To: caml-list On Fri, Feb 22, 2002 at 12:30:38PM +0100, Remi VANICAT wrote: > Which ocaml debian package are your using ? if you are using 3.04-9 Yes I am using 3.04-9. > the you have to make (as root) > ocaml-ldconf -a /usr/local/lib/ocaml/pcre/ > > to add the dll support for pcre. (this will work only in there is > a *.so file in the /usr/local/lib/ocaml/pcre/ directory.) :( There is no .so file. I could not compile it with dynamic linking. Why? > if there is no *.so, you will have to make a custom toplevel (with > ocamlmktop, I believe that findlib have some support for it). This is bad news. Johann. -- Johann Spies Telefoon: 021-808 4036 Informasietegnologie, Universiteit van Stellenbosch "The LORD bless thee, and keep thee; The LORD make his face shine upon thee, and be gracious unto thee; The LORD lift up his countenance upon thee, and give thee peace." Numbers 6:24-26 ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Caml-list] Problem using pcre on Debian 2002-02-22 14:08 ` Johann Spies @ 2002-02-22 14:57 ` Remi VANICAT 2002-02-22 16:08 ` Markus Mottl 0 siblings, 1 reply; 16+ messages in thread From: Remi VANICAT @ 2002-02-22 14:57 UTC (permalink / raw) To: caml-list Johann Spies <jspies@sun.ac.za> writes: > On Fri, Feb 22, 2002 at 12:30:38PM +0100, Remi VANICAT wrote: > > > Which ocaml debian package are your using ? if you are using 3.04-9 > > Yes I am using 3.04-9. > > > the you have to make (as root) > > ocaml-ldconf -a /usr/local/lib/ocaml/pcre/ > > > > to add the dll support for pcre. (this will work only in there is > > a *.so file in the /usr/local/lib/ocaml/pcre/ directory.) > > :( There is no .so file. I could not compile it with dynamic > linking. Why? the distribution of pcre include it's own pcre. You should use the one installed by debian. I successfully build ocaml-pcre on debian with shared suport by - installing the libpcre3-dev package - modifying one of the pcre-OCaml/Makefile : replacing shared: byte-code-nolink native-code-nolink ocamlmklib -o pcre pcre.cmo pcre.cmx pcre_intf.o \ -L../pcre-C/.libs -lpcre -rpath $(OCAML_LIB_INSTALL) cp ../pcre-C/.libs/libpcre.a . ar r libpcre.a pcre_intf.o ranlib libpcre.a by shared: byte-code-nolink native-code-nolink ocamlmklib -o pcre pcre.cmo pcre.cmx pcre_intf.o \ -lpcre -rpath $(OCAML_LIB_INSTALL) it compile. By the way the pcre library in debian is not the same than the pcre-C in pcre-ocaml, so there may be problems, and I have do no further test. -- Rémi Vanicat vanicat@labri.u-bordeaux.fr http://dept-info.labri.u-bordeaux.fr/~vanicat ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Caml-list] Problem using pcre on Debian 2002-02-22 14:57 ` Remi VANICAT @ 2002-02-22 16:08 ` Markus Mottl 0 siblings, 0 replies; 16+ messages in thread From: Markus Mottl @ 2002-02-22 16:08 UTC (permalink / raw) To: Remi VANICAT; +Cc: caml-list On Fri, 22 Feb 2002, Remi VANICAT wrote: > By the way the pcre library in debian is not the same than the pcre-C > in pcre-ocaml, so there may be problems, and I have do no further test. There shouldn't be any problems concerning the interface to OCaml as long as you use a C-library with a version > 3. Though, if you don't use the latest release, there may be bugs or even missing pattern features in it. Note that you can also install the C-library shipped with pcre-OCaml under "pcre-C" alone: it's a verbatim copy of Phil Hazel's original distribution. If Debian's paranoid upgrade policy drives you mad, you might consider "manual" installation. Regards, Markus Mottl -- Markus Mottl markus@oefai.at Austrian Research Institute for Artificial Intelligence http://www.oefai.at/~markus ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Caml-list] Problem using pcre on Debian 2002-02-22 10:44 [Caml-list] Problem using pcre on Debian Johann Spies 2002-02-22 11:30 ` Remi VANICAT @ 2002-02-22 12:59 ` Stefano Zacchiroli 2002-02-22 14:48 ` Markus Mottl 2002-02-22 16:01 ` Alain Frisch 3 siblings, 0 replies; 16+ messages in thread From: Stefano Zacchiroli @ 2002-02-22 12:59 UTC (permalink / raw) To: caml-list On Fri, Feb 22, 2002 at 12:44:52PM +0200, Johann Spies wrote: > # #use "ocamlfind";; > Findlib has been successfully loaded. Additional directives: > #require "package";; to load a package IIRC, '#use "ocamlfind"' toplevel directive is used to load the definitions needed for _findlib_ package, so if pcre doesn't support the findlib META system #require will not work with that library. Cheers. -- Stefano Zacchiroli - undergraduate student of CS @ Univ. Bologna, Italy zack@cs.unibo.it | ICQ# 33538863 | http://www.cs.unibo.it/~zacchiro "I know you believe you understood what you think I said, but I am not sure you realize that what you heard is not what I meant!" -- G.Romney ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Caml-list] Problem using pcre on Debian 2002-02-22 10:44 [Caml-list] Problem using pcre on Debian Johann Spies 2002-02-22 11:30 ` Remi VANICAT 2002-02-22 12:59 ` Stefano Zacchiroli @ 2002-02-22 14:48 ` Markus Mottl 2002-02-22 16:03 ` Johann Spies 2002-02-22 16:01 ` Alain Frisch 3 siblings, 1 reply; 16+ messages in thread From: Markus Mottl @ 2002-02-22 14:48 UTC (permalink / raw) To: Johann Spies; +Cc: OCAML On Fri, 22 Feb 2002, Johann Spies wrote: > The compilation went without a problem after I removed the comment to > use STATIC=1 in the Makefile. I also copied META to the installation > directory. What is the particular problem that prevents you from compiling the PCRE as a shared library? > Now when try to use it in the toplevel the following happens: > ------------------------------------- > $ ledit ocaml > Objective Caml version 3.04 [snip] > # #require "pcre";; > Loading /usr/local/lib/ocaml/pcre/pcre.cma > The external function `pcre_exec_wrapper_bc' is not available This is quite natural: since you haven't compiled the PCRE as a shared library, the toplevel assumes that every object it needs for it is already linked statically. This, however, is not the case: you'll have to create a new toplevel and link it with the PCRE-library then. Regards, Markus Mottl -- Markus Mottl markus@oefai.at Austrian Research Institute for Artificial Intelligence http://www.oefai.at/~markus ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Caml-list] Problem using pcre on Debian 2002-02-22 14:48 ` Markus Mottl @ 2002-02-22 16:03 ` Johann Spies 2002-02-22 16:17 ` Alain Frisch 2002-02-22 16:26 ` Markus Mottl 0 siblings, 2 replies; 16+ messages in thread From: Johann Spies @ 2002-02-22 16:03 UTC (permalink / raw) To: OCAML On Fri, Feb 22, 2002 at 03:48:39PM +0100, Markus Mottl wrote: > What is the particular problem that prevents you from compiling the PCRE > as a shared library? A series of messages like this: ---------------------------------------- ocamlc -I ../../pcre-OCaml -ccopt -L../../pcre-OCaml pcre.cma -o cloc \ cloc.cmo Error on dynamically loaded library: libpcre.so.0: cannot open shared object fi$make[2]: *** [cloc] Error 2 ------------------------------------ Regards. Johann -- Johann Spies Telefoon: 021-808 4036 Informasietegnologie, Universiteit van Stellenbosch "The LORD bless thee, and keep thee; The LORD make his face shine upon thee, and be gracious unto thee; The LORD lift up his countenance upon thee, and give thee peace." Numbers 6:24-26 ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Caml-list] Problem using pcre on Debian 2002-02-22 16:03 ` Johann Spies @ 2002-02-22 16:17 ` Alain Frisch 2002-02-22 16:27 ` Johann Spies 2002-02-22 16:26 ` Markus Mottl 1 sibling, 1 reply; 16+ messages in thread From: Alain Frisch @ 2002-02-22 16:17 UTC (permalink / raw) To: Johann Spies; +Cc: OCAML On Fri, 22 Feb 2002, Johann Spies wrote: > On Fri, Feb 22, 2002 at 03:48:39PM +0100, Markus Mottl wrote: > > > What is the particular problem that prevents you from compiling the PCRE > > as a shared library? > > A series of messages like this: > ---------------------------------------- > ocamlc -I ../../pcre-OCaml -ccopt -L../../pcre-OCaml pcre.cma > -o cloc \ cloc.cmo > Error on dynamically loaded library: libpcre.so.0: cannot open shared > object fi$make[2]: *** [cloc] Error 2 > ------------------------------------ This error appears when building test/example applications and it indicates that the dll has not been successfully built; don't you have any error message beforehand ? Again: what is the architecture, C compiler ? Are dll supported by your OCaml installation ? -- Alain ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Caml-list] Problem using pcre on Debian 2002-02-22 16:17 ` Alain Frisch @ 2002-02-22 16:27 ` Johann Spies 2002-02-22 21:14 ` Markus Mottl 0 siblings, 1 reply; 16+ messages in thread From: Johann Spies @ 2002-02-22 16:27 UTC (permalink / raw) To: OCAML [-- Attachment #1: Type: text/plain, Size: 1032 bytes --] On Fri, Feb 22, 2002 at 05:17:23PM +0100, Alain Frisch wrote: > This error appears when building test/example applications and it > indicates that the dll has not been successfully built; don't you have any > error message beforehand ? Again: what is the architecture, C compiler ? > Are dll supported by your OCaml installation ? I suppose so. It is the standard Debian installation. Architecture : bash-2.05a$ cat /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 6 model name : Celeron (Mendocino) stepping : 5 cpu MHz : 334.095 bash-2.05a$ gcc --version 2.95.4 I have attached the full output of make and the Makefile. -- Johann Spies Telefoon: 021-808 4036 Informasietegnologie, Universiteit van Stellenbosch "The LORD bless thee, and keep thee; The LORD make his face shine upon thee, and be gracious unto thee; The LORD lift up his countenance upon thee, and give thee peace." Numbers 6:24-26 [-- Attachment #2: fout --] [-- Type: text/plain, Size: 10724 bytes --] checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for executable suffix... checking for object suffix... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for a BSD compatible install... /usr/bin/install -c checking for ranlib... ranlib checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for limits.h... yes checking for gcc option to accept ANSI C... none needed checking for an ANSI C-conforming const... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for unistd.h... yes checking for size_t... yes checking for bcopy... yes checking for memmove... yes checking for strerror... yes checking build system type... i686-pc-linux-gnu checking host system type... i686-pc-linux-gnu checking for ld used by GCC... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependant libraries... pass_all checking command to parse /usr/bin/nm -B output... ok checking for dlfcn.h... yes checking for ranlib... (cached) ranlib checking for strip... strip checking for objdir... .libs checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc static flag -static works... yes checking if gcc supports -c -o file.o... yes checking if gcc supports -c -o file.lo... checking if gcc supports -fno-rtti -fno-exceptions... yes checking whether the linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether -lc should be explicitly linked in... no creating libtool configure: creating ./config.status config.status: creating Makefile config.status: creating pcre.h config.status: creating pcre-config config.status: creating RunTest config.status: creating config.h config.status: config.h is unchanged make[1]: Entering directory `/usr/local/src/pcre_ocaml-4.20-0/pcre-C' /bin/sh ./libtool --mode=compile gcc -c -g -O2 -I. ./maketables.c mkdir .libs gcc -c -g -O2 -I. ./maketables.c -fPIC -DPIC -o maketables.o mv -f maketables.o .libs/maketables.lo gcc -c -g -O2 -I. ./maketables.c -o maketables.o >/dev/null 2>&1 mv -f .libs/maketables.lo maketables.lo /bin/sh ./libtool --mode=compile gcc -c -g -O2 -I. ./get.c rm -f .libs/get.lo gcc -c -g -O2 -I. ./get.c -fPIC -DPIC -o get.o mv -f get.o .libs/get.lo gcc -c -g -O2 -I. ./get.c -o get.o >/dev/null 2>&1 mv -f .libs/get.lo get.lo /bin/sh ./libtool --mode=compile gcc -c -g -O2 -I. ./study.c rm -f .libs/study.lo gcc -c -g -O2 -I. ./study.c -fPIC -DPIC -o study.o mv -f study.o .libs/study.lo gcc -c -g -O2 -I. ./study.c -o study.o >/dev/null 2>&1 mv -f .libs/study.lo study.lo /bin/sh ./libtool --mode=link gcc -o dftables -g -O2 ./dftables.c gcc -o dftables -g -O2 ./dftables.c ./dftables >./chartables.c /bin/sh ./libtool --mode=compile gcc -c -g -O2 -I. ./pcre.c rm -f .libs/pcre.lo gcc -c -g -O2 -I. ./pcre.c -fPIC -DPIC -o pcre.o mv -f pcre.o .libs/pcre.lo gcc -c -g -O2 -I. ./pcre.c -o pcre.o >/dev/null 2>&1 mv -f .libs/pcre.lo pcre.lo rm -f libpcre.la /bin/sh ./libtool --mode=link gcc -rpath /usr/local/lib -version-info \ '0:1:0' -o libpcre.la maketables.lo get.lo study.lo pcre.lo rm -fr .libs/libpcre.la .libs/libpcre.* .libs/libpcre.* gcc -shared maketables.lo get.lo study.lo pcre.lo -Wl,-soname -Wl,libpcre.so.0 -o .libs/libpcre.so.0.0.1 (cd .libs && rm -f libpcre.so.0 && ln -s libpcre.so.0.0.1 libpcre.so.0) (cd .libs && rm -f libpcre.so && ln -s libpcre.so.0.0.1 libpcre.so) ar cru .libs/libpcre.a maketables.o get.o study.o pcre.o ranlib .libs/libpcre.a creating libpcre.la (cd .libs && rm -f libpcre.la && ln -s ../libpcre.la libpcre.la) /bin/sh ./libtool --mode=compile gcc -c -g -O2 -I. ./pcreposix.c rm -f .libs/pcreposix.lo gcc -c -g -O2 -I. ./pcreposix.c -fPIC -DPIC -o pcreposix.o mv -f pcreposix.o .libs/pcreposix.lo gcc -c -g -O2 -I. ./pcreposix.c -o pcreposix.o >/dev/null 2>&1 mv -f .libs/pcreposix.lo pcreposix.lo rm -f libpcreposix.la /bin/sh ./libtool --mode=link gcc -rpath /usr/local/lib -version-info \ '0:0:0' -o libpcreposix.la pcreposix.lo rm -fr .libs/libpcreposix.la .libs/libpcreposix.* .libs/libpcreposix.* gcc -shared pcreposix.lo -Wl,-soname -Wl,libpcreposix.so.0 -o .libs/libpcreposix.so.0.0.0 (cd .libs && rm -f libpcreposix.so.0 && ln -s libpcreposix.so.0.0.0 libpcreposix.so.0) (cd .libs && rm -f libpcreposix.so && ln -s libpcreposix.so.0.0.0 libpcreposix.so) ar cru .libs/libpcreposix.a pcreposix.o ranlib .libs/libpcreposix.a creating libpcreposix.la (cd .libs && rm -f libpcreposix.la && ln -s ../libpcreposix.la libpcreposix.la) /bin/sh ./libtool --mode=compile gcc -c -g -O2 -I. ./pcretest.c rm -f .libs/pcretest.lo gcc -c -g -O2 -I. ./pcretest.c -fPIC -DPIC -o pcretest.o mv -f pcretest.o .libs/pcretest.lo gcc -c -g -O2 -I. ./pcretest.c -o pcretest.o >/dev/null 2>&1 mv -f .libs/pcretest.lo pcretest.lo /bin/sh ./libtool --mode=link gcc -g -O2 -o pcretest pcretest.o \ libpcre.la libpcreposix.la gcc -g -O2 -o .libs/pcretest pcretest.o ./.libs/libpcre.so ./.libs/libpcreposix.so -Wl,--rpath -Wl,/usr/local/lib creating pcretest /bin/sh ./libtool --mode=compile gcc -c -g -O2 -I. -DIS_UNIX ./pcregrep.c rm -f .libs/pcregrep.lo gcc -c -g -O2 -I. -DIS_UNIX ./pcregrep.c -fPIC -DPIC -o pcregrep.o mv -f pcregrep.o .libs/pcregrep.lo gcc -c -g -O2 -I. -DIS_UNIX ./pcregrep.c -o pcregrep.o >/dev/null 2>&1 mv -f .libs/pcregrep.lo pcregrep.lo /bin/sh ./libtool --mode=link gcc -g -O2 -o pcregrep pcregrep.o libpcre.la gcc -g -O2 -o .libs/pcregrep pcregrep.o ./.libs/libpcre.so -Wl,--rpath -Wl,/usr/local/lib creating pcregrep make[1]: Leaving directory `/usr/local/src/pcre_ocaml-4.20-0/pcre-C' make[1]: Entering directory `/usr/local/src/pcre_ocaml-4.20-0/pcre-OCaml' make[2]: Entering directory `/usr/local/src/pcre_ocaml-4.20-0/pcre-OCaml' making ._bcdi/pcre.di from pcre.mli making ._d/pcre.d from pcre.ml make[2]: Leaving directory `/usr/local/src/pcre_ocaml-4.20-0/pcre-OCaml' make[2]: Entering directory `/usr/local/src/pcre_ocaml-4.20-0/pcre-OCaml' ocamlc -c pcre.mli ocamlc -c pcre.ml cc -c -O2 -fPIC -DPIC -I../pcre-C -I/usr/lib/ocaml \ pcre_intf.c -o pcre_intf.o make[2]: Leaving directory `/usr/local/src/pcre_ocaml-4.20-0/pcre-OCaml' make[2]: Entering directory `/usr/local/src/pcre_ocaml-4.20-0/pcre-OCaml' making ._ncdi/pcre.di from pcre.mli make[2]: Leaving directory `/usr/local/src/pcre_ocaml-4.20-0/pcre-OCaml' make[2]: Entering directory `/usr/local/src/pcre_ocaml-4.20-0/pcre-OCaml' ocamlopt -c pcre.ml make[2]: Leaving directory `/usr/local/src/pcre_ocaml-4.20-0/pcre-OCaml' ocamlmklib -o pcre pcre.cmo pcre.cmx pcre_intf.o \ -L../pcre-C/.libs -lpcre -rpath /usr/lib/ocaml/contrib cp ../pcre-C/.libs/libpcre.a . ar r libpcre.a pcre_intf.o ranlib libpcre.a make[1]: Leaving directory `/usr/local/src/pcre_ocaml-4.20-0/pcre-OCaml' make[1]: Entering directory `/usr/local/src/pcre_ocaml-4.20-0/examples/cloc' make[2]: Entering directory `/usr/local/src/pcre_ocaml-4.20-0/examples/cloc' making ._d/cloc.d from cloc.ml make[2]: Leaving directory `/usr/local/src/pcre_ocaml-4.20-0/examples/cloc' make[2]: Entering directory `/usr/local/src/pcre_ocaml-4.20-0/examples/cloc' ocamlc -c -I ../../pcre-OCaml cloc.ml ocamlc -I ../../pcre-OCaml -ccopt -L../../pcre-OCaml pcre.cma -o cloc \ cloc.cmo Error on dynamically loaded library: libpcre.so.0: cannot open shared object file: No such file or directory make[2]: *** [cloc] Error 2 make[2]: Leaving directory `/usr/local/src/pcre_ocaml-4.20-0/examples/cloc' make[1]: *** [byte-code] Error 2 make[1]: Leaving directory `/usr/local/src/pcre_ocaml-4.20-0/examples/cloc' make[1]: Entering directory `/usr/local/src/pcre_ocaml-4.20-0/examples/count_hash' make[2]: Entering directory `/usr/local/src/pcre_ocaml-4.20-0/examples/count_hash' making ._d/count_hash.d from count_hash.ml make[2]: Leaving directory `/usr/local/src/pcre_ocaml-4.20-0/examples/count_hash' make[2]: Entering directory `/usr/local/src/pcre_ocaml-4.20-0/examples/count_hash' ocamlc -c -I ../../pcre-OCaml count_hash.ml ocamlc -I ../../pcre-OCaml -ccopt -L../../pcre-OCaml pcre.cma -o count_hash \ count_hash.cmo Error on dynamically loaded library: libpcre.so.0: cannot open shared object file: No such file or directory make[2]: *** [count_hash] Error 2 make[2]: Leaving directory `/usr/local/src/pcre_ocaml-4.20-0/examples/count_hash' make[1]: *** [byte-code] Error 2 make[1]: Leaving directory `/usr/local/src/pcre_ocaml-4.20-0/examples/count_hash' make[1]: Entering directory `/usr/local/src/pcre_ocaml-4.20-0/examples/pcregrep' make[2]: Entering directory `/usr/local/src/pcre_ocaml-4.20-0/examples/pcregrep' making ._d/pcregrep.d from pcregrep.ml make[2]: Leaving directory `/usr/local/src/pcre_ocaml-4.20-0/examples/pcregrep' make[2]: Entering directory `/usr/local/src/pcre_ocaml-4.20-0/examples/pcregrep' ocamlc -c -I ../../pcre-OCaml pcregrep.ml ocamlc -I ../../pcre-OCaml -ccopt -L../../pcre-OCaml pcre.cma -o pcregrep \ pcregrep.cmo Error on dynamically loaded library: libpcre.so.0: cannot open shared object file: No such file or directory make[2]: *** [pcregrep] Error 2 make[2]: Leaving directory `/usr/local/src/pcre_ocaml-4.20-0/examples/pcregrep' make[1]: *** [byte-code] Error 2 make[1]: Leaving directory `/usr/local/src/pcre_ocaml-4.20-0/examples/pcregrep' make[1]: Entering directory `/usr/local/src/pcre_ocaml-4.20-0/examples/subst' make[2]: Entering directory `/usr/local/src/pcre_ocaml-4.20-0/examples/subst' making ._d/subst.d from subst.ml make[2]: Leaving directory `/usr/local/src/pcre_ocaml-4.20-0/examples/subst' make[2]: Entering directory `/usr/local/src/pcre_ocaml-4.20-0/examples/subst' ocamlc -c -I ../../pcre-OCaml subst.ml ocamlc -I ../../pcre-OCaml -ccopt -L../../pcre-OCaml pcre.cma -o subst \ subst.cmo Error on dynamically loaded library: libpcre.so.0: cannot open shared object file: No such file or directory make[2]: *** [subst] Error 2 make[2]: Leaving directory `/usr/local/src/pcre_ocaml-4.20-0/examples/subst' make[1]: *** [byte-code] Error 2 make[1]: Leaving directory `/usr/local/src/pcre_ocaml-4.20-0/examples/subst' make: *** [examples] Error 2 [-- Attachment #3: Makefile --] [-- Type: text/plain, Size: 1048 bytes --] #STATIC = 1 export STATIC EXAMPLES = $(filter-out examples/CVS, $(wildcard examples/*)) all: examples .PHONY: opt opt: pcre-OCaml/libpcre.a @for dir in $(EXAMPLES); do (cd $$dir && $(MAKE) nc); done .PHONY: examples examples: pcre-OCaml/libpcre.a @for dir in $(EXAMPLES); do (cd $$dir && $(MAKE)); done pcre-OCaml/libpcre.a: pcre-C/.libs/libpcre.a @cd pcre-OCaml && $(MAKE) pcre-C/.libs/libpcre.a: @cd pcre-C && \ if [ $(STATIC) ]; then \ ./configure --disable-shared && $(MAKE); \ else \ ./configure && $(MAKE); \ fi .PHONY: doc doc: @cd pcre-OCaml && $(MAKE) doc ln -sf pcre-OCaml/doc .PHONY: install install: pcre-OCaml/libpcre.a @cd pcre-OCaml && $(MAKE) && $(MAKE) install .PHONY: uninstall uninstall: @cd pcre-OCaml && $(MAKE) uninstall .PHONY: clean clean: @cd pcre-C && $(MAKE) clean && rm -f dftables chartables.c @cd pcre-OCaml && $(MAKE) clean @for dir in $(EXAMPLES); do (cd $$dir && $(MAKE) clean); done .PHONY: distclean distclean: clean @cd pcre-C && $(MAKE) $@ && rm -f RunTest @rm -f doc ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Caml-list] Problem using pcre on Debian 2002-02-22 16:27 ` Johann Spies @ 2002-02-22 21:14 ` Markus Mottl 2002-02-24 17:30 ` Xavier Leroy 0 siblings, 1 reply; 16+ messages in thread From: Markus Mottl @ 2002-02-22 21:14 UTC (permalink / raw) To: Johann Spies; +Cc: OCAML On Fri, 22 Feb 2002, Johann Spies wrote: [...] > ocamlmklib -o pcre pcre.cmo pcre.cmx pcre_intf.o \ > -L../pcre-C/.libs -lpcre -rpath /usr/lib/ocaml/contrib > cp ../pcre-C/.libs/libpcre.a . > ar r libpcre.a pcre_intf.o > ranlib libpcre.a > make[1]: Leaving directory `/usr/local/src/pcre_ocaml-4.20-0/pcre-OCaml' As you can see, the library is correctly built. It's just the examples that cannot (yet) be compiled, because the library is not yet installed ("make install"). I'll consider changing the compilation/installation procedure so that the examples are not automatically compiled. Regards, Markus Mottl -- Markus Mottl markus@oefai.at Austrian Research Institute for Artificial Intelligence http://www.oefai.at/~markus ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Caml-list] Problem using pcre on Debian 2002-02-22 21:14 ` Markus Mottl @ 2002-02-24 17:30 ` Xavier Leroy 2002-02-24 20:44 ` Markus Mottl 0 siblings, 1 reply; 16+ messages in thread From: Xavier Leroy @ 2002-02-24 17:30 UTC (permalink / raw) To: Johann Spies, OCAML > As you can see, the library is correctly built. It's just the examples > that cannot (yet) be compiled, because the library is not yet installed > ("make install"). > > I'll consider changing the compilation/installation procedure so that > the examples are not automatically compiled. An alternative is to compile the examples with the option -dllpath to record the location of the (not yet installed) shared library in the bytecode executables for the examples. - Xavier Leroy ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Caml-list] Problem using pcre on Debian 2002-02-24 17:30 ` Xavier Leroy @ 2002-02-24 20:44 ` Markus Mottl 2002-02-26 12:06 ` Johann Spies 0 siblings, 1 reply; 16+ messages in thread From: Markus Mottl @ 2002-02-24 20:44 UTC (permalink / raw) To: Xavier Leroy; +Cc: Johann Spies, OCAML On Sun, 24 Feb 2002, Xavier Leroy wrote: > An alternative is to compile the examples with the option -dllpath to > record the location of the (not yet installed) shared library in the > bytecode executables for the examples. Yes, I should have considered this possibility earlier. I'll do this. Regards, Markus Mottl -- Markus Mottl markus@oefai.at Austrian Research Institute for Artificial Intelligence http://www.oefai.at/~markus ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Caml-list] Problem using pcre on Debian 2002-02-24 20:44 ` Markus Mottl @ 2002-02-26 12:06 ` Johann Spies 0 siblings, 0 replies; 16+ messages in thread From: Johann Spies @ 2002-02-26 12:06 UTC (permalink / raw) To: OCAML; +Cc: Xavier Leroy Thank you to all who responded. Doing a "make install" and then "make" again solved the problem. Regards. Johann -- Johann Spies Telefoon: 021-808 4036 Informasietegnologie, Universiteit van Stellenbosch "But God commendeth his love toward us, in that, while we were yet sinners, Christ died for us." Romans 5:8 ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Caml-list] Problem using pcre on Debian 2002-02-22 16:03 ` Johann Spies 2002-02-22 16:17 ` Alain Frisch @ 2002-02-22 16:26 ` Markus Mottl 1 sibling, 0 replies; 16+ messages in thread From: Markus Mottl @ 2002-02-22 16:26 UTC (permalink / raw) To: Johann Spies; +Cc: OCAML On Fri, 22 Feb 2002, Johann Spies wrote: > On Fri, Feb 22, 2002 at 03:48:39PM +0100, Markus Mottl wrote: > > What is the particular problem that prevents you from compiling the PCRE > > as a shared library? > > A series of messages like this: > ---------------------------------------- > ocamlc -I ../../pcre-OCaml -ccopt -L../../pcre-OCaml pcre.cma > -o cloc \ cloc.cmo > Error on dynamically loaded library: libpcre.so.0: cannot open shared > object fi$make[2]: *** [cloc] Error 2 > ------------------------------------ This is a known issue. The latest release contains information about it in the INSTALL-file. In short, you'll have to install the library before the examples can be compiled _unless_ you already have a libpcre.so installed in some place where the loader can find it (e.g. either in a place like /usr/lib or in some directory that is in LD_LIBRARY_PATH). I know this is really inconvenient, but I don't know how to solve this issue without adding further search paths for dynamic libraries with -rpath to the PCRE-library. A bit overkill just for the examples... Just do a "make install" and compile the examples again. This should work. Regards, Markus Mottl -- Markus Mottl markus@oefai.at Austrian Research Institute for Artificial Intelligence http://www.oefai.at/~markus ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Caml-list] Problem using pcre on Debian 2002-02-22 10:44 [Caml-list] Problem using pcre on Debian Johann Spies ` (2 preceding siblings ...) 2002-02-22 14:48 ` Markus Mottl @ 2002-02-22 16:01 ` Alain Frisch 3 siblings, 0 replies; 16+ messages in thread From: Alain Frisch @ 2002-02-22 16:01 UTC (permalink / raw) To: Johann Spies; +Cc: caml-list On Fri, 22 Feb 2002, Johann Spies wrote: > There is no Debian package for pcre so I compiled one in > /usr/local/src and installed it to /usr/local/lib/ocaml/pcre. > > The compilation went without a problem after I removed the comment to > use STATIC=1 in the Makefile. I also copied META to the installation > directory. If you want to use pcre as a dll, you have to build it as a dll. So you have to investigate why the Makefile failed to build the dll ... What is your platform / C compiler ? OCamlMakefile uses by default cc as the C compiler, and passes -fPIC to it. On Solaris, cc does not recognizes this option, and I had to tell OCamlMakefile to use gcc instead. Maybe you can try to do the same ... Usually, I use ocamlc as a front-end to the C compiler; it seems natural to compile C files (that have to be interfaced with OCaml) with the compiler ocamlrun was built from. Is there any reason not to do it ? -- Alain ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners ^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2002-02-26 12:06 UTC | newest] Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2002-02-22 10:44 [Caml-list] Problem using pcre on Debian Johann Spies 2002-02-22 11:30 ` Remi VANICAT 2002-02-22 14:08 ` Johann Spies 2002-02-22 14:57 ` Remi VANICAT 2002-02-22 16:08 ` Markus Mottl 2002-02-22 12:59 ` Stefano Zacchiroli 2002-02-22 14:48 ` Markus Mottl 2002-02-22 16:03 ` Johann Spies 2002-02-22 16:17 ` Alain Frisch 2002-02-22 16:27 ` Johann Spies 2002-02-22 21:14 ` Markus Mottl 2002-02-24 17:30 ` Xavier Leroy 2002-02-24 20:44 ` Markus Mottl 2002-02-26 12:06 ` Johann Spies 2002-02-22 16:26 ` Markus Mottl 2002-02-22 16:01 ` Alain Frisch
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox