octave-maintainers
[Top][All Lists]
Advanced

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

Re: Octave 4.0 on Mac OS Yosemite (with gui!)


From: Sebastian Schöps
Subject: Re: Octave 4.0 on Mac OS Yosemite (with gui!)
Date: Mon, 3 Aug 2015 03:54:44 -0700 (PDT)

1) Octave with homegrown Mesa: 

I compiled mesa-10.5.4 using the sources from
ftp://ftp.freedesktop.org/pub/mesa/10.5.4/mesa-10.5.4.tar.gz 
which is the most recent one that is in Macports. I used their patches:
https://trac.macports.org/browser/trunk/dports/x11/mesa/files/0001-glext.h-Add-missing-include-of-stddef.h-for-ptrdiff_.patch?format=txt
https://trac.macports.org/browser/trunk/dports/x11/mesa/files/1001-darwin-Fix-install-name-of-libOSMesa.patch?format=txt
https://trac.macports.org/browser/trunk/dports/x11/mesa/files/5001-swrast-Build-fix-for-darwin.patch?format=txt
https://trac.macports.org/browser/trunk/dports/x11/mesa/files/5002-darwin-Suppress-type-conversion-warnings-for-GLhandl.patch?format=txt
https://trac.macports.org/browser/trunk/dports/x11/mesa/files/5003-applegl-Provide-requirements-of-_SET_DrawBuffers.patch?format=txt

and the following configure switches
./configure --prefix=/usr/local  --disable-silent-rules --disable-xvmc
--disable-glx --disable-dri --disable-openvg --with-dri-drivers=swrast
--with-gallium-drivers="" --disable-shared-glapi --disable-egl
--with-egl-platforms="" --enable-osmesa --enable-gallium-llvm=no

Then I used the standard flags to compile octave, i.e., I added
"--with-OSMesa-includedir=/usr/local/include"
and "--with-OSMesa-libdir=/usr/local/lib" to configure.

(Actually I used homebrew, you can find my build script here:
https://gist.github.com/schoeps/45235e1dce52df45e323)

2) Octave with Mesa from XQuartz 2.7.8_rc1:
This was quite messy since I did not manage to make octave find the includes
properly. However, I did the following ugly trick: I hardcoded the path of
"osmesa.h" in "libinterp/dldfcn/__osmesa_print__.cc" to
"/opt/X11/include/GL/osmesa.h" (and the same for "GL/osmesa.h"). This
finally allowed octave to find osmesa but then it complained about missing
gl.h. The only way I found was to change "<GL/gl.h>" to "<gl.h>" in
"/opt/X11/include/GL/osmesa.h". This allowed to compile Octave after being
configured with "--with-OSMesa-includedir=/opt/X11/include
--with-OSMesa-libdir=/opt/X11/lib" using LDFLAGS "-L/opt/X11/lib" and CFLAGS
"-I/opt/X11/include". I am not sure why all this was necessary; it might be
a bug in the Xquartz includes or in the compile script of Octave.

Anyway, images that I save with "print" from Octave 4 on Yosemite are
entirely black (I will check if the bug is also present when disabling
osmesa).




--
View this message in context: 
http://octave.1599824.n4.nabble.com/Octave-4-0-on-Mac-OS-Yosemite-with-gui-tp4671769p4671976.html
Sent from the Octave - Maintainers mailing list archive at Nabble.com.



reply via email to

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