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

OS and distribution dependent makefile #41

Open
matu3ba opened this issue Feb 11, 2020 · 3 comments
Open

OS and distribution dependent makefile #41

matu3ba opened this issue Feb 11, 2020 · 3 comments

Comments

@matu3ba
Copy link

matu3ba commented Feb 11, 2020

Manjaro and Arch do use #define NCURSESW_INCLUDE_H <curses.h>,
but __Linux__ only provides here <ncursesw/curses.h>.

The general way to detect the Linux in the shell is this.
However for Windows to work we need this.

Any idea to make this easier ?

@chanana
Copy link

chanana commented Apr 13, 2020

I'm running Manjaro linux where in trying to do make gave me a similar error

cc -std=c99 -Wall -Wextra -pedantic -Os -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED -o mtm  vtparser.c mtm.c  -lncursesw -lutil
In file included from mtm.c:35:
config.h:67:36: fatal error: ncursesw/curses.h: No such file or directory
   67 |         #define NCURSESW_INCLUDE_H <ncursesw/curses.h>
      |                                    ^
compilation terminated.
make: *** [Makefile:14: mtm] Error 1

so I went ahead and did the following:

sudo ln -s /usr/include/ncurses.h /usr/include/ncursesw/ncurses.h

which fixed the error. This was based on a closed bug report I found. I thought I should file this here since it worked for me and may potentially help others. 😃
#41 #27 are similar issues

@matu3ba
Copy link
Author

matu3ba commented Apr 13, 2020

Very sad to need working around distribution flaws. If you have any idea how to get around this madness of make and distribution setups without a gazillion of configurations for each distribution, post your ideas.

@matu3ba
Copy link
Author

matu3ba commented Apr 15, 2020

We could use the shell for flag inclusion-DNCURSESW_INCLUDE_H="<curses.h>", which does not work properly in Makefiles or give manual Makefile adaption for user.

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

2 participants