[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Getting mod_caml and perl4caml into Debian



On Sun, Nov 09, 2003 at 04:17:02PM +0100, Sven Luther wrote:
> Ok, i am having a look currently. 
> 
> There are still a few warning in the build process, but i guess these
> are harmless. Still it would be nice to solve them :

All the warnings generated now are unavoidable as far as I know.

> ocamldoc -html -stars -sort -I +pcre -I /usr/lib/ocaml/3.07/postgres -d html
> apache.ml cgi.ml dbi.ml dbi_mysql.ml dbi_perl.ml dbi_postgres.ml
> mod_caml.ml registry.ml apache.mli cgi.mli dbi.mli dbi_mysql.mli dbi_perl.mli
> dbi_postgres.mli mod_caml.mli registry.mli
> File "cgi.ml", line 308, characters 5-35:
> Warning: this expression should have type unit.
> File "cgi.ml", line 476, characters 1-16:
> Warning: this expression should have type unit.
> File "dbi_mysql.ml", line 95, characters 3-15:
> Unbound value Mysql.escape
> File "dbi_perl.ml", line 23, characters 0-9:
> Unbound module Perl
> 2 error(s) encountered
> make[1]: [html/index.html] Erreur 1 (ignor?e)

OK, this is a mistake in the Makefile ... The ocamldoc target
shouldn't try to parse dbi_perl.ml if perl4caml isn't installed. This
error can probably be ignored safely.

> Mmm, does modcaml depend on perl4caml ?

It suggests perl4caml, but doesn't strictly depend on it.

> And : 
> 
> ocamlc -output-obj -g -w s -I +pcre -I /usr/lib/ocaml/3.07/postgres
>   dynlink.cma str.cma pcre.cma postgres.cma dbi.cmo dbi_postgres.cmo
>   apache.cmo mod_caml_config.cmo mod_caml.cmo cgi.cmo -o mod_caml.o
> mod_caml.c: Dans la fonction ? caml_startup ?:
> mod_caml.c:13313: attention : implicit declaration of function
>   `caml_startup_code'

Yes, this message is unavoidable as far as I know. I think it's
because the OCaml header files don't declare this function.

> However, for perl4caml, it doesn't build with :
> 
> gcc -Wall -Wno-unused -I/usr/lib/perl/5.8.2/CORE   -c -o perl_c.o
> perl_c.c
> Dans le fichier inclus ? partir de /usr/lib/perl/5.8.2/CORE/perl.h:37,
>           ? partir de perl_c.c:24:
> /usr/lib/perl/5.8.2/CORE/config.h:3691:1: attention : ?
> HAS_GETHOSTBYADDR_R ? red?fini
> Dans le fichier inclus ? partir de /usr/include/caml/misc.h:22,
>           ? partir de /usr/include/caml/alloc.h:20,
>           ? partir de perl_c.c:12:
> /usr/include/caml/config.h:72:1: attention : ceci est la localisation
> d'une pr?c?dente d?finition
> Dans le fichier inclus ? partir de /usr/lib/perl/5.8.2/CORE/perl.h:37,
>           ? partir de perl_c.c:24:
> /usr/lib/perl/5.8.2/CORE/config.h:3704:1: attention : ?
> HAS_GETHOSTBYNAME_R ? red?fini
> Dans le fichier inclus ? partir de /usr/include/caml/misc.h:22,
>           ? partir de /usr/include/caml/alloc.h:20,
>           ? partir de perl_c.c:12:
> /usr/include/caml/config.h:71:1: attention : ceci est la localisation
> d'une pr?c?dente d?finition
> In file included from /usr/lib/perl/5.8.2/CORE/op.h:484,
>                  from /usr/lib/perl/5.8.2/CORE/perl.h:2344,
>                  from perl_c.c:24:
> /usr/lib/perl/5.8.2/CORE/reentr.h:611: error: field `_crypt_struct' has
> incomplete type
> make[1]: *** [perl_c.o] Erreur 1
> make[1]: Leaving directory `/home/luther/debian/modcaml/perl4caml-0.3.6'

Grrr. this is really annoying. What's happening here is two things.

Firstly there are _two_ header files, both called config.h, and both
containing conflicting symbol names which need to be included in order
to link with OCaml and with perl. Both OCaml and perl use the C
namespace without regard to other libraries. So the warnings are
unavoidable, but safe.

Secondly there seems to be some problem with Perl 5.8.2. Where do you
get this from? I'm using Debian/unstable here, and I only seem to have
Perl 5.8.1.

> Not sure about this, but maybe a missing build-dependency, or an
> incompatible header package or something such. I have upgraded my sid
> install this morning.
> 
> Also, when installing apache, i get :
> 
> Param?trage de libapache-ocaml (1.0.0-5) ...
> dpkg : des probl?mes de d?pendances emp?chent la configuration de
> libapache-ocaml-dev :
>  libapache-ocaml-dev d?pend de apache ; cependant :
>   Paquet apache n'est pas install?.
> dpkg : erreur de traitement de libapache-ocaml-dev (--install) :
>  probl?mes de d?pendances - laiss? non configur?
> Des erreurs ont ?t? rencontr?es pendant l'ex?cution :
>  libapache-ocaml-dev
> 
> But then, i have apache2 and not apache installed.

Not sure about this. There's a bug in apache2 (in Debian) which
prevents you from using any Apache module which links with
pcre. Apparently it is possible to build Apache2 so that it doesn't
have this bug, but since I'm not really too interested in Apache2 I
haven't verified this. Anyway the long and the short of this is that
you won't be able to build a working mod_caml package which works with
Debian's Apache2 in its current form. I'm using Apache 1.3 here.

Rich.

-- 
Richard Jones. http://www.annexia.org/ http://freshmeat.net/users/rwmj
Merjis Ltd. http://www.merjis.com/ - improving website return on investment
"One serious obstacle to the adoption of good programming languages is
the notion that everything has to be sacrificed for speed. In computer
languages as in life, speed kills." -- Mike Vanier



Reply to: