unknownbrackets / maxcso

Fast cso compressor
ISC License
390 stars 23 forks source link

Build failure on macOS #76

Open jainze opened 1 year ago

jainze commented 1 year ago

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.

unknownbrackets commented 1 year ago

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]

jainze commented 1 year ago

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

     ^~~~

1 error generated. make: *** [src/buffer_pool.o] Error 1

orbea commented 7 months ago

Is libuv even installed on the system?

maxexcloo commented 6 months ago

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 commented 6 months ago

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
orbea commented 6 months ago

@maxexcloo You need pkg-config installed.

maxexcloo commented 6 months ago

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