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

[cmake] FindCurses.cmake ignores CURSES_NEED_WIDE , can't compile with ncursesw #39053

Closed
rumly111 opened this issue Mar 27, 2020 · 9 comments · Fixed by #55054
Closed

[cmake] FindCurses.cmake ignores CURSES_NEED_WIDE , can't compile with ncursesw #39053

rumly111 opened this issue Mar 27, 2020 · 9 comments · Fixed by #55054
Labels
<Bug> This needs to be fixed Code: Build Issues regarding different builds and build environments (S2 - Confirmed) Bug that's been confirmed to exist

Comments

@rumly111
Copy link
Contributor

Until now I didn't use the provided Makefile but generated it with cmake. Building TILES version worked just fine, but when I tried building CURSES version, I noticed it is linked with libncurses.so , instead of libncursesw.so

There is a placeholder variable in CMakeLists.txt (CURSES_NEED_WIDE), but later on it is ignored in CMakeModules/FindCurses.cmake

@Night-Pryanik Night-Pryanik added the Code: Build Issues regarding different builds and build environments label Mar 29, 2020
@Jookia
Copy link
Contributor

Jookia commented Apr 9, 2020

I accidentally reproduced this in #39361 where it compiled fine but broke at runtime. This is because CMAKE_MODULE_PATH prefers the FindCurses shipped with the source code instead of the system-wide FindCurses which works fine. FindCurses should be updated to search for ncursesw now that the game depends on it.

@rumly111
Copy link
Contributor Author

rumly111 commented Apr 9, 2020

I accidentally reproduced this in #39361 where it compiled fine but broke at runtime. This is because CMAKE_MODULE_PATH prefers the FindCurses shipped with the source code instead of the system-wide FindCurses which works fine. FindCurses should be updated to search for ncursesw now that the game depends on it.

I looked into my /usr/share/cmake-3.5/Modules/FindCurses.cmake , but there is no ncursesw in it. So we can't depend on it.

@Jookia
Copy link
Contributor

Jookia commented Apr 9, 2020 via email

@rumly111
Copy link
Contributor Author

rumly111 commented Apr 9, 2020

Maybe the latest CMake FindCurses should be copied to this tree. I'm unsure how to test it with older CMake versions or verify it works with CMake 3.1 which is what CMakeLists.txt specifies it though.

Maybe try installing Ubuntu 14.04 in a virtual machine or docker? I use Ubuntu 16.04, and it comes with CMake 3.5 . I wonder if simply copying can be a solution.

BTW, it's possible to compile CDDA with cursesw, if you use the provided makefile (not cmake).

@Jookia
Copy link
Contributor

Jookia commented Apr 9, 2020 via email

@stale
Copy link

stale bot commented May 9, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Please do not 'bump' or comment on this issue unless you are actively working on it. Stale issues, and stale issues that are closed are still considered.

@stale stale bot added the stale Closed for lack of activity, but still valid. label May 9, 2020
@stale
Copy link

stale bot commented Jun 8, 2020

This issue has been automatically closed due to lack of activity. This does not mean that we do not value the issue. Feel free to request that it be re-opened if you are going to actively work on it

@stale stale bot closed this as completed Jun 8, 2020
@anothersimulacrum anothersimulacrum added <Bug> This needs to be fixed and removed stale Closed for lack of activity, but still valid. labels Jun 8, 2020
@anothersimulacrum
Copy link
Member

This means that people can't use curses when building in certain ways, this should be fixed.

@ZhilkinSerg ZhilkinSerg added the (S2 - Confirmed) Bug that's been confirmed to exist label Jul 21, 2020
@kevingranade
Copy link
Member

This issue has been mentioned on Cataclysm: Dark Days Ahead. There might be relevant details there:

https://discourse.cataclysmdda.org/t/strange-text-troubles/24209/5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bug> This needs to be fixed Code: Build Issues regarding different builds and build environments (S2 - Confirmed) Bug that's been confirmed to exist
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants