[Rd] OpenBSD 3.[23] and R-1.7.1

Simon Urbanek Simon.Urbanek at math.uni-augsburg.de
Fri Jul 25 16:11:28 MEST 2003


On Friday, July 25, 2003, at 01:30  PM, Peter Rye wrote:

> [...]
> I've reviewed my previous OpenBSD patches, which now look like a 
> horribly
> clumsy way of fixing the shared library naming problem, and I see they 
> were
> mangled in the conversion to html.
>
> For the benefit of anyone else using OpenBSD, here are my revised 
> patches
> (just need to get R on the alpha working properly):
>
>
> <code>
>
> -- configure.orig	Fri Jul 25 12:02:53 2003
> ++ configure	Fri Jul 25 12:10:30 2003

Just a side note: it's not a good idea to patch configure, since it is 
auto-generated from configure.ac
You probably want to use following patch for configure.ac: (this one is 
based on current R-devel, but that should be no problem)

--- R-devel/configure.ac        Thu Jul 24 09:38:47 2003
+++ R-devel.patched/configure.ac        Fri Jul 25 15:06:35 2003
@@ -659,6 +659,11 @@
      fi
      ## </NOTE>
      ;;
+  openbsd*)
+    if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then     # 
we're ELF
+      AC_DEFINE(HAVE_NO_SYMBOL_UNDERSCORE)
+    fi
+    ;;
    osf*)
      AC_DEFINE(HAVE_NO_SYMBOL_UNDERSCORE)
      ;;
@@ -885,6 +890,12 @@
        shlib_ldflags="-Bshareable"
      fi
      ;;
+  openbsd*)
+    if ${CPP} - -dM < /dev/null | grep __ELF__ >/dev/null ; then  # 
we're ELF
+      main_ldflags="${wl}-export-dynamic"
+      shlib_ldflags="-shared -fPIC"
+    fi
+    ;;
    osf*)
      cpicflags=
      cxxpicflags=
@@ -1040,6 +1051,12 @@
      else
        LAPACK_LDFLAGS="+s"
      fi
+    ;;
+  openbsd3*)
+    ## Not sure if this is required for earlier versions of OpenBSD
+    PACKAGE_VERSION_MAJOR=`echo ${PACKAGE_VERSION} | sed -e "s/\.//" 
-e "s/\..*$//"`
+    PACKAGE_VERSION_MINOR=`echo ${PACKAGE_VERSION} | sed -e 
"s/.*\.\([^.][^.]*$\)/\1/"`
+    DYLIB_EXT=".so.${PACKAGE_VERSION_MAJOR}.${PACKAGE_VERSION_MINOR}"
      ;;
  esac

Of course you'll need to re-run autoconf after patching.
Again, this is untested since I have no OpenBSD box here.

Cheers,
Simon

---
Simon Urbanek
Department of computer oriented statistics and data analysis
University of Augsburg
Universitätsstr. 14
86135 Augsburg
Germany

Tel: +49-821-598-2236
Fax: +49-821-598-2200

Simon.Urbanek at Math.Uni-Augsburg.de
http://simon.urbanek.info



More information about the R-devel mailing list