Skip to content

Add copilot-setup-steps.yml and update build system for Goby 3.4.0#13

Draft
Copilot wants to merge 6 commits intomasterfrom
copilot/update-copilot-setup-for-goby-3-4-0
Draft

Add copilot-setup-steps.yml and update build system for Goby 3.4.0#13
Copilot wants to merge 6 commits intomasterfrom
copilot/update-copilot-setup-for-goby-3-4-0

Conversation

Copy link
Copy Markdown

Copilot AI commented Apr 13, 2026

  • Create .github/workflows/copilot-setup-steps.yml
  • Replace cmake_modules/FindProtobufLocal.cmake with cmake_modules/GobyTarget.cmake
  • Update main CMakeLists.txt and all sub-CMakeLists.txt files
  • Fix CI failure: add find_package(Protobuf REQUIRED)
  • Fix CI failure: update C++ standard from 14 to 17
  • Fix CI failure: wrap target_include_directories PUBLIC in $<BUILD_INTERFACE:...>
  • Fix CI failure: proto canonical name mismatch — copy each .proto to PROTOC_OUT_DIR before invoking protoc (mirroring the original FindProtobufLocal.cmake behaviour), and remove CMAKE_CURRENT_SOURCE_DIR/PROTOC_OUT_DIR from protoc import dirs so the canonical name (netsim/acousticstoolbox/environment.proto) is derived from IMPORT_DIRS rather than just the basename

Copy link
Copy Markdown
Member

@tsaubergine tsaubergine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

…t for GobyTarget.cmake

Agent-Logs-Url: https://github.com/GobySoft/netsim/sessions/ba70897d-9fe0-4158-8f73-85475349ef51

Co-authored-by: tsaubergine <732276+tsaubergine@users.noreply.github.com>
Copy link
Copy Markdown
Author

Copilot AI commented Apr 13, 2026

Please fix build failures: https://app.circleci.com/pipelines/github/GobySoft/netsim/119/workflows/7c47d255-96d2-4e8b-9618-7fefa625428c/jobs/1047

Fixed in 09cb626. The root cause was a missing find_package(Protobuf REQUIRED) call — GobyTarget.cmake uses the protobuf::protoc imported target which is only created by CMake's built-in FindProtobuf module. The goby3-examples reference CMakeLists.txt includes this call, which we had omitted.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • packages.gobysoft.org
    • Triggering command: /usr/lib/apt/methods/http /usr/lib/apt/methods/http (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copy link
Copy Markdown
Member

@tsaubergine tsaubergine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

…q headers)

Agent-Logs-Url: https://github.com/GobySoft/netsim/sessions/6895a37c-0532-4dd6-a4fa-7795a2fd1340

Co-authored-by: tsaubergine <732276+tsaubergine@users.noreply.github.com>
Copy link
Copy Markdown
Author

Copilot AI commented Apr 13, 2026

Still fails. Please fix: https://app.circleci.com/pipelines/github/GobySoft/netsim/120/workflows/703a4e5e-dcbe-4a1e-909a-3221c0923df5/jobs/1050

Fixed in 5cf79dd. The build was failing because Goby 3.x headers (zeromq/transport/interprocess.h and detail/tags.h) use if constexpr, which requires C++17. The netsim CMakeLists.txt was hardcoded to C++14. Updated to use C++17 following the same pattern as goby3-examples.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • output.circle-artifacts.com
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copy link
Copy Markdown
Member

@tsaubergine tsaubergine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Build still fails:

-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Setting CMAKE_CXX_STANDARD to 17 as required by Goby 3.x
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so (found version "3.21.12")
Using DCCL in /usr/include
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found suitable version "1.74.0", minimum required is "1.58.0") found components: system date_time program_options filesystem
-- Found the following Goby libraries:
-- goby
-- goby_zeromq
-- goby_zeromq
-- goby_moos
-- Goby headers in /usr/include
Using Goby in /usr/include
-- Found MOOS: /usr/lib/x86_64-linux-gnu/cmake/MOOS/UseMOOS.cmake (Required is at least version "10")
-- Found Threads: TRUE
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found version "1.74.0") found components: serialization
-- Configuring done
CMake Error in src/lib/messages/CMakeLists.txt:
Target "netsim_messages" INTERFACE_INCLUDE_DIRECTORIES property contains
path:

"/root/netsim/build/include/netsim/messages"

which is prefixed in the build directory.

CMake Error in src/lib/messages/CMakeLists.txt:
Target "netsim_messages" INTERFACE_INCLUDE_DIRECTORIES property contains
path:

"/root/netsim/build/include/netsim/messages"

which is prefixed in the build directory.Target "netsim_messages"
INTERFACE_INCLUDE_DIRECTORIES property contains path:

"/root/netsim/build/include/netsim/messages"

which is prefixed in the source directory.

CMake Error in src/lib/acousticstoolbox/CMakeLists.txt:
Target "netsim_acousticstoolbox" INTERFACE_INCLUDE_DIRECTORIES property
contains path:

"/root/netsim/build/include/netsim/acousticstoolbox"

which is prefixed in the build directory.

CMake Error in src/lib/acousticstoolbox/CMakeLists.txt:
Target "netsim_acousticstoolbox" INTERFACE_INCLUDE_DIRECTORIES property
contains path:

"/root/netsim/build/include/netsim/acousticstoolbox"

which is prefixed in the build directory.Target "netsim_acousticstoolbox"
INTERFACE_INCLUDE_DIRECTORIES property contains path:

