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

Build wheels for 7.7.0 #7

Merged
merged 1 commit into from
Jan 19, 2023
Merged

Build wheels for 7.7.0 #7

merged 1 commit into from
Jan 19, 2023

Conversation

fpq473
Copy link
Collaborator

@fpq473 fpq473 commented Jan 8, 2023

Match latest versions of ocp and vtk conda packages.

VTK manylinux wheels are now available on PyPI for
3.10, so remove use of third-party wheel.

@fpq473 fpq473 requested a review from jmwright January 8, 2023 17:49
@fpq473 fpq473 changed the title Build wheels for 7.7.0.alpha Build wheels for 7.7.0 Jan 8, 2023
@jmwright
Copy link
Member

@fpq473 Is this going to run into the same glibc versioning problem that we have with 7.6.*?

@fpq473
Copy link
Collaborator Author

fpq473 commented Jan 10, 2023

@jmwright The fix in a54b3c7 allowed us to produce manylinux_2_31 wheels for 7.6, matching what we had for 7.5. So the requirement is debian 11 or ubuntu 20.04, which isn't the greatest, but still useful.

This change will (hopefully) build the same for 7.7.

@fpq473
Copy link
Collaborator Author

fpq473 commented Jan 10, 2023

And just FTR, here are the 7.6.3a0 wheels released last October:

https://pypi.org/project/cadquery-ocp/7.6.3a0/#files

It's an alpha release (matching the conda package), so the PyPI page still says 7.5.3.0.

@jmwright
Copy link
Member

I've tried building a final 7.6.3.0 release before merging this, but things aren't working again.

https://github.com/CadQuery/ocp-build-system/actions/runs/3884118392/jobs/6626257305#step:8:98879

@fpq473
Copy link
Collaborator Author

fpq473 commented Jan 10, 2023

I committed some fixes to try to get 7.6.3.0 to build.

But there is still one problem which you might know how to fix: the conda install command is installing 7.6.3.alpha from the cadquery channel instead of 7.6.3.0 from conda-forge.

I already tried 2102e5d but it seemingly had no effect.

@fpq473
Copy link
Collaborator Author

fpq473 commented Jan 10, 2023

Okay, I managed to get 7.6.3.0 to install. But now there are glibc versioning problems like you noted.

I'll think about it.

@jmwright
Copy link
Member

@fpq473 Thanks.

I think the proper way to fix this kind of problem and to support other platforms like ARM properly, is to do from-scratch compilation of the toolchain (VTK, OCCT, OCP, etc) so we have more control over the glibc version. It's very involved to build everything from scratch though.

@fpq473
Copy link
Collaborator Author

fpq473 commented Jan 10, 2023

I did some debugging. The workflow logs say:

2023-01-10T17:55:46.2566145Z DEBUG:auditwheel.policy.versioned_symbols:Package requires GLIBCXX_3.4.29, incompatible with policy manylinux_2_31_x86_64 ...
2023-01-10T17:55:46.2566962Z DEBUG:auditwheel.policy.versioned_symbols:Package requires CXXABI_1.3.13, incompatible with policy manylinux_2_31_x86_64 ...

This requirement is coming from OCP.so file:

./OCP.cpython-310-x86_64-linux-gnu.so:     file format elf64-x86-64
  9264f7:       ff 15 a3 05 d0 07       callq  *0x7d005a3(%rip)        # 8626aa0 <std::__exception_ptr::exception_ptr::_M_addref()@CXXABI_1.3.13>
  926512:       ff 15 90 ff cf 07       callq  *0x7cfff90(%rip)        # 86264a8 <std::__exception_ptr::exception_ptr::_M_release()@CXXABI_1.3.13>
  926527:       ff 15 73 05 d0 07       callq  *0x7d00573(%rip)        # 8626aa0 <std::__exception_ptr::exception_ptr::_M_addref()@CXXABI_1.3.13>
  c7f09e:       ff 15 cc 2e 98 07       callq  *0x7982ecc(%rip)        # 8601f70 <std::__throw_bad_array_new_length()@GLIBCXX_3.4.29>
  c7f42e:       ff 15 3c 2b 98 07       callq  *0x7982b3c(%rip)        # 8601f70 <std::__throw_bad_array_new_length()@GLIBCXX_3.4.29>
  c7f796:       ff 15 d4 27 98 07       callq  *0x79827d4(%rip)        # 8601f70 <std::__throw_bad_array_new_length()@GLIBCXX_3.4.29>

This is specific to the 7.6.3.0 package on conda-forge. The 7.6.3.alpha and 7.7.0.alpha packages on the cadquery channel do not have this problem. So there is some difference in how these packages are compiled (but not sure how/where these builds are done).

Should we (1) try to identify the differences, or (2) just build and release 7.7.0.alpha, or (3) throw in the towel?

@fpq473
Copy link
Collaborator Author

fpq473 commented Jan 10, 2023

Fourth option: release 7.6.3.0 as a manylinux_2_34 wheel. This requires newer distros, e.g. fedora 35, ubuntu 21.10, debian testing.

@jmwright
Copy link
Member

It looks like all the OCP builds, even the OCCT 7.7 ones are using Ubuntu 18.04, so the system's glibc version shouldn't be the problem. It must be something with how conda is solving and setting up the environments.

https://dev.azure.com/cadquery/OCP/_build/results?buildId=2552&view=results

Maybe the best thing to do is your option #4 first, followed by a build and release of 7.7 alpha.

What do you think @fpq473 ?

@fpq473
Copy link
Collaborator Author

fpq473 commented Jan 10, 2023

We can do (4) but after additional reflection, it seems like a potential pain point to support -- when users are unable to install cadquery-ocp, it may be because they didn't say pip install --pre or maybe it's their linux distro version.

I can try to test your theory by comparing build logs, but I can't find the 7.6.3.0 build log. Can you?

The 7.6.3.0 files were uploaded to conda-forge around Dec 30. The Azure pipeline runs you linked to go back to September, but none of them appear to be for 7.6.3.0 -- all the December runs are titled "Start with 7.7.0".

https://dev.azure.com/cadquery/OCP/_build?definitionId=6

@jmwright
Copy link
Member

The latest commit I see on master for 7.6.3 is Sept. https://github.com/CadQuery/OCP/commits/master

The latest release is the 7.6.3.0 tag on Nov 23rd. I don't see any Azure logs for that tag, but that tag points back to the September commit for 7.6.3, which does have logs.
https://github.com/CadQuery/OCP/releases

@fpq473
Copy link
Collaborator Author

fpq473 commented Jan 11, 2023

@jmwright Are you still referring to the Azure builds? None of them are for 7.6.3.0, as far as I can tell. The log output indicates that 7.7.0.alpha or 7.6.3.alpha are being built.

image

Also I see that this line {% set OCP_TWEAK = "alpha" %} has existed in OCP for over a year, so if it means what I think it means, it seems unlikely that a non-alpha build was done via github/azure.

https://github.com/CadQuery/OCP/blame/2cb2dba8674c58d6ede38fd27619a09e850856e8/conda/meta.yaml#L2

Is it possible the upload was done as a one-off elsewhere?

@jmwright
Copy link
Member

@fpq473 Unless you object, I'm going to do the following.

  1. Do a "fake" 7.6.3.0 release.
  2. Start work on reviewing/merging this branch

@fpq473
Copy link
Collaborator Author

fpq473 commented Jan 17, 2023

@jmwright Sounds like a plan!

@jmwright
Copy link
Member

@fpq473 Sorry that I made such a mess of this. 7.6.3 has been published and we can move ahead with this PR. I ended up using 7.6.3 as the version number rather than 7.6.3.0 because we didn't have the trailing 0 in the last release version number.

@fpq473
Copy link
Collaborator Author

fpq473 commented Jan 18, 2023

I see 7.6.3 on pypi, awesome, nicely done.

Do you want to release 7.7.0.alpha now, or just a straight up 7.7.0?

@jmwright
Copy link
Member

Do you want to release 7.7.0.alpha now, or just a straight up 7.7.0?

Let's do an alpha first just to be safe.

- VTK manylinux wheels are now available on PyPI for 3.10,
  so remove use of third-party wheel.

- Move version wrangling into setup.py to prepare for
  "7.7.0" release
@fpq473
Copy link
Collaborator Author

fpq473 commented Jan 19, 2023

@jmwright I updated this PR for 7.7.0.alpha. Also tried to centralize the version wrangling. Tested on Linux.

Copy link
Member

@jmwright jmwright left a comment

Choose a reason for hiding this comment

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

Thanks @fpq473 ! Let's see how it works.

@jmwright jmwright merged commit 36c617f into CadQuery:main Jan 19, 2023
@jmwright
Copy link
Member

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.

2 participants