conda-forge / pyqt-feedstock

A conda-smithy repository for pyqt.
BSD 3-Clause "New" or "Revised" License
5 stars 36 forks source link

FIX: Patch PyQt's configure.py to always assume a shared python. #45

Closed hhslepicka closed 5 years ago

hhslepicka commented 5 years ago

Checklist

Solves #44.

This is an attempt to fix issue #44 in which Python now being a static binary makes the configure.py script at PyQt to fail to locate the Python shared library which is always packaged even with the static python.

Attn. @conda-forge/pyqt

conda-forge-linter commented 5 years ago

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

CJ-Wright commented 5 years ago

@conda-forge-admin please rerender

ccordoba12 commented 5 years ago

To fix the failures on Azure/Linux, please add this file

https://github.com/conda-forge/qtawesome-feedstock/blob/master/recipe/yum_requirements.txt

to the recipe dir.

I don't know about the failures on Azure/macOS. You'll have to fix those by yourself.

ccordoba12 commented 5 years ago

@conda-forge-admin please rerender

hhslepicka commented 5 years ago

@ccordoba12 I did some quick investigation and the support for yum_requirements.txt was added 3 days ago to conda-smithy (https://github.com/conda-forge/conda-smithy/commit/18268390faae918bf933f9041bc08f6f5f98042a) and there is not yet a version released. That is the reason why it is failing for linux. For OSX it is failing to link QtTest and with that failing the test for the recipe. Is this related to XCode9.4?

hhslepicka commented 5 years ago

@conda-forge-admin please rerender

conda-forge-linter commented 5 years ago

Hi! This is the friendly automated conda-forge-webservice.

I tried to re-render for you, but it looks like there was nothing to do.

CJ-Wright commented 5 years ago

(I rebuilt the bot) @conda-forge-admin please rerender

conda-forge-linter commented 5 years ago

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

ccordoba12 commented 5 years ago

So both Travis and Azure fail with the same problem, and I don't know how to fix it.

@conda-forge/core, have you seen this problem before?

hhslepicka commented 5 years ago

@ccordoba12 would this be the case of the xcode version? The re-render switched it back to 9.4

ccordoba12 commented 5 years ago

No, before the compilation completely failed due to that xcode versión. Now it only fails with QtTest.

ccordoba12 commented 5 years ago

@hhslepicka, ok, I was wrong: changing back to xcode 6.4 do really fix things in Travis. Azure is broken because it uses a more recent xcode version, I'd say.

@conda-forge/core, what do you think we should do about this?

hhslepicka commented 5 years ago

@ccordoba12, no problem at all... i was just testing it to make sure! Would it be the case that maybe a newer version of Qt and PyQt would work with the new xcode?

hhslepicka commented 5 years ago

@ccordoba12 and @conda-forge/core any news here? If not, could we at least move forward with the merge and address the Xcode change later on?

isuruf commented 5 years ago

Travis will get broken in a rerender as well. It's using 10.10 sdk (although CONDA_BUILD_SYSROOT is set to 10.9), but with the latest it will use 10.14 sdk and break

hhslepicka commented 5 years ago

@isuruf in this case what would be the recommendation? Go after updating qt to a newer version so we can probably build a newer PyQt here?

hhslepicka commented 5 years ago

@ccordoba12 could it be the case that qt needs a rerender? The error with Azure is:

make -f cfgtest_QtTest.mk
$BUILD_PREFIX/bin/x86_64-apple-darwin13.4.0-clang++ -c -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -std=c++14 -fmessage-length=0 -I$PREFIX/include -fdebug-prefix-map=$SRC_DIR=/usr/local/src/conda/pyqt-5.6.0 -fdebug-prefix-map=$PREFIX=/usr/local/src/conda-prefix -std=c++11 -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9 -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -I$PREFIX/include -fdebug-prefix-map=$SRC_DIR=/usr/local/src/conda/pyqt-5.6.0 -fdebug-prefix-map=$PREFIX=/usr/local/src/conda-prefix -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9 -pipe -stdlib=libc++ -O2 -isysroot /Applications/Xcode_9.4.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -mmacosx-version-min=10.9 -Wall -W -fPIC -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_TESTLIB_LIB -DQT_CORE_LIB -DQT_TESTCASE_BUILDDIR='"$SRC_DIR"' -I. -I../_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_plac/include/qt -I../_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_plac/include/qt/QtWidgets -I../_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_plac/include/qt/QtGui -I../_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_plac/include/qt/QtTest -I../_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_plac/include/qt/QtCore -I. -I/Applications/Xcode_9.4.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/OpenGL.framework/Headers -I/Applications/Xcode_9.4.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/AGL.framework/Headers -I../_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_plac/mkspecs/macx-clang -o cfgtest_QtTest.o cfgtest_QtTest.cpp
$BUILD_PREFIX/bin/x86_64-apple-darwin13.4.0-clang++ -Wl,-pie -Wl,-headerpad_max_install_names -Wl,-dead_strip_dylibs -Wl,-rpath,$PREFIX/lib -L$PREFIX/lib -Wl,-rpath,$PREFIX/lib -licuuc -licui18n -licudata -headerpad_max_install_names -stdlib=libc++ -Wl,-syslibroot,/Applications/Xcode_9.4.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -mmacosx-version-min=10.9 -Wl,-rpath,$PREFIX/lib -o cfgtest_QtTest.app/Contents/MacOS/cfgtest_QtTest cfgtest_QtTest.o   -L$PREFIX/lib -lQt5Widgets -framework DiskArbitration -framework IOKit -lQt5Gui -lQt5Test -framework Security -framework Foundation -framework ApplicationServices -lQt5Core -framework OpenGL -framework AGL 
ld: in '/Applications/Xcode_9.4.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks//ColorSync.framework/Versions/A/ColorSync.tbd', file was built for unsupported file format ( 0x2D 0x2D 0x2D 0x20 0x21 0x74 0x61 0x70 0x69 0x2D 0x74 0x62 0x64 0x2D 0x76 0x33 ) which is not the architecture being linked (x86_64): /Applications/Xcode_9.4.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks//ColorSync.framework/Versions/A/ColorSync.tbd for architecture x86_64
clang-4.0: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [cfgtest_QtTest.app/Contents/MacOS/cfgtest_QtTest] Error 1
ccordoba12 commented 5 years ago

@conda-forge-admin, please rerender

hhslepicka commented 5 years ago

Probably related... https://github.com/ContinuumIO/anaconda-issues/issues/9097 and the referred issue: https://github.com/ContinuumIO/anaconda-issues/issues/9096

Not sure how to address it as it seems to me that after forcing the install of the new SDK we should probably run xcode-select to set it to the proper tools and headers (total guess here): https://github.com/conda-forge/conda-forge-ci-setup-feedstock/blob/2846d2ddc456743a78d52386499639431c580626/recipe/run_conda_forge_build_setup_osx#L20

Any ideas @ccordoba12 and @conda-forge/core

hhslepicka commented 5 years ago

Folks, Sorry for being annoying but we are fighting this issue for a long time now and there is no clear path forward. What would be the downside of downgrading to xcode 6.4 and merging this fix in? @ccordoba12 @conda-forge/core

scopatz commented 5 years ago

@hhslepicka - would that break compatibility with other conda-forge packages?

hhslepicka commented 5 years ago

@scopatz I don't think I would have the answer for your question (maybe other senior members of this recipe will be able to) but AFAIK, the current available package was not done with Xcode 9.4.

mingwandroid commented 5 years ago

You are risking a lot by not using the same libc++. Strongly recommend not to do that.

The thing I dont get is why so much time is being spent on qt 5.6 when there's been two lts releases since then. Can anyone explain that?

hhslepicka commented 5 years ago

@mingwandroid I would love to use a newer version if available as long as the new version includes the plugins properly (Qt Designer and other pieces).

mingwandroid commented 5 years ago

If pieces are missing that's a bug. Qt 5.6 on the other hand is full of bugs, missing features and known security issues. Hence 5.9 then 5.12.

hhslepicka commented 5 years ago

@mingwandroid that is exactly the bug that I am trying to fix here. Since I have very little knowledge of conda-forge and how the whole ecosystem is done, I tried to solve first the problem at hand (missing Qt Designer plugin) and later I was going to take a look on how to update to a newer version (which I believe will require a great amount of work).

I'm fighting the missing designer plugin bug for a while (https://github.com/AnacondaRecipes/pyqt-feedstock/issues/1) ~and I just saw that you added a fix for it 6 months ago (which I could not know about because there was no update on the issue).~

~Is the package available at the pyqt-feedstock from AnacondaRecipes compiled with Xcode 9.4?~

~PS: The designer plugin shows up in a package that was uploaded 2 months ago.. not the one from 6 months which I tested in that time.~

A fix to my previous statements: I saw it wrong... the package from conda-forge includes the plugin but none of the packages from https://anaconda.org/anaconda/pyqt does.

mingwandroid commented 5 years ago

Glad your issue is fixed.

I'm more likely to spend time on Qt 5.12 than ensuring the designer plugin is bundled with Anaconda Distribution's Qt 5.6 (no chance) or Qt 5.9 (some chance) packages. I will try to make sure the plugin is correctly packaged though at that time.

No new software is compiled using Xcode on Anaconda Defaults nor on conda-forge. Historically yes, but we didn't keep track of that very well. We use our own compilers now and compile everything with them specifically because compiler runtimes from Apple tend not to be compatible with custom compilers which we need for openmp support. And building from source is good too!

ccordoba12 commented 5 years ago

The thing I dont get is why so much time is being spent on qt 5.6 when there's been two lts releases since then. Can anyone explain that?

Ray, I think no one wants to put the time and energy needed to compile new Qt versions, including me. I can't speak for the other contributors but in my case a) I have a lot of work with Spyder itself to become the Qt maintainer here; and b) there's no gain in helping conda-forge to compile Qt when Anaconda provides quite good Qt packages thanks to you.

How do you think we could improve the situation for conda-forge?

hhslepicka commented 5 years ago

Glad your issue is fixed.

Not really fixed... i thought it was but I was looking at the wrong place. This fix here fixes my issue with the plugin.

hhslepicka commented 5 years ago

I will close this PR as there is no clear path forward. Thank you all for your time and contribution. If someone feels like picking it up and driving through the finish line, feel free to do so. My branch will remain alive.