-
-
Notifications
You must be signed in to change notification settings - Fork 15k
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
wxPython: 4.1.0 -> 4.1.1 #135607
wxPython: 4.1.0 -> 4.1.1 #135607
Conversation
@davidak the only problem with wxPython 4.1.1 is that it doesn't compile with wxWidgets from the system. wxPython only compiles if used the wxWidgets included in the wxPython source code. To do that, you just need to remove buildPhase = ''
${python.interpreter} build.py -v dox etg --nodoc build_py
''; |
@tfmoraes yes, that fixed the problem. upstream issue wxWidgets/Phoenix#1909 now i get this error:
|
I did some modifications and it worked, see: https://gist.github.com/tfmoraes/fc2f1b0e4d571f5c92754720a8303d6b |
It builds, but does not work.
|
Adding |
I think It works now 🚀 |
Manually patch it or even better build from source which I think is the right choice here. |
Co-authored-by: Thiago Franco de Moraes <totonixsame@gmail.com>
i don't understand where the file comes from. do they distribute binary files? so i'm just happy when the package is updated. others can improve it further |
Those files are compiled from source on compiling process of wxPython. In the compiling process those file should have set the rpath, but that is not happening. Something like in this bug report wxWidgets/Phoenix#423 |
I checked here. wxPython compiled on Ubuntu appends
That is not the case of the version compile on NixOS (without the autoPatchelfHook):
|
This means we compile the binary but the RPATH is not set correct, right? If so please comment that if not already done. |
Yes. |
I think this PR can be merged. It's working in my tests. |
This is a semi-automatic executed nixpkgs-review with nixpkgs-review-checks extension. It is checked by a human on a best effort basis and does not build all packages (e.g. lumo, tensorflow or pytorch). Result of 1 package failed to build and already failed to build on hydra master:
2 packages failed to build and are new build failures:
1 package built:
|
Looks like this change broke the build of the stable KiCad version too:
KiCad uses wxWidgets both directly and through wxPython, therefore changing wxPython to use the bundled newer version of wxWidgets breaks the kicad-base package. @evils I suppose that even reviving #98634 won't work to fix this from the KiCad side, because the updated wxPython package no longer exposes the underlying wxGTK. |
@sigprof Maybe there is an upstream issue for this situation or we can look how other distros handle it? |
|
substituteInPlace wx/lib/wxcairo/wx_pycairo.py \ | ||
--replace '_dlls = dict()' '_dlls = {k: ctypes.CDLL(v) for k, v in [ | ||
("gdk", "${wxGTK.gtk}/lib/libgtk-x11-3.0.so"), | ||
("pangocairo", "${pango.out}/lib/libpangocairo-1.0.so"), | ||
("cairoLib = None", "cairoLib = ctypes.CDLL('${cairo}/lib/libcairo.so')"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This part does not seem to be correct — the text ends up being included in the Python code, while the original suggestion was to add a pair of arguments to substituteInPlace
, so that one call will perform two replacements in separate parts of the same file.
wxWidgets/Phoenix#1961 suggests making a wxPython release that can build with system wxWidgets 3.1.5, but apparently this requires applying some patches to wxWidgets and won't work with an unmodified wxWidgets 3.1.5 release. However, a more traditional distro would probably need to do exactly that, and even NixOS may need to obey similar restrictions if there is some chance that different versions of the same shared library may end up in the dependency tree of a single executable.
The existence of wxGTK31 3.1.5 probably satisfies CMake, but the resulting binaries will still have two different wxGTK versions in the dependency tree — one as a direct shared library dependency, another as a dependency of wxPython shared modules. But this may be OK if the Python code executed by the embedded Python interpreter never actually imports any wxPython modules. I'm not familiar with KiCad internals — does it always spawn a separate process to run any Python code that might use wxPython, or may it end up running some Python code of that kind in the process that also uses wxGTK directly for its GUI? (Actually even KiCad packages built before this PR depend on two different builds of wxWidgets — the directly used |
Arch Linux reverted to old wxPython/wxWidgets combination because of KiCad build issues — currently they have wxPython 4.0.7.2 and wxGTK 3.0.5.1. In theory the wxGTK 3.0 branch is “stable”, but it's also rather old, and the corresponding wxPython version is really old too. The Flatpak for KiCad apparently uses unmodified wxWidgets-3.1.5 and wxPython-4.1.1 patched with fix-wxpython-4.1.1-on-wxwidgets-3.1.5.patch; that patch apparently comes from wxWidgets/Phoenix#1909 (comment). So waiting for #157848 and then updating wxPython to build with that version of wxGTK31 using that patch may be a suitable solution. I don't know how important are the other patches mentioned in wxWidgets/Phoenix#1961 though. |
an approach that's more in line with wxPython phoenix's apparently intended usage is to have the wxPython package expose the wxwidgets it was built with (the one they bundle in their source) edit: it was mentioned above that
which would mean this is indeed not an option... |
Motivation for this change
This is fixing wxWidgets/Phoenix#1956 (which affects the Timeline package)
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)