Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building on Windows fails if Go is enabled #553

Open
jg110 opened this issue Dec 11, 2024 · 1 comment
Open

Building on Windows fails if Go is enabled #553

jg110 opened this issue Dec 11, 2024 · 1 comment

Comments

@jg110
Copy link

jg110 commented Dec 11, 2024

Similar to #552, this issue has to do with a component that isn't tested in the github actions, with the difference that Go is not automatically enabled by Cmake even if it's installed and has to be enabled with -DLCM_ENABLE_GO=ON. If Go is installed on Windows and is enabled via Cmake, the build fails. This happens both for 1.5.0 and master.

Steps to reproduce:

  1. Install Java JDK on Windows (may not be necessary)
  2. Install Go on Windows (I have version 1.23.4)
  3. Launch MSYS2 in MinGW64 environment: msys2_shell.cmd -mingw64 -full-path
  4. Install packages:
pacman -S \
mingw64/mingw-w64-x86_64-toolchain \
mingw64/mingw-w64-x86_64-cmake \
mingw64/mingw-w64-x86_64-glib2 \
glib2-devel \
mingw64/mingw-w64-x86_64-gtest \
mingw64/mingw-w64-x86_64-doxygen \
mingw64/mingw-w64-x86_64-python-sphinx
  1. Change into the LCM directory and run cmake: cmake -DLCM_ENABLE_GO=ON -DPython_FIND_REGISTRY=NEVER
  2. Build: cmake --build build

Step 5 output is the same as in #552 with the exception that Lua isn't found if you don't install it, but that shouldn't affect this issue.

Step 6 output:

[22/129] Generating lcmtest_bools_t.h, lcmtest_bools_t.c, lcmtest/bools_t.hpp, lcmtest/bools_t.py, go/src/lcmtest/bools_t.go, lcmtest/bools_t.java
FAILED: test/types/lcmtest_bools_t.h test/types/lcmtest_bools_t.c test/types/lcmtest/bools_t.hpp test/types/lcmtest/bools_t.py test/types/go/src/lcmtest/bools_t.go test/types/lcmtest/bools_t.java C:/Users/jg110/Downloads
/lcm-1.5.0/build/test/types/lcmtest_bools_t.h C:/Users/jg110/Downloads/lcm-1.5.0/build/test/types/lcmtest_bools_t.c C:/Users/jg110/Downloads/lcm-1.5.0/build/test/types/lcmtest/bools_t.hpp C:/Users/jg110/Downloa
ds/lcm-1.5.0/build/test/types/lcmtest/bools_t.py C:/Users/jg110/Downloads/lcm-1.5.0/build/test/types/go/src/lcmtest/bools_t.go C:/Users/jg110/Downloads/lcm-1.5.0/build/test/types/lcmtest/bools_t.java
C:\Windows\system32\cmd.exe /C "cd /D C:\Users\jg110\Downloads\lcm-1.5.0\build\test\types && C:\Users\jg110\Downloads\lcm-1.5.0\build\lcmgen\lcm-gen.exe --c --c-cpath C:/Users/jg110/Downloads/lcm-1.5.0/build/te
st/types --c-hpath C:/Users/jg110/Downloads/lcm-1.5.0/build/test/types --c-export-symbol LCMTEST_EXPORT --c-export-include lcmtest_export.h --cpp --cpp-hpath C:/Users/jg110/Downloads/lcm-1.5.0/build/test/types --jav
a --jpath C:/Users/jg110/Downloads/lcm-1.5.0/build/test/types --python --python-no-init --ppath C:/Users/jg110/Downloads/lcm-1.5.0/build/test/types --go --go-path C:/Users/jg110/Downloads/lcm-1.5.0/build/test/t
ypes/go/src C:/Users/jg110/Downloads/lcm-1.5.0/test/types/lcmtest/bools_t.lcm"
[23/129] Generating lcmtest_byte_array_t.h, lcmtest_byte_array_t.c, lcmtest/byte_array_t.hpp, lcmtest/byte_array_t.py, go/src/lcmtest/byte_array_t.go, lcmtest/byte_array_t.java
FAILED: test/types/lcmtest_byte_array_t.h test/types/lcmtest_byte_array_t.c test/types/lcmtest/byte_array_t.hpp test/types/lcmtest/byte_array_t.py test/types/go/src/lcmtest/byte_array_t.go test/types/lcmtest/byte_array_t.java
 C:/Users/jg110/Downloads/lcm-1.5.0/build/test/types/lcmtest_byte_array_t.h C:/Users/jg110/Downloads/lcm-1.5.0/build/test/types/lcmtest_byte_array_t.c C:/Users/jg110/Downloads/lcm-1.5.0/build/test/types/lcmtest
