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

pgocaml and calendar package.



Hello.

I'd like to raise up an issue with the current packaging of libocaml-calendar-dev and compiling pgocaml. You'll find background material at the end.

What it boils down to is the following:

-1- The current packaging of libocaml-calendar-dev delivers .cmo files, and not .cma files;

-2- For this reason, pgocaml fails to compile properly on debian systems.

I see two possible solutions:

-1- Changing the packaging of libocaml-calendar-dev in order to provide .cma files;

-2- Packaging pgocaml in debian.

What should be the course of action to follow?

Guillaume Yziquel.


https://lists.berlios.de/pipermail/pgocaml-dev/2008-October/000008.html

Yesterday I tried to compile pgocaml, but I couldn't link the test suite:

================================ 8< CUT HERE >8 ================================
$ make
ocamlfind ocamlc -g  -package unix,extlib,pcre,calendar,csv -c pGOCaml_config.ml
ocamlfind ocamlc -g  -package unix,extlib,pcre,calendar,csv -c pGOCaml.mli
ocamlfind ocamlc -g  -package unix,extlib,pcre,calendar,csv -c pGOCaml.ml
ocamlfind ocamlc -g -package unix,extlib,pcre,calendar,csv -a -o
pgocaml.cma pGOCaml_config.cmo pGOCaml.cmo
ocamlfind ocamlopt   -package unix,extlib,pcre,calendar,csv -c pGOCaml_config.ml
ocamlfind ocamlopt   -package unix,extlib,pcre,calendar,csv -c pGOCaml.ml
ocamlfind ocamlopt  -package unix,extlib,pcre,calendar,csv -a -o
pgocaml.cmxa pGOCaml_config.cmx pGOCaml.cmx
ocamlfind ocamlc -g -package unix,extlib,pcre,calendar,csv \
	  -pp "camlp4o pa_extend.cmo q_MLast.cmo -loc loc -impl" \
	  -I +camlp4 -c -impl pa_pgsql.ml4
ocamlfind ocamlc -g  -package unix,extlib,pcre,calendar,csv -c
test_pgocaml_lowlevel.ml
ocamlfind ocamlc -g -package unix,extlib,pcre,calendar,csv -linkpkg \
	  pgocaml.cma -o test_pgocaml_lowlevel test_pgocaml_lowlevel.cmo
Error while linking pgocaml.cma(PGOCaml):
Reference to undefined global `Calendar'
make: *** [test_pgocaml_lowlevel] Error 2
================================ 8< END HERE >8 ================================

As you can see the package "calendar" is present and actually the
library successfully compiles, both native and bytecode.

My system is a Debian (unstable), OCaml 3.10.2, extlib 1.5.1, calendar
2.0.2 and csv 1.1.6. I think I'm probably missing something *very*
obvious that I should see at a glance. Can anyone of you help me?

Thanks a lot,


-- Paolo ~ ~ :wq


https://lists.berlios.de/pipermail/pgocaml-dev/2008-October/000012.html

Thanks, Richard and Dario, for help. The problem is actually the
absence of .cma, .cmxa and .a files in the Debian package. Downloading
the original source package [1] I found that the problem is present in
the source distribution itself. I'll send a note to Julien Signoles.

Best regards,


[1] http://www.lri.fr/~signoles/prog/calendar/calendar-2.0.4.tar.gz


-- Paolo ~ ~ :wq


https://lists.berlios.de/pipermail/pgocaml-dev/2008-October/000017.html

Richard Jones wrote:
> Hmmm -- shouldn't ocamlfind ... -package calendar pick this up?

It does. Actually, I think the problem is in PGOcaml itself (I've faced
a similar situation with nurpawiki): the compilation of each module
succeeds because .cmi files for each submodule are there (maybe they
shouldn't, BTW). Adding "open CalendarLib" at the beginning of each
module using calendar's ones solved all my problems in nurpawiki.


Cheers,

-- Stéphane


https://lists.berlios.de/pipermail/pgocaml-dev/2008-October/000018.html

Richard Jones wrote:

> Paolo: If you add 'open CalendarLib' somewhere at the top of the
> test_pgocaml_lowlevel.ml file, does it link?

Adding "open CalendarLib" on top of pGOCaml.ml *and* pGOCaml.mli, and
replacing line 41 of PGOcaml Makefile (from 1.1 source tarball):
-I +calendar $(shell ocamlfind query calendar)/calendar.cma \
with:
-I +calendar $(shell ocamlfind query calendar)/calendarLib.cmo \

everything compiles and links.

In any case, this is the first time a see an OCaml library distributed
as cmo/cmx and not as a cma/cmxa package. Unfortunately a standard for
package distribution (blessed by INRIA) is far from coming, but Calendar
distribution package is certainly weird a lot :-)

-- Paolo ~ ~ :wq


Reply to: