You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This might just be user error, considering that there are binaries available for macOS, and brew install notcurses installs a working notcurses-demo binary. But I hope we can use this issue to document the build process better.
which I assumed would also provide any necessary transitive dependencies for a successful build.
mkdir build/
cd build
cmake ../
Fails with:
-- Requested multimedia engine: ffmpeg
-- Requested build mode: RelWithDebInfo
-- Checking for one of the modules 'tinfo>=6.1;ncursesw>=6.1'
CMake Error at /opt/homebrew/Cellar/cmake/3.31.0/share/cmake/Modules/FindPkgConfig.cmake:938 (message):
None of the required 'tinfo>=6.1;ncursesw>=6.1' found
Call Stack (most recent call first):
CMakeLists.txt:104 (pkg_search_module)
-- Looking for unigbrk.h
-- Looking for unigbrk.h - not found
CMake Error at CMakeLists.txt:170 (message):
Couldn't find unigbrk.h from GNU libunistring
-- Configuring incomplete, errors occurred!
There are two issues here:
None of the required 'tinfo>=6.1;ncursesw>=6.1' found
Although I have ncurses installed, this check always fails, and I have to comment it out.
The second problem is that it cannot locate header files for libunistring and libdeflate. I fixed this by adding:
Is there a way to pass this through the environment instead? I tried a number of ways such as setting CFLAGS, CXXFLAGS but nothing worked.
Problem 2: Linking fails
With the workarounds above, ultimately the library compiles but then fails to link:
[ 11%] Building C object CMakeFiles/notcurses-core.dir/src/compat/compat.c.o
[ 11%] Linking C shared library libnotcurses-core.dylib
Undefined symbols for architecture arm64:
"_cur_term", referenced from:
_ncdirect_stop_minimal in direct.c.o
_notcurses_core_init in notcurses.c.o
_notcurses_stop in notcurses.c.o
_interrogate_terminfo in termdesc.c.o
"_curses_version", referenced from:
_init_banner in banner.c.o
"_del_curterm", referenced from:
_ncdirect_stop_minimal in direct.c.o
_notcurses_core_init in notcurses.c.o
_notcurses_stop in notcurses.c.o
_interrogate_terminfo in termdesc.c.o
"_setupterm", referenced from:
_interrogate_terminfo in termdesc.c.o
"_termname", referenced from:
_interrogate_terminfo in termdesc.c.o
"_tigetflag", referenced from:
_interrogate_terminfo in termdesc.c.o
_interrogate_terminfo in termdesc.c.o
_interrogate_terminfo in termdesc.c.o
"_tigetnum", referenced from:
_interrogate_terminfo in termdesc.c.o
_interrogate_terminfo in termdesc.c.o
_interrogate_terminfo in termdesc.c.o
_build_supported_styles in termdesc.c.o
"_tigetstr", referenced from:
_prep_special_keys in in.c.o
_prep_special_keys in in.c.o
_init_terminfo_esc in termdesc.c.o
_terminfostr in termdesc.c.o
"_tiparm", referenced from:
_init_banner in banner.c.o
_init_banner in banner.c.o
_init_banner in banner.c.o
_init_banner in banner.c.o
_ncdirect_cursor_up in direct.c.o
_ncdirect_cursor_left in direct.c.o
_ncdirect_cursor_right in direct.c.o
...
ld: symbol(s) not found for architecture arm64
cc: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [libnotcurses-core.3.0.9.dylib] Error 1
make[1]: *** [CMakeFiles/notcurses-core.dir/all] Error 2
make: *** [all] Error 2
The text was updated successfully, but these errors were encountered:
The linker error also disappears when setting PKG_CONFIG_PATH to included ncurses -- that leaves the problem with the missing libunistring header file. I think this is just because cmake is not aware of /opt/homebrew/include?
Please include the following data:
export | egrep 'LANG|LC_CTYPE|TERM'
notcurses-demo i
)3.0.11
Warp v0.2024.10.29.08.02.stable_02
Problems
notcurses does not build on macOS Sonoma 14.7 (using homebrew dependencies) and there are no build instructions provided in https://github.com/dankamongmen/notcurses/blob/9d8cc0d86c1daf18f30110bfdf8388aeb96ff637/INSTALL.md.
This might just be user error, considering that there are binaries available for macOS, and
brew install notcurses
installs a workingnotcurses-demo
binary. But I hope we can use this issue to document the build process better.See thread here: #2801
Problem 1: required header files are not found
I installed build dependencies as follows:
I also installed the main library package:
which I assumed would also provide any necessary transitive dependencies for a successful build.
Fails with:
There are two issues here:
Although I have
ncurses
installed, this check always fails, and I have to comment it out.The second problem is that it cannot locate header files for
libunistring
andlibdeflate
. I fixed this by adding:Is there a way to pass this through the environment instead? I tried a number of ways such as setting
CFLAGS
,CXXFLAGS
but nothing worked.Problem 2: Linking fails
With the workarounds above, ultimately the library compiles but then fails to link:
The text was updated successfully, but these errors were encountered: