silviucpp/erlcass

Can't build driver, fatal error: 'uv.h' file not found

Vkutovoy92 opened this issue · 11 comments

Hi, I have:

  1. Apple M3 Pro
  2. 14.4.1 (23E224)

I can't build the driver because of error:

 CPP    nif_utils.cc
In file included from /Users/dn010992kvo1/Documents/antifraud-systems/_build/default/lib/erlcass/c_src/nif_cass_session.cc:8:
In file included from /Users/dn010992kvo1/Documents/antifraud-systems/_build/default/lib/erlcass/_build/deps/cpp-driver/src/logger.hpp:21:
/Users/dn010992kvo1/Documents/antifraud-systems/_build/default/lib/erlcass/_build/deps/cpp-driver/src/get_time.hpp:20:10: fatal error: 'uv.h' file not found
#include <uv.h>
         ^~~~~~

I figured out that uv.h is linked with libuv and I see this file into

MacBook-Pro-Kutovyi:libuv dn010992kvo1$ cd 1.48.0/include/
MacBook-Pro-Kutovyi:include dn010992kvo1$ pwd
/opt/homebrew/Cellar/libuv/1.48.0/include
MacBook-Pro-Kutovyi:include dn010992kvo1$ ls
uv	uv.h

I can't understand that is the problem, maybe do you have any ideas?

What you get for brew --prefix libuv ?

For some reason the library is not in the include path int your system.

Most probably related to : datastax/cpp-driver#562

brew --prefix libuv

MacBook-Pro-Kutovyi:antifraud-systems dn010992kvo1$ brew --prefix libuv
/opt/homebrew/opt/libuv

And I added to .bash_profile these lines:
MacBook-Pro-Kutovyi:~ dn010992kvo1$ cat .bash_profile
export LIBUV_ROOT_DIR="/opt/homebrew/opt/libuv"
export LIBUV_INCLUDE_DIR="/opt/homebrew/opt/libuv/include"

Unfortunately doesn't work but I feel it's very close)

Most probably related to : datastax/cpp-driver#562

Could you make a release with the last cpp-driver tag?

Can you please test last release I just made (4.1.2) ? I didn't published in hex yet as the travis build didnt finished on osx.

Silviu

Can you please test last release I just made (4.1.2) ? I didn't published in hex yet as the travis build didnt finished on osx.

Silviu

-- libuv version: v1.48.0
-- Found Libuv: /opt/homebrew/lib/libuv.dylib (found suitable version "1.48.0", minimum required is "1.0.0")

But


In file included from /Users/dn010992kvo1/Documents/antifraud-systems/_build/default/lib/erlcass/c_src/nif_cass_session.cc:8:
In file included from /Users/dn010992kvo1/Documents/antifraud-systems/_build/default/lib/erlcass/_build/deps/cpp-driver/src/logger.hpp:21:
/Users/dn010992kvo1/Documents/antifraud-systems/_build/default/lib/erlcass/_build/deps/cpp-driver/src/get_time.hpp:20:10: fatal error: 'uv.h' file not found
#include <uv.h>
         ^~~~~~
In file included from /Users/dn010992kvo1/Documents/antifraud-systems/_build/default/lib/erlcass/c_src/nif_cass_statement.cc:3:
In file included from /Users/dn010992kvo1/Documents/antifraud-systems/_build/default/lib/erlcass/_build/deps/cpp-driver/src/execute_request.hpp:21:
In file included from /Users/dn010992kvo1/Documents/antifraud-systems/_build/default/lib/erlcass/_build/deps/cpp-driver/src/prepared.hpp:20:
In file included from /Users/dn010992kvo1/Documents/antifraud-systems/_build/default/lib/erlcass/_build/deps/cpp-driver/src/buffer.hpp:20:
/Users/dn010992kvo1/Documents/antifraud-systems/_build/default/lib/erlcass/_build/deps/cpp-driver/src/ref_counted.hpp:27:10: fatal error: 'uv.h' file not found
#include <uv.h>

It seems like a problem with link or something like that (maybe it searches include in some specific place), I have another mac os 12.5 and x86 i7 and no any problems...

Can you replace the c_src/Makefile content with the one attached and rebuild ?
file.txt

Can you replace the c_src/Makefile content with the one attached and rebuild ? file.txt

It works!!!!!

Ok I will publish the fix

Can you replace the c_src/Makefile content with the one attached and rebuild ? file.txt

You are grand master!)

Fixed in last released.