Hello,

You'll find below instructions and needed patches to compile demexp 0.8
on Ubuntu Feisty Fawn (7.04). Those instructions should help for any
Linux system (especially Debian systems) using OCaml 3.09. There are
specific patches for this release of OCaml. Let me know of any issue.

The compiled client and server work but there is an issue with the
translation with the demexp GTK client. I won't look further at this
issue. The issue might be related to the error I have when compiling
ocaml-gettext. 

You can find pre-patched demexp sources and needed patches (in doc/
directory) here:
  
http://www.linux-france.org/~dmentre/demexp/latest-src/demexp-0.8-ubuntu-feisty.tar.gz


Note on modifications: the most important modification I had to do on
demexp sources was to add libraries libtasn1, libgrcypt, libgpg-error
when compiling the servers. I really don't understand why. I anybody has
an explanation...

Yours,
d.

PS: Thank you Serge for raising issues more than a year ago:
  http://thread.gmane.org/gmane.politics.organizations.demexp.devel/887


Compilation of demexp 0.8 on Ubuntu Feisty (7.04)
=================================================

* Install packages :
    ocaml ocaml-native-compilers ocaml-findlib liblablgtk2-ocaml-dev
    nowebm libocamlnet-ocaml-dev gettext libcamomile-ocaml-dev
    librpc-ocaml-dev cduce make gcc libc6-dev sed tetex-bin tetex-extra 
    latex-ucs libbz2-dev libfileutils-ocaml-dev

