Page MenuHomePhabricator

[Services] Fix Clang errors with tunnelbroker
ClosedPublic

Authored by jon on Aug 6 2022, 10:24 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Dec 15, 10:22 PM
Unknown Object (File)
Sun, Dec 15, 10:22 PM
Unknown Object (File)
Sun, Dec 15, 10:22 PM
Unknown Object (File)
Sun, Dec 15, 10:22 PM
Unknown Object (File)
Sun, Dec 15, 10:22 PM
Unknown Object (File)
Sun, Dec 15, 10:22 PM
Unknown Object (File)
Sun, Dec 15, 8:00 AM
Unknown Object (File)
Sun, Dec 15, 8:00 AM

Details

Summary

Clang doesn't provide an alias for usize_t which
corresponds directly to amqp's overloaded types. So
explicity cast to a type which amqp has an overload for.

Test Plan

Follow test plan from D4766 on a mac device

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:46 AM

Running into the following:

[  0%] Built target cargo-build_rust-notifications
Consolidate compiler generated dependencies of target comm-tunnelbroker-grpc
[ 14%] Built target comm-tunnelbroker-grpc
Consolidate compiler generated dependencies of target comm-services-common
[ 19%] Building CXX object common/CMakeFiles/comm-services-common.dir/DatabaseManagerBase.cpp.o
[ 23%] Building CXX object common/CMakeFiles/comm-services-common.dir/DynamoDBTools.cpp.o
[ 28%] Linking CXX static library libcomm-services-common.a
[ 33%] Built target comm-services-common
[ 38%] Building CXX object CMakeFiles/tunnelbroker.dir/src/Amqp/AmqpManager.cpp.o
In file included from /Users/atul/comm/services/tunnelbroker/src/Amqp/AmqpManager.cpp:1:
In file included from /Users/atul/comm/services/tunnelbroker/src/Amqp/AmqpManager.h:6:
/nix/store/3vkd0v2jnpihwakl088fjj4zwv9ylcxn-amqp-cpp-4.3.16/include/amqpcpp/libuv.h:22:10: fatal error: 'uv.h' file not found
#include <uv.h>
         ^~~~~~
1 error generated.
make[2]: *** [CMakeFiles/tunnelbroker.dir/src/Amqp/AmqpManager.cpp.o] Error 1
make[1]: *** [CMakeFiles/tunnelbroker.dir/all] Error 2
make: *** [all] Error 2
make: INTERNAL: Exiting with 5 jobserver tokens available; should be 4!
This revision now requires changes to proceed.Aug 8 2022, 10:46 AM

Ensure macOS changes have been rebased

atul requested changes to this revision.Aug 8 2022, 1:16 PM

Still running into the following:

In file included from /Users/atul/comm/services/tunnelbroker/src/Amqp/AmqpManager.h:6:
/nix/store/2vc0ap87d1lr4ibm7m41nnx5skmn7qjd-amqp-cpp-4.3.16/include/amqpcpp/libuv.h:22:10: fatal error: 'uv.h' file not found
#include <uv.h>
         ^~~~~~
1 error generated.
make[2]: *** [CMakeFiles/tunnelbroker.dir/src/Amqp/AmqpManager.cpp.o] Error 1
make[1]: *** [CMakeFiles/tunnelbroker.dir/all] Error 2
make: *** [all] Error 2

However, confirmed that everything works in D4766.

Do you think this diff is okay to land based on everything being fixed up in D4766?

This revision now requires changes to proceed.Aug 8 2022, 1:16 PM
This revision is now accepted and ready to land.Aug 8 2022, 1:29 PM

Yea, this also needs the pkg-config changes in D4766 to correctly the related libuv headers.

Not sure why linux was working fine. I'm assuming it was because of some transitive dependency adding them through a public interface. And for some reason on mac this isn't the case.