This was the result
❯ ICU_ROOT=/usr/local/opt/icu4c luarocks install lua-nuspell
Installing https://luarocks.org/lua-nuspell-0.3alpha-1.src.rock
lua-nuspell 0.3alpha-1 depends on lua >= 5.1 (5.4-1 provided by VM)
Warning: unmatched variable LUA_LIBDIR_FILE
Warning: unmatched variable LUA_LIBDIR
Warning: unmatched variable CMAKE_BUILD_TYPE
-- The CXX compiler identification is AppleClang 13.0.0.13000029
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found the following ICU libraries:
-- uc (required)
-- data (required)
-- Found ICU: /usr/local/opt/icu4c/include (found version "69.1")
-- Configuring done
-- Generating done
-- Build files have been written to: /var/folders/_7/lk2n6mlj06sd3bs38fntwv2s8yf8_m/T/luarocks_lua-nuspell-0.3alpha-1-yYh6mf/lua-nuspell/build.luarocks
[ 50%] Building CXX object CMakeFiles/nuspell.dir/src/nuspell.cxx.o
[100%] Linking CXX shared module nuspell.so
ld: warning: dylib (/usr/local/lib/libnuspell.5.0.0.dylib) was built for newer macOS version (11.0) than being linked (10.15)
ld: warning: dylib (/usr/local/opt/icu4c/lib/libicuuc.dylib) was built for newer macOS version (11.0) than being linked (10.15)
ld: warning: dylib (/usr/local/opt/icu4c/lib/libicudata.dylib) was built for newer macOS version (11.0) than being linked (10.15)
Undefined symbols for architecture x86_64:
"_luaL_checklstring", referenced from:
l_search_dirs_for_dicts(lua_State*) in nuspell.cxx.o
l_find_dictionary(lua_State*) in nuspell.cxx.o
l_Dictionary_load_from_path(lua_State*) in nuspell.cxx.o
l_Dictionary_spell(lua_State*) in nuspell.cxx.o
l_Dictionary_suggest(lua_State*) in nuspell.cxx.o
"_luaL_checktype", referenced from:
l_search_dirs_for_dicts(lua_State*) in nuspell.cxx.o
l_find_dictionary(lua_State*) in nuspell.cxx.o
"_luaL_checkudata", referenced from:
l_Dictionary_spell(lua_State*) in nuspell.cxx.o
l_Dictionary_suggest(lua_State*) in nuspell.cxx.o
l_Dictionary_destructor(lua_State*) in nuspell.cxx.o
"_luaL_checkversion_", referenced from:
_luaopen_nuspell in nuspell.cxx.o
"_luaL_error", referenced from:
l_Dictionary_load_from_path(lua_State*) in nuspell.cxx.o
"_luaL_newmetatable", referenced from:
_luaopen_nuspell in nuspell.cxx.o
"_luaL_setfuncs", referenced from:
_luaopen_nuspell in nuspell.cxx.o
"_lua_createtable", referenced from:
_luaopen_nuspell in nuspell.cxx.o
l_get_default_dir_paths(lua_State*) in nuspell.cxx.o
l_get_libreoffice_dir_paths(lua_State*) in nuspell.cxx.o
l_Dictionary_suggest(lua_State*) in nuspell.cxx.o
return_array_of_pairs(lua_State*, std::__1::vector<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > >&) in nuspell.cxx.o
"_lua_getfield", referenced from:
l_Dictionary_load_from_path(lua_State*) in nuspell.cxx.o
"_lua_newuserdatauv", referenced from:
l_Dictionary_load_from_path(lua_State*) in nuspell.cxx.o
"_lua_pushboolean", referenced from:
l_Dictionary_spell(lua_State*) in nuspell.cxx.o
"_lua_pushnil", referenced from:
l_find_dictionary(lua_State*) in nuspell.cxx.o
"_lua_pushstring", referenced from:
_luaopen_nuspell in nuspell.cxx.o
l_get_default_dir_paths(lua_State*) in nuspell.cxx.o
l_get_libreoffice_dir_paths(lua_State*) in nuspell.cxx.o
l_find_dictionary(lua_State*) in nuspell.cxx.o
l_Dictionary_suggest(lua_State*) in nuspell.cxx.o
return_array_of_pairs(lua_State*, std::__1::vector<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > >&) in nuspell.cxx.o
"_lua_pushvalue", referenced from:
_luaopen_nuspell in nuspell.cxx.o
"_lua_rawgeti", referenced from:
l_search_dirs_for_dicts(lua_State*) in nuspell.cxx.o
l_find_dictionary(lua_State*) in nuspell.cxx.o
"_lua_rawlen", referenced from:
l_search_dirs_for_dicts(lua_State*) in nuspell.cxx.o
l_find_dictionary(lua_State*) in nuspell.cxx.o
"_lua_rawseti", referenced from:
l_get_default_dir_paths(lua_State*) in nuspell.cxx.o
l_get_libreoffice_dir_paths(lua_State*) in nuspell.cxx.o
l_Dictionary_suggest(lua_State*) in nuspell.cxx.o
return_array_of_pairs(lua_State*, std::__1::vector<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > >&) in nuspell.cxx.o
"_lua_setfield", referenced from:
_luaopen_nuspell in nuspell.cxx.o
"_lua_setmetatable", referenced from:
l_Dictionary_load_from_path(lua_State*) in nuspell.cxx.o
"_lua_settop", referenced from:
l_search_dirs_for_dicts(lua_State*) in nuspell.cxx.o
l_find_dictionary(lua_State*) in nuspell.cxx.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [nuspell.so] Error 1
make[1]: *** [CMakeFiles/nuspell.dir/all] Error 2
make: *** [all] Error 2
Error: Build error: Failed building.