* Install Gz library

 $ wget http://ocamlplot.sourceforge.net/gz-0.5.7.tar.gz

 $ tar zxf gz-0.5.7.tar.gz

 $ cd gz-0.5.7

 $ ./configure --with-findlib

 $ make all

 $ ocamlfind install gz META {gz,bz}.{cmi,cmx,mli} gz.{a,cma,cmxa} \
      dllmlgz.so libmlgz.a

 [ The 'make install' target does not work, I don't know why. I've sent
   a bug report to gz's authors. ]


* Install ocaml-ast-analyze

 $ wget http://sylvain.le-gall.net/download/ocaml-ast-analyze-0.1.1.tar.gz

 $ tar zxf ocaml-ast-analyze-0.1.1.tar.gz

 $ cd cd ocaml-ast-analyze-0.1.1/

 $ patch -p1 --dry-run < ocaml-ast-analyze-0.1.1-ocaml-3.09.2.patch 

[ This patch is provided next to this file or email. ]

 $ ./configure --libdir=/usr/local/lib/ocaml/3.09.2/

 $ make

 $ make install


* Install ocaml-gettext

 $ wget http://sylvain.le-gall.net/download/ocaml-gettext-0.2.0.tar.gz

 $ tar zxf ocaml-gettext-0.2.0.tar.gz

 $  cd ocaml-gettext-0.2.0/

 $ ./configure --disable-doc --disable-bench \
                     --libdir=/usr/local/lib/ocaml/3.09.2/

 $ make

[ 'make' does the installation. However, there is an error at the
  end. This error does not seem to trigger any issue.

ocamlfind ocamlc   -package "gettext.extension camomile camomile"   -c 
gettextCamomile.ml
findlib: [WARNING] Package gettext has multiple definitions in 
/home/david/demexp/locally-installed/ocaml-gettext-0.2.0/build/lib/gettext/META,
 /usr/local/lib/ocaml/3.09.2/gettext/META
File "gettextCamomile.ml", line 26, characters 0-13:
Unbound module Camomile
]

* Install config_file

 $ wget http://download.gna.org/cameleon/config_file_0.1.tar.gz

 $ tar zxf config_file_0.1.tar.gz 

 $ cd config_file-0.1/

 $ ./configure

 $ chmod 644 master.Makefile

    Edit master.Makefile and modify INSTALLDIR to install config_file
    where you want (configure script is buggy). In my case:
       INSTALLDIR=/usr/local/lib/ocaml/3.09.2/config_file

 $ make all

 $ make install


* Install demexp

  [I choose to install it using stow, so don't forget to install the stow
   package.]

 $ patch -p1 --dry-run \
      < /home/david/demexp/docs/ubuntu-feisty-demexp-0.8.patch 

 $ ./configure --prefix /usr/local/stow/demexp-0.8-feisty/ --no-web

 $ make

 $ make install

  The compiled version works but the interface is not translated. I
  don't know why.

-- 
GPG/PGP key: A3AD7A2A David MENTRE <[EMAIL PROTECTED]>
 5996 CC46 4612 9CA4 3562  D7AC 6C67 9E96 A3AD 7A2A

diff -r 368dc1bbf5f5 config/Makefile.inc
--- a/config/Makefile.inc	Sun Mar 25 16:07:14 2007 +0200
+++ b/config/Makefile.inc	Sat Sep 15 15:58:30 2007 +0200
@@ -359,15 +359,20 @@ srv/demexp-server.ml: srv/demexp-server.
 
 ### native code
 srv/demexp-server: $(SRVOBJ)
-	$(OCAMLOPT) $(SRV_OCAMLOPTFLAGS) -o $@ $(SRV_CMXALIBS) $^
+	$(OCAMLOPT) $(SRV_OCAMLOPTFLAGS)  \
+                -cclib -ltasn1 -cclib -lgcrypt -cclib -lgpg-error \
+                -o $@ $(SRV_CMXALIBS) $^
 
 srv/demexp-server.static: $(SRVOBJ)
 	$(OCAMLOPT) $(SRV_OCAMLOPTFLAGS) -ccopt $(STATIC) \
+                -cclib -ltasn1 -cclib -lgcrypt -cclib -lgpg-error \
 		-o $@ $(SRV_CMXALIBS) $^
 
 ## bytecode
 srv/demexp-server.bc: $(SRVCMO)
-	$(OCAMLC) -custom -dllib pcre_stubs -ccopt $(STATIC) -cclib -lpcre \
+	$(OCAMLC) -custom -dllib pcre_stubs -ccopt $(STATIC) \
+                -cclib -ltasn1 -cclib -lgcrypt -cclib -lgpg-error \
+                -cclib -lpcre \
 		$(SRV_OCAMLCFLAGS) -o $@ $(SRV_CMALIBS) $^
 
 ## gtk2 client
@@ -413,6 +418,7 @@ srv/example-demexp-base.xml: srv/demexp.
 ## install
 
 install: 
+	if test -d $(PREFIX); then : ; else $(MKDIR) $(PREFIX); fi
 	if test -d $(BINDIR); then : ; else $(MKDIR) $(BINDIR); fi
 	if test -d $(MANDIR); then : ; else $(MKDIR) $(MANDIR); fi
 	if test -d $(MANDIR)/man$(MANEXT); then : ; \
diff -Nur ocaml-ast-analyze-0.1.1/CHANGELOG ocaml-ast-analyze-0.1.1-patched/CHANGELOG
--- ocaml-ast-analyze-0.1.1/CHANGELOG	2005-04-16 18:39:08.000000000 +0200
+++ ocaml-ast-analyze-0.1.1-patched/CHANGELOG	2007-09-15 15:15:34.000000000 +0200
@@ -1,3 +1,7 @@
+v 0.1.2 :
+  * Don't search for camlidl in configure, camlidl is not used (Closes: #60),
+  * Compile for ocaml 3.09.0
+
 v 0.1.1 :
   * Add website/ : generate some pages to present ocaml-ast-analyze.
 
diff -Nur ocaml-ast-analyze-0.1.1/configure.in ocaml-ast-analyze-0.1.1-patched/configure.in
--- ocaml-ast-analyze-0.1.1/configure.in	2005-04-16 18:39:40.000000000 +0200
+++ ocaml-ast-analyze-0.1.1-patched/configure.in	2007-09-15 15:15:34.000000000 +0200
@@ -12,7 +12,7 @@
 	AC_HELP_STRING([--with-localedir=dir], [Location of the locale dir ( default is /usr/share/locale and /usr/local/share/locale )]),
 	LOCALEDIR=$LOCALEDIR "\"$withval\";", LOCALEDIR="\"/usr/share/locale\"; \"/usr/local/share/locale\"")
 
-VERSION=0.1.1
+VERSION=0.1.2
 DATE=`date`
 
 # Check for Ocaml compilers
@@ -122,11 +122,6 @@
         AC_MSG_ERROR(Cannot find camlp4.)
 fi
 
-AC_CHECK_PROG(CAMLIDL,camlidl,camlidl,no)
-if test "$CAMLIDL" = no ; then
-        AC_MSG_ERROR(Cannot find camlidl.)
-fi
-
 AC_CHECK_PROG(OCAMLMKLIB,ocamlmklib,ocamlmklib,no)
 if test "$OCAMLMKLIB" = no ; then
         AC_MSG_ERROR(Cannot find ocamlmklib.)
@@ -147,7 +142,6 @@
 AC_SUBST(OCAMLWIN32)
 AC_SUBST(OCAMLFIND)
 AC_SUBST(OCAMLP4)
-AC_SUBST(CAMLIDL)
 AC_SUBST(OCAMLMKLIB)
 AC_SUBST(EXE)
 AC_SUBST(LOCALEDIR)
