-
-
Notifications
You must be signed in to change notification settings - Fork 738
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
Does not compile on MSYS2 #784
Comments
@sjmulder could you help with this? I know you compiled |
I am not sure what that means.
Where is it? Link please?
I really don't have the time to go back to autoconf and automake, however dirty your fix may look like. :) I don't see any issue with platform-specific patches. When a platform imposes cosmetic conditions to compile stuff on it, most users won't be using it. |
Please raise the PR so you can start using |
Please test the patch (on master) and confirm it works. |
I used a separate test on my branch (where the commit came from) to do more checks on the version, but it works and compiles, if that's good enough, why not? |
@jarun I don't have an msys build environment set up now but could if you still need testing. |
I believe this is fixed now. |
At commit d38f4b1. |
@csdvrx along with msys2, would it be possible for you to add a package for Cygwin as well? It's been a long term request from Cygwin users. |
nnn v3.5 doesn't compile on the latest msys2
make
cc -std=c11 -Wall -Wextra -Wshadow -O3 -D_XOPEN_SOURCE=600 -I/usr/include/ncursesw -o nnn src/nnn.c -lreadline -pipe -lncursesw
src/nnn.c:2418:72: error: ‘strcasestr’ undeclared here (not in a function); did you mean ‘strcasecmp’?
(...)
src/nnn.c:5018:11: error: ‘AT_SYMLINK_NOFOLLOW’ undeclared (first use in this function)
(...)
src/nnn.c:5227:47: error: ‘O_CLOEXEC’ undeclared (first use in this function); did you mean ‘FD_CLOEXEC’?
msys2 is a posix environment but a less lenient one: it requires proper definition to access recent posix additions. everything you need is there, but without requiring access, you won’t get it!
In commit 747c58cfff3fc9265f8bf3b880d2b82de5a2977c I made a fix that I find a bit dirty: a conditional #define _GNU_SOURCE, right above your #ifdef _linux, with just #if defined(MINGW) || defined(MINGW32) || defined(MINGW64) || defined(CYGWIN), without checking more precisely for the proper version.
Right now it compiles:
make
cc -std=c11 -Wall -Wextra -Wshadow -O3 -D_XOPEN_SOURCE=600 -I/usr/include/ncursesw -o nnn src/nnn.c -lreadline -pipe -lncursesw
You are not using GNU autoconf, an interesting choice, as I believe the issue fixed may point to a structural issue with POSIX compliance
The text was updated successfully, but these errors were encountered: