Re: Having problem building on macOS Mojave

classic Classic list List threaded Threaded
49 messages Options
123
Reply | Threaded
Open this post in threaded view
|

Re: Having problem building on macOS Mojave

ThomasScofield
I have recently upgraded to MacOS Mojave.  I did a re-install of Octave from
Homebrew.  The installation seemed to go fine, and the software starts up in
a terminal window without incident.  One of the first things I do after an
install is to check that plots work.  Plotting a simple cosine graph

  xs = 0:.1:2*pi;
  plot(xs, cos(xs))

caused program termination with the message

fatal: caught signal Segmentation fault: 11 -- stopping myself...
Segmentation fault: 11

I've been trolling through maintainers messages, and it seems segfaults have
been a topic of conversation recently, perhaps in connection with the latest
MacOS releases.  I uninstalled/reinstalled Homebrew and started with a clean
slate, but without change.  I have been out of the install-from-source world
for a while, so have shied away from parts of the discussion that involved
playing with software on which Octave is dependent, or running
make/configure.  Following Andrew's note, I did this

 brew tap octave-app/octave-app-bases
 brew install --HEAD octave-head-test

which ran through OK (several notes about keg-only software that wasn't
symlinked, or export for commands should a compiler need to find something),
and gave me a working version of Octave.  That is, as before, I can start it
up in a terminal and do basic stuff.  The plot command that brought on a
segfault with the earlier install now does not cause a crash.  In fact, a
figure window appears, and everything seems to work OK, excepting the fact
that the figure window remains blank.  Other graphic-generating commands act
similarly.

Perhaps this is relevant: since starting anew with Homebrew, I have used it
to install qt but not gnuplot.

Thomas




--
Sent from: http://octave.1599824.n4.nabble.com/Octave-Maintainers-f1638794.html

Reply | Threaded
Open this post in threaded view
|

Re: Having problem building on macOS Mojave

apjanke-floss
Hi Thomas,

Sorry you're having trouble.

On 1/10/19 1:57 PM, ThomasScofield wrote:

> I have recently upgraded to MacOS Mojave.  I did a re-install of Octave from
> Homebrew.  The installation seemed to go fine, and the software starts up in
> a terminal window without incident.  One of the first things I do after an
> install is to check that plots work.  Plotting a simple cosine graph
>
>    xs = 0:.1:2*pi;
>    plot(xs, cos(xs))
>
> caused program termination with the message
>
> fatal: caught signal Segmentation fault: 11 -- stopping myself...
> Segmentation fault: 11
It looks like the Homebrew core octave formula has recently dropped the
patches it uses, so it is no longer picking up the patches for these two
bugs:

https://savannah.gnu.org/bugs/index.php?55268
https://savannah.gnu.org/bugs/?50025

Those bugs manifest with seg faults and hangs, so you could be running
in to one of those. The octave-head-test formula does include these
patches, which could explain why the crash went away when you switched
to using it.

>
> I've been trolling through maintainers messages, and it seems segfaults have
> been a topic of conversation recently, perhaps in connection with the latest
> MacOS releases.  I uninstalled/reinstalled Homebrew and started with a clean
> slate, but without change.  I have been out of the install-from-source world
> for a while, so have shied away from parts of the discussion that involved
> playing with software on which Octave is dependent, or running
> make/configure.  Following Andrew's note, I did this
>
>   brew tap octave-app/octave-app-bases
>   brew install --HEAD octave-head-test
>
> which ran through OK (several notes about keg-only software that wasn't
> symlinked, or export for commands should a compiler need to find something),
Those notes are probably all fine, and expected; they're issued for any
keg-only
formulae, of which octave uses a few. The octave or octave-head-test
formula will automatically take care of those export commands for you
when it does the build.

> and gave me a working version of Octave.  That is, as before, I can start it
> up in a terminal and do basic stuff.  The plot command that brought on a
> segfault with the earlier install now does not cause a crash.  In fact, a
> figure window appears, and everything seems to work OK, excepting the fact
> that the figure window remains blank.  Other graphic-generating commands act
> similarly.
>
> Perhaps this is relevant: since starting anew with Homebrew, I have used it
> to install qt but not gnuplot.

Shouldn't matter. The octave or octave-head-test formulae will
automatically install all their dependencies.

I couldn't reproduce this "blank figure window" behavior on macOS
10.13.6 High Sierra using octave-head-test: running your code, the plot
appears fine for me there.

On 10.14.2 Mojave, I can reproduce your exact behavior: the figure
window is blank after doing a plot(). (I set up a 10.14.2 Mojave VM for
testing.) Screen shot attached. Happens when I do it from the GUI
(`octave --gui`) too.