/byte_array_t.hpp C:/Users/jg110/Downloads/lcm-1.5.0/build/test/types/lcmtest/byte_array_t.py C:/Users/jg110/Downloads/lcm-1.5.0/build/test/types/go/src/lcmtest/byte_array_t.go C:/Users/jg110/Downloads/lcm-1.5.
0/build/test/types/lcmtest/byte_array_t.java
C:\Windows\system32\cmd.exe /C "cd /D C:\Users\jg110\Downloads\lcm-1.5.0\build\test\types && C:\Users\jg110\Downloads\lcm-1.5.0\build\lcmgen\lcm-gen.exe --c --c-cpath C:/Users/jg110/Downloads/lcm-1.5.0/build/te
st/types --c-hpath C:/Users/jg110/Downloads/lcm-1.5.0/build/test/types --c-export-symbol LCMTEST_EXPORT --c-export-include lcmtest_export.h --cpp --cpp-hpath C:/Users/jg110/Downloads/lcm-1.5.0/build/test/types --jav
a --jpath C:/Users/jg110/Downloads/lcm-1.5.0/build/test/types --python --python-no-init --ppath C:/Users/jg110/Downloads/lcm-1.5.0/build/test/types --go --go-path C:/Users/jg110/Downloads/lcm-1.5.0/build/test/t
ypes/go/src C:/Users/jg110/Downloads/lcm-1.5.0/test/types/lcmtest/byte_array_t.lcm"
[24/129] Generating lcmtest_comments_t.h, lcmtest_comments_t.c, lcmtest/comments_t.hpp, lcmtest/comments_t.py, go/src/lcmtest/comments_t.go, lcmtest/comments_t.java
FAILED: test/types/lcmtest_comments_t.h test/types/lcmtest_comments_t.c test/types/lcmtest/comments_t.hpp test/types/lcmtest/comments_t.py test/types/go/src/lcmtest/comments_t.go test/types/lcmtest/comments_t.java C:/Users/jg
ardner43/Downloads/lcm-1.5.0/build/test/types/lcmtest_comments_t.h C:/Users/jg110/Downloads/lcm-1.5.0/build/test/types/lcmtest_comments_t.c C:/Users/jg110/Downloads/lcm-1.5.0/build/test/types/lcmtest/comments_t.hpp
C:/Users/jg110/Downloads/lcm-1.5.0/build/test/types/lcmtest/comments_t.py C:/Users/jg110/Downloads/lcm-1.5.0/build/test/types/go/src/lcmtest/comments_t.go C:/Users/jg110/Downloads/lcm-1.5.0/build/test/types/lcm
test/comments_t.java
C:\Windows\system32\cmd.exe /C "cd /D C:\Users\jg110\Downloads\lcm-1.5.0\build\test\types && C:\Users\jg110\Downloads\lcm-1.5.0\build\lcmgen\lcm-gen.exe --c --c-cpath C:/Users/jg110/Downloads/lcm-1.5.0/build/te
st/types --c-hpath C:/Users/jg110/Downloads/lcm-1.5.0/build/test/types --c-export-symbol LCMTEST_EXPORT --c-export-include lcmtest_export.h --cpp --cpp-hpath C:/Users/jg110/Downloads/lcm-1.5.0/build/test/types --jav
a --jpath C:/Users/jg110/Downloads/lcm-1.5.0/build/test/types --python --python-no-init --ppath C:/Users/jg110/Downloads/lcm-1.5.0/build/test/types --go --go-path C:/Users/jg110/Downloads/lcm-1.5.0/build/test/t
ypes/go/src C:/Users/jg110/Downloads/lcm-1.5.0/test/types/lcmtest/comments_t.lcm"
[25/129] Building Java objects for jchart2d.jar
warning: [options] source value 8 is obsolete and will be removed in a future release
warning: [options] target value 8 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
3 warnings
[27/129] Building C object lcm/CMakeFiles/lcm.dir/lcm_tcpq.c.obj
ninja: build stopped: subcommand failed.
@nosracd
Copy link
Contributor

nosracd commented Dec 16, 2024

Currently, the Go extensions of LCM are in need of a maintainer. I took a quick look at it in case it was an easy fix but was unable to get LCM to pick up Go on Windows. If I install go via pacboy I get:

go: cannot find GOROOT directory: 'go' binary is trimmed and GOROOT is not set
Unable to parse the Go version string:
CMake Error at C:/msys64/mingw64/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:233 (message):
  Could NOT find Go (missing: GO_VERSION GO_PLATFORM GO_ARCH)
Call Stack (most recent call first):
  C:/msys64/mingw64/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:603 (_FPHSA_FAILURE_MESSAGE)
  cmake/FindGo.cmake:32 (find_package_handle_standard_args)
  lcm-cmake/functions.cmake:16 (find_package)
  CMakeLists.txt:87 (lcm_option)

when trying to configure a build directory with the -DLCM_ENABLE_GO=ON flag.

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

No branches or pull requests

2 participants