Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wants to merge 8 commits into from
Closed

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

wants to merge 8 commits into from

Conversation

hhslepicka
Copy link

@hhslepicka hhslepicka commented Feb 4, 2019

Checklist

  • Used a fork of the feedstock to propose changes
  • Bumped the build number (if the version is unchanged)
  • Reset the build number to 0 (if the version changed)
  • Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering) (thanks @CJ-Wright )
  • Ensured the license file is being packaged.

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
Copy link

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
Copy link
Member

@conda-forge-admin please rerender


language: generic

os: osx
osx_image: xcode6.4
osx_image: xcode9.4
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Last time we discovered this was the problem, i.e. we need xcode6.4 here for PyQt to compile correctly. So please revert this change and try again (it seems that image is still available).

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it.. This was changed by the re-render command. Should the instructions be updated to reflect this issue as well?

@ccordoba12
Copy link
Contributor

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
Copy link
Contributor

@conda-forge-admin please rerender

@hhslepicka
Copy link
Author

hhslepicka commented Feb 5, 2019

@ccordoba12 I did some quick investigation and the support for yum_requirements.txt was added 3 days ago to conda-smithy (conda-forge/conda-smithy@1826839) 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
Copy link
Author

@conda-forge-admin please rerender

@conda-forge-linter
Copy link

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
Copy link
Member

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

@conda-forge-linter
Copy link

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
Copy link
Contributor

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
Copy link
Author

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

@ccordoba12
Copy link
Contributor

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

@ccordoba12
Copy link
Contributor

@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
Copy link
Author

@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
Copy link
Author

@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
Copy link
Member

isuruf commented Mar 8, 2019

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
Copy link
Author

@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
Copy link
Author

@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
Copy link
Contributor

@conda-forge-admin, please rerender

@hhslepicka
Copy link
Author

Probably related...
ContinuumIO/anaconda-issues#9097 and the referred issue: ContinuumIO/anaconda-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
Copy link
Author

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
Copy link
Member

scopatz commented Mar 18, 2019

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

@hhslepicka
Copy link
Author

@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
Copy link
Contributor

mingwandroid commented Mar 18, 2019

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
Copy link
Author

@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
Copy link
Contributor

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
Copy link
Author

hhslepicka commented Mar 18, 2019

@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 (AnacondaRecipes#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
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Author

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
Copy link
Author

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.

@hhslepicka hhslepicka closed this Mar 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants