GUI on MacOS X !

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
24 messages Options
12
Reply | Threaded
Open this post in threaded view
|

GUI on MacOS X !

bpabbott
Administrator
In the last week something changed. The GUI is now running for me with Mac OS X (10.12.6) on a 2.9GHz Intel Core i7 MacBook Pro.

$ hg tip
changeset:   24092:80906ac05e7d
bookmark:    @
tag:         tip
user:        John W. Eaton <[hidden email]>
date:        Fri Sep 22 22:03:01 2017 -0400
summary:     * lex.ll: Disable GCC diagnostic -Wimplicit-fallthrough.

I’m using Fink for dependencies and am linking to their Qt4 libs.

The GUI hangs when I quit, so its not “stable” yet.

Ben


Reply | Threaded
Open this post in threaded view
|

Re: GUI on MacOS X !

Daniel Sebald
On 09/23/2017 10:49 AM, Ben Abbott wrote:

> In the last week something changed. The GUI is now running for me with Mac OS X (10.12.6) on a 2.9GHz Intel Core i7 MacBook Pro.
>
> $ hg tip
> changeset:   24092:80906ac05e7d
> bookmark:    @
> tag:         tip
> user:        John W. Eaton <[hidden email]>
> date:        Fri Sep 22 22:03:01 2017 -0400
> summary:     * lex.ll: Disable GCC diagnostic -Wimplicit-fallthrough.
>
> I’m using Fink for dependencies and am linking to their Qt4 libs.
>
> The GUI hangs when I quit, so its not “stable” yet.

That may not be a Mac OS X specific problem, just generally that Octave
clean up at exit isn't quite correct yet for the Qt GUI.  There has been
a change to objects now rather than static variables.  Perhaps those
changes have enabled your GUI, but still need perfecting.  If you have
an error message, create a bug report.

Dan


Reply | Threaded
Open this post in threaded view
|

Re: GUI on MacOS X !

Sebastian Schöps
In reply to this post by bpabbott
bpabbott wrote
> In the last week something changed. The GUI is now running for me with Mac
> OS X (10.12.6) on a 2.9GHz Intel Core i7 MacBook Pro.
> [...]
> I’m using Fink for dependencies and am linking to their Qt4 libs.
>
> The GUI hangs when I quit, so its not “stable” yet.

This is also what I observe since more than half a year. Octave hangs on
exit:
https://savannah.gnu.org/bugs/?50025
https://savannah.gnu.org/bugs/?50795

Homebrew has stopped shipping the GUI. I did not see any change recently.
However, I am compiling with qt5.9. Maybe this makes a difference.

By the way: to my knowledge we should drop support for qt4 as it is
unsupported and has many knows bugs.

Bye
Sebastian



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

Reply | Threaded
Open this post in threaded view
|

Re: GUI on MacOS X !

bpabbott
Administrator
> On Sep 24, 2017, at 7:26 AM, Sebastian Schöps <[hidden email]> wrote:
>
> bpabbott wrote
>> In the last week something changed. The GUI is now running for me with Mac
>> OS X (10.12.6) on a 2.9GHz Intel Core i7 MacBook Pro.
>> [...]
>> I’m using Fink for dependencies and am linking to their Qt4 libs.
>>
>> The GUI hangs when I quit, so its not “stable” yet.
>
> This is also what I observe since more than half a year. Octave hangs on
> exit:
> https://savannah.gnu.org/bugs/?50025
> https://savannah.gnu.org/bugs/?50795
>
> Homebrew has stopped shipping the GUI. I did not see any change recently.
> However, I am compiling with qt5.9. Maybe this makes a difference.
>
> By the way: to my knowledge we should drop support for qt4 as it is
> unsupported and has many knows bugs.
>
> Bye
> Sebastian

I’m still using Qt4 because I was never able to complete a successful build wth Qt5 (via Fink).

If there are any maintainers on MacOS who would like to get the gui working, now may be a good opportunity.

Ben
Reply | Threaded
Open this post in threaded view
|

Re: GUI on MacOS X !

Sebastian Schöps
> Am 24.09.2017 um 13:49 schrieb Ben Abbott <[hidden email]>:
>> On Sep 24, 2017, at 7:26 AM, Sebastian Schöps <[hidden email]> wrote:
>>> The GUI hangs when I quit, so its not “stable” yet.
>>
>> This is also what I observe since more than half a year. Octave hangs on
>> exit:
>> https://savannah.gnu.org/bugs/?50025
>> https://savannah.gnu.org/bugs/?50795
>>
>> Homebrew has stopped shipping the GUI. I did not see any change recently.
>> However, I am compiling with qt5.9. Maybe this makes a difference.
>>
>> By the way: to my knowledge we should drop support for qt4 as it is
>> unsupported and has many knows bugs.
>
> I’m still using Qt4 because I was never able to complete a successful build wth Qt5 (via Fink).
>
> If there are any maintainers on MacOS who would like to get the gui working, now may be a good opportunity.

I like to add that we have - thanks to Simone Deparis - an macOS development machine... dear qt experts, please help!

Sebastian


Reply | Threaded
Open this post in threaded view
|

Re: GUI on MacOS X !

Simone Deparis
On 24.09.17 14:03, Sebastian Schöps wrote:

>> Am 24.09.2017 um 13:49 schrieb Ben Abbott <[hidden email]>:
>>> On Sep 24, 2017, at 7:26 AM, Sebastian Schöps <[hidden email]> wrote:
>>>> The GUI hangs when I quit, so its not “stable” yet.
>>>
>>> This is also what I observe since more than half a year. Octave hangs on
>>> exit:
>>> https://savannah.gnu.org/bugs/?50025
>>> https://savannah.gnu.org/bugs/?50795
>>>
>>> Homebrew has stopped shipping the GUI. I did not see any change recently.
>>> However, I am compiling with qt5.9. Maybe this makes a difference.
>>>
>>> By the way: to my knowledge we should drop support for qt4 as it is
>>> unsupported and has many knows bugs.
>>
>> I’m still using Qt4 because I was never able to complete a successful build wth Qt5 (via Fink).
>>
>> If there are any maintainers on MacOS who would like to get the gui working, now may be a good opportunity.
>
> I like to add that we have - thanks to Simone Deparis - an macOS development machine... dear qt experts, please help!
>
> Sebastian
>

As discussed with Sebastian, I have upgraded the MacMini. If needed, I
can give access to other developers, please let me know.

Thanks!


Simone


--
_____________________________________________________________________

   Simone Deparis, PhD, MER
   Deputy Director SMA
   MA A2 383
   SMA - SB - EPFL
   Station 8
   CH - 1015 Lausanne
   Switzerland

   phone :  +41 -21 693 2547             mailto:[hidden email]
                                  http://people.epfl.ch/simone.deparis
_____________________________________________________________________

Reply | Threaded
Open this post in threaded view
|

Re: GUI on MacOS X !

Daniel Sebald
In reply to this post by Sebastian Schöps
On 09/24/2017 07:03 AM, Sebastian Schöps wrote:

>> Am 24.09.2017 um 13:49 schrieb Ben Abbott <[hidden email]>:
>>> On Sep 24, 2017, at 7:26 AM, Sebastian Schöps <[hidden email]> wrote:
>>>> The GUI hangs when I quit, so its not “stable” yet.
>>>
>>> This is also what I observe since more than half a year. Octave hangs on
>>> exit:
>>> https://savannah.gnu.org/bugs/?50025
>>> https://savannah.gnu.org/bugs/?50795
>>>
>>> Homebrew has stopped shipping the GUI. I did not see any change recently.
>>> However, I am compiling with qt5.9. Maybe this makes a difference.
>>>
>>> By the way: to my knowledge we should drop support for qt4 as it is
>>> unsupported and has many knows bugs.
>>
>> I’m still using Qt4 because I was never able to complete a successful build wth Qt5 (via Fink).
>>
>> If there are any maintainers on MacOS who would like to get the gui working, now may be a good opportunity.
>
> I like to add that we have - thanks to Simone Deparis - an macOS development machine... dear qt experts, please help!

I don't have Mac OS X, but I looked at the code a bit.

First, in Linux I migrated from Qt4 to Qt5 a little while ago and had no
problems.  A couple years ago Qt5 was unstable so I stuck with Qt4, but
I suspect that is because of distro build tools used by Qt5 hadn't
caught up.  So, I'd say anyone looking to migrate from Qt4 to Qt5
shouldn't have but a small number of issues, if any.

Regarding the Mac OS crash at shutdown, I suspect this is a consequence
of Octave not correctly shutting down the QThread that holds the
interpreter.  It's just that Linux working is probably luck more than
anything.  On Mac OS, no such luck.

I've posted some comments at this bug report:

https://savannah.gnu.org/bugs/?50025

I'm not sure of how to proceed because I think the GUI startup/shutdown
sequence needs to be overhauled, which might take a while.

Dan

Reply | Threaded
Open this post in threaded view
|

Re: GUI on MacOS X !

bpabbott
Administrator
On Sep 24, 2017, at 4:29 PM, Daniel J Sebald <[hidden email]> wrote:

On 09/24/2017 07:03 AM, Sebastian Schöps wrote:
Am 24.09.2017 um 13:49 schrieb Ben Abbott <[hidden email]>:
On Sep 24, 2017, at 7:26 AM, Sebastian Schöps <[hidden email]> wrote:
The GUI hangs when I quit, so its not “stable” yet.

This is also what I observe since more than half a year. Octave hangs on
exit:
https://savannah.gnu.org/bugs/?50025
https://savannah.gnu.org/bugs/?50795

Homebrew has stopped shipping the GUI. I did not see any change recently.
However, I am compiling with qt5.9. Maybe this makes a difference.

By the way: to my knowledge we should drop support for qt4 as it is
unsupported and has many knows bugs.

I’m still using Qt4 because I was never able to complete a successful build wth Qt5 (via Fink).

If there are any maintainers on MacOS who would like to get the gui working, now may be a good opportunity.
I like to add that we have - thanks to Simone Deparis - an macOS development machine... dear qt experts, please help!

I don't have Mac OS X, but I looked at the code a bit.

First, in Linux I migrated from Qt4 to Qt5 a little while ago and had no problems.  A couple years ago Qt5 was unstable so I stuck with Qt4, but I suspect that is because of distro build tools used by Qt5 hadn't caught up.  So, I'd say anyone looking to migrate from Qt4 to Qt5 shouldn't have but a small number of issues, if any.

Regarding the Mac OS crash at shutdown, I suspect this is a consequence of Octave not correctly shutting down the QThread that holds the interpreter.  It's just that Linux working is probably luck more than anything.  On Mac OS, no such luck.

I've posted some comments at this bug report:

https://savannah.gnu.org/bugs/?50025

I'm not sure of how to proceed because I think the GUI startup/shutdown sequence needs to be overhauled, which might take a while.

Dan

I’m having trouble with pkg-config looking for QtCore.pc instead of Qt5Core.pc (I expect Qt5Gui.pc and Qt5Network.pc are next). How did you resolve that for your Linux build?

Ben

Reply | Threaded
Open this post in threaded view
|

Re: GUI on MacOS X !

bpabbott
Administrator

On Sep 24, 2017, at 6:40 PM, Ben Abbott <[hidden email]> wrote:

On Sep 24, 2017, at 4:29 PM, Daniel J Sebald <[hidden email]> wrote:

On 09/24/2017 07:03 AM, Sebastian Schöps wrote:
Am 24.09.2017 um 13:49 schrieb Ben Abbott <[hidden email]>:
On Sep 24, 2017, at 7:26 AM, Sebastian Schöps <[hidden email]> wrote:
The GUI hangs when I quit, so its not “stable” yet.

This is also what I observe since more than half a year. Octave hangs on
exit:
https://savannah.gnu.org/bugs/?50025
https://savannah.gnu.org/bugs/?50795

Homebrew has stopped shipping the GUI. I did not see any change recently.
However, I am compiling with qt5.9. Maybe this makes a difference.

By the way: to my knowledge we should drop support for qt4 as it is
unsupported and has many knows bugs.

I’m still using Qt4 because I was never able to complete a successful build wth Qt5 (via Fink).

If there are any maintainers on MacOS who would like to get the gui working, now may be a good opportunity.
I like to add that we have - thanks to Simone Deparis - an macOS development machine... dear qt experts, please help!

I don't have Mac OS X, but I looked at the code a bit.

First, in Linux I migrated from Qt4 to Qt5 a little while ago and had no problems.  A couple years ago Qt5 was unstable so I stuck with Qt4, but I suspect that is because of distro build tools used by Qt5 hadn't caught up.  So, I'd say anyone looking to migrate from Qt4 to Qt5 shouldn't have but a small number of issues, if any.

Regarding the Mac OS crash at shutdown, I suspect this is a consequence of Octave not correctly shutting down the QThread that holds the interpreter.  It's just that Linux working is probably luck more than anything.  On Mac OS, no such luck.

I've posted some comments at this bug report:

https://savannah.gnu.org/bugs/?50025

I'm not sure of how to proceed because I think the GUI startup/shutdown sequence needs to be overhauled, which might take a while.

Dan

I’m having trouble with pkg-config looking for QtCore.pc instead of Qt5Core.pc (I expect Qt5Gui.pc and Qt5Network.pc are next). How did you resolve that for your Linux build?

Ben

I’ve made progress, but am seeing this "QAbstractItemModel::beginResetModel not found; disabling Qt GUI

Apparently beginResetModel is obsolete?

Ben

Reply | Threaded
Open this post in threaded view
|

Re: GUI on MacOS X !

