maxcso icon indicating copy to clipboard operation
maxcso copied to clipboard

Build failure on macOS

Open jainze opened this issue 3 years ago • 7 comments
trafficstars

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.

jainze avatar Oct 10 '22 09:10 jainze

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]

unknownbrackets avatar Oct 11 '22 01:10 unknownbrackets

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

jainze avatar Oct 11 '22 11:10 jainze

Is libuv even installed on the system?

orbea avatar Jan 16 '24 14:01 orbea

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"

maxexcloo avatar Feb 19 '24 02:02 maxexcloo

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 avatar Feb 19 '24 02:02 maxexcloo

@maxexcloo You need pkg-config installed.

orbea avatar Feb 19 '24 13:02 orbea

Somehow missed that completely! Will give that a go, thanks 🙏

maxexcloo avatar Feb 19 '24 14:02 maxexcloo