ddsperf and examples don't build when SSL and security are enabled on Windows
Using MSVC 2019 64bit tools. Also having cloned OpenSSL repo version 1.1.1s and built that (also tried 3.0.7 but got other problems with that due to exported function prototypes no longer matching). If I try to build CycloneDDS 0.10.2 with the following I get build errors:
cmake -G "Visual Studio 16 2019" -Bbuild -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=../ -DENABLE_SHM=NO -DENABLE_SSL=YES -DENABLE_SECURITY=YES -DBUILD_EXAMPLES=ON -DBUILD_DDSPERF=YES -DCMAKE_PREFIX_PATH=../
The errors are:
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(241,5): error MSB8066: Custom build for 'C:\Projects\ThirdParty\opensrc\EclipseCycloneDDS\win_msvc2019_x86-64\cyc lonedds\build\CMakeFiles\720cacbc15ecd791efbb6ce01baeed6c\HelloWorldData.c.rule;C:\Projects\ThirdParty\opensrc\EclipseCycloneDDS\win_msvc2019_x86-64\cyclonedds\build\CMakeFiles\c2c4f15ee85e959ed3c6b7d4e4502d5f\HelloWorldData_lib_g enerate.rule;C:\Projects\ThirdParty\opensrc\EclipseCycloneDDS\win_msvc2019_x86-64\cyclonedds\examples\helloworld\CMakeLists.txt' exited with code -1073741515. [C:\Projects\ThirdParty\opensrc\EclipseCycloneDDS\win_msvc2019_x86-64\c yclonedds\build\examples\helloworld\HelloWorldData_lib_generate.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(241,5): error MSB8066: Custom build for 'C:\Projects\ThirdParty\opensrc\EclipseCycloneDDS\win_msvc2019_x86-64\cyc lonedds\build\CMakeFiles\6acb7d48881b16d944a4361a3f46e016\variouspub_types.c.rule;C:\Projects\ThirdParty\opensrc\EclipseCycloneDDS\win_msvc2019_x86-64\cyclonedds\build\CMakeFiles\5ebc1e2e4e0e8993e844c6bfe1ebd39b\variouspub_lib_gen erate.rule;C:\Projects\ThirdParty\opensrc\EclipseCycloneDDS\win_msvc2019_x86-64\cyclonedds\examples\dynsub\CMakeLists.txt' exited with code -1073741515. [C:\Projects\ThirdParty\opensrc\EclipseCycloneDDS\win_msvc2019_x86-64\cyclone dds\build\examples\dynsub\variouspub_lib_generate.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(241,5): error MSB8066: Custom build for 'C:\Projects\ThirdParty\opensrc\EclipseCycloneDDS\win_msvc2019_x86-64\cyc lonedds\build\CMakeFiles\5dd90e2efbed40bc49ba8b270ec413da\ddsperf_types.c.rule;C:\Projects\ThirdParty\opensrc\EclipseCycloneDDS\win_msvc2019_x86-64\cyclonedds\build\CMakeFiles\abd7b57a81ff8a3c089aa037714bde68\ddsperf_types_generat e.rule;C:\Projects\ThirdParty\opensrc\EclipseCycloneDDS\win_msvc2019_x86-64\cyclonedds\src\tools\ddsperf\CMakeLists.txt' exited with code -1073741515. [C:\Projects\ThirdParty\opensrc\EclipseCycloneDDS\win_msvc2019_x86-64\cyclonedd s\build\src\tools\ddsperf\ddsperf_types_generate.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(241,5): error MSB8066: Custom build for 'C:\Projects\ThirdParty\opensrc\EclipseCycloneDDS\win_msvc2019_x86-64\cyc lonedds\build\CMakeFiles\b8757e718f7ed1187ae992a4ae598341\RoundTrip.c.rule;C:\Projects\ThirdParty\opensrc\EclipseCycloneDDS\win_msvc2019_x86-64\cyclonedds\build\CMakeFiles\e86bb74fc78cc605720c4317b29bf443\RoundTrip_lib_generate.ru le;C:\Projects\ThirdParty\opensrc\EclipseCycloneDDS\win_msvc2019_x86-64\cyclonedds\examples\roundtrip\CMakeLists.txt' exited with code -1073741515. [C:\Projects\ThirdParty\opensrc\EclipseCycloneDDS\win_msvc2019_x86-64\cyclonedds\b uild\examples\roundtrip\RoundTrip_lib_generate.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(241,5): error MSB8066: Custom build for 'C:\Projects\ThirdParty\opensrc\EclipseCycloneDDS\win_msvc2019_x86-64\cyc lonedds\build\CMakeFiles\0934c02344a286056558751f6f8bfe8a\Throughput.c.rule;C:\Projects\ThirdParty\opensrc\EclipseCycloneDDS\win_msvc2019_x86-64\cyclonedds\build\CMakeFiles\a1bca9e9937e59595e045e73d651a4e3\Throughput_lib_generate. rule;C:\Projects\ThirdParty\opensrc\EclipseCycloneDDS\win_msvc2019_x86-64\cyclonedds\examples\throughput\CMakeLists.txt' exited with code -1073741515. [C:\Projects\ThirdParty\opensrc\EclipseCycloneDDS\win_msvc2019_x86-64\cyclonedd s\build\examples\throughput\Throughput_lib_generate.vcxproj]
If I want to build those failed items successfully then I have to disable SSL and security like:
cmake -G "Visual Studio 16 2019" -Bbuild -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=../ -DENABLE_SHM=NO -DENABLE_SSL=NO -DENABLE_SECURITY=NO -DBUILD_EXAMPLES=ON -DBUILD_DDSPERF=YES -DCMAKE_PREFIX_PATH=../
If I want to build with out errors and have the security features I have to forgo having those problem items and use:
cmake -G "Visual Studio 16 2019" -Bbuild -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=../ -DENABLE_SHM=NO -DENABLE_SSL=YES -DENABLE_SECURITY=YES -DBUILD_EXAMPLES=OFF -DBUILD_DDSPERF=NO -DCMAKE_PREFIX_PATH=../
If I build on Ubuntu 22.04 I have no issues and everything builds fine.
Is the above expected behaviour on Windows?
hi @dac1976 how are you building the examples? Could it be a config type mismatch as by default the examples on windows are build with the Debug config type which does not match with RelWithDebInfo
can you try to build the examples with cmake --build . --config RelWithDebInfo and see if it works then?
Hi @dac1976 did you manage to make some progress with @ThijsSassen suggestion?