-
Notifications
You must be signed in to change notification settings - Fork 15
Fixing 7.7.0 manylinux build #10
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
Comments
Well, that's a tough one. My laptop (Ubuntu 20.04) will stop being able to install CadQuery via pip when it requires OCP 7.7.0. To buy us some time, we could release the 7.7.0 alpha, but keep CadQuery on the 7.6.3 release. I need to do a CadQuery release this month, and so I'm thinking about leaving the OCP version pinned to 7.6.3. It would be nice to push CadQuery to 7.7.0 because it fixes a few issues, but it also introduces at least one regression (CadQuery/cadquery#1229). A drawback is that people could be running 7.7.0-alpha in conda and 7.6.3 in pip and there will be some differences in modelling results (in certain situations).
So, the solution is to build our own VTK wheels on Ubuntu 20.04 or earlier? |
Yes, and not only that, it would have need to set
and assuming it's possible, we need to build with an older compiler and It appears (but definitive source not found) that manylinux_2_24 wheels tend to have |
I have been able to get a working local VTK build per the instructions here. There is a There is also this section of the OCCT documentation about building VTK for OCCT. So, my initial thought is to create a vtk-build-system repo which builds VTK from scratch the way we need it. I would need help getting that packaged into a cadquery-vtk wheel the way it's done in this repo though. As you note, there may also be complications with other dependencies that we don't know about yet. |
Sounds like a plan. We should be able to package it simply by installing it as part of the build workflow:
In case it helps you, I found some mentions of manylinux in the VTK project. It's possible that's how their builds work, and you may want to leverage that. |
@jmwright [Moving the discussion back here] I took your VTK artifacts and built manylinux_2_31 wheels for 7.7.0 alpha. OCP imports properly in all 3.x; I ran pytest in 3.10. Action One issue is that the VTK wheels produced here are almost 400MB, while those from PyPI are under 100MB. This makes the cadquery-ocp wheel close to 500MB instead of under 200MB. |
Looks like the build defaults to Debug, so I added a cmake option that should set it to Release. We will see how much of a difference that makes in the size of the resulting wheel. https://github.com/CadQuery/ocp-build-system/actions/runs/4029788896 |
Thanks, the linux wheels are ~141 MB now. Feel free to try them out. https://github.com/CadQuery/ocp-build-system/actions/runs/4030163165 Should we just build for the other platforms and release to PyPI? |
I downloaded the Python 3.8 wheel and tried to install it into a Python 3.8 venv, but got an error.
I tried pip3 as well and got the same error. I seem to have the minimum glibc version:
Am I doing something wrong when trying to install it locally? |
You may have to upgrade pip first -- older pips don't understand certain manylinux tags. |
Ah yes, I should have thought of that. pip has to be upgraded oftentimes to install cadquery-ocp from PyPI. I was able to build an environment on my Ubuntu 20.04 machine, install the appropriate wheel from this CI, install all the other CadQuery deps, and run all the CadQuery tests. I got no failures. I would agree that it's time to build the 7.7.0a0 packages for all platforms so we can get them published to PyPI. |
We should probably check to make sure our MacOS wheels don't have a similar versioning problem. We're building on macos-latest and I think it's possible to use a macos-11 runner. I'll try to borrow a Mac tomorrow to make sure our wheel will install on it before we publish the wheels. |
Ah, it looks like the other runners are trying to pull the Linux VTK wheels in. |
Fixed, run here: https://github.com/CadQuery/ocp-build-system/actions/runs/4035304342 |
I tried the wheel on MacOS 10.14.6, and even with upgrading pip, the wheel refuses to install. The wheel is labelled 10.15, so it must be too new. I'm going to try changing the runner to macos-11 to see if that fixes the problem. |
If macos-11 install works, I think you can just upload to PyPI. Then this requirement in cadquery can change to something like
https://github.com/CadQuery/cadquery/blob/60fdbea0e0c85946b44ef31fdf7c7f62d0bf781d/setup.py#L29 |
I think people will still have to use the |
I'll test after 7.7.0a0 hits PyPI and let you know what I find. But are you saying that github master is compatible with both 7.6 and 7.7? What about the forthcoming 2.2.0 release (hooray, btw)? Just 7.6, or both 7.6 and 7.7? |
I need to test it, but I think the current master and the 2.2.0 release coming in a few days should work with either 7.6 or 7.7. |
So even when I run the wheel build on MacOS 11, the wheel inside the ZIP file still has a filename that includes I'm also wondering if we should change windows-latest to windows-2019. I would want to test that on a Windows 10/11 machine, but I think that should work, and might even solve the problem one user had with the CQ on Windows 7 (#8). |
Nice work.
I'd suggest to be consistent with conda - require OCP 7.7: |
Thanks for the info @lorenzncode . I wonder if that means we'll need to keep the @fpq473 I think this warning might explain the |
@fpq473 I finally stopped messing around with the MacOS version. Totally not a Mac guy, and I minunderstood how old the 10.15 version was. It looks like we're limited by the conda packages which were built against 10.15, which was released in 2018. Unfortunately, that will keep me from testing on the Mac that I was borrowing, but I think it should be good for the majority of users. I also tested the Python 3.8 Windows wheel and it worked fine. I'll create a release tomorrow morning. |
The release is available, but users will need to use https://pypi.org/project/cadquery-ocp/7.7.0a0/ Thanks for all the help @fpq473 . I think we made some good improvements to the wheel builds. I'm going to close this issue and turn my attention to the main CadQuery release now. |
Following on from #7, it looks like the Linux wheel built, but it's broken. The only fix I can think of is to bump the manylinux requirement from manylinux_2_31 to manylinux_2_35 (fedora 36+, ubuntu 22.04+, etc.). I'm inclined to say this isn't too restrictive and we should just go ahead. @jmwright Thoughts?
Underlying issue (I think)
Roughly, I think the issue is as follows. With 7.6 we were bundling the VTK 9.1 manylinux wheel, which required manylinux_2_31, to avoid using VTK from conda, which required manylinux_2_35. (Back then, manylinux_2_35 wasn't even defined. It is now.) This replacement no longer works with 7.7, and so we are forced to use VTK from conda, which forces us to use manylinux_2_35.
Not that I really understand this, but in case it's useful to others, one observed difference between manylinux and conda VTK is as follows:
manylinux
conda
This difference is perhaps causing the error:
The undefined symbol demangles to
vtkObject::GetObjectDescription[abi:cxx11]() const
. So it appears that opencascade (from conda) is expecting an "abi:cxx11" VTK, which the manylinux VTK isn't. This conflict is also consistent with various discussions of whether manylinux wheels should be compiled with_GLIBCXX_USE_CXX11_ABI=1
(example).So the conclusion is that there is no easy way to keep manylinux_2_31 compat. We can revisit if VTK manylinux wheels are made to be "abi:cxx11".
The text was updated successfully, but these errors were encountered: