eProsima / Fast-DDS-statistics-backend

eProsima Fast DDS Statistics Backend is a C++ library that provides collection and procession the statistics measurements reported by Fast DDS Statistics Module. Looking for commercial support? Contact info@eprosima.com
https://eprosima.com
Apache License 2.0
17 stars 9 forks source link

Failing to build on OSX Catalina #184

Open Dormancy-Cat opened 1 year ago

Dormancy-Cat commented 1 year ago

Hello, i have had trouble compiling with mac.

This is the error message I get:

[  6%] Building CXX object src/cpp/CMakeFiles/fastdds_statistics_backend.dir/database/data.cpp.o
In file included from /Users/syrius/work/syrius/fast_dds/ddsmonitor/src/Fast-DDS-Monitor/src/fastdds_statistics_backend/src/cpp/database/data.cpp:16:
In file included from /Users/syrius/work/syrius/fast_dds/ddsmonitor/src/Fast-DDS-Monitor/src/fastdds_statistics_backend/src/cpp/database/data.hpp:29:
In file included from /Users/syrius/work/syrius/fast_dds/ddsmonitor/src/Fast-DDS-Monitor/src/fastdds_statistics_backend/src/cpp/database/samples.hpp:26:
/Users/syrius/work/syrius/fast_dds/ddsmonitor/src/Fast-DDS-Monitor/src/fastdds_statistics_backend/include/fastdds_statistics_backend/types/types.hpp:124:5: error: expected identifier
    DOMAIN,
    ^
/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/math.h:734:17: note: expanded from macro 'DOMAIN'
#define DOMAIN          1
                        ^
1 error generated.
make[2]: *** [src/cpp/CMakeFiles/fastdds_statistics_backend.dir/database/data.cpp.o] Error 1
make[1]: *** [src/cpp/CMakeFiles/fastdds_statistics_backend.dir/all] Error 2
make: *** [all] Error 2

my version information:

xcode-select -v
xcode-select version 2384.
gcc -v 
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 12.0.5 (clang-1205.0.22.11)
Target: x86_64-apple-darwin20.3.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

Any help would be greatly appreciated. Thanks!

Mario-DL commented 1 year ago

Hi @Dormancy-Cat,

Thanks for the report and sorry for the delay in the response. Apparently, there is a conflict between an internal in clang and an enum token inside the project, both defining DOMAIN .

I opened a PR #195 . Please, check if the issue persists with that