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

Patch fails on renaming file with "Invalid argument" #90

Closed
mikewl opened this issue Apr 9, 2016 · 13 comments
Closed

Patch fails on renaming file with "Invalid argument" #90

mikewl opened this issue Apr 9, 2016 · 13 comments

Comments

@mikewl
Copy link

mikewl commented Apr 9, 2016

While compiling some software, anything that used patch and renamed a file gave this error. This breaks compilation for many projects.

@ghost
Copy link

ghost commented Apr 11, 2016

Can you give an example?

@mikewl
Copy link
Author

mikewl commented Apr 11, 2016

Attempting to compile Julia fails when patch is invoked on DSFMT. It is attempting to rename a .h file to .h.orig.
I checked my vm and it definitely is working on a clean build still, this is isolated to bash on Windows.

On 11 Apr 2016, at 08:50, Adam Baxter notifications@github.com wrote:

Can you give an example?


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub

@tkelman
Copy link

tkelman commented Apr 11, 2016

Here's the exact steps:

curl -O http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/dSFMT-src-2.2.3.tar.gz
tar -xf dSFMT-src-2.2.3.tar.gz
cd dSFMT-src-2.2.3
curl https://raw.githubusercontent.com/JuliaLang/julia/v0.4.5/deps/dSFMT.h.patch | patch

Works fine in Cygwin, actual Ubuntu, etc.

@tkelman
Copy link

tkelman commented Apr 12, 2016

strace output: https://gist.github.com/263edd6d13cd28d279f42b676a05f908

Missing renameat maybe? http://git.savannah.gnu.org/cgit/patch.git/tree/src/safe.c#n589

@hut8
Copy link

hut8 commented Apr 12, 2016

I think this might be the same. Sorry for the duplicate if it is. Mine doesn't use renameat

#163

@benhillis
Copy link
Member

Thanks for the information everyone. I've implemented the renameat system call and can verify that patch is now working in our dev branch. The fix will be making its way to the flighting branch (no firm ETA).

@davidanthoff
Copy link

Great! I assume the flighting branch is different from the fast insider ring? I.e. this won't be in the fast ring build released today?

@benhillis
Copy link
Member

benhillis commented Apr 22, 2016

Correct, this will not be in the build that is being released today since it was just checked into our development branch yesterday. All rings (fast, slow, release preview) get their builds out of the flighting branch but with different release criteria. There's a good table on Wikipedia with more info.

We will be releasing some release notes soon on what's fixed in the build that is being released today.

@HenkPoley
Copy link

Probably known, but.. this is still a bug on build 14332: ocaml/opam-repository#6343 (comment)

@benhillis
Copy link
Member

Yeah the fix for this didn't make it to the most recent flight, it's still inbound (implementing the renameat system call). Keep an eye out for the release notes of a future flight.

@HenkPoley
Copy link

The bug I was hitting with opam install sha.1.9 (that uses patch somewhere) is resolved in Windows 10 build 14342. There are no relevant changes to their package, so this must be resolved outside of the changelog.

@benhillis
Copy link
Member

benhillis commented May 11, 2016

Good to hear! FYI - The fix for patch was implementing the renameat system call. I'll make sure the release notes for the new build are posted today.

@tkelman
Copy link

tkelman commented May 11, 2016

The originally reported issue works for me as well in 14342, so I think you can close this. If you try to build Julia you'll hit #272, but that's unrelated.

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

No branches or pull requests

8 participants