Error in Macos build using homebrew's notcurses library
josei opened this issue · comments
When following the directions for building on macos, it looks like the build process expects to use notcurses/wrappers.h
, which seems specific to neurocyte/notcurses-zig.
My output:
$ brew info notcurses
==> notcurses: stable 3.0.9 (bottled)
Blingful character graphics/TUI library
https://nick-black.com/dankwiki/index.php/Notcurses
Installed
/opt/homebrew/Cellar/notcurses/3.0.9_3 (196 files, 9.4MB) *
Poured from bottle using the formulae.brew.sh API on 2024-04-18 at 10:25:08
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/n/notcurses.rb
License: Apache-2.0
==> Dependencies
Build: cmake ✘, doctest ✘, pandoc ✘, pkg-config ✔
Required: ffmpeg ✔, libdeflate ✔, libunistring ✔, ncurses ✔
==> Analytics
install: 308 (30 days), 738 (90 days), 2,255 (365 days)
install-on-request: 308 (30 days), 738 (90 days), 2,250 (365 days)
build-error: 14 (30 days)
$ rm -r zig-cache ~/.cache/zig
$ ./zig build -Duse_system_notcurses=true --search-prefix /usr/local
install
└─ install flow
└─ zig build-exe flow Debug native
└─ zig build-lib wrappers ReleaseFast native 1 errors
/Users/jose/.cache/zig/p/12200a3fa3e5d76f1ff96d1ca5fab64b61ff0e3f28f953ac8464f43986ca7cf4f7eb/include/notcurses/wrappers.h:1:10: error: 'notcurses/notcurses.h' file not found
#include <notcurses/notcurses.h>
^~~~~~~~~~~~~~~~~~~~~~~~
/Users/jose/.cache/zig/p/12200a3fa3e5d76f1ff96d1ca5fab64b61ff0e3f28f953ac8464f43986ca7cf4f7eb/src/wrappers.c:1:10: note: in file included from /Users/jose/.cache/zig/p/12200a3fa3e5d76f1ff96d1ca5fab64b61ff0e3f28f953ac8464f43986ca7cf4f7eb/src/wrappers.c:1:
#include <notcurses/wrappers.h>
^
error: the following command failed with 1 compilation errors:
/Users/jose/Code/flow/.cache/zig/zig-macos-aarch64-0.12.0/zig build-lib -cflags -DPUBLIC -D_XOPEN_SOURCE=700 -DPRIVATE -D_GNU_SOURCE -D_DEFAULT_SOURCE -Wall -Wno-deprecated-pragma -Wno-deprecated-declarations -Wno-bitwise-instead-of-logical -Wno-unused-but-set-variable -Werror -fno-sanitize=undefined -D_DARWIN_C_SOURCE -- /Users/jose/.cache/zig/p/12200a3fa3e5d76f1ff96d1ca5fab64b61ff0e3f28f953ac8464f43986ca7cf4f7eb/src/wrappers.c -OReleaseFast -I /Users/jose/.cache/zig/p/12200a3fa3e5d76f1ff96d1ca5fab64b61ff0e3f28f953ac8464f43986ca7cf4f7eb/include -Mroot -lc --cache-dir /Users/jose/Code/flow/zig-cache --global-cache-dir /Users/jose/.cache/zig --name wrappers -static -L /usr/local/lib --listen=-
Build Summary: 8/12 steps succeeded; 1 failed (disable with --summary none)
install transitive failure
└─ install flow transitive failure
└─ zig build-exe flow Debug native transitive failure
└─ zig build-lib wrappers ReleaseFast native 1 errors
error: the following build command failed with exit code 1:
/Users/jose/Code/flow/zig-cache/o/620f3fd59abe3865b3b0b2a807fd28bb/build /Users/jose/Code/flow/.cache/zig/zig-macos-aarch64-0.12.0/zig /Users/jose/Code/flow /Users/jose/Code/flow/zig-cache /Users/jose/.cache/zig --seed 0x7d3caffc -Z016119b1079513ac -Duse_system_notcurses=true --search-prefix /usr/local
Additionally, I tried running ./zig build -Duse_system_notcurses=true --search-prefix /opt/homebrew/Cellar
with same output.
This error implies that the build of the the notcurses zig bindings (notcurses-zig) is not able to find the brew install of notcurses. notcurses/wrappers.h is not the file that cannot be found. It's notcurses/notcurses.h that is missing.
You need to set --search-prefix
to a directory that contains include/notcurses/notcurses.h
This is usually your brew prefix ($HOMEBREW_PREFIX
). If that variable is not set, check the output of brew config
.