-
Notifications
You must be signed in to change notification settings - Fork 337
Add ability to disable or force system libffi and fix stdcall on Win32 #669
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
Conversation
This lets the user select if system or builtin libffi version shall be used. Default is still "try system libffi and fallback to builtin". The option can be used like so: gem install ffi -- --disable-system-libffi Primary use is to run specs on builtin libffi on Windows in addition to system libffi.
rake-10.5.0/lib/rake/application.rb:381: warning: deprecated Object#=~ is called on Proc; it always returns nil
... and use it in Appveyor-CI.
This temporary switches to a forked libffi, until the fixing PR is merged: libffi/libffi#465 Use the following command to update the submodule: git submodule update --init --remote
PipeHelperWindows.c:15:5: warning: implicit declaration of function 'sprintf' [-Wimplicit-function-declaration] sprintf( name, "\\\\.\\Pipe\\pipeHelper-%u-%i", ^~~~~~~
Can you split this into multiple PRs? |
@tduehr I already separated the changes into different commits but they belong semantically together. Which objections do you have to merge this? |
The only real issue I have is using a libffi fork. Does FFI not work on windows at all without it? |
Uh, that's the simplest way to patch the upstream library. This is also common practice, that core members provide forked repositories in order to apply patches, until the particular issue has been fixed upstream. See here in rails for example. But I can move it to https://github.com/ffi/libffi/ if you like.
As mentioned above, it fails at this one test case I wrote years ago. But this test case wasn't triggered on Appveyor with system libffi in the past. |
FWIW, I had this in my
I tried removing it, and
The only way I found was to:
Might be a |
@eregon Usually I'm the one who's called in the company when there any git issues, but git submodules are very special and don't fit well to the rest of the git commands. So I don't like them. Nevertheless I updated two ruby-ffi repositories by |
@larskanis Yes, I think I tried that too. Maybe it's a bad interaction with |
This makes sure that we run tests with system libffi and with bunded libffi on Appveyor (Windows build). The specs fail on current libffi master branch due to broken stdcall to closures. This can be seen here.
The failing stdcall issue is fixed by this PR. This is why the PR enables a libffi fork temporary.
Fixes #649