3
1
I'm trying to launch GNUPlot from Octave, but when I do I get the following error:
octave-3.4.0:3> plot(x,y)
dyld: Library not loaded: /usr/X11/lib/libfreetype.6.dylib
Referenced from: /usr/X11/lib/libfontconfig.1.dylib
Reason: Incompatible library version: libfontconfig.1.dylib requires version 14.0.0 or later, but libfreetype.6.dylib provides version 13.0.0
dyld: Library not loaded: /usr/X11/lib/libfreetype.6.dylib
Referenced from: /usr/X11/lib/libfontconfig.1.dylib
Reason: Incompatible library version: libfontconfig.1.dylib requires version 14.0.0 or later, but libfreetype.6.dylib provides version 13.0.0
/Applications/Gnuplot.app/Contents/Resources/bin/gnuplot: line 71: 53997 Trace/BPT trap: 5 GNUTERM="${GNUTERM}" GNUPLOT_HOME="${GNUPLOT_HOME}" PATH="${PATH}" DYLD_LIBRARY_PATH="${DYLD_LIBRARY_PATH}" HOME="${HOME}" GNUHELP="${GNUHELP}" DYLD_FRAMEWORK_PATH="${DYLD_FRAMEWORK_PATH}" GNUPLOT_PS_DIR="${GNUPLOT_PS_DIR}" DISPLAY="${DISPLAY}" GNUPLOT_DRIVER_DIR="${GNUPLOT_DRIVER_DIR}" "${ROOT}/bin/gnuplot-4.4.3" "$@"
/Applications/Gnuplot.app/Contents/Resources/bin/gnuplot: line 71: 54003 Trace/BPT trap: 5 GNUTERM="${GNUTERM}" GNUPLOT_HOME="${GNUPLOT_HOME}" PATH="${PATH}" DYLD_LIBRARY_PATH="${DYLD_LIBRARY_PATH}" HOME="${HOME}" GNUHELP="${GNUHELP}" DYLD_FRAMEWORK_PATH="${DYLD_FRAMEWORK_PATH}" GNUPLOT_PS_DIR="${GNUPLOT_PS_DIR}" DISPLAY="${DISPLAY}" GNUPLOT_DRIVER_DIR="${GNUPLOT_DRIVER_DIR}" "${ROOT}/bin/gnuplot-4.4.3" "$@"
warning: broken pipe -- some output may be lost
warning: broken pipe -- some output may be lost
warning: broken pipe -- some output may be lost
warning: broken pipe -- some output may be lost
warning: broken pipe -- some output may be lost
warning: broken pipe -- some output may be lost
warning: broken pipe -- some output may be lost
^C
First I tried this:
Notes for Snow Leopard users:
mkoctfile
Since OS X 10.6, the Apple shipped version of
gcc
builds 64bit binaries by default. As the libraries included with Octave.app version 3.2.3 are 32bit, you need to apply the following patch in order for mkoctfile to work:- Open the folder
/Applications
in the Finder - Right-click on Octave.app and select "Show Package Contents"
- Navigate to
/Applications/Octave.app/Contents/Resources/bin
- Right-click on the file
mkoctfile
and select Open with → Other… → TextEdit.app Right after the line:
# along with this program; If not, see <http://www.gnu.org/licenses/>.
add the lines
CFLAGS="-m32 ${CFLAGS}" FFLAGS="-m32 ${FFLAGS}" CPPFLAGS="-m32 ${CPPFLAGS}" CXXFLAGS="-m32 ${CXXFLAGS}" LDFLAGS="-m32 ${LDFLAGS}"
and save.
- Open the folder
Gnuplot.app
An update to system libraries introduced with OS X 10.6.5 has broken the functionality of the Gnuplot.app included with the Octave.app distribution, in order to use Gnuplot.app on OSX 10.6.5 and later, you can use the fix described below:
- Open the folder
/Applications
in the Finder - Right-click on Gnuplot.app and select "Show Package Contents"
- Navigate to
/Applications/Gnuplot.app/Contents/Resources/bin
- Right-click on the file
gnuplot
and select Open with → Other… → TextEdit.app Change the line:
DYLD_LIBRARY_PATH="${ROOT}/lib:${DYLD_LIBRARY_PATH}"
to
DYLD_LIBRARY_PATH="${ROOT}/lib"
and save.
- Open the folder
After that didn't work, I double checked to see I typed the correct information. After that didn't work, I installed MacPorts and used it to install Octave and GNUPlot. That hasn't cleared it up either.
I'm running OS X Lion 10.7.3
The current way of installing octave and gnuplot is using a package manager such as Homebrew; it's really just a few commands and you're done; see http://wiki.octave.org/Octave_for_MacOS_X#Homebrew
– Erik Kaplun – 2013-10-21T00:04:34.727