#58226 closed defect (fixed)
octave @5.1.0_0+accelerate+app+docs+gfortran+graphicsmagick+qt5+sound+sundials --- Compiler error issue with qt5's "posF"
Reported by: | SenileFelineS | Owned by: | MarcusCalhoun-Lopez (Marcus Calhoun-Lopez) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | lion x86_64 | Cc: | |
Port: | octave |
Description (last modified by SenileFelineS)
I'm trying to install octave (see title) with the qt56 dependency.
I received two errors caused by the same issue of not recognizing 'posF':
(Error 1)
CXX libgui/graphics/__init_qt___la-ToolBar.lo libgui/graphics/Canvas.cc:398:57: error: no member named 'posF' in 'QMouseEvent'; did you mean 'pos'? bool rect_contains_pos = r.contains (event->posF ()); ^~~~ pos /opt/local/libexec/qt5/include/QtGui/qevent.h:115:19: note: 'pos' declared here inline QPoint pos() const { return l.toPoint(); } ^
(Error 2)
libgui/graphics/Canvas.cc:452:61: error: no member named 'posF' in 'QMouseEvent'; did you mean 'pos'? bool rect_contains_pos = r.contains (event->posF ()); ^~~~ pos /opt/local/libexec/qt5/include/QtGui/qevent.h:115:19: note: 'pos' declared here inline QPoint pos() const { return l.toPoint(); } ^
These two errors both reference the qt5 library file /opt/local/libexec/qt5/include/QtGui/qevent.h:115:19
which does in fact make reference to posF() as the following:
#if QT_DEPRECATED_SINCE(5, 0) QT_DEPRECATED inline QPointF posF() const { return l; } #endif
However, I have no idea if that matters.................I'm guessing it actually doesn't.
I've attached both the build main.log
and the qt5 qevent.h
files.
Thank you.
Update I have reopened this as Octave gui fails to work even though the installation process seems to work with the patch. (See comment 11 below.)
Update 2
After doing some internet sleuthing, apparently when switching between different versions of octave that are built with different versions of Qt (i.e. qt4 vs. qt5), the file ~/.config/octave/qt-settings
cannot exist when switching from one version of Qt to another. The solution is to take the current file ~/.config/octave/qt-settings
and rename it to something like qt-settings_qt-old
to force Octave to re-create the qt-settings
file for the current Qt-based gui. Then, if you ever want to switch back to the previous Qt-based gui, you can rename you're old qt-settings_qt-old
file back to qt-settings
. Just make sure you don't delete the other qt-settings
file.
Attachments (4)
Change History (23)
Changed 6 years ago by SenileFelineS
comment:1 Changed 6 years ago by SenileFelineS
Description: | modified (diff) |
---|
comment:2 Changed 6 years ago by Schamschula (Marius Schamschula)
Keywords: | lion, x86_64 → lion x86_64 |
---|---|
Owner: | set to MarcusCalhoun-Lopez |
Port: | octave added |
Status: | new → assigned |
comment:3 Changed 6 years ago by SenileFelineS
Attempted the same installation of octave but with qt55 instead of qt56. Same error produced. Qt versions greater than qt56 are not compatible with my OS (10.7 Lion).
Changed 6 years ago by SenileFelineS
Attachment: | config.log added |
---|
Config.log attached. There were a number of errors generated.
Changed 6 years ago by SenileFelineS
Attachment: | Octave_qt56_Features_Test.txt added |
---|
Edited from https://gitlab.com/snippets/1834909 --- Shows what each version *should* look like. Qt5.6 *should* be similar to Qt5.5 and Qt5.7. X's indicate that test failed (result=no) in the config.log that is attached.
comment:4 follow-up: 5 Changed 6 years ago by kencu (Ken)
This might be useful <https://stackoverflow.com/questions/25622952/how-enable-deprecated-functions-in-qt5>.
comment:5 Changed 6 years ago by SenileFelineS
Replying to kencu:
This might be useful <https://stackoverflow.com/questions/25622952/how-enable-deprecated-functions-in-qt5>.
I did this, just a minute ago, but I had to hard-code "QT_DISABLE_DEPRECATED_BEFORE=0" into the configure executable script. I couldn't find a .pro project file.
Anyway, the result was that it looks like it moved past the error of posF(), but ran into another one:
CXXLD libgui/graphics/__init_qt__.la CXXLD src/octave-gui ld: framework not found QtOpenGL clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [libgui/graphics/__init_qt__.la] Error 1
This issue, I'm guessing may have to do with Qt56 (on my 10.7 Lion system). See my attached config.log
and the Octave_qt56_Features_Test.txt
. The features with "X" in front of them could not be found.
comment:6 follow-up: 7 Changed 6 years ago by kencu (Ken)
OK, progress anyway. The framework is there. Just have to make the linker find it somehow:
$ port provides /opt/local/libexec/qt5/lib/QtOpenGL.framework/Versions/5/Headers/QGL /opt/local/libexec/qt5/lib/QtOpenGL.framework/Versions/5/Headers/QGL is provided by: qt56-qtbase
comment:7 Changed 6 years ago by SenileFelineS
Replying to kencu:
OK, progress anyway. The framework is there. Just have to make the linker find it somehow:
$ port provides /opt/local/libexec/qt5/lib/QtOpenGL.framework/Versions/5/Headers/QGL /opt/local/libexec/qt5/lib/QtOpenGL.framework/Versions/5/Headers/QGL is provided by: qt56-qtbase
I get the same result as you.
I made an interesting discovery:
Running sudo port configure octave +'my_variants...'
will result in a config.log
file showing configure:73917: checking for QMouseEvent::localPos
to have a result of configure:73972: result: no
. When I try to install with this default configuration, I get the posF()
error.
However, when I cd to the Octave work directory where there is a configure
executable and run the configure
executable with the option --disable-readline
(it halts before finishing if I don't...), suddenly configure:73917: checking for QMouseEvent::localPos
has a result of configure:73972: result: yes
!! Then when I try to install octave with this configuration, I don't get the posF()
error that I first reported in this ticket. Instead I get the error I mentioned two comments ago, ld: framework not found QtOpenGL
!!!
(Side note: this hacked configuration causes a different set of errors from the compiler).
I guess the takeaway from this is that something is altering the configuration beyond the configure
executable file. And it is the source of the localPos
/posF()
errors.
comment:8 follow-up: 9 Changed 6 years ago by kencu (Ken)
You are indeed learning all the tricks and troubles that we face trying to make these ports work on all the different configurations of systems that we try to run them on. We're close on this one -- with a little more effort, I think we can come up with the solution to this. Octave qt5 will most likely be workable on 10.7 with some further efforts...
In the meantime, Octave qt4 is working on 10.7.
comment:9 Changed 6 years ago by SenileFelineS
Replying to kencu:
You are indeed learning all the tricks and troubles that we face trying to make these ports work on all the different configurations of systems that we try to run them on. We're close on this one -- with a little more effort, I think we can come up with the solution to this. Octave qt5 will most likely be workable on 10.7 with some further efforts...
In the meantime, Octave qt4 is working on 10.7.
You're very right, Octave qt4 works, although I have some errors/issues with the gui. Perhaps I should make a ticket for that as well?
Also, is there any way to find documentation on Octave's installation process? Or is it down to combing through the configure and make files? The big question I'm trying to figure out is if this is a Macports issue or an Octave issue.
comment:10 follow-up: 11 Changed 6 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:11 follow-ups: 15 16 17 Changed 6 years ago by SenileFelineS
Replying to MarcusCalhoun-Lopez:
In d92681c5c7c487dc858059c9d17cedc06634c718/macports-ports (master):
Hi Marcus,
Thank you for the update. Just out of curiosity, what did you change?
Also, I just did a clean install of octave. (there were some warnings but it didn't halt the installation). However, when I try to launch Octave with the GUI (command: octave --gui "$@"
), Octave hangs/freezes and never loads. Could this have anything to do with the Carbon framework?...Just a shot in the dark - I noticed from compilation that it was mentioned in some of the verbose stdout (using: 'port install octave...').
*Update 2* (same as above)
After doing some internet sleuthing, apparently when switching between different versions of octave that are built with different versions of Qt (i.e. qt4 vs. qt5), the file ~/.config/octave/qt-settings cannot exist when switching from one version of Qt to another. The solution is to take the current file ~/.config/octave/qt-settings and rename it to something like qt-settings_qt-old to force Octave to re-create the qt-settings file for the current Qt-based gui. Then, if you ever want to switch back to the previous Qt-based gui, you can rename you're old qt-settings_qt-old file back to qt-settings. Just make sure you don't delete the other qt-settings file.
Question Does the port octave_select take care of this issue? For some reason octave_select doesn't register that I even have an installed version of octave. The only option is none (active)
.
comment:12 Changed 6 years ago by SenileFelineS
Description: | modified (diff) |
---|---|
Resolution: | fixed |
Status: | closed → reopened |
comment:13 Changed 6 years ago by SenileFelineS
Description: | modified (diff) |
---|
comment:14 Changed 6 years ago by SenileFelineS
Description: | modified (diff) |
---|
comment:15 follow-up: 18 Changed 6 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Replying to SenileFelineS:
Replying to MarcusCalhoun-Lopez:
In d92681c5c7c487dc858059c9d17cedc06634c718/macports-ports (master):
Hi Marcus,
Thank you for the update. Just out of curiosity, what did you change?
CXXFLAGS
were not being passed to the compiler when testing for Qt features.
For older systems, this meant that the C++11 flags (e.g. -stdlib=...
) were not being used, and Qt features were not detected (incorrectly).
I can only imagine this is a typo upstream because CXXPICFLAG
are included twice.
I need to follow-up upstream, but I have not quite found the time.
comment:16 Changed 6 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Replying to SenileFelineS:
Question Does the port octave_select take care of this issue? For some reason octave_select doesn't register that I even have an installed version of octave. The only option is
none (active)
.
You raise a good point.
However, it is a little off-topic for this ticket.
To answer you question, however, octave_select is a remnant from a time when there were multiple Octave ports.
It needs to be removed.
To be honest, I forgot it still existed.
comment:17 follow-up: 19 Changed 6 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Replying to SenileFelineS:
Also, I just did a clean install of octave. (there were some warnings but it didn't halt the installation). However, when I try to launch Octave with the GUI (command:
octave --gui "$@"
), Octave hangs/freezes and never loads. Could this have anything to do with the Carbon framework?...Just a shot in the dark - I noticed from compilation that it was mentioned in some of the verbose stdout (using: 'port install octave...').
A a general rule, a ticket should deal with only one issue.
A new issue warrants a new ticket.
After doing some internet sleuthing, apparently when switching between different versions of octave that are built with different versions of Qt (i.e. qt4 vs. qt5), the file ~/.config/octave/qt-settings cannot exist when switching from one version of Qt to another.
I am glad you found a solution.
Thank you for passing it along.
comment:18 Changed 6 years ago by SenileFelineS
Replying to MarcusCalhoun-Lopez:
Replying to SenileFelineS:
Replying to MarcusCalhoun-Lopez:
In d92681c5c7c487dc858059c9d17cedc06634c718/macports-ports (master):
Hi Marcus,
Thank you for the update. Just out of curiosity, what did you change?
CXXFLAGS
were not being passed to the compiler when testing for Qt features.
For older systems, this meant that the C++11 flags (e.g.-stdlib=...
) were not being used, and Qt features were not detected (incorrectly).
I can only imagine this is a typo upstream becauseCXXPICFLAG
are included twice.
I need to follow-up upstream, but I have not quite found the time.
Is there any direction you could give me so that I could look for the issue within Octave's building process? Would it be a matter of combing through the config file?
comment:19 Changed 6 years ago by SenileFelineS
Replying to MarcusCalhoun-Lopez:
Replying to SenileFelineS:
Also, I just did a clean install of octave. (there were some warnings but it didn't halt the installation). However, when I try to launch Octave with the GUI (command:
octave --gui "$@"
), Octave hangs/freezes and never loads. Could this have anything to do with the Carbon framework?...Just a shot in the dark - I noticed from compilation that it was mentioned in some of the verbose stdout (using: 'port install octave...').A a general rule, a ticket should deal with only one issue.
A new issue warrants a new ticket.After doing some internet sleuthing, apparently when switching between different versions of octave that are built with different versions of Qt (i.e. qt4 vs. qt5), the file ~/.config/octave/qt-settings cannot exist when switching from one version of Qt to another.
I am glad you found a solution.
Thank you for passing it along.
Understood. I thought the issues were related, when in reality they weren't. When in doubt, I'll make a new ticket. Which brings me to (hopefully) my last question. Essestially, I'm having issues with both the qt4 and qt5 guis on my system (OS X 10.7). Should I create a new ticket to describe the issues in both qt4 and qt5 builds of Octave (the issues appear different)? Or would this be more of an issue worth reporting to https://savannah.gnu.org/bugs/?group=octave ? Is trac.macports.org more geared towards installation issues?
The qt5 file that defines pos() but apparently not posF()