maxcso
maxcso copied to clipboard
Build failure on macOS
Build fails on macOS Monterey (ARM).
xxx@xxx maxcso-1.13.0 % make c++ -c -W -Wall -Wextra -std=c++11 -Izopfli/src -I7zip -DNDEBUG=1 -Ilibdeflate -Wno-unused-parameter -Wno-unused-variable -pthread -O2 -o src/buffer_pool.o src/buffer_pool.cpp In file included from src/buffer_pool.cpp:2: src/buffer_pool.h:5:10: fatal error: 'uv.h' file not found #include "uv.h" ^~~~~~ 1 error generated. make: *** [src/buffer_pool.o] Error 1
libuv installed with brew as directed.
Does it help to change #include "uv.h" to #include <uv.h>?
maxcso ought to compile fine on M1, but if something is causing it to compile as Intel to run under Rosetta, that could be another explanation.
-[Unknown]
Sorry, no. Same error.
xxx@xxx maxcso-1.13.0 % make c++ -c -W -Wall -Wextra -std=c++11 -Izopfli/src -I7zip -DNDEBUG=1 -Ilibdeflate -Wno-unused-parameter -Wno-unused-variable -pthread -O2 -o src/buffer_pool.o src/buffer_pool.cpp In file included from src/buffer_pool.cpp:2: src/buffer_pool.h:5:10: fatal error: 'uv' file not found #include <uv.h> ^~~~ 1 error generated. make: *** [src/buffer_pool.o] Error 1
Is libuv even installed on the system?
I have libuv installed with the same error.
EDIT: Changing to a hardcoded path seems to fix this one: #include "/opt/homebrew/Cellar/libuv/1.48.0/include/uv.h"
New error with the above fix:
max.schaefer@mini:~/Downloads/maxcso$ make
make: pkg-config: Command not found
make: pkg-config: Command not found
make: pkg-config: Command not found
make: pkg-config: Command not found
make: pkg-config: Command not found
make: pkg-config: Command not found
c++ -c -W -Wall -Wextra -std=c++11 -I/Users/max.schaefer/Downloads/maxcso/zopfli/src -I/Users/max.schaefer/Downloads/maxcso/7zip -DNDEBUG=1 -I/Users/max.schaefer/Downloads/maxcso/libdeflate -Wno-unused-parameter -Wno-unused-variable -pthread -O2 -o obj/src/buffer_pool.o /Users/max.schaefer/Downloads/maxcso/src/buffer_pool.cpp
In file included from /Users/max.schaefer/Downloads/maxcso/src/buffer_pool.cpp:2:
In file included from /Users/max.schaefer/Downloads/maxcso/src/buffer_pool.h:5:
In file included from /opt/homebrew/Cellar/libuv/1.48.0/include/uv.h:71:
/opt/homebrew/Cellar/libuv/1.48.0/include/uv/unix.h:46:10: fatal error: 'uv/threadpool.h' file not found
#include "uv/threadpool.h"
^~~~~~~~~~~~~~~~~
1 error generated.
make: *** [obj/src/buffer_pool.o] Error 1
@maxexcloo You need pkg-config installed.
Somehow missed that completely! Will give that a go, thanks 🙏