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

use libffi instead of older vendored version #48

Merged
merged 3 commits into from
Jul 11, 2021

Conversation

mattip
Copy link
Contributor

@mattip mattip commented Jul 11, 2021

Checklist

  • Used a personal 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)
  • Ensured the license file is being packaged.

It turns out PyPy was vendoring a very old version of libffi for msvc. Conda provides a newer version, so use it. This seems to fix the segfaults in conda-forge/numpy-feedstock#238. While the patch comes from an upstream branch, the branch itself requires pypa/virtualenv#2141 so I am optimistically marking this as part of the next pypy release.

@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.

@mattip
Copy link
Contributor Author

mattip commented Jul 11, 2021

@conda-forge-admin, please rerender

@mattip
Copy link
Contributor Author

mattip commented Jul 11, 2021

ping @h-vetinari

@github-actions
Copy link
Contributor

Hi! This is the friendly automated conda-forge-webservice.
I tried to rerender for you, but it looks like there was nothing to do.

@h-vetinari
Copy link
Member

Cool, thanks for figuring this out Matti!

I don't understand the dependence on virtualenv though? I see you're carring the same diff in the patch here, why would we need to wait for pypa/virtualenv#2141?

Also, the patch doesn't seem to apply cleanly on top of 7.3.5 (+ the existing patches)...

@mattip
Copy link
Contributor Author

mattip commented Jul 11, 2021

We don't need to wait for virtualenv, upstream PyPy does. So even though I made this a "pre-7.3.6-0008.patch", it may need to be carried over past v7.3.6. I will fix the diff.

@h-vetinari
Copy link
Member

There seems to be an issue (best guess from the trace) with how the shared lib extension is applied?

[platform:Error] LINK : fatal error LNK1181: cannot open input file 'libffi-7.lib'

Not sure where along the way libffi-7.dll becomes libffi-7.lib. Confusingly, .lib is used for both static libraries, as well as the import libraries for DLLs (so it could also be that this needs a corresponding import library...).

@mattip
Copy link
Contributor Author

mattip commented Jul 11, 2021

Probably an issue with the compilation LIB directive to add the path. I am trying to debug locally

Copy link
Member

@h-vetinari h-vetinari left a comment

Choose a reason for hiding this comment

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

Not much to contribute in terms of correctness, but LGTM. Thanks!

Comment on lines 20 to 21
--- a/pypy/tool/release/package.py Mon Apr 12 07:11:48 2021 +0200
+++ b/pypy/tool/release/package.py Sun Jul 11 12:46:37 2021 +0300
--- a/pypy/tool/release/package.py 2021-4-12 07:11:48.000 +0200
+++ b/pypy/tool/release/package.py Sun Jul 11 12:46:37.000 2021 +0300
Copy link
Member

Choose a reason for hiding this comment

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

Aside from the fact that git (& patch) should easily handle the other dates as well, this looks inconsistent (now a mix of both formats). In any case, the patch seems to have been applied without issue:

Patch analysis gives:
[[ RA--D1L-VE ]] - [[                                                 patches/fficurses.patch ]]
[[ RA--D1LO-E ]] - [[                                               patches/tklib_build.patch ]]
[[ RA--D1LOVE ]] - [[                                                    patches/tk_app.patch ]]
[[ RA--D1L-VE ]] - [[                                                patches/lzma_build.patch ]]
[[ RA-MD1LOVE ]] - [[                                  patches/site-and-sysconfig-conda.patch ]]
[[ RA-MD1LOVE ]] - [[                                         patches/distutils-install.patch ]]
[[ RA-MD1LOVE ]] - [[                        patches/distutils-sysconfig-get_python_lib.patch ]]
[[ RA-MD1L-VE ]] - [[ patches/0009-runtime_library_dir_option-Use-1st-word-of-CC-as-com.patch ]]
[[ RA-MD1LOVE ]] - [[ patches/0012-Fix-find_library-so-that-it-looks-in-sys.prefix-lib-.patch ]]
[[ RA-MD1L-VE ]] - [[                patches/0013-Disable-new-dtags-in-unixccompiler.py.patch ]]
[[ RA-MD1L-VE ]] - [[           patches/0020-Use-ranlib-from-env-if-env-variable-is-set.patch ]]
[[ RA-MD1L-VE ]] - [[                                            patches/pre-7.3.6-0001.patch ]]
[[ RA-MD1LOVE ]] - [[                                            patches/pre-7.3.6-0002.patch ]]
[[ RA-MD1L-VE ]] - [[                                            patches/pre-7.3.6-0003.patch ]]
[[ RA-MD1L-VE ]] - [[                                            patches/pre-7.3.6-0004.patch ]]
[[ RA-MD1LOVE ]] - [[                                            patches/pre-7.3.6-0005.patch ]]
[[ RA-MD1L-VE ]] - [[                                            patches/pre-7.3.6-0006.patch ]]
[[ RA-MD1L-VE ]] - [[                                            patches/pre-7.3.6-0007.patch ]]
[[ RA-MD1L--E ]] - [[                                            patches/pre-7.3.6-0008.patch ]]

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah, I got confused by a failure at some point and tried to modify this by hand. I think patch ignores the date altogether, so it shouldn't matter

@h-vetinari
Copy link
Member

@isuruf, if fine for you, would be good to merge this for continuing with conda-forge/numpy-feedstock#238

@isuruf isuruf merged commit 45df2de into conda-forge:master Jul 11, 2021
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.

4 participants