Mike Miller-4
On Sun, Sep 24, 2017 at 19:09:08 -0400, Ben Abbott wrote:
> I’ve made progress, but am seeing this
> "QAbstractItemModel::beginResetModel not found; disabling Qt GUI”
>
> Apparently beginResetModel is obsolete?

It's not. I think you will have to debug this closer or post more info
from your config.log.

In my config.log:

    configure:70604: checking for QAbstractItemModel::beginResetModel in <QAbstractItemModel>
    configure:70659: g++ -c -fPIC -g -O2 -pthread -fopenmp ...
    configure:70659: $? = 0
    configure:70675: result: yes

Are you trying to build with Qt 5 now? Are you running configure with
--with-qt=5 or letting it autodetect?

--
mike

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: GUI on MacOS X !

Daniel Sebald
In reply to this post by bpabbott
On 09/24/2017 05:40 PM, Ben Abbott wrote:

>> On Sep 24, 2017, at 4:29 PM, Daniel J Sebald <[hidden email]
>> <mailto:[hidden email]>> wrote:
>>
>> On 09/24/2017 07:03 AM, Sebastian Schöps wrote:
>>>> Am 24.09.2017 um 13:49 schrieb Ben Abbott <[hidden email]
>>>> <mailto:[hidden email]>>:
>>>>> On Sep 24, 2017, at 7:26 AM, Sebastian Schöps <[hidden email]
>>>>> <mailto:[hidden email]>> wrote:
>>>>>> The GUI hangs when I quit, so its not “stable” yet.
>>>>>
>>>>> This is also what I observe since more than half a year. Octave
>>>>> hangs on
>>>>> exit:
>>>>> https://savannah.gnu.org/bugs/?50025
>>>>> https://savannah.gnu.org/bugs/?50795
>>>>>
>>>>> Homebrew has stopped shipping the GUI. I did not see any change
>>>>> recently.
>>>>> However, I am compiling with qt5.9. Maybe this makes a difference.
>>>>>
>>>>> By the way: to my knowledge we should drop support for qt4 as it is
>>>>> unsupported and has many knows bugs.
>>>>
>>>> I’m still using Qt4 because I was never able to complete a
>>>> successful build wth Qt5 (via Fink).
>>>>
>>>> If there are any maintainers on MacOS who would like to get the gui
>>>> working, now may be a good opportunity.
>>> I like to add that we have - thanks to Simone Deparis - an macOS
>>> development machine... dear qt experts, please help!
>>
>> I don't have Mac OS X, but I looked at the code a bit.
>>
>> First, in Linux I migrated from Qt4 to Qt5 a little while ago and had
>> no problems.  A couple years ago Qt5 was unstable so I stuck with Qt4,
>> but I suspect that is because of distro build tools used by Qt5 hadn't
>> caught up.  So, I'd say anyone looking to migrate from Qt4 to Qt5
>> shouldn't have but a small number of issues, if any.
>>
>> Regarding the Mac OS crash at shutdown, I suspect this is a
>> consequence of Octave not correctly shutting down the QThread that
>> holds the interpreter.  It's just that Linux working is probably luck
>> more than anything.  On Mac OS, no such luck.
>>
>> I've posted some comments at this bug report:
>>
>> https://savannah.gnu.org/bugs/?50025
>>
>> I'm not sure of how to proceed because I think the GUI
>> startup/shutdown sequence needs to be overhauled, which might take a
>> while.
>>
>> Dan
>
> I’m having trouble with pkg-config looking for QtCore.pc instead of
> Qt5Core.pc (I expect Qt5Gui.pc and Qt5Network.pc are next). How did you
> resolve that for your Linux build?

I didn't have to do anything, but I will describe how things are set up
here and maybe it will help.

Here is the sequence of events from configure:

configure:69304: result: no
configure:69369: checking Qt version 5
configure:69405: checking for QT
configure:69413: $PKG_CONFIG --exists --print-errors "$QT_MODULES"
configure:69416: $? = 0
configure:69431: $PKG_CONFIG --exists --print-errors "$QT_MODULES"
configure:69434: $? = 0
configure:69472: result: yes
configure:69562: checking for qtchooser
configure:69578: found /usr/bin/qtchooser
configure:69589: result: qtchooser
configure:69663: checking for moc-qt5
configure:69693: result: no
configure:69764: checking for moc
configure:69780: found /usr/bin/moc
configure:69791: result: moc
configure:69871: checking for uic-qt5
configure:69901: result: no
configure:69972: checking for uic
configure:69988: found /usr/bin/uic
configure:69999: result: uic
configure:70079: checking for rcc-qt5
configure:70109: result: no
configure:70180: checking for rcc
configure:70196: found /usr/bin/rcc
configure:70207: result: rcc
configure:70287: checking for lrelease-qt5
configure:70317: result: no
configure:70388: checking for lrelease
configure:70404: found /usr/bin/lrelease
configure:70415: result: lrelease
configure:70471: checking for setlocale
configure:70471: result: yes

Here's more info:

sebald@ ~/octave/octave/octave $ pkg-config --exists --print-errors
"QtCore QtGui QtNetwork QtOpenGL"
Package QtCore was not found in the pkg-config search path.
Perhaps you should add the directory containing `QtCore.pc'
to the PKG_CONFIG_PATH environment variable
No package 'QtCore' found
Package QtGui was not found in the pkg-config search path.
Perhaps you should add the directory containing `QtGui.pc'
to the PKG_CONFIG_PATH environment variable
No package 'QtGui' found
Package QtNetwork was not found in the pkg-config search path.
Perhaps you should add the directory containing `QtNetwork.pc'
to the PKG_CONFIG_PATH environment variable
No package 'QtNetwork' found
Package QtOpenGL was not found in the pkg-config search path.
Perhaps you should add the directory containing `QtOpenGL.pc'
to the PKG_CONFIG_PATH environment variable
No package 'QtOpenGL' found

sebald@ ~/octave/octave/octave $ pkg-config --exists --print-errors
"Qt5Core Qt5Gui Qt5Network Qt5OpenGL Qt5PrintSupport"

So, it looks to me that Mint 18.2 doesn't have libQtCore.so, etc.  It has

/usr/lib/x86_64-linux-gnu/libQtCore.so.4

but maybe they dropped the general reference to avoid confusion.  That
is probably what has made things work better going from Mint 17.3 to
Mint 18.2.  It looks like Octave configure does not have a "qt5" or
"qt4" option.  Perhaps that should be added to avoid looking for
libQtCore.so and just skip to looking for libQt5Core.so, etc.

Checking first for "-qt5" variants, e.g., "moc-qt5" is a legacy thing
for Octave.  That is, a few years ago I think there wasn't the qtchooser
utility so looking for the "XYZ-qt5" seemed most logical.

sebald@ ~ $ ls -l /usr/bin/moc
lrwxrwxrwx 1 root root 9 Aug 30 16:41 /usr/bin/moc -> qtchooser

and I think that qtchooser has some options for which it can select
version 4 or 5.  Acceptable are:

sebald@ ~ $ qtchooser -l
4
5
default
qt4-x86_64-linux-gnu
qt4
qt5-x86_64-linux-gnu
qt5

That is, because of the link, "moc" becomes "qtchooser moc" and we can
do something like "moc -qt=5" to select the version.

Dan

Reply | Threaded
Open this post in threaded view
|

Re: GUI on MacOS X !

Daniel Sebald
In reply to this post by Mike Miller-4
On 09/24/2017 06:13 PM, Mike Miller wrote:
> On Sun, Sep 24, 2017 at 19:09:08 -0400, Ben Abbott wrote:
>> I’ve made progress, but am seeing this
[snip]
> Are you trying to build with Qt 5 now? Are you running configure with
> --with-qt=5 or letting it autodetect?

OK, there is an version option.  I thought there was.

Dan


Reply | Threaded
Open this post in threaded view
|

Re: GUI on MacOS X !

bpabbott
Administrator
In reply to this post by Mike Miller-4
> On Sep 24, 2017, at 19:13, Mike Miller <[hidden email]> wrote:
>
>> On Sun, Sep 24, 2017 at 19:09:08 -0400, Ben Abbott wrote:
>> I’ve made progress, but am seeing this
>> "QAbstractItemModel::beginResetModel not found; disabling Qt GUI”
>>
>> Apparently beginResetModel is obsolete?
>
> It's not. I think you will have to debug this closer or post more info
> from your config.log.
>
> In my config.log:
>
>   configure:70604: checking for QAbstractItemModel::beginResetModel in <QAbstractItemModel>
>   configure:70659: g++ -c -fPIC -g -O2 -pthread -fopenmp ...
>   configure:70659: $? = 0
>   configure:70675: result: yes
>
> Are you trying to build with Qt 5 now? Are you running configure with
> --with-qt=5 or letting it autodetect?
>
> --
> mike

I am setting qt=5 (4 and 5 coexist for me). I was setting QT_LIBS using pkg-config, but now leaving this to configure.

In any event, the additional info from config.log is below.