diff -Nur ocaml-ast-analyze-0.1.1/libast-analyze-ocaml/META ocaml-ast-analyze-0.1.1-patched/libast-analyze-ocaml/META
--- ocaml-ast-analyze-0.1.1/libast-analyze-ocaml/META	2005-02-03 01:46:18.000000000 +0100
+++ ocaml-ast-analyze-0.1.1-patched/libast-analyze-ocaml/META	2007-09-15 15:15:43.000000000 +0200
@@ -1,4 +1,4 @@
-version = "0.1"
+version = "0.1.1-patched-for-ocaml-3.09.2"
 predicates = ""
 requires = "camlp4.gramlib" 
 archive(byte) = "pr_ast_analyze.cmo" 
diff -Nur ocaml-ast-analyze-0.1.1/libast-analyze-ocaml/pr_ast_analyze.ml ocaml-ast-analyze-0.1.1-patched/libast-analyze-ocaml/pr_ast_analyze.ml
--- ocaml-ast-analyze-0.1.1/libast-analyze-ocaml/pr_ast_analyze.ml	2005-01-11 01:16:37.000000000 +0100
+++ ocaml-ast-analyze-0.1.1-patched/libast-analyze-ocaml/pr_ast_analyze.ml	2007-09-15 15:15:39.000000000 +0200
@@ -75,16 +75,18 @@
         ctyp t c1
     | TyQuo (loc,str) -> 
         t
-    | TyRec (loc,b,lst) -> 
+    | TyRec (loc,lst) -> 
         fold ( 
           fun t (loc,str,b,c1) -> 
             ctyp t c1 
           ) t lst
-    | TySum (loc,b,lst) -> 
+    | TySum (loc,lst) -> 
         fold ( 
           fun t (loc,str,lst) -> 
             fold ctyp t lst
           ) t lst
+    | TyPrv (loc, c1) ->
+        ctyp t c1
     | TyTup (loc,lst) -> 
         fold ctyp t lst
     | TyUid (loc,str)-> 
diff -Nur ocaml-ast-analyze-0.1.1/libast-analyze-ocaml/pr_ast_dump.ml ocaml-ast-analyze-0.1.1-patched/libast-analyze-ocaml/pr_ast_dump.ml
--- ocaml-ast-analyze-0.1.1/libast-analyze-ocaml/pr_ast_dump.ml	2005-01-11 01:16:37.000000000 +0100
+++ ocaml-ast-analyze-0.1.1-patched/libast-analyze-ocaml/pr_ast_dump.ml	2007-09-15 15:15:41.000000000 +0200
@@ -108,10 +108,9 @@
       fprintf ppf "TyQuo(@[%a,@ [EMAIL PROTECTED])" 
       ast_loc loc
       str
-  | TyRec (loc,b,lst) -> 
-      fprintf ppf "TyRec(@[%a,@ %B,@ [EMAIL PROTECTED])" 
+  | TyRec (loc,lst) -> 
+      fprintf ppf "TyRec(@[%a,@ [EMAIL PROTECTED])" 
       ast_loc loc
-      b
       (
         ast_list ( 
           fun ppf (loc,str,b,c1) -> 
@@ -122,10 +121,9 @@
             ast_ctyp c1 
           )
       ) lst
-  | TySum (loc,b,lst) -> 
-      fprintf ppf "TySum(@[%a,@ %B,@ [EMAIL PROTECTED])" 
+  | TySum (loc,lst) -> 
+      fprintf ppf "TySum(@[%a,@ [EMAIL PROTECTED])" 
       ast_loc loc
-      b
       (
         ast_list ( 
           fun ppf (loc,str,lst) -> 
@@ -135,6 +133,10 @@
             (ast_list ast_ctyp) lst
           )
       ) lst
+  | TyPrv (loc,c1) ->
+      fprintf ppf "TyPrv(@[%a,@ [EMAIL PROTECTED])"
+      ast_loc loc
+      ast_ctyp c1
   | TyTup (loc,lst) -> 
       fprintf ppf "TyTup(@[%a,@ [EMAIL PROTECTED])"
       ast_loc loc
diff -Nur ocaml-ast-analyze-0.1.1/TopMakefile.in ocaml-ast-analyze-0.1.1-patched/TopMakefile.in
--- ocaml-ast-analyze-0.1.1/TopMakefile.in	2005-01-11 23:46:51.000000000 +0100
+++ ocaml-ast-analyze-0.1.1-patched/TopMakefile.in	2007-09-15 15:15:34.000000000 +0200
@@ -35,7 +35,6 @@
 OCAMLFIND    = @OCAMLFIND@
 OCAMLP4      = @OCAMLP4@
 OCAMLMKLIB   = @OCAMLMKLIB@
-CAMLIDL      = @CAMLIDL@
 OCAMLYACC    = @OCAMLYACC@
 OCAMLLEX     = @OCAMLLEX@
 EXE          = @EXE@
_______________________________________________
Demexp-dev mailing list
Demexp-dev@nongnu.org
http://lists.nongnu.org/mailman/listinfo/demexp-dev

Répondre à