Skip to content

fix(docker): add Dockerfile.cpp so C++ nodes can build in docker mode - #686

Open
yadavchiragg wants to merge 1 commit into
ControlCore-Project:devfrom
yadavchiragg:feat/docker-cpp-support
Open

yadavchiragg wants to merge 1 commit into
ControlCore-Project:devfrom
yadavchiragg:feat/docker-cpp-support

Conversation

@yadavchiragg

Copy link
Copy Markdown

Problem

mkconcore.py picks Dockerfile.cpp for .cpp nodes in docker mode, but that template was never in the repo. Every docker build of a workflow with a C++ node exits with rc=1. The bare except: prints "…is not correct path to concore", which points at the wrong cause.

Reproduce on current dev:
python3 mkconcore.py testsou/testSM1.graphml testsou out docker

Changes

  • Add Dockerfile.cpp (ubuntu:22.04 + g++, same layout as Dockerfile.v)
  • Emit RUN g++ ./<source> and CMD ["./a.out"] for C++ nodes, matching the POSIX run script
  • Replace the bare except: with except OSError and report the template that could not be read
  • Add tests/test_docker_cpp.py

Testing

  • New tests fail without this change and pass with it
  • Generated Dockerfile for testSM1 checked; sample C++ sources (e.g. testsou/pmpymat.cpp) compile with plain g++ against the copied headers.

mkconcore selects Dockerfile.cpp for .cpp nodes, but the template did not exist, so every docker build of a C++ workflow exited with a misleading 'not correct path to concore' error. Add the template, emit the g++ compile step and CMD like the Verilog path does, and narrow the bare except so a missing template names the actual file. Adds tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant