-
Notifications
You must be signed in to change notification settings - Fork 136
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
To adopt PR #1264 approach of using Readline replacement for MinGW build (WIP, DNM) #1553
Conversation
This PR needs review and testing. Please do not merge yet. |
One potential side effect of using Reference discussion: |
I guarantee it will as it uses staff from C++ Standard Library (notably |
More analysys:
With So instead I've tried |
And I can no longer push to your branch :) This is the patch: diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index db1c85d..ef07127 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -319,6 +319,10 @@ add_executable(avrdude
target_link_libraries(avrdude PUBLIC libavrdude)
+if(MINGW)
+ target_link_options(avrdude PRIVATE -static)
+endif()
+
# =====================================
# Install
# ===================================== |
Strange, you should be able to do that. I just checked and you are still listed as collaborator. Anyway, I just push the patch. |
Without this extra dependancies will be brought in. libgcc_s_seh-1.dll - C++ exceptions handling library; libwinpthread-1.dll - pthread implementation; libstdc++-6.dll - libstdc++;
Ah, right, I used the wrong key. |
Static build is okay for MinGW build. For avrdude project, the default for MSVC/MinGW build is static build. Then the default for Linux/macOS/FreeBSD is dynamic build. But people actually want static build for Linux/macOS as well. |
Now it is good in terms of dependancies.
For my local build.
|
This PR is not working yet. I encountered the previous issue that I need extra return to excute the command.
|
The good thing is that it does not get time out so easily compared to git main MinGW build, which is a known issue. Example from git main MSYS2 mingw64 build.
|
Previous issue reported by @MCUdude under macOS when using libedit. Similar issues when I was testing PR #1132. @dl8dtl sorted out the issue with libedit with a clever PR. I need to see if it helps in this case or not. |
@Youw In case you want to see the issue under Windows, you do not need a real setup, just use the
|
The following work-around does not work (similar to PR #1207).
|
Other problems: wrong first line
|
Looks like I can not sorted out the issue without help from others. I will still keep this PR open for a while, at least until when @stefanrueger is back. And there are good changes to CMake by @Youw. Even if we close this PR, I may raise another to adopt CMake improvements from this PR into git main. |
The following changes reverted the addition of embedded MinGW Readline and use GNU Readline (if GNU Readline is installed). And it works properly (except existing issues that it may time out in terminal mode sometimes). So the issue is really related to the embedded readline implementation, which works under MSVC but not MinGW. Strange.
Problems with current PR.
|
Could be a difference between GNU/MSVC standard on line endings ( |
Ineed I also suspect this reason. By the way, I have also tried MSYS2 clang64 and it has the same problem as MinGW.
I have tried Windows Command prompt, WIndows Terminal and MSYS2 terminal, the results are the same. |
I find that a good thing - less workarounds in the code would be required. |
I have lost track of this PR. Should it be merged? Afraid I cannot help with Windows issues. |
This PR is not working and it should not be merged.
Fair enough. |
As I can not fix the issue myself, I will close this PR for now. Thanks a lot for the help. I will still keep the following branch open. |
This is to adopt the CMake improvements in PR avrdudes#1553 even though the PR itself was abondoned. The author of the change is @Youw.
PR #1264 has been merged and it performs much better than using GNU Readline under Windows. It is good to adopt the same approach for MinGW.
This PR will fix Issue #1271.
This PR was initially developed by Xiaofan Chen based on PR #1264 but it does not work.
@Youw (Ihor Dutchak) helps to sort out the remaining issues.