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

patches fail on Windows #295

Closed
smanders opened this issue Jan 11, 2021 · 5 comments
Closed

patches fail on Windows #295

smanders opened this issue Jan 11, 2021 · 5 comments
Assignees
Labels
Milestone

Comments

@smanders
Copy link
Owner

similar to the same issue seen with palam patches https://isrhub.usurf.usu.edu/smanders/internpro/issues/240 where Windows fails to move/rename a file

the apr patch apache/apr@1.5.2...smanders:xp1.5.2
renames/moves test/sendfile.c to test/sendfiletest.c

on linux

patching file CMakeLists.txt
patching file configure.cmake
patching file include/apr_general.h
patching file include/arch/unix/apr_private.cmake.in
patching file test/sendfiletest.c (renamed from test/sendfile.c)
patching file test/testapp.c
patching file test/testdso.c
patching file test/testsockets.c

on windows

5>patching file CMakeLists.txt
5>patching file configure.cmake
5>patching file include/apr_general.h
5>patching file include/arch/unix/apr_private.cmake.in
5>patching file test/sendfile.c
5>patching file test/testapp.c
5>patching file test/testdso.c
5>patching file test/testsockets.c

and then the cmake (on Windows) fails:

7>CMake Error at CMakeLists.txt:488 (ADD_EXECUTABLE):
7>  Cannot find source file:
7>
7>    test/sendfiletest.c
@smanders smanders added the bug label Jan 11, 2021
@smanders smanders added this to the current milestone Jan 11, 2021
@smanders smanders self-assigned this Jan 11, 2021
@smanders
Copy link
Owner Author

revert commit apache/apr@b355fff since the rename was to "prevent name clash on systems which have sendfile library (Solaris)" and Solaris is no longer a supported platform

smanders pushed a commit to externpro/apr that referenced this issue Jan 11, 2021
smanders pushed a commit that referenced this issue Jan 11, 2021
@smanders
Copy link
Owner Author

completed with commits referenced above

@smanders smanders changed the title apr patch fails on Windows patches fail on Windows Jan 12, 2021
@smanders
Copy link
Owner Author

the wirehair patch also fails
catid/wirehair@9e8923a...smanders:xp20.11.21

gf256.h is moved from the root to include/wirehair

diff --git a/gf256.h b/include/wirehair/gf256.h
similarity index 100%
rename from gf256.h
rename to include/wirehair/gf256.h

@smanders smanders reopened this Jan 12, 2021
@smanders
Copy link
Owner Author

similar problem reported cweagans/composer-patches#172 (comment)
solution cweagans/composer-patches#172 (comment)

You need GNU Patch >= 2.7. From their News page (https://savannah.gnu.org/forum/forum.php?forum_id=7361) about 2.7:

Support for most features of the "diff --git" format, including renames and copies, permission changes, and symlink diffs. Binary diffs are not supported yet; patch will complain and skip them.

currently (20.10.1 release of externpro) patch binary is downloaded on Windows from sourceforge https://github.com/smanders/externpro/blob/20.10.1/projects/patch.cmake#L17 -- but the version 2.5.9-7 appears to be the latest available

patch version 2.7.6 is part of Git for Windows and the executable is found in "Program Files/Git/usr/bin" but also requires msys-2.0.dll -- so I've zipped these files up into patch-2.7.6-bin.zip and put it in the externpro releases (associated with externpro 20.10.1 release)
https://github.com/smanders/externpro/releases/download/20.10.1/patch-2.7.6-bin.zip

smanders pushed a commit that referenced this issue Jan 12, 2021
@smanders
Copy link
Owner Author

completed with commits to dev branch referenced above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant