Software GNUPlot not launching from GNU Octave

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:

  1. 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:

    1. Open the folder /Applications in the Finder
    2. Right-click on Octave.app and select "Show Package Contents"
    3. Navigate to /Applications/Octave.app/Contents/Resources/bin
    4. Right-click on the file mkoctfile and select Open with → Other… → TextEdit.app
    5. 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.

  2. 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:

    1. Open the folder /Applications in the Finder
    2. Right-click on Gnuplot.app and select "Show Package Contents"
    3. Navigate to /Applications/Gnuplot.app/Contents/Resources/bin
    4. Right-click on the file gnuplot and select Open with → Other… → TextEdit.app
    5. Change the line:

      DYLD_LIBRARY_PATH="${ROOT}/lib:${DYLD_LIBRARY_PATH}"
      

    to

    DYLD_LIBRARY_PATH="${ROOT}/lib"
    

    and save.

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

Max Tagher

Posted 2012-02-20T13:42:24.777

Reputation: 33

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

Answers

1

Had the same problem.

I think the issue is that I hadn't installed gnuplot correctly. I got around this by downloading Maxima, which has another binary installation of gnuplot.

http://sourceforge.net/projects/maxima/files/Maxima-MacOS/

Once this was installed, I had to make sure that the environment was set to x11, because aquaterm was also giving me grief. I did this in octave by:

 > setenv GNUTERM 'x11'

And then

 > hist(randn(1,1000))

worked!

NB: This is a partial solution which is workable for me for now. There is surely a better solution...

gabe

Posted 2012-02-20T13:42:24.777

Reputation: 126

brew install gnuplot – Erik Kaplun – 2013-10-21T00:03:58.100

2

Adriano Cortes

Posted 2012-02-20T13:42:24.777

Reputation: 21