Subject: [dtn-users] DTN fails build: configure unable to find Oasys in the system

From: Leo Iannacone <[email-masked]>
Date: Thu, 10 Nov 2011 19:30:49 +0100

Dear DTN users and developers,

in Oasys there's a problem that makes DTN impossible to install if
library Oasys files are not in the "../" level.

This problem has been reported one year ago, but patch was not
imported in the Oasys devel branch.

In fact, after release 1.5.0 I've discovered problem is still there,
so I rewrote the patch (see attach).

Please, could you try it and give me feedback?

On debian systems you can run following commands to apply patch:

# apt-get install mercurial autotools-dev libdb-dev tcl-dev \
   libxerces-c2-dev build-essential
$ hg clone http://dtn.hg.sourceforge.net/hgweb/dtn/oasys
$ cd oasys

Download the patch (in attachment) and copy it into the Oasys dir,
after that run:
$ patch -p1 < fix-aclocal-oasys_v1.5.patch

Run this script to rebuild configure script:
$ ./build-configure.sh

And now classic build way:
$ ./configure
$ make
# make install

$ cd ..

Download DTN2:
$ hg clone http://dtn.hg.sourceforge.net/web/dtn/DTN2

Run this script to rebuild the configure script:
$ ./build-configure.sh

And again with classic build:
$ ./configure
$ make
# make install

Could you please import patch into devel branch if it works?

Best regards,

Leonardo Iannacone.
--- a/aclocal/oasys.ac
+++ b/aclocal/oasys.ac
@@ -48,7 +48,9 @@
 dnl AC_OASYS_CONFIG [major] [minor]
 dnl
 AC_DEFUN(AC_OASYS_CONFIG, [
-    rm -rf oasys
+    if test -d oasys ; then
+    	rm -rf oasys
+    fi  
 
     ac_oasysver_major=$1
     ac_oasysver_minor=$2
@@ -63,38 +65,33 @@
     AC_MSG_CHECKING([for an oasys installation (version $ac_oasysver_major.$ac_oasysver_minor or better)])
 
     ac_oasysdir_ver=`find .. -maxdepth 1 -type d -name $ac_oasysdir_ver_base.* | tail -1`
-    if test "$ac_oasysdir" = "" ; then
-	if test -d "$ac_oasysdir_ver" ; then
-	    ac_oasysdir=$ac_oasysdir_ver
-	elif test -d ../oasys ; then
-	    ac_oasysdir=../oasys
-
-	else
-	    ac_oasysdir=/usr
-	    # Set the oasys paths properly. OASYS_INCDIR points to the parent
-	    # directory containing the oasys header files or the source
-	    # directory itself with a symlink (include/oasys -> .),
-	    # OASYS_LIBDIR points to the directory where the libraries are.
-	    # OASYS_ETCDIR points to where the various scripts are.
-	    #
-	    OASYS_INCDIR="$ac_oasysdir/include"
-	    OASYS_LIBDIR="$ac_oasysdir/lib"
-	    OASYS_ETCDIR="$ac_oasysdir/share/oasys"
-	fi
+
+    if test -d "$ac_oasysdir_ver" ; then
+      ac_oasysdir=$ac_oasysdir_ver
+   
+    elif test -d ../oasys ; then
+      ac_oasysdir=../oasys
+      ac_oasysdir_ver=$ac_oasysdir 
     fi
-        if test -d oasys ; then
-                rm -rf oasys
-        fi
-            mkdir -p oasys/include
-            OASYS_DIR="oasys/include/oasys"
-            OASYS_INCDIR="oasys/include"
-            OASYS_LIBDIR="oasys/lib"
-            OASYS_ETCDIR="oasys/share"
-            ln -s ../../$ac_oasysdir $OASYS_DIR
-            ln -s ../$ac_oasysdir/lib $OASYS_LIBDIR
-            ln -s ../$ac_oasysdir $OASYS_ETCDIR
 
-    #
+    if test -d "$ac_oasysdir_ver" ; then
+      mkdir oasys oasys/include
+      OASYS_INCDIR="oasys/include"
+      OASYS_LIBDIR="oasys/lib"
+      OASYS_ETCDIR="oasys/share"
+      ln -s ../../$ac_oasysdir $OASYS_INCDIR
+      ln -s ../$ac_oasysdir/lib $OASYS_LIBDIR
+      ln -s ../$ac_oasysdir $OASYS_ETCDIR
+
+    else
+      if test "$ac_oasysdir" = "" ; then
+        ac_oasysdir=/usr
+      fi
+      OASYS_INCDIR="$ac_oasysdir/include"
+      OASYS_LIBDIR="$ac_oasysdir/lib"
+      OASYS_ETCDIR="$ac_oasysdir/share/oasys"
+    fi
+   
     if test ! -d $OASYS_INCDIR ; then echo ""
     AC_OASYS_CONFIG_HELP
     AC_MSG_ERROR(nonexistent oasys include directory $OASYS_INCDIR)

---

From: Alex McMahon <[email-masked]>
Date: Fri, 11 Nov 2011 09:29:11 +0000

Hi Leo,

Your oasys patch works and will be applied

All the best

Alex 

On Thu, 2011-11-10 at 19:30 +0100, Leo Iannacone wrote:
> _______________________________________________
> dtn-users mailing list
> [email-masked]
> https://www.irtf.org/mailman/listinfo/dtn-users

---

From: Leo Iannacone <[email-masked]>
Date: Fri, 11 Nov 2011 18:42:00 +0100

> Hi Leo,

Hi Alex!

> Your oasys patch works and will be applied

Thank you!

Just a remind: in order to "really" apply patch you must edit the DTN
branch too, the file "aclocal.m4" need to be updated.

Thanks again,

yours,
Leo.