Page MenuHomePhabricator

[Services] Update tunnelbroker CMake to be MacOS compatible
ClosedPublic

Authored by jon on Aug 6 2022, 10:31 AM.
Tags
None
Referenced Files
F3273762: D4766.id15398.diff
Sat, Nov 16, 6:18 AM
F3273747: D4766.id15447.diff
Sat, Nov 16, 6:17 AM
Unknown Object (File)
Sun, Oct 27, 6:36 AM
Unknown Object (File)
Sun, Oct 27, 6:36 AM
Unknown Object (File)
Sun, Oct 27, 6:36 AM
Unknown Object (File)
Sun, Oct 27, 6:36 AM
Unknown Object (File)
Sun, Oct 27, 6:36 AM
Unknown Object (File)
Sun, Oct 27, 6:30 AM

Details

Summary

Allow for tunnelbroker to be built with MacOS+Clang.
Adds C++17 support by setting OSX requirement above minimum
OSX support.

Also fix pkg-config logic so that the correct libraries are
being linked.

Depends on D4765

Test Plan

On a mac device:

  • Install nix (optional, but brings in all the correct dependencies)
nix develop # or install protobuf, grpc, awssdk, cryptopp, libuv, boost, amqp separately
cd services/tunnelbroker && mkdir build && cd build && cmake .. && make -j4 -l4

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

atul requested changes to this revision.Aug 8 2022, 10:48 AM

Hm, running into the following here:

[100%] Linking CXX executable bin/tunnelbroker
ld: warning: directory not found for option '-L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/var/empty/lib'
Undefined symbols for architecture arm64:
  "AMQP::TcpConnection::process(int, int)", referenced from:
      AMQP::LibUvHandler::Watcher::callback(uv_poll_s*, int, int) in AmqpManager.cpp.o
  "AMQP::TcpConnection::TcpConnection(AMQP::TcpHandler*, AMQP::Address const&)", referenced from:
      comm::network::AmqpManager::connectInternal() in AmqpManager.cpp.o
  "AMQP::TcpConnection::~TcpConnection()", referenced from:
      comm::network::AmqpManager::connectInternal() in AmqpManager.cpp.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [bin/tunnelbroker] Error 1
make[1]: *** [CMakeFiles/tunnelbroker.dir/all] Error 2
make: *** [all] Error 2
This revision now requires changes to proceed.Aug 8 2022, 10:48 AM

Hmm, I Must not have updated the diff with the mac changes

Ensure macOS changes have been rebased

This revision is now accepted and ready to land.Aug 8 2022, 12:25 PM

This is awesome! Can build/run locally and finally get full code completion/debugging/go to definition/etc etc

Screen Shot 2022-08-08 at 3.27.43 PM.png (2×3 px, 1 MB)

That's awesome! Thanks, @jon 🥳
Finally, I don't need to rebase my fork to get an instant build and IDE support ))