ros-industrial / abb_robot_driver

The new ROS driver for ABB robots
BSD 3-Clause "New" or "Revised" License
100 stars 42 forks source link

Windows build failing #17

Open dyumanaditya opened 3 years ago

dyumanaditya commented 3 years ago

Hi, When I try to build the package on Windows using catkin_make_isolated (because catkin build isn't supported on Windows) this is my CMakeError log:

Click to expand ``` Determining if the include file pthread.h exists failed with the following output: Change Dir: C:/Users/Dyuman/catkin_ws/build_isolated/abb_rapid_msgs/CMakeFiles/CMakeTmp Run Build Command(s):C:/PROGRA~2/MICROS~2/2019/COMMUN~1/Common7/IDE/COMMON~1/MICROS~1/CMake/Ninja/ninja.exe cmTC_d3d33 && [1/2] Building C object CMakeFiles\cmTC_d3d33.dir\CheckIncludeFile.c.obj FAILED: CMakeFiles/cmTC_d3d33.dir/CheckIncludeFile.c.obj C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\1428~1.293\bin\Hostx64\x64\cl.exe /nologo /DWIN32 /D_WINDOWS /W3 /MDd /Zi /Ob0 /Od /RTC1 /showIncludes /FoCMakeFiles\cmTC_d3d33.dir\CheckIncludeFile.c.obj /FdCMakeFiles\cmTC_d3d33.dir\ /FS -c CheckIncludeFile.c CheckIncludeFile.c(1): fatal error C1083: Cannot open include file: 'pthread.h': No such file or directory ninja: build stopped: subcommand failed. ```

And this is my CMakeOutput log:

Click to expand ``` The system is: Windows - 10.0.19042 - AMD64 Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded. Compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.28.29333/bin/Hostx64/x64/cl.exe Build flags: Id flags: The output was: 0 Microsoft (R) C/C++ Optimizing Compiler Version 19.28.29337 for x64 Copyright (C) Microsoft Corporation. All rights reserved. CMakeCCompilerId.c Microsoft (R) Incremental Linker Version 14.28.29337.0 Copyright (C) Microsoft Corporation. All rights reserved. /out:CMakeCCompilerId.exe CMakeCCompilerId.obj Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "CMakeCCompilerId.exe" Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "CMakeCCompilerId.obj" The C compiler identification is MSVC, found in "C:/Users/Dyuman/catkin_ws/build_isolated/abb_rapid_msgs/CMakeFiles/3.18.2/CompilerIdC/CMakeCCompilerId.exe" Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded. Compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.28.29333/bin/Hostx64/x64/cl.exe Build flags: Id flags: The output was: 0 Microsoft (R) C/C++ Optimizing Compiler Version 19.28.29337 for x64 Copyright (C) Microsoft Corporation. All rights reserved. CMakeCXXCompilerId.cpp Microsoft (R) Incremental Linker Version 14.28.29337.0 Copyright (C) Microsoft Corporation. All rights reserved. /out:CMakeCXXCompilerId.exe CMakeCXXCompilerId.obj Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "CMakeCXXCompilerId.exe" Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "CMakeCXXCompilerId.obj" The CXX compiler identification is MSVC, found in "C:/Users/Dyuman/catkin_ws/build_isolated/abb_rapid_msgs/CMakeFiles/3.18.2/CompilerIdCXX/CMakeCXXCompilerId.exe" Detecting C compiler ABI info compiled with the following output: Change Dir: C:/Users/Dyuman/catkin_ws/build_isolated/abb_rapid_msgs/CMakeFiles/CMakeTmp Run Build Command(s):C:/PROGRA~2/MICROS~2/2019/COMMUN~1/Common7/IDE/COMMON~1/MICROS~1/CMake/Ninja/ninja.exe cmTC_c4114 && [1/2] Building C object CMakeFiles\cmTC_c4114.dir\CMakeCCompilerABI.c.obj [2/2] Linking C executable cmTC_c4114.exe Detecting CXX compiler ABI info compiled with the following output: Change Dir: C:/Users/Dyuman/catkin_ws/build_isolated/abb_rapid_msgs/CMakeFiles/CMakeTmp Run Build Command(s):C:/PROGRA~2/MICROS~2/2019/COMMUN~1/Common7/IDE/COMMON~1/MICROS~1/CMake/Ninja/ninja.exe cmTC_92086 && [1/2] Building CXX object CMakeFiles\cmTC_92086.dir\CMakeCXXCompilerABI.cpp.obj [2/2] Linking CXX executable cmTC_92086.exe ```

Can this package be build on Windows? If not, what is the best way to use this package on Ubuntu and run RobotStudio on Windows?

enricovillagrossi commented 2 years ago

Thank you @traversaro, this fix the problem! It is necessary to modify also: https://github.com/ros-industrial/abb_robot_driver/blob/master/abb_egm_state_controller/CMakeLists.txt