Resizing the figure window a bit causes the plot graphics to appear.
They're mis-scaled for me; probably a Retina scaling issue. Screen shot
#2 attached. That's probably because octave-head-test does not include
the patch for https://savannah.gnu.org/bugs/?49053.

Does resizing the figure window make plot graphics appear for you?

No idea what's causing it. I can just say it looks like new behavior in
Mojave.

(I had to install it with `brew install --HEAD octave-head-test
--without-docs` to avoid having to install MacTex on the test box.)

For what it's worth, I'm also having another hang with octave-head-test:
if I fire up `octave --gui` and choose the octave-gui > Preferences menu
item, and then close the Preferences pane, the Octave GUI locks up
(spinning beachball) and I have have to Force Quit it. (This is on macOS
10.13.6; doesn't seem to happen on 10.14.)

Would you mind sharing your full build logs so we can see exactly what
your Octave was built with? You can do this with `brew gist-logs
octave-head-test` and sending along the resulting URL. Here's mine for
reference.

https://gist.github.com/0cd9d0ee233f4d7bc782475653e16336

I don't see anything weird in there, offhand.

Cheers,
Andrew



Screen Shot 2019-01-10 at 5.28.20 PM.png (1M) Download Attachment
Screen Shot 2019-01-10 at 6.30.46 PM.png (2M) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Having problem building on macOS Mojave

ThomasScofield
Thanks for the feedback.  Interesting about resizing the graphics window.
Yes, that brought a plot into view for me as well.

I tried running

 octave --gui

and, like you experienced in Mojave, opening/closing the Preferences window
seemed to cause no disruption.  I did a plot from the gui interface, and
just as with the non-gui version, the figure window displayed nothing until
I resized the window.

You're correct, I see that gnuplot is actually installed, must be through
dependency.

My build logs are at

 https://gist.github.com/95d90436391d87bfce30038f03c445d7

I'm going to be teaching a linear algebra course beginning in 2.5 weeks.
I've been regularly recommending and using Octave in various computational
courses such as differential equations and linear algebra.  I'm not sure
that the Mac users among my students will be Homebrew users.  Even for those
who are, if there were a more-easily-followed set of instructions for an
Octave install to share, I would like to hear about it.  Of course, the
version of OSX being used as a student's Mac platform will almost certainly
vary.

Thomas






--
Sent from: http://octave.1599824.n4.nabble.com/Octave-Maintainers-f1638794.html

Reply | Threaded
Open this post in threaded view
|

Re: Having problem building on macOS Mojave

apjanke-floss
On 1/10/19 10:43 PM, ThomasScofield wrote:

>
> I'm going to be teaching a linear algebra course beginning in 2.5 weeks.
> I've been regularly recommending and using Octave in various computational
> courses such as differential equations and linear algebra.  I'm not sure
> that the Mac users among my students will be Homebrew users.  Even for those
> who are, if there were a more-easily-followed set of instructions for an
> Octave install to share, I would like to hear about it.  Of course, the
> version of OSX being used as a student's Mac platform will almost certainly
> vary.
>
> Thomas

This is exactly what Sebastian Schoeps and I made Octave.app for! It's a
native Mac app distribution of Octave with a drag-and-drop installer.

http://octave-app.org/

Download the DMG, open it and drag Octave to Applications, and you're
ready to go. (And optionally, install a JDK if you want to use Java
inside Octave.)

Supports all macOS versions from 10.11 El Capitan onwards. (Octave won't
build on earlier macOS versions.) And it includes the patches for some
crashes and the Retina scaling.

Andrew

Reply | Threaded
Open this post in threaded view
|

Re: Having problem building on macOS Mojave

apjanke-floss
In reply to this post by ThomasScofield


On 1/10/19 10:43 PM, ThomasScofield wrote:

> Thanks for the feedback.  Interesting about resizing the graphics window.
> Yes, that brought a plot into view for me as well.
>
> I tried running
>
>   octave --gui
>
> and, like you experienced in Mojave, opening/closing the Preferences window
> seemed to cause no disruption.  I did a plot from the gui interface, and
> just as with the non-gui version, the figure window displayed nothing until
> I resized the window.
>
> You're correct, I see that gnuplot is actually installed, must be through
> dependency.
>
> My build logs are at
>
>   https://gist.github.com/95d90436391d87bfce30038f03c445d7

Nothing suspicious there as far as I can see. The stuff in doctor.out is
just from a non-brewed Tcl/Tk installation, which is fine, and a couple
non-linked kegs, which don't look relevant.

I think this might be an Octave issue, and not a problem with how you're
building it.

I tested Octave 4.4.0 and 4.4.1 on 10.14.2 Mojave, too. Plots show up
fine for me in 4.4.0 and 4.4.1.

Perhaps this is a Qt issue? My 4.4.0 and 4.4.1 were built against Qt
5.11, whereas octave-head-test is building against Qt 5.12. If I find
some time I'll put together an "Octave head with Qt 5.11" build and see
how that goes.

Andrew

Reply | Threaded
Open this post in threaded view
|

Re: Having problem building on macOS Mojave

ThomasScofield
Thanks for the help.  I really appreciate it.  As far as I'm concerned, I can
live with the state of things (i.e., where a resized plot looks as it
should), at least for now.  Plotting does not comprise a large portion of
the uses I make of the software.  I am also pretty engrained in using the
non-gui version, which this defaults to.  I presume the Octave.app (don't
know how I missed finding that) defaults to a gui version at startup?  I bet
my students will prefer that.

I'll monitor this feed to see if you get round to investigating this
further, and post new things you learn.

Thanks again.
Thomas



--
Sent from: http://octave.1599824.n4.nabble.com/Octave-Maintainers-f1638794.html

Reply | Threaded
Open this post in threaded view
|

Re: Having problem building on macOS Mojave

apjanke-floss

On 1/10/19 11:45 PM, ThomasScofield wrote:

> Thanks for the help.  I really appreciate it.  As far as I'm concerned, I can
> live with the state of things (i.e., where a resized plot looks as it
> should), at least for now.  Plotting does not comprise a large portion of
> the uses I make of the software.  I am also pretty engrained in using the
> non-gui version, which this defaults to.  I presume the Octave.app (don't
> know how I missed finding that) defaults to a gui version at startup?  I bet
> my students will prefer that.
>
> I'll monitor this feed to see if you get round to investigating this
> further, and post new things you learn.
>
> Thanks again.
> Thomas
>

You're welcome!

Yep, Octave.app defaults to the GUI (double-click the icon and you get
the Qt GUI), but you can also launch the command line version by running
it from the command line like so:

/Applications/Octave-4.4.0.app/Contents/Resources/usr/bin/octave

That octave binary is the regular old octave program, and it supports
the normal options.

Sebastian is also a teacher; students were his main use case for making
Octave.app. (He's the original creator; I just came along later and
spruced it up some.)

Yeah, I'd bet your students would prefer the GUI. It shortens the
learning curve for new users: actions are discoverable, and the editor
has syntax highlighting and stuff to assist you in writing code.

Cheers,
Andrew

Reply | Threaded
Open this post in threaded view
|

Re: Having problem building on macOS Mojave

apjanke-floss
In reply to this post by apjanke-floss


On 1/10/19 11:09 PM, Andrew Janke wrote:

>
>
> On 1/10/19 10:43 PM, ThomasScofield wrote:
>> Thanks for the feedback.  Interesting about resizing the graphics window.
>> Yes, that brought a plot into view for me as well.
>>
>> I tried running
>>
>>   octave --gui
>>
>> and, like you experienced in Mojave, opening/closing the Preferences
>> window
>> seemed to cause no disruption.  I did a plot from the gui interface, and
>> just as with the non-gui version, the figure window displayed nothing
>> until
>> I resized the window.
>>
>> You're correct, I see that gnuplot is actually installed, must be through
>> dependency.
>>
>> My build logs are at
>>
>>   https://gist.github.com/95d90436391d87bfce30038f03c445d7
>
> Nothing suspicious there as far as I can see. The stuff in doctor.out is
> just from a non-brewed Tcl/Tk installation, which is fine, and a couple
> non-linked kegs, which don't look relevant.
>
> I think this might be an Octave issue, and not a problem with how you're
> building it.
>
> I tested Octave 4.4.0 and 4.4.1 on 10.14.2 Mojave, too. Plots show up
> fine for me in 4.4.0 and 4.4.1.
>
> Perhaps this is a Qt issue? My 4.4.0 and 4.4.1 were built against Qt
> 5.11, whereas octave-head-test is building against Qt 5.12. If I find
> some time I'll put together an "Octave head with Qt 5.11" build and see
> how that goes.
>
> Andrew

I built an Octave 4.4.0 against Qt 5.12 on macOS 10.14.2 Mojave, and it
had the same "blank figure" behavior as the head test. It looks like
this may have been introduced by Qt 5.12.

Cheers,
Andrew

Reply | Threaded
Open this post in threaded view
|

Re: Having problem building on macOS Mojave

ThomasScofield
Thanks for tracking that down.  Is there a useful way to share this with
people developing qt?



--
Sent from: http://octave.1599824.n4.nabble.com/Octave-Maintainers-f1638794.html

123