Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failure on macOS #76

Open
jainze opened this issue Oct 10, 2022 · 7 comments
Open

Build failure on macOS #76

jainze opened this issue Oct 10, 2022 · 7 comments

Comments

@jainze
Copy link

jainze commented Oct 10, 2022

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
Copy link
Owner

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
Copy link
Author

jainze commented Oct 11, 2022

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

@orbea
Copy link
Contributor

orbea commented Jan 16, 2024

Is libuv even installed on the system?

@maxexcloo
Copy link

maxexcloo commented Feb 19, 2024

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
Copy link

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
Copy link
Contributor

orbea commented Feb 19, 2024

@maxexcloo You need pkg-config installed.

@maxexcloo
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants