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

Add plotjuggler to windows #407

Merged
merged 5 commits into from
Feb 16, 2024
Merged

Conversation

gftabor
Copy link
Contributor

@gftabor gftabor commented Sep 26, 2023

No description provided.

mostly I just want to see if windows segfaults again
@gftabor
Copy link
Contributor Author

gftabor commented Sep 27, 2023

Hmmmm segfault for windows. I hoped trying a second time would magically solve it, it did not.

@Tobias-Fischer
Copy link
Collaborator

@gftabor - do you have a Windows machine and could try a local build?

@gftabor
Copy link
Contributor Author

gftabor commented Sep 30, 2023

error.txt

@Tobias-Fischer
Copy link
Collaborator

It looks like this could be relevant - could you please try?

https://github.com/protocolbuffers/protobuf/blob/main/cmake/README.md#dlls-vs-static-linking

Alternatively, we could just patch out the Protobuf parser in Plotjuggler.

@traversaro
Copy link
Member

traversaro commented Nov 10, 2023

error.txt

The error seems:

[508/509] Linking CXX shared library devel\bin\ProtobufParser.dll
FAILED: devel/bin/ProtobufParser.dll devel/lib/ProtobufParser.lib 
cmd.exe /C "cmd.exe /C "%BUILD_PREFIX%\Library\bin\cmake.exe -E __create_def %SRC_DIR%\build\plotjuggler_plugins\ParserProtobuf\CMakeFiles\ProtobufParser.dir\.\exports.def %SRC_DIR%\build\plotjuggler_plugins\ParserProtobuf\CMakeFiles\ProtobufParser.dir\.\exports.def.objs && cd %SRC_DIR%\build" && %BUILD_PREFIX%\Library\bin\cmake.exe -E vs_link_dll --intdir=plotjuggler_plugins\ParserProtobuf\CMakeFiles\ProtobufParser.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\mt.exe --manifests  -- C:\PROGRA~2\MICROS~3\2019\COMMUN~1\VC\Tools\MSVC\1429~1.301\bin\Hostx64\x64\link.exe /nologo plotjuggler_plugins\ParserProtobuf\CMakeFiles\ProtobufParser.dir\ProtobufParser_autogen\mocs_compilation.cpp.obj plotjuggler_plugins\ParserProtobuf\CMakeFiles\ProtobufParser.dir\error_collectors.cpp.obj plotjuggler_plugins\ParserProtobuf\CMakeFiles\ProtobufParser.dir\protobuf_parser.cpp.obj plotjuggler_plugins\ParserProtobuf\CMakeFiles\ProtobufParser.dir\protobuf_factory.cpp.obj  /out:devel\bin\ProtobufParser.dll /implib:devel\lib\ProtobufParser.lib /pdb:devel\bin\ProtobufParser.pdb /dll /version:0.0 /machine:x64 /INCREMENTAL:NO  /DEF:plotjuggler_plugins\ParserProtobuf\CMakeFiles\ProtobufParser.dir\.\exports.def  C:\Users\tabor\anaconda3\Library\lib\libprotobuf.lib  devel\lib\plotjuggler_base.lib  devel\lib\plotjuggler_qwt.lib  %PREFIX%\Library\lib\Qt5Xml_conda.lib  %PREFIX%\Library\lib\Qt5PrintSupport_conda.lib  %PREFIX%\Library\lib\Qt5Concurrent_conda.lib  %PREFIX%\Library\lib\Qt5Svg_conda.lib  %PREFIX%\Library\lib\Qt5OpenGL_conda.lib  %PREFIX%\Library\lib\Qt5Widgets_conda.lib  %PREFIX%\Library\lib\Qt5Gui_conda.lib  %PREFIX%\Library\lib\Qt5WebSockets_conda.lib  %PREFIX%\Library\lib\Qt5Network_conda.lib  %PREFIX%\Library\lib\Qt5Core_conda.lib  devel\lib\lua_static.lib  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib  && cd ."
LINK: command "C:\PROGRA~2\MICROS~3\2019\COMMUN~1\VC\Tools\MSVC\1429~1.301\bin\Hostx64\x64\link.exe /nologo plotjuggler_plugins\ParserProtobuf\CMakeFiles\ProtobufParser.dir\ProtobufParser_autogen\mocs_compilation.cpp.obj plotjuggler_plugins\ParserProtobuf\CMakeFiles\ProtobufParser.dir\error_collectors.cpp.obj plotjuggler_plugins\ParserProtobuf\CMakeFiles\ProtobufParser.dir\protobuf_parser.cpp.obj plotjuggler_plugins\ParserProtobuf\CMakeFiles\ProtobufParser.dir\protobuf_factory.cpp.obj /out:devel\bin\ProtobufParser.dll /implib:devel\lib\ProtobufParser.lib /pdb:devel\bin\ProtobufParser.pdb /dll /version:0.0 /machine:x64 /INCREMENTAL:NO /DEF:plotjuggler_plugins\ParserProtobuf\CMakeFiles\ProtobufParser.dir\.\exports.def C:\Users\tabor\anaconda3\Library\lib\libprotobuf.lib devel\lib\plotjuggler_base.lib devel\lib\plotjuggler_qwt.lib %PREFIX%\Library\lib\Qt5Xml_conda.lib %PREFIX%\Library\lib\Qt5PrintSupport_conda.lib %PREFIX%\Library\lib\Qt5Concurrent_conda.lib %PREFIX%\Library\lib\Qt5Svg_conda.lib %PREFIX%\Library\lib\Qt5OpenGL_conda.lib %PREFIX%\Library\lib\Qt5Widgets_conda.lib %PREFIX%\Library\lib\Qt5Gui_conda.lib %PREFIX%\Library\lib\Qt5WebSockets_conda.lib %PREFIX%\Library\lib\Qt5Network_conda.lib %PREFIX%\Library\lib\Qt5Core_conda.lib devel\lib\lua_static.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST:EMBED,ID=2" failed (exit code 1120) with the following output:
   Creating library devel\lib\ProtobufParser.lib and object devel\lib\ProtobufParser.exp
protobuf_parser.cpp.obj : error LNK2019: unresolved external symbol "private: static enum google::protobuf::FieldDescriptor::CppType const * const google::protobuf::FieldDescriptor::kTypeToCppTypeMap" (?kTypeToCppTypeMap@FieldDescriptor@protobuf@google@@0QBW4CppType@123@B) referenced in function "public: __cdecl <lambda_bf367ae0e0412ce84dcc511f79a5c9d2>::operator()(class google::protobuf::Message const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,bool)const " (??R<lambda_bf367ae0e0412ce84dcc511f79a5c9d2>@@QEBA@AEBVMessage@protobuf@google@@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@_N@Z)
protobuf_parser.cpp.obj : error LNK2019: unresolved external symbol "const google::protobuf::FileDescriptorProto::`vftable'" (??_7FileDescriptorProto@protobuf@google@@6B@) referenced in function "public: __cdecl google::protobuf::FileDescriptorProto::FileDescriptorProto(void)" (??0FileDescriptorProto@protobuf@google@@QEAA@XZ)
protobuf_factory.cpp.obj : error LNK2019: unresolved external symbol "const google::protobuf::FileDescriptorSet::`vftable'" (??_7FileDescriptorSet@protobuf@google@@6B@) referenced in function "public: __cdecl google::protobuf::FileDescriptorSet::FileDescriptorSet(void)" (??0FileDescriptorSet@protobuf@google@@QEAA@XZ)

devel\bin\ProtobufParser.dll : fatal error LNK1120: 3 unresolved externals

[509/509] Linking CXX executable devel\lib\plotjuggler\plotjuggler.exe

Looking in the link command, it is possible to see that the protobuf version is the one in the base environment (i.e. C:\Users\tabor\anaconda3\Library\lib\libprotobuf.lib instead of the one in the host environment i.e. $PREFIX\Library\lib\libprotobuf.lib). Indeed, it does not seems that there is any libprotobuf installed in the host environment. Perhaps there is some metadata problem?

@traversaro
Copy link
Member

traversaro commented Nov 10, 2023

error.txt

The error seems:

[508/509] Linking CXX shared library devel\bin\ProtobufParser.dll
FAILED: devel/bin/ProtobufParser.dll devel/lib/ProtobufParser.lib 
cmd.exe /C "cmd.exe /C "%BUILD_PREFIX%\Library\bin\cmake.exe -E __create_def %SRC_DIR%\build\plotjuggler_plugins\ParserProtobuf\CMakeFiles\ProtobufParser.dir\.\exports.def %SRC_DIR%\build\plotjuggler_plugins\ParserProtobuf\CMakeFiles\ProtobufParser.dir\.\exports.def.objs && cd %SRC_DIR%\build" && %BUILD_PREFIX%\Library\bin\cmake.exe -E vs_link_dll --intdir=plotjuggler_plugins\ParserProtobuf\CMakeFiles\ProtobufParser.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\mt.exe --manifests  -- C:\PROGRA~2\MICROS~3\2019\COMMUN~1\VC\Tools\MSVC\1429~1.301\bin\Hostx64\x64\link.exe /nologo plotjuggler_plugins\ParserProtobuf\CMakeFiles\ProtobufParser.dir\ProtobufParser_autogen\mocs_compilation.cpp.obj plotjuggler_plugins\ParserProtobuf\CMakeFiles\ProtobufParser.dir\error_collectors.cpp.obj plotjuggler_plugins\ParserProtobuf\CMakeFiles\ProtobufParser.dir\protobuf_parser.cpp.obj plotjuggler_plugins\ParserProtobuf\CMakeFiles\ProtobufParser.dir\protobuf_factory.cpp.obj  /out:devel\bin\ProtobufParser.dll /implib:devel\lib\ProtobufParser.lib /pdb:devel\bin\ProtobufParser.pdb /dll /version:0.0 /machine:x64 /INCREMENTAL:NO  /DEF:plotjuggler_plugins\ParserProtobuf\CMakeFiles\ProtobufParser.dir\.\exports.def  C:\Users\tabor\anaconda3\Library\lib\libprotobuf.lib  devel\lib\plotjuggler_base.lib  devel\lib\plotjuggler_qwt.lib  %PREFIX%\Library\lib\Qt5Xml_conda.lib  %PREFIX%\Library\lib\Qt5PrintSupport_conda.lib  %PREFIX%\Library\lib\Qt5Concurrent_conda.lib  %PREFIX%\Library\lib\Qt5Svg_conda.lib  %PREFIX%\Library\lib\Qt5OpenGL_conda.lib  %PREFIX%\Library\lib\Qt5Widgets_conda.lib  %PREFIX%\Library\lib\Qt5Gui_conda.lib  %PREFIX%\Library\lib\Qt5WebSockets_conda.lib  %PREFIX%\Library\lib\Qt5Network_conda.lib  %PREFIX%\Library\lib\Qt5Core_conda.lib  devel\lib\lua_static.lib  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib  && cd ."
LINK: command "C:\PROGRA~2\MICROS~3\2019\COMMUN~1\VC\Tools\MSVC\1429~1.301\bin\Hostx64\x64\link.exe /nologo plotjuggler_plugins\ParserProtobuf\CMakeFiles\ProtobufParser.dir\ProtobufParser_autogen\mocs_compilation.cpp.obj plotjuggler_plugins\ParserProtobuf\CMakeFiles\ProtobufParser.dir\error_collectors.cpp.obj plotjuggler_plugins\ParserProtobuf\CMakeFiles\ProtobufParser.dir\protobuf_parser.cpp.obj plotjuggler_plugins\ParserProtobuf\CMakeFiles\ProtobufParser.dir\protobuf_factory.cpp.obj /out:devel\bin\ProtobufParser.dll /implib:devel\lib\ProtobufParser.lib /pdb:devel\bin\ProtobufParser.pdb /dll /version:0.0 /machine:x64 /INCREMENTAL:NO /DEF:plotjuggler_plugins\ParserProtobuf\CMakeFiles\ProtobufParser.dir\.\exports.def C:\Users\tabor\anaconda3\Library\lib\libprotobuf.lib devel\lib\plotjuggler_base.lib devel\lib\plotjuggler_qwt.lib %PREFIX%\Library\lib\Qt5Xml_conda.lib %PREFIX%\Library\lib\Qt5PrintSupport_conda.lib %PREFIX%\Library\lib\Qt5Concurrent_conda.lib %PREFIX%\Library\lib\Qt5Svg_conda.lib %PREFIX%\Library\lib\Qt5OpenGL_conda.lib %PREFIX%\Library\lib\Qt5Widgets_conda.lib %PREFIX%\Library\lib\Qt5Gui_conda.lib %PREFIX%\Library\lib\Qt5WebSockets_conda.lib %PREFIX%\Library\lib\Qt5Network_conda.lib %PREFIX%\Library\lib\Qt5Core_conda.lib devel\lib\lua_static.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST:EMBED,ID=2" failed (exit code 1120) with the following output:
   Creating library devel\lib\ProtobufParser.lib and object devel\lib\ProtobufParser.exp
protobuf_parser.cpp.obj : error LNK2019: unresolved external symbol "private: static enum google::protobuf::FieldDescriptor::CppType const * const google::protobuf::FieldDescriptor::kTypeToCppTypeMap" (?kTypeToCppTypeMap@FieldDescriptor@protobuf@google@@0QBW4CppType@123@B) referenced in function "public: __cdecl <lambda_bf367ae0e0412ce84dcc511f79a5c9d2>::operator()(class google::protobuf::Message const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,bool)const " (??R<lambda_bf367ae0e0412ce84dcc511f79a5c9d2>@@QEBA@AEBVMessage@protobuf@google@@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@_N@Z)
protobuf_parser.cpp.obj : error LNK2019: unresolved external symbol "const google::protobuf::FileDescriptorProto::`vftable'" (??_7FileDescriptorProto@protobuf@google@@6B@) referenced in function "public: __cdecl google::protobuf::FileDescriptorProto::FileDescriptorProto(void)" (??0FileDescriptorProto@protobuf@google@@QEAA@XZ)
protobuf_factory.cpp.obj : error LNK2019: unresolved external symbol "const google::protobuf::FileDescriptorSet::`vftable'" (??_7FileDescriptorSet@protobuf@google@@6B@) referenced in function "public: __cdecl google::protobuf::FileDescriptorSet::FileDescriptorSet(void)" (??0FileDescriptorSet@protobuf@google@@QEAA@XZ)

devel\bin\ProtobufParser.dll : fatal error LNK1120: 3 unresolved externals

[509/509] Linking CXX executable devel\lib\plotjuggler\plotjuggler.exe

Looking in the link command, it is possible to see that the protobuf version is the one in the base environment (i.e. C:\Users\tabor\anaconda3\Library\lib\libprotobuf.lib instead of the one in the host environment i.e. $PREFIX\Library\lib\libprotobuf.lib). Indeed, it does not seems that there is any libprotobuf installed in the host environment. Perhaps there is some metadata problem?

I see, that is an optional dependency that gets enable automatically if it is found (see https://github.com/facontidavide/PlotJuggler/blob/a123c36350b4ef116c7d76a79c16832eec6f9643/plotjuggler_plugins/ParserProtobuf/CMakeLists.txt#L7). Probably we can disable it by passing the CMake option -DCMAKE_DISABLE_FIND_PACKAGE_Protobuf=ON, if that is too tricky to do, probably you can either:

  • Uninstall libprotobuf from the base environment
  • Do not activate the base environment when your run the boa build (for example via conda config --set auto_activate_base false)

@Tobias-Fischer
Copy link
Collaborator

In the patch/dependencies.yaml we can add protobuf as a host dep. I’m on my mobile apologies otherwise I’d do myself.

@Tobias-Fischer
Copy link
Collaborator

Will revisit once #418 is merged, the patches to protobuf there might fix the issue here.

@Tobias-Fischer
Copy link
Collaborator

This works fine now :)

@Tobias-Fischer Tobias-Fischer merged commit 4db39d9 into RoboStack:main Feb 16, 2024
5 checks passed
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.

3 participants