"/root/netsim/build/include/netsim/acousticstoolbox"

which is prefixed in the source directory.

-- Generating done
CMake Generate step failed. Build files cannot be regenerated correctly.

Exited with code exit status 1

Copy link
Copy Markdown
Author

Copilot AI commented Apr 13, 2026

Build still fails:

-- Detecting C compiler ABI info...

Fixed in 644493c. The add_goby_library function in GobyTarget.cmake was passing the raw build-directory path to target_include_directories(...PUBLIC ...), which CMake rejects in INTERFACE_INCLUDE_DIRECTORIES. Wrapped it with $<BUILD_INTERFACE:...> — the standard fix for build-tree paths that are set on exported targets.

Copy link
Copy Markdown
Member

@tsaubergine tsaubergine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-- The C compiler identification is GNU 12.2.0
-- The CXX compiler identification is GNU 12.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Setting CMAKE_CXX_STANDARD to 17 as required by Goby 3.x
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so (found version "3.21.12")
Using DCCL in /usr/include
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found suitable version "1.74.0", minimum required is "1.58.0") found components: system date_time program_options filesystem
-- Found the following Goby libraries:
-- goby
-- goby_zeromq
-- goby_zeromq
-- goby_moos
-- Goby headers in /usr/include
Using Goby in /usr/include
-- Found MOOS: /usr/lib/x86_64-linux-gnu/cmake/MOOS/UseMOOS.cmake (Required is at least version "10")
-- Found Threads: TRUE
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found version "1.74.0") found components: serialization
-- Configuring done
-- Generating done
-- Build files have been written to: /root/netsim/build
[ 1%] Running dccl protocol buffer compiler on svp_request_response.proto
[ 3%] Building CXX object src/lib/tcp/CMakeFiles/netsim_tcp.dir/tcp_client.cpp.o
[ 4%] Running dccl protocol buffer compiler on environment.proto
[ 6%] Running dccl protocol buffer compiler on iBellhop_messages.proto
[ 8%] Building CXX object src/lib/acousticstoolbox/CMakeFiles/netsim_acousticstoolbox.dir/environment.cpp.o
[ 9%] Building CXX object src/lib/acousticstoolbox/CMakeFiles/netsim_acousticstoolbox.dir////include/netsim/acousticstoolbox/environment.pb.cc.o
[ 11%] Building CXX object src/lib/tcp/CMakeFiles/netsim_tcp.dir/tcp_server.cpp.o
[ 12%] Building CXX object src/lib/acousticstoolbox/CMakeFiles/netsim_acousticstoolbox.dir/
///include/netsim/acousticstoolbox/svp_request_response.pb.cc.o
/root/netsim/build/include/netsim/acousticstoolbox/svp_request_response.pb.cc:303:6: error: '::descriptor_table_netsim_2facousticstoolbox_2fenvironment_2eproto' has not been declared
303 | &::descriptor_table_netsim_2facousticstoolbox_2fenvironment_2eproto,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gmake[2]: *** [src/lib/acousticstoolbox/CMakeFiles/netsim_acousticstoolbox.dir/build.make:128: src/lib/acousticstoolbox/CMakeFiles/netsim_acousticstoolbox.dir///__/include/netsim/acousticstoolbox/svp_request_response.pb.cc.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:643: src/lib/acousticstoolbox/CMakeFiles/netsim_acousticstoolbox.dir/all] Error 2
gmake[1]: *** Waiting for unfinished jobs....
[ 14%] Building CXX object src/lib/tcp/CMakeFiles/netsim_tcp.dir/tcp_session.cpp.o
[ 16%] Linking CXX shared library ../../../lib/libnetsim_tcp.so
[ 16%] Built target netsim_tcp
gmake: *** [Makefile:136: all] Error 2

…re invoking protoc

Agent-Logs-Url: https://github.com/GobySoft/netsim/sessions/745b6c83-1b54-47d2-bfdc-9bf58c3b702d

Co-authored-by: tsaubergine <732276+tsaubergine@users.noreply.github.com>
Copy link
Copy Markdown
Author

Copilot AI commented Apr 13, 2026

-- The C compiler identification is GNU 12.2.0
-- The CXX compiler identification is GNU 12.2.0
-- Detecting C compiler ABI info...

Fixed in b256e49.

Root cause: _goby_generate_protos was running protoc on the source .proto file (e.g. src/lib/acousticstoolbox/environment.proto) with CMAKE_CURRENT_SOURCE_DIR as a protoc import dir. This caused protoc to assign the canonical name environment.proto (just the basename). But svp_request_response.proto imports it as netsim/acousticstoolbox/environment.proto, so the generated svp_request_response.pb.cc references ::descriptor_table_netsim_2facousticstoolbox_2fenvironment_2eproto while the compiled environment.pb.cc only defined ::descriptor_table_environment_2eproto — a mismatch that produces the "has not been declared" error.

Fix mirrors what the original FindProtobufLocal.cmake did: copy each .proto into PROTOC_OUT_DIR first, run protoc on the copy (not the source file), and remove CMAKE_CURRENT_SOURCE_DIR and PROTOC_OUT_DIR from the -I flags. With IMPORT_DIRS (build/include) as the sole base, protoc derives the canonical name netsim/acousticstoolbox/environment.proto, which matches the import statement in svp_request_response.proto.

Copilot AI requested a review from tsaubergine April 13, 2026 12:15
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.

2 participants