-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Cygwin Build Broken #1672
Comments
This problem really applies to any path that contains spaces or any unusual characters. It breaks on Cygwin because of the extensive use of unusual characters under Windows. But it is equally broken on other platforms. We must not release code with this showstopping bug in it. |
I added this to the next release milestone so that it becomes a blocker for next release |
(assuming 10.0 will be next, we can rename it to whatever we think it should be) |
This has been broken since July 15. This is why is it essential to get at least one Cygwin build using a Windows native toolchain into the PR checks. |
Just as a clarification. The above uses the command 'dir' which is not the same as the make 'dir' command. So lets do things right:
Now we see:
Proving that PR #1450 is the cause of the Cygwin build failure. |
There is a PR that I put up months aggo and then closed a couple days ago because I did not have the time to finish that adds Cygwin to the CI. I did not quite understand how to get the right toolchain involved, but we could at least get the sim building which hits a lot of the build infrastructure code. |
I believe the the root cause of the problem is this:
So the solution might be to use cygpath to convert the windows path to a Windows path like:
|
But EXTRA_LIBPATHS is finally consumed by arm-none-eabi-ld which require Windows style path, not POSIX style path? |
The Bash dirname seems to work okay:
|
PR apache#1450 broke the Cygwin build. Refer to Issue apache#1672. The use of of logic like: EXTRA_LIBPATHS += -L "${dir ${shell $(CC) $(ARCHCPUFLAGS) --print-file-name=libgcc.a}}" fails when the Toolchain $(CC) is a native Windows toolchain. That is because the returned path is a Windows-style patch which cannot be handled by the make 'dir' command. Commit 4910d43 reorganized a lot of definitions and replaced the correct code with the use of the limit make 'dir' command. The original code used the Bash dirname command which does not suffer from this limitation; it can handle both POSIX and Windows paths. This was verified using the stm32f4discover:nsh toolchain with the Windows native ARM Embedded toolchain. That toolchain returns: arm-none-eabi-gcc --print-file-name=libgcc.a c:/program files (x86)/gnu tools arm embedded/9 2019-q4-major/bin/../lib/gcc/arm-none-eabi/9.2.1/libgcc.a
PR #1682 appears to correct this problem. With that change applied:
|
PR #1450 broke the Cygwin build. Refer to Issue #1672. The use of of logic like: EXTRA_LIBPATHS += -L "${dir ${shell $(CC) $(ARCHCPUFLAGS) --print-file-name=libgcc.a}}" fails when the Toolchain $(CC) is a native Windows toolchain. That is because the returned path is a Windows-style patch which cannot be handled by the make 'dir' command. Commit 4910d43 reorganized a lot of definitions and replaced the correct code with the use of the limit make 'dir' command. The original code used the Bash dirname command which does not suffer from this limitation; it can handle both POSIX and Windows paths. This was verified using the stm32f4discover:nsh toolchain with the Windows native ARM Embedded toolchain. That toolchain returns: arm-none-eabi-gcc --print-file-name=libgcc.a c:/program files (x86)/gnu tools arm embedded/9 2019-q4-major/bin/../lib/gcc/arm-none-eabi/9.2.1/libgcc.a
PR #1450 broke the Cygwin build and it is still broken in the current master. Consider this:
Results in:
Trying again with a different configuration, no -j and no V=1 gives me the same error:
The problem is due to this commit:
Commit 4910d43 adds logic like the following to all Toolchain.defs files:
But look what happens under Cygwin:
Broken!
The text was updated successfully, but these errors were encountered: