Hello, I was exploring the Qpid project yesterday and noticed that while it doesn’t officially support macOS, there have been some online discussions in the past related to building Proton C++ and, the Dispatch Router for macOS. I think some of the issues had been test compilation failures.
I haven’t noticed any such similar discussions related to building the C++
Broker on macOS. I thought I’d run a quick build myself, to see how far I got.
Unsurprisingly, the build failed (I’m on Monterey 12.6.2). It was a pthread API
issue. I’ll past the output below if anyone has any idea how to get past this,
but my question is more generally, does anyone have any past experience trying
to get the C++ Broker to compile on macOS, or does anyone know what the past
sticking points were that prevented the C++ Broker (feel free to include any of
the other C++ products in your answer if you wish) from being built on macOS?
> [ 20%] Building CXX object
> src/CMakeFiles/qpidcommon.dir/qpid/sys/posix/Condition.cpp.o
> /Users/ray/Developer/User/qpid-cpp-1.39.0/src/qpid/sys/posix/Condition.cpp:34:36:
> error: use of undeclared identifier 'pthread_condattr_setclock'; did you
> mean 'pthread_condattr_setpshared'?
> QPID_POSIX_ASSERT_THROW_IF(pthread_condattr_setclock(&attr,
> CLOCK_MONOTONIC));
> ^~~~~~~~~~~~~~~~~~~~~~~~~
> pthread_condattr_setpshared
> /Users/ray/Developer/User/qpid-cpp-1.39.0/src/qpid/sys/posix/check.h:45:63:
> note: expanded from macro 'QPID_POSIX_ASSERT_THROW_IF'
> #define QPID_POSIX_ASSERT_THROW_IF(ERRNO) QPID_POSIX_THROW_IF(ERRNO)
> ^
> /Users/ray/Developer/User/qpid-cpp-1.39.0/src/qpid/sys/posix/check.h:41:17:
> note: expanded from macro 'QPID_POSIX_THROW_IF'
> do { int e=(ERRNO); if (e) throw QPID_POSIX_ERROR(e); } while(0)
> ^
> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/pthread.h:325:5:
> note: 'pthread_condattr_setpshared' declared here
> int pthread_condattr_setpshared(pthread_condattr_t *, int);
> ^
> 1 error generated.
> make[2]: *** [src/CMakeFiles/qpidcommon.dir/qpid/sys/posix/Condition.cpp.o]
> Error 1
> make[1]: *** [src/CMakeFiles/qpidcommon.dir/all] Error 2
> make: *** [all] Error 2
Kind regards,
Emmett Brown
[email protected] <mailto:[email protected]>
PGP: 2EB563D958F5CB8153AAED477867D39BF7356F59
<https://api.protonmail.ch/pks/lookup?op=get&[email protected]>
signature.asc
Description: OpenPGP digital signature
