test_node build failed with limit sections with non-release builds on windows

Open
#3,311 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
Half a day
Newbie friendliness
52/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
cmake, cpp
Domain
testing

Research direction

The MSVC C1128 error is raised while compiling rclcpp/test/rclcpp/test_node.cpp under RelWithDebInfo. Locate the CMake target that builds that test and add the /bigobj flag for MSVC (non-Release). Reproduce with the Windows CI job and packages-up-to/select rosbag2_performance_benchmarking. Done when the object file builds without exceeding the section limit.

Written by the indexing model from the issue text.

Description

bug
Generated by Generative AI

No

Operating System:

```Windows 11 - ROS 2 CI``

ROS version or commit hash:

rolling

RMW implementation (if applicable):

n/a

RMW Configuration (if applicable):

n/a

Client library (if applicable):

rclcpp

'ros2 doctor --report' output

N/A

Steps to reproduce issue
  1. Go to ci.ros2.org
  2. In the CI_CMAKE_BUILD_TYPE field type RelWithDebInfo
  3. In build_args add --packages-up-to rosbag2_performance_benchmarking
  4. in test_args add --packages-select rosbag2_performance_benchmarking
Expected behavior

It building like a charm

Actual behavior

Build failure like:

W:\src\ros2\rclcpp\rclcpp\test\rclcpp\test_node.cpp : fatal error C1128: number of sections exceeded object file format limit: compile with /bigobj
ninja: build stopped: subcommand failed.
Additional information

This issue was encountered in this PR for ROSbag2 https://github.com/ros2/rosbag2/pull/2494

You can find a reference build here with the failure: Build Status

Dominant language
C++
Stars
829
Forks
587
Avg merge
4d 6h
Merged PRs (30d)
30

Getting set up

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.

More from ros2/rclcpp

All issues in ros2/rclcpp

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.