[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Where to find readlink for Mac OS 10.3.9?
From: |
Neil.Francis |
Subject: |
Where to find readlink for Mac OS 10.3.9? |
Date: |
Wed, 26 Sep 2007 10:28:59 +0800 |
Hello,
I've been trying to update my 2.1.73 to the SourceForge.net binaries for
2.9.13 and 2.9.14 on PPC Mac OS X 10.3.9, but am running into a problem
with the startup script that they supply. It expects to find a program
called readlink, which isn't present on my machine, so I get an error
message whenever I start octave. This would only be mildy annoying, but
it also seems to mean that I can't start octave with command link
arguments - they seem to be ignored. This breaks a cron job I run,
which runs a script, which calls octave with command line arguments.
I've tried googling for readlink, but haven't found a PPC binary for it.
I've noticed there is a man page for readlink on my machines, but they
are referring to a C function in unistd.h, not something that can be run
from the shell.
If it makes a difference, I've symlinked to the installed location
(/Applications/Octave/Octave.app/Contents/Resources/bin/octave) from
/usr/local/bin, which is in my path.
I see -
/Applications/Octave/Octave.app/Contents/Resources/bin/octave: line 1:
readlink: command not found
GNU Octave, version 2.9.13
Copyright (C) 2007 John W. Eaton and others.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTIBILITY or
FITNESS FOR A PARTICULAR PURPOSE. For details, type `warranty'.
Octave was configured for "powerpc-apple-darwin7.9.1".
Additional information about Octave is available at
http://www.octave.org.
Please contribute if you find this software useful.
For more information, visit http://www.octave.org/help-wanted.html
Report bugs to <address@hidden> (but first, please read
http://www.octave.org/bugs.html to learn how to write a helpful report).
For information about changes from previous versions, type `news'.
octave-2.9.13:1>
The startup script looks like this:
#!/bin/sh
# Copyright (C) 2007, Thomas Treichl and Paul Kienzle
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301 USA
# Checks if Octave is started from a file that is a link or if this
# file has been taken directly to startup the Octave program.
LINK=`readlink "${0}"`
if [ -z "${LINK}" ]; then
BASE="${0%/bin/octave}"
else
BASE="${LINK%/bin/octave}"
fi
#BASE="/Applications/Octave/Octave.app/Contents/Resources/bin/octave"
ROOT=`(cd "${BASE}" 2>/dev/null && pwd)`
# echo LINK: ${LINK}
# echo BASE: ${BASE}
# echo ROOT: ${ROOT}; exit
# Check if Gnuplot.app is installed in /Applications. Other
# directories could be added in a similiar way.
if [ -d "/Applications/Gnuplot.app" ]; then
PATH="/Applications/Gnuplot.app/Contents/Resources/bin:$PATH"
fi
# Setting up various path information variables that are needed to
# startup the Octave program.
OCTAVE_HOME="${ROOT}"
PATH="${ROOT}/bin:${PATH}"
DYLD_LIBRARY_PATH="${ROOT}/lib:${DYLD_LIBRARY_PATH}"
DYLD_LIBRARY_PATH="${ROOT}/lib/octave-2.9.13:${DYLD_LIBRARY_PATH}"
# Setting up various path information variables that are needed to run
# the "mkoctfile" and "mex" commands from within the Octave program.
CFLAGS="-I'${ROOT}/include/curl' -I'${ROOT}/include/readline' ${CFLAGS}"
CPPFLAGS="${CFLAGS}"
CXXFLAGS="${CXXFLAGS}"
LDFLAGS="-L${ROOT}/lib -L${ROOT}/lib/octave-2.9.13 ${LDFLAGS}"
# These default include paths are set by mkoctfile-2.9.12 automatically
# CFLAGS="-I'${ROOT}/include' -I'${ROOT}/include/octave-2.9.13'"
# Setting up other variables that are needed to run the octave program
# or mkoctfile.
DL_LDFLAGS="-bundle -bundle_loader '${ROOT}/bin/octave-2.9.13'"
SED="/usr/bin/sed"
# Export the variables that have been defined before so that the
# Octave program gets knowledge about them.
export OCTAVE_HOME PATH DYLD_LIBRARY_PATH
export CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
export DL_LDFLAGS SED
# Invoke octave, preserving spaces in all the input arguments.
"${ROOT}/bin/octave-2.9.13" "$@"
Any assistance appreciated!
Neil
- Where to find readlink for Mac OS 10.3.9?,
Neil.Francis <=