octave-maintainers
[Top][All Lists]
Advanced

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

Solaris: patches to run-octave.in


From: Moritz Borgmann
Subject: Solaris: patches to run-octave.in
Date: Thu, 29 Nov 2007 23:08:33 +0100

Good news: I have seen the message "Octave successfully built" on my Solaris 8 system for the first time now. I'll follow up with a couple minor remaining issues.

To start with, some patches for run-octave.in. The problem with the current run-octave script is that by default, Solaris has seriously braindead awk, find, and sh commands (at least on Solaris 8, I don't have anything newer to test).

Sun's find simply doesn't like the -exec '{}': - it wants a space between the '{}' and the colon, otherwise it prints a literal {}. Rather stupid. I'm now using configure to specify another find, if possible gfind.

I guess that we either want to remark the fact that Sun find doesn't work in a (new) README.solaris, or try some other methods to make it more portable.

For awk, I use the gawk that we find during configure.

In terms of braindead sh, I live with it by setting the environment variables and exporting them before we run the exec.

Also, I don't see why we need LD_PRELOAD; setting LD_LIBRARY_PATH should be sufficient. LD_PRELOAD actually leads to errors under Solaris; I suspect that the dynamic linker tries to link the octave libraries into any child process of octave (such as shells) and fails.

Find patches below.

Index: Makeconf.in
===================================================================
RCS file: /cvs/octave/Makeconf.in,v
retrieving revision 1.201
diff -u -r1.201 Makeconf.in
--- Makeconf.in 26 Oct 2007 18:22:04 -0000      1.201
+++ Makeconf.in 29 Nov 2007 22:01:07 -0000
@@ -29,6 +29,9 @@
 SED = @SED@
 export SED

+FIND = @FIND@
+export FIND
+
 PERL = @PERL@
 PYTHON = @PYTHON@

@@ -586,6 +589,8 @@
 define do-subst-script-vals
 echo "making $@ from $<"
 $(SED) < $< \
+  -e "s|%AWK%|${AWK}|g" \
+  -e "s|%FIND%|${FIND}|g" \
   -e "s|%library_path_var%|${library_path_var}|g" \
   -e "s|%liboctinterp%|${LIBPRE}octinterp.${SHLEXT}|g" \
   -e "s|%liboctave%|${LIBPRE}octave.${SHLEXT}|g" \
Index: aclocal.m4
===================================================================
RCS file: /cvs/octave/aclocal.m4,v
retrieving revision 1.116
diff -u -r1.116 aclocal.m4
--- aclocal.m4  24 Oct 2007 20:35:20 -0000      1.116
+++ aclocal.m4  29 Nov 2007 22:01:07 -0000
@@ -817,6 +817,14 @@
AC_DEFINE(MKDIR_TAKES_ONE_ARG, 1, [Define if host mkdir takes a single argument.])
 fi
 ])
+# OCTAVE_PROG_FIND
+# ----------------
+# Check for gfind first since it's generally better.
+AN_MAKEVAR([FIND],  [OCTAVE_PROG_FIND])
+AN_PROGRAM([gfind], [OCTAVE_PROG_FIND])
+AN_PROGRAM([find],  [OCTAVE_PROG_FIND])
+AC_DEFUN([OCTAVE_PROG_FIND],
+[AC_CHECK_PROGS(FIND, gfind find, )])
 # OCTAVE_PROG_SED
 # --------------
 # Check for a fully-functional sed program, that truncates
Index: configure.in
===================================================================
RCS file: /cvs/octave/configure.in,v
retrieving revision 1.596
diff -u -r1.596 configure.in
--- configure.in        14 Nov 2007 22:21:35 -0000      1.596
+++ configure.in        29 Nov 2007 22:01:07 -0000
@@ -1592,6 +1592,7 @@
 ### and running Octave.

 AC_PROG_AWK
+OCTAVE_PROG_FIND
 OCTAVE_PROG_SED
 OCTAVE_PROG_PERL
 OCTAVE_PROG_PYTHON
Index: run-octave.in
===================================================================
RCS file: /cvs/octave/run-octave.in,v
retrieving revision 1.24
diff -u -r1.24 run-octave.in
--- run-octave.in       12 Oct 2007 21:27:12 -0000      1.24
+++ run-octave.in       29 Nov 2007 22:01:07 -0000
@@ -20,7 +20,8 @@
 ## along with Octave; see the file COPYING.  If not, see
 ## <http://www.gnu.org/licenses/>.

-AWK=${AWK:-'awk'}
+AWK=%AWK%
+FIND=%FIND%

 # FIXME -- is there a better way to handle the possibility of spaces
 # in these names?
@@ -37,10 +38,10 @@
 d3="$builddir/scripts"
 d4="$builddir/src"

-d1_list=`find "$d1" -type d -a ! \( \( -name CVS -o -name private \) -a -prune \) -exec echo '{}': ';'` -d2_list=`find "$d2" -type d -a ! \( \( -name CVS -o -name private \) -a -prune \) -exec echo '{}': ';'` -d3_list=`find "$d3" -type d -a ! \( \( -name CVS -o -name private \) -a -prune \) -exec echo '{}': ';'` -d4_list=`find "$d4" -type d -a ! \( \( -name CVS -o -name private \) -a -prune \) -exec echo '{}': ';'` +d1_list=`$FIND "$d1" -type d -a ! \( \( -name CVS -o -name private \) -a -prune \) -exec echo '{}': ';'` +d2_list=`$FIND "$d2" -type d -a ! \( \( -name CVS -o -name private \) -a -prune \) -exec echo '{}': ';'` +d3_list=`$FIND "$d3" -type d -a ! \( \( -name CVS -o -name private \) -a -prune \) -exec echo '{}': ';'` +d4_list=`$FIND "$d4" -type d -a ! \( \( -name CVS -o -name private \) -a -prune \) -exec echo '{}': ';'`

d1_path=`echo "$d1_list" | $AWK '{ t = (s $0); s = t; } END { sub (/:$/, "", s); print s; }'` d2_path=`echo "$d2_list" | $AWK '{ t = (s $0); s = t; } END { sub (/:$/, "", s); print s; }'`
@@ -64,8 +65,12 @@
   fi
 fi

-OCTAVE_SITE_INITFILE="$top_srcdir/scripts/startup/main-rcfile" \
-LD_PRELOAD="$liboctinterp $liboctave $libcruft" \
-%library_path_var%="$builddir/src:$builddir/liboctave:$builddir/libcruft:$%library_path_var%" \ - exec $driver "$builddir/src/octave" --no-initial-path --path="$LOADPATH" --image-path="$IMAGEPATH" --info-file="$INFOFILE" "$@"
+OCTAVE_SITE_INITFILE="$top_srcdir/scripts/startup/main-rcfile"
+export OCTAVE_SITE_INITFILE
+
+%library_path_var%="$builddir/src:$builddir/liboctave:$builddir/libcruft:$%library_path_var%"
+export %library_path_var%
+
+exec $driver "$builddir/src/octave" --no-initial-path --path="$LOADPATH" \
+  --image-path="$IMAGEPATH" --info-file="$INFOFILE" "$@"


Cheers,

Moritz


reply via email to

[Prev in Thread] Current Thread [Next in Thread]