configure:70547: checking for QAbstractItemModel::beginResetModel in <QAbstractItemModel>
configure:70602: /sw/var/lib/fink/path-prefix-libcxx/c++ -std=gnu++11 -c -fPIC -O2 -g -fno-omit-frame-pointer -D_THREAD_SAFE -pthread  -I/sw/lib/qt5-mac/lib/QtCore.framework/Headers -I/sw/lib/qt5-mac/lib/QtGui.framework/Headers -I/sw/lib/qt5-mac/lib/QtNetwork.framework/Headers -I/sw/lib/qt5-mac/lib/QtOpenGL.framework/Headers -I/sw/lib/qt5-mac/lib/QtWidgets.framework/Headers -I/sw/lib/qt5-mac/lib/QtPrintSupport.framework/Headers -I/sw/lib/qt5-mac/include -fPIC -I/sw/include conftest.cpp >&5
In file included from conftest.cpp:769:
In file included from /sw/lib/qt5-mac/lib/QtCore.framework/Headers/QAbstractItemModel:1:
/sw/lib/qt5-mac/lib/QtCore.framework/Headers/qabstractitemmodel.h:43:10: fatal error: 'QtCore/qvariant.h' file not found
#include <QtCore/qvariant.h>
         ^~~~~~~~~~~~~~~~~~~
1 error generated.

I can verify that qvariant.h is the QtCore framework, i.e. it is in QtCore.framework/Versions/5//Headers

Ben
Reply | Threaded
Open this post in threaded view
|

Re: GUI on MacOS X !

Daniel Sebald
On 09/24/2017 06:54 PM, Ben Abbott wrote:

>> On Sep 24, 2017, at 19:13, Mike Miller <[hidden email]> wrote:
>>
>>> On Sun, Sep 24, 2017 at 19:09:08 -0400, Ben Abbott wrote:
>>> I’ve made progress, but am seeing this
>>> "QAbstractItemModel::beginResetModel not found; disabling Qt GUI”
>>>
>>> Apparently beginResetModel is obsolete?
>>
>> It's not. I think you will have to debug this closer or post more info
>> from your config.log.
>>
>> In my config.log:
>>
>>    configure:70604: checking for QAbstractItemModel::beginResetModel in <QAbstractItemModel>
>>    configure:70659: g++ -c -fPIC -g -O2 -pthread -fopenmp ...
>>    configure:70659: $? = 0
>>    configure:70675: result: yes
>>
>> Are you trying to build with Qt 5 now? Are you running configure with
>> --with-qt=5 or letting it autodetect?
>>
>> --
>> mike
>
> I am setting qt=5 (4 and 5 coexist for me). I was setting QT_LIBS using pkg-config, but now leaving this to configure.
>
> In any event, the additional info from config.log is below.
>
> configure:70547: checking for QAbstractItemModel::beginResetModel in <QAbstractItemModel>
> configure:70602: /sw/var/lib/fink/path-prefix-libcxx/c++ -std=gnu++11 -c -fPIC -O2 -g -fno-omit-frame-pointer -D_THREAD_SAFE -pthread  -I/sw/lib/qt5-mac/lib/QtCore.framework/Headers -I/sw/lib/qt5-mac/lib/QtGui.framework/Headers -I/sw/lib/qt5-mac/lib/QtNetwork.framework/Headers -I/sw/lib/qt5-mac/lib/QtOpenGL.framework/Headers -I/sw/lib/qt5-mac/lib/QtWidgets.framework/Headers -I/sw/lib/qt5-mac/lib/QtPrintSupport.framework/Headers -I/sw/lib/qt5-mac/include -fPIC -I/sw/include conftest.cpp >&5
> In file included from conftest.cpp:769:
> In file included from /sw/lib/qt5-mac/lib/QtCore.framework/Headers/QAbstractItemModel:1:
> /sw/lib/qt5-mac/lib/QtCore.framework/Headers/qabstractitemmodel.h:43:10: fatal error: 'QtCore/qvariant.h' file not found
> #include <QtCore/qvariant.h>
>           ^~~~~~~~~~~~~~~~~~~
> 1 error generated.
>
> I can verify that qvariant.h is the QtCore framework, i.e. it is in QtCore.framework/Versions/5//Headers
>
> Ben

You'll need to include that directory somehow.  (And when you figure out
how, a changeset for configure.ac can be made.

I would guess

-I/sw/lib/qt5-mac/lib/QtCore.framework/Versions/5/Headers

is what's missing from you c++ compiler command.  Does adding

   --includedir=/sw/lib/qt5-mac/lib/QtCore.framework/Versions/5/Headers

to the configure help?  If so, then in the configure.ac file Headers
needs to be added specifically for Mac OS X systems.

Dan

Reply | Threaded
Open this post in threaded view
|

Re: GUI on MacOS X !

Mike Miller-4
In reply to this post by bpabbott
On Sun, Sep 24, 2017 at 19:54:24 -0400, Ben Abbott wrote:

> In any event, the additional info from config.log is below.
>
> configure:70547: checking for QAbstractItemModel::beginResetModel in <QAbstractItemModel>
> configure:70602: /sw/var/lib/fink/path-prefix-libcxx/c++ -std=gnu++11 -c -fPIC -O2 -g -fno-omit-frame-pointer -D_THREAD_SAFE -pthread  -I/sw/lib/qt5-mac/lib/QtCore.framework/Headers -I/sw/lib/qt5-mac/lib/QtGui.framework/Headers -I/sw/lib/qt5-mac/lib/QtNetwork.framework/Headers -I/sw/lib/qt5-mac/lib/QtOpenGL.framework/Headers -I/sw/lib/qt5-mac/lib/QtWidgets.framework/Headers -I/sw/lib/qt5-mac/lib/QtPrintSupport.framework/Headers -I/sw/lib/qt5-mac/include -fPIC -I/sw/include conftest.cpp >&5
> In file included from conftest.cpp:769:
> In file included from /sw/lib/qt5-mac/lib/QtCore.framework/Headers/QAbstractItemModel:1:
> /sw/lib/qt5-mac/lib/QtCore.framework/Headers/qabstractitemmodel.h:43:10: fatal error: 'QtCore/qvariant.h' file not found
> #include <QtCore/qvariant.h>
>          ^~~~~~~~~~~~~~~~~~~
> 1 error generated.
>
> I can verify that qvariant.h is the QtCore framework, i.e. it is in QtCore.framework/Versions/5//Headers
So this looks related to the -I options required to build against Qt and
how the header files are organized in your package management system.

First, I know that Qt recommends the following style in user code

    #include <QAbstractItemModel>

Second, I can verify that my system has the same include as yours,
specifically

    $ grep 'include.*qvariant' $( find /usr/include -path '*qt5*qabstractitemmodel.h' )
    #include <QtCore/qvariant.h>

So the only difference is the -I options that are derived on your system
from pkg-config.

On my system, "pkg-config --cflags Qt5Core" gives the following

    -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/x86_64-linux-gnu/qt5

So that all of the following include styles work

    #include <QVariant>
    #include <qvariant.h>
    #include <QtCore/QVariant>
    #include <QtCore/qvariant.h>

This seems like a pretty fundamental bug of how Qt 5 is packaged on your
system, if the -I options returned by pkg-config don't let you compile a
trivial file including a Qt header file.

Do the "Headers" directories in your list of -I directories also contain
subdirectories named QtCore, QtGui, etc?

--
mike

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: GUI on MacOS X !

Daniel Sebald
In reply to this post by Daniel Sebald
On 09/24/2017 07:10 PM, Daniel J Sebald wrote:

> I would guess
>
> -I/sw/lib/qt5-mac/lib/QtCore.framework/Versions/5/Headers
>
> is what's missing from you c++ compiler command.  Does adding
>
>    --includedir=/sw/lib/qt5-mac/lib/QtCore.framework/Versions/5/Headers
>
> to the configure help?  If so, then in the configure.ac file Headers
> needs to be added specifically for Mac OS X systems.

Oh wait, I see there is a Headers included already:

-I/sw/lib/qt5-mac/lib/QtCore.framework/Headers

What's missing is "/Versions/5/" between the framework directory and
Headers directory.  Is this standard for Mac OS X?  Where is the
responsibility for putting that in path name?

Dan

Reply | Threaded
Open this post in threaded view
|

Re: GUI on MacOS X !

Daniel Sebald
On 09/24/2017 07:15 PM, Daniel J Sebald wrote:

> Oh wait, I see there is a Headers included already:
>
> -I/sw/lib/qt5-mac/lib/QtCore.framework/Headers
>
> What's missing is "/Versions/5/" between the framework directory and
> Headers directory.  Is this standard for Mac OS X?  Where is the
> responsibility for putting that in path name?

 From this post to the Qt forum:

http://www.qtcentre.org/threads/61699-Build-Qt-based-app-on-Mac-OS-X-head-file-not-found

my guess would be that you are supposed to have some links pointing from

/sw/lib/qt5-mac/lib/QtCore.framework/Headers

to

/sw/lib/qt5-mac/lib/QtCore.framework/Versions/5/Headers

etc.

But, maybe the links were deprecated on Mac OS X.  I don't know.

Dan

Reply | Threaded
Open this post in threaded view
|

Re: GUI on MacOS X !

bpabbott
Administrator

On Sep 24, 2017, at 8:48 PM, Daniel J Sebald <[hidden email]> wrote:

On 09/24/2017 07:15 PM, Daniel J Sebald wrote:

Oh wait, I see there is a Headers included already:
-I/sw/lib/qt5-mac/lib/QtCore.framework/Headers
What's missing is "/Versions/5/" between the framework directory and Headers directory.  Is this standard for Mac OS X?  Where is the responsibility for putting that in path name?

From this post to the Qt forum:

http://www.qtcentre.org/threads/61699-Build-Qt-based-app-on-Mac-OS-X-head-file-not-found

my guess would be that you are supposed to have some links pointing from

/sw/lib/qt5-mac/lib/QtCore.framework/Headers

to

/sw/lib/qt5-mac/lib/QtCore.framework/Versions/5/Headers

etc.

But, maybe the links were deprecated on Mac OS X.  I don't know.

Dan

The location I posted earlier was what I found via MacOS gui. From the command line ...

$ ls -l /sw/lib/qt5-mac/lib/QtCore.framework/Headers
lrwxr-xr-x  1 root  wheel  24 Jan 23  2017 /sw/lib/qt5-mac/lib/QtCore.framework/Headers -> Versions/Current/Headers

ls -l /sw/lib/qt5-mac/lib/QtCore.framework/Headers/qvariant.h
-rw-r--r--  1 root  wheel  29027 Dec 23  2016 /sw/lib/qt5-mac/lib/QtCore.framework/Headers/qvariant.h

Ben
Reply | Threaded
Open this post in threaded view
|

Re: GUI on MacOS X !

Daniel Sebald
On 09/24/2017 07:58 PM, Ben Abbott wrote:

>
>> On Sep 24, 2017, at 8:48 PM, Daniel J Sebald <[hidden email]
>> <mailto:[hidden email]>> wrote:
>>
>> On 09/24/2017 07:15 PM, Daniel J Sebald wrote:
>>
>>> Oh wait, I see there is a Headers included already:
>>> -I/sw/lib/qt5-mac/lib/QtCore.framework/Headers
>>> What's missing is "/Versions/5/" between the framework directory and
>>> Headers directory.  Is this standard for Mac OS X?  Where is the
>>> responsibility for putting that in path name?
>>
>> From this post to the Qt forum:
>>
>> http://www.qtcentre.org/threads/61699-Build-Qt-based-app-on-Mac-OS-X-head-file-not-found
>>
>> my guess would be that you are supposed to have some links pointing from
>>
>> /sw/lib/qt5-mac/lib/QtCore.framework/Headers
>>
>> to
>>
>> /sw/lib/qt5-mac/lib/QtCore.framework/Versions/5/Headers
>>
>> etc.
>>
>> But, maybe the links were deprecated on Mac OS X.  I don't know.
>>
>> Dan
>
> The location I posted earlier was what I found via MacOS gui. From the
> command line ...
>
> $ ls -l /sw/lib/qt5-mac/lib/QtCore.framework/Headers
> lrwxr-xr-x  1 root  wheel  24 Jan 23  2017
> /sw/lib/qt5-mac/lib/QtCore.framework/Headers -> Versions/Current/Headers
>
> ls -l /sw/lib/qt5-mac/lib/QtCore.framework/Headers/qvariant.h
> -rw-r--r--  1 root  wheel  29027 Dec 23  2016
> /sw/lib/qt5-mac/lib/QtCore.framework/Headers/qvariant.h

Hmmm.  There's no

   /sw/lib/qt5-mac/lib/QtCore.framework/Headers/QtCore

directory?  From your original error, the included file is

#include <QtCore/qvariant.h>
          ^~~~~~~~~~~~~~~~~~~

But what's interesting is that the GUI source code doesn't have many
<QtCore/XYZ.h> files... except the

libgui/qterminal/libqterminal/unix/

directory, which I think Mac OS X doesn't use.

So perhaps this directory structure is only something important for
configure???

Anyway, that <QtCore/qvariant.h> is originating from the Qt header files
themselves.  No changing that.  So something about your environment is
not setting up the proper path or links or something.  You have:

/sw/lib/qt5-mac/lib/QtCore.framework/Headers/qvariant.h

but qvariant.h has to be located in some directory

/.../QtCore/qvariant.h

Dan

Reply | Threaded
Open this post in threaded view
|

Re: GUI on MacOS X !

John W. Eaton
Administrator
On 09/24/2017 09:22 PM, Daniel J Sebald wrote:

> But what's interesting is that the GUI source code doesn't have many
> <QtCore/XYZ.h> files... except the
>
> libgui/qterminal/libqterminal/unix/
>
> directory, which I think Mac OS X doesn't use.

The files in libgui/qterminal/libqterminal/unix are used on all systems
except Windows.

jwe



12