rticommunity / rticommunity/rticonnextdds-examples

Win32 builds under a Win64 host

Open
#336 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
148
Forks
153
PR merge metrics
No merged PRs in 30d

Description

Information
  • RTI Product: RTI Connext DDS
  • Version: 6.0.0
  • Operating system: Win 10 64
  • Compiler:
  • Compiler version:
  • Additional information:
What is the current behavior?

If I want to compile under Win64 for a Win32 target, and I only have the i86Win32 package installed, using the provided FindRTIConnectDDS.cmake, I get the error:

CMake Warning at C:/RTI/rti_connext_dds-6.0.0/resource/cmake/FindRTIConnextDDS.cmake:481 (message):
header_files is not installed for i86Win32 under
C:/RTI/rti_connext_dds-6.0.0
Call Stack (most recent call first):
C:/RTI/rti_connext_dds-6.0.0/resource/cmake/FindRTIConnextDDS.cmake:953 (connextdds_check_component_field_version)
CMakeLists.txt:50 (find_package)

Steps to reproduce the issue

Create a dummy CMakeLists.txt and add to it:

set(RTI_VERSION "6.0.0")

set(RTI_HOME "C:/RTI")
set(RTI_LIB "i86Win32VS2017")
    
#we are running on Win64, but buildig for Win32
set(CONNEXTDDS_ARCH "i86Win32")

set(ENV{NDDS_HOME} ${RTI_HOME}/rti_connext_dds-${RTI_VERSION})
set(NDDS_RESOURCE_CMAKE ${RTI_HOME}/rti_connext_dds-${RTI_VERSION}/resource/cmake/)
set(CONNEXTDDS_DIR $ENV{NDDS_HOME})

set(CMAKE_MODULE_PATH
    ${CMAKE_MODULE_PATH}
    ${NDDS_RESOURCE_CMAKE}
)
find_package(RTIConnextDDS
            EXACT ${RTI_VERSION}
            REQUIRED
            COMPONENTS
            core)
What is the expected behavior?

No errors running cmake.

Suggested solutions

The cmake file FindRTIConnextDDS.cmake has a section that is setting some platform specific definitions. Search for the comment: Platform-specific Definitions to find it. Under that section, the list connextdds_host_arch is being set with values guess from the CMAKE_HOST... , ignoring the supplied CONNEXTDDS_ARCH value.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with resource/cmake/FindRTIConnextDDS.cmake, especially the “Platform-specific Definitions” section and the handling of CONNEXTDDS_ARCH versus CMAKE_HOST values. Reproduce the issue with the supplied CMakeLists.txt on a Win64 host targeting i86Win32. Done means CMake finds the core component without the header_files warning.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.