Closed djhoese closed 5 years ago
Perhaps you need to install an additional system package in Travis now. Please see
https://github.com/conda-forge/pyqt-feedstock/blob/master/recipe/yum_requirements.txt
for the system packages required to import all PyQt5 modules now (those are for CentOS 6).
We had similar issues with the recent SDL2 build: https://github.com/conda-forge/sdl2-feedstock/issues/13
I'll try to compare the yum and apt packages and see if that helps at all.
@djhoese @ccordoba12 In the latest build log of PyQt5.9 this shows up:
+ xvfb-run -a bash -c 'python pyqt_test.py'
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-conda'
xkbcommon: ERROR: failed to add default include path
Qt: Failed to create XKB context!
Use QT_XKB_CONFIG_ROOT environmental variable to provide an additional search path, add ':' as separator to provide several search paths and/or make sure that XKB configuration data directory contains recent enough contents, to update please see http://cgit.freedesktop.org/xkeyboard-config/ .
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
No XVisualInfo for format QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize -1, redBufferSize 0, greenBufferSize 0, blueBufferSize 0, alphaBufferSize -1, stencilBufferSize -1, samples -1, swapBehavior QSurfaceFormat::SwapBehavior(SingleBuffer), swapInterval 1, profile QSurfaceFormat::OpenGLContextProfile(NoProfile))
Falling back to using screens root_visual.
Unsupported screen format: depth: 8, red_mask: 0, blue_mask: 0
QPainter::begin: Paint device returned engine == 0, type: 3
QPainter::setCompositionMode: Painter not active
+ exit 0
Here is the link to the azure builds (unfortunately I've no idea how to link into the log itself): https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=33234&view=logs
So that would suggest that the test script isn't properly testing things then. At least that's how I read that. I wonder how PyQt can have all of those errors and not raise some exception.
I've no idea if other packages beside vispy
are affected as well, but if, the :hankey: will hit the fan soon. :grimacing:
There is also this old build of the Qt library (qt-feedstock):
https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=30715
X11:
Using system-provided XCB libraries .. no
EGL on X11 ........................... yes
Xinput2 .............................. yes
XCB XKB .............................. yes
XLib ................................. yes
XCB render ........................... yes
XCB GLX .............................. yes
XCB Xlib ............................. yes
Using system-provided xkbcommon ...... no
No idea if xkbcommon should be 'yes' but just pointing out what I'm seeing.
Edit: Oops this was from a cancelled build. Having trouble looking through past qt builds on azure.
@djhoese There are currently no green linux builds on azure for qt
. See also this comment.
Ping @ocefpaf Something might be wrong with the current qt 5.9.7
related to the issues seen here. WIthout the logs we can't say much. Do you have any thoughts? Should we open an issue at qt-feedstock
?
On my own linux machine, it seems to be related to the new qt packages on conda-forge, I had to export the following runtime variables on Ubuntu 18.04
bash:
export QT_XKB_CONFIG_ROOT=/usr/share/X11/xkb
Ping @ocefpaf Something might be wrong with the current
qt 5.9.7
related to the issues seen here. WIthout the logs we can't say much. Do you have any thoughts? Should we open an issue atqt-feedstock
?
Sadly qt
does not build on the CIs and those were local builds uploaded to the channel.
@ocefpaf Yes, no problem. But how would we tackle this in the best way? Could we add this variable to the qt-feedstock
somehow that it get's activated if qt
is installed?
@ocefpaf Yes, no problem. But how would we tackle this in the best way? Could we add this variable to the
qt-feedstock
somehow that it get's activated ifqt
is installed?
I'm looking into it. To be honest I'm not sure what is the best solution here. Maybe @mingwandroid or @isuruf could comment on what they think is the best course of action.
@ocefpaf I thought there were a few super secret machines that you all had setup for when timeouts happen on Azure? Did those time out as well?
Finally, when building locally, don't you use the same container as the CIs?
@ocefpaf I thought there were a few super secret machines that you all had setup for when timeouts happen on Azure? Did those time out as well?
Only for macOS and ironically that is the only one that worked without the dedicated machine :smile:
Finally, when building locally, don't you use the same container as the CIs?
For Linux? Yes. Window sis more complicated.
Got it. Strange that Linux is giving this kind of issue in this case. Maybe it is bug upstream in qt then.
Got it. Strange that Linux is giving this kind of issue in this case. Maybe it is bug upstream in qt then.
Or a problem with my build :grimacing: still looking into it but qt
takes hours to build and test :frowning_face:
There are many things related to X11, etc. in yum_requirements.txt
on the AnacondaRecipes qt-feedstock:
https://github.com/AnacondaRecipes/qt-feedstock/blob/master/recipe/yum_requirements.txt
that are not in the conda-forge variant:
https://github.com/conda-forge/qt-feedstock/blob/master/recipe/yum_requirements.txt
Perhaps that could be the source of the problem? The following Qt 5.9 bug report also seems related: https://bugreports.qt.io/browse/QTBUG-60005
There are many things related to X11, etc. in
yum_requirements.txt
on the AnacondaRecipes qt-feedstock: AnacondaRecipes/qt-feedstock:recipe/yum_requirements.txt@master
that are not in the conda-forge variant: conda-forge/qt-feedstock:recipe/yum_requirements.txt@master
Perhaps that could be the source of the problem? The following Qt 5.9 bug report also seems related: bugreports.qt.io/browse/QTBUG-60005
Nope. AnancondaRecipes does not use the yum_requirements.txt
at all and that is the old conda-forge
one.
@hmaarrfk Were you getting these errors/warnings on normal use on Ubuntu (X11)? Or did they only show up when doing things off screen (fake display like in the vispy tests)?
Local. Seems like I'm running X11, not Wayland too
$ loginctl show-session 2 -p Type
Type=x11
So that would mean this is an issue for anyone using this new build on a Linux X11 machine?
maybe, want me to try and create a new user?
If you have the time. Any new data points I'm sure would help. I'm guessing that using the Qt backend for matplotlib should also produce these errors/warnings. That would make this a bigger deal than our little ol' vispy library.
ok, i just created a new user, add rebooted into it.
Defaults works fine.
Creating two environments, one with defaults, one with conda forge and installing spyder
conda install spyder [-c conda-forge]
The one for conda-forge goes back QT 5.6 since spyder 3.3.4 doesn't seem to be built for qt???? https://github.com/conda-forge/spyder-feedstock/pull/52
For some reason, if you force qt 5.9
conda install spyder qt=5.9 -c conda-forge
you will get
spyder 3.3.1 and python 3.6
Anyway, the issue definitely persists with that combination
If you use Qt 5.9 and create/show a matplotlib figure with the Qt backend does it show these errors?
Yeah
i can't type in that little window.
@ocefpaf @ccordoba12 Given the above results, what are your thoughts on marking the current Qt 5.9 as a broken build for linux?
It could be that we specify
-qt-xcb \
-qt-xkbcommon \
-xkb-config-root $PREFIX/lib \
xkb config root is specified, but we are using CDTs???
@ocefpaf @ccordoba12 Given the above results, what are your thoughts on marking the current Qt 5.9 as a broken build for linux?
I asked a few people who know about this them me and no answer. I'll ping them again. They are not completely broken though, looks like they are working for some applications.
xkb config root is specified, but we are using CDTs???
@mingwandroid any advice for us here?
Defaults uses the same flags https://github.com/AnacondaRecipes/qt-feedstock/blob/master/recipe/build.sh#L141
so thats not it
This definitely requires a Qt rebuild on Linux (but probably not a PyQt one). I think the problem is that the RPM package for xkbcommon (no idea what that is) is not installed in the docker image used by conda-forge, whereas Anaconda complies packages in an image or VM that has all X11 components installed.
@ocefpaf, you can try adding that package to yum_requirements in the Qt repo and recompiling again. I know that's expensive but that's the only solution I see at the moment.
Defaults uses the same flags AnacondaRecipes/qt-feedstock:recipe/build.sh@
master
#L141so thats not it
@hmaarrfk the recipe is the same from defaults
. So the differences is in our build systems.
I think the problem is that the RPM package for xkbcommon (no idea what that is) is not installed in the docker image used by conda-forge, whereas Anaconda complies packages in an image or VM that has all X11 components installed.
We install with yum
:
chrpath
mesa-libGL
ruby
all listed in the yum_requirements.txt
.
whereas Anaconda complies packages in an image or VM that has all X11 components installed.
I thought that AnacondaRecipes relied only on CTDs. If that is true then it would be nice to get a list of the X11 stuff installed to create a similar build.
Good find. It does seem that from a commit message https://github.com/conda-forge/qt-feedstock/commit/63dbab69be4848aeaf6687619d03eeae1209546b#diff-cd6a7861c185736da828f5fa163c4806
that installing things in the yum_requirements was removed in favour of the conda-forge packages.
But when the recipe was merged in from AD (I'm guess that is what happened), the yum_requirements.txt wasn't pulled in
https://github.com/AnacondaRecipes/qt-feedstock/blob/master/recipe/yum_requirements.txt
expensive, but likely the fix!
@ocefpaf, from their yum_requirements file they seem to install
libX11-devel
libXt-devel
libXext-devel
chrpath
libXrender-devel
gtk2-devel
dbus-devel
libSM-devel
libICE-devel
xorg-x11-server-Xvfb
ruby
maybe those are the missing packages?
Good find. It does seem that from a commit message conda-forge/qt-feedstock@63dbab6#diff-cd6a7861c185736da828f5fa163c4806
that installing things in the yum_requirements was removed in favour of the conda-forge packages.
But when the recipe was merged in from AD (I'm guess that is what happened), the yum_requirements.txt wasn't pulled in
AnacondaRecipes/qt-feedstock:recipe/yum_requirements.txt@
master
expensive, but likely the fix!
@hmaarrfk I can try a build with that but my understanding was that the CTDs should cover that.
I thought that AnacondaRecipes relied only on CTDs. If that is true then it would be nice to get a list of the X11 stuff installed to create a similar build.
I don't think the problem has to do with CDT's, just with the fact that Qt doesn't find where xkbcommon
is installed in the system (because it's not installed), so you have to tell it that by setting QT_XKB_CONFIG_ROOT
.
So my guess is that if it finds it in /usr/share/X11/xkb
, it will use that as the default and the problem will go away.
So my guess is that if it finds it in /usr/share/X11/xkb, it will use that as the default and the problem will go away.
And we are hoping that is a common enough location on enough platforms?
It will depend on whether the test for xkb tries to run the test program or not. If it does then yes, yum_requirements.txt should be added to. If not then it doesn't matter. I'd general add them.
And we are hoping that is a common enough location on enough platforms?
It should be on most Linux distros (I haven't heard anyone complaining about this before).
I just uploaded a new package that should solved this. Please try it and report back.
(It may take ~30 min for the package to be available and it will be qt 5.9.7 h52cfd70_2
.)
@ocefpaf Should I expect to see it here: https://anaconda.org/conda-forge/qt/files?version= I don't see anything yet and its been an hour.
We are having trouble with uploads. Ping @soapy.
I re-uploaded and this time it seems to be in the file list:
https://anaconda.org/conda-forge/qt/files
it should take ~20 min for it to be available for download.
I can confirm that the new version fixes the issue for me (on ubuntu 18.04). Thanks @ocefpaf!
Looks like it fixed vispy's travis tests too: https://travis-ci.org/vispy/vispy/jobs/535042985
🎉
Thanks @grlee77 and @djhoese for reporting back. Glad it is resolved!
Vispy (CC @kmuehlbauer @larsoner) uses PyQt5 to run its examples/tests on travis. The jobs now fail starting with PyQt 5.9 with the message:
See https://travis-ci.org/vispy/vispy/jobs/530796417 for the full job. See https://travis-ci.org/vispy/vispy/jobs/529293572 for a passing job using PyQt5 5.6.
Any ideas what may have changed in the build process? Maybe this environment variable is set in an activation script now? I'm not sure we are reactivating the environment after we install PyQt5 and we may be using an older version of conda (via astropy's ci-helpers).