octave-maintainers
[Top][All Lists]
Advanced

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

Re: error building GUI on Mac OS-X 10.6.8


From: Ben Abbott
Subject: Re: error building GUI on Mac OS-X 10.6.8
Date: Sat, 11 Aug 2012 17:25:52 -0400

On Aug 11, 2012, at 12:53 PM, John W. Eaton wrote:

> On 11-Aug-2012, Ben Abbott wrote:
> 
> | 
> | On Aug 11, 2012, at 12:13 PM, Michael Goffioul wrote:
> | 
> | > On Sat, Aug 11, 2012 at 3:53 PM, Ben Abbott <address@hidden> wrote:
> | >> The the "thread" subdirectory references removed
> | > 
> | > OK, but if you remove moc_QTerminal.cpp and let moc recreate it )when run 
> from gui/src/), does it contain a reference to thread again?
> | 
> | You are correct. The moc_QTerminal.cpp is recreated but without the 
> "thread" reference.
> | 
> | I did this a second time to verify.  Now when I ./run-octave the gui comes 
> up!
> | 
> | So what I did was ...
> | 
> | (1) Apply the findFirst.diff patch
> | (2) Commented out out the call to dissociate_terminal in octave_start_gui 
> in gui/src/octave-gui.cc.
> | (3) Removed qterminal/libqterminal/moc_QTerminal.cpp
> | (4) Ran "make"
> | 
> | I'm able to type commands and plot, and don't see any focus problems.  
> However, the keyboard mapping isn't correct.  When "less" is paging the 
> output, typeing "q" has no effect.  Neither does ctrl-c.  The "Quit" from the 
> MacOS menu bar also does not work.  So I had to kill Octave from the MacOS 
> activity monitor.
> 
> OK, can you try the following change and see if it helps?
> 
> If this change works, then we would need to find a way to call
> dissociate_terminal earlier.  But I'd prefer to avoid calling it
> unconditionally.
> 
> Even if this change does work, it might be best to find a way to
> associate the keyboard (/dev/tty?) with the command window without
> having to fork.
> 
> jwe
> 
> diff --git a/gui/src/octave-gui.cc b/gui/src/octave-gui.cc
> --- a/gui/src/octave-gui.cc
> +++ b/gui/src/octave-gui.cc
> @@ -34,7 +34,7 @@
> 
> // Dissociate from the controlling terminal, if any.
> 
> -static void
> +void
> dissociate_terminal (void)
> {
> #if ! defined (Q_OS_WIN32) || defined (Q_OS_CYGWIN)
> diff --git a/src/main.cc b/src/main.cc
> --- a/src/main.cc
> +++ b/src/main.cc
> @@ -27,9 +27,13 @@
> #include <octave.h>
> #include <octave-gui.h>
> 
> +extern void dissociate_terminal (void);
> +
> int
> main (int argc, char **argv)
> {
> +  dissociate_terminal ();
> +
>   octave_initialize_interpreter (argc, argv, 0);
> 
>   if (octave_starting_gui ())

With that change ...

$ ./run-octave 
panic: Segmentation fault: 11 -- stopping myself...
attempting to save variables to `octave-workspace'...

To be sure I've done everything correctly, I've attached a diff.

Ben

Attachment: changes.diff
Description: Binary data




reply via email to

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