help-octave
[Top][All Lists]
Advanced

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

Re: Where to find readlink for Mac OS 10.3.9?


From: Victor Hanby
Subject: Re: Where to find readlink for Mac OS 10.3.9?
Date: Wed, 26 Sep 2007 20:45:54 +0100

I'm running 10.3.9 on my home machine and at work. After installing 2.9.13 I had no problem at home but at work got the readlink error message.

'which readlink' (at home) gave

/usr/local/teTeX/bin/powerpc-apple-darwin-current/readlink

so I just copied this file onto the other machine. Error message disappeared, but I don't understand it.

Vic

On 26 Sep 2007, at 17:56, Thomas Treichl wrote:

Neil,

readlink should be part of the OS (but I can see that it isn't for 10.3 and this
is a problem). I can find readlink of my 10.4.9 system as

   /usr/bin/readlink

Maybe another idea would be to set an alias in .profile or .bashrc (depends on
whether you prefer to use Terminal.app or xterm)

alias octave="/Applications/Octave.app/Contents/Resources/bin/octave"

Does this work for you?

   Thomas

address@hidden schrieb:
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

_______________________________________________
Help-octave mailing list
address@hidden
https://www.cae.wisc.edu/mailman/listinfo/help-octave


_______________________________________________
Help-octave mailing list
address@hidden
https://www.cae.wisc.edu/mailman/listinfo/help-octave




reply via email to

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