jonhoo / rust-ibverbs

Bindings for RDMA ibverbs through rdma-core
Apache License 2.0
134 stars 30 forks source link

Build outside of source dir (using cmake crate) #36

Closed jonhoo closed 1 month ago

jonhoo commented 1 month ago

Locally I also need https://github.com/linux-rdma/rdma-core/pull/1485 for this to work.

jonhoo commented 1 month ago

sigh as far as I can tell this is failing because the path we're building in is now too long to fit inside of sun_path (the path part of UNIX domains sockets ..

jonhoo commented 1 month ago

Ref https://unix.stackexchange.com/questions/367008/why-is-socket-path-length-limited-to-a-hundred-chars

jonhoo commented 1 month ago

Fixed by making the target directory be at /tmp/cargo instead.

The move to Clang is probably actually unnecessary now, but :shrug:

jonhoo commented 1 month ago

Also worth noting that this change means we also run cmake --build (not just cmake), which I think is technically unnecessary to get the input we need for bindgen. Hoping that won't cause major headache for folks. There unfortunately doesn't appear to be a way to make the cmake crate not call --build.

jonhoo commented 1 month ago

Filed a ticket asking for this functionality in the cmake crate: https://github.com/rust-lang/cmake-rs/issues/207

jonhoo commented 1 month ago

Also, FYI, after I change the invocation to not also call the install target I no longer need https://github.com/linux-rdma/rdma-core/pull/1485 (since we never hit that step).

jonhoo commented 1 month ago

Released in ibverbs-sys 0.2.1 :tada: