osrf / gazebo_tutorials

Tutorials for gazebo
http://gazebosim.org/tutorials
150 stars 72 forks source link

Protoc error: Installing Gazebo on Windows 10 (Stuck at ign-msgs). #129

Closed AnjanaWijesinghe closed 3 years ago

AnjanaWijesinghe commented 3 years ago

I'm installing Gazebo on Windows 10 (following the tutorial). I managed to complete the installation up to ign-msgs, everything else was successful after little adjustments (simply editing the CMakeCache with proper addresses). The .\configure works

E:\gz-ws\ign-msgs>.\configure

E:\gz-ws\ign-msgs>call :download_unzip_install protobuf-3.4.1-vc15-x64-dll-MD.zip The system cannot find the batch label specified - download_unzip_install

E:\gz-ws\ign-msgs>call :install_ign_project ign-math ign-math4 The system cannot find the batch label specified - install_ign_project Configuring for build type Release

E:\gz-ws\ign-msgs>cd /d E:\gz-ws\ign-msgs\

E:\gz-ws\ign-msgs>md build A subdirectory or file build already exists.

E:\gz-ws\ign-msgs>cd build

E:\gz-ws\ign-msgs\build>cmake .. -G "NMake Makefiles" -DCMAKE_INSTALL_PREFIX="" -DCMAKE_BUILD_TYPE="Release" -DBUILD_TESTING:BOOL=False -- ignition-msgs1 version 1.0.0 -- Operating system is Windows

-- ====== Finding Dependencies ====== -- Looking for Protobuf - found

-- Looking for ignition-math4 - found

-- Looking for ignition-tools - not found

-- BUILD WARNINGS -- Missing: ignition-tools -- END BUILD WARNINGS

-- Installing Ruby messages to /ignition/msgs -- Testing is disabled -- skipping UNIT tests -- Build configuration successful -- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) -- Build type: Release -- Install prefix: -- Configuring done -- Generating done -- Build files have been written to: E:/gz-ws/ign-msgs/build

Next when I run nmake, I get a plugin error.

E:\gz-ws\ign-msgs\build>nmake

Microsoft (R) Program Maintenance Utility Version 14.28.29334.0 Copyright (C) Microsoft Corporation. All rights reserved.

[ 1%] Built target ign_msgs_gen [ 1%] Running protoc on E:/gz-ws/ign-msgs/proto/ignition/msgs/altimeter.proto --ignmsgs_out: protoc-gen-ignmsgs: Plugin failed with status code 3221225781. NMAKE : fatal error U1077: 'E:\gz-ws\protobuf-3.4.1-vc15-x64-dll-MD\bin\protoc.exe' : return code '0x1' Stop. NMAKE : fatal error U1077: '"D:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\bin\HostX86\x64\nmake.exe"' : return code '0x2' Stop. NMAKE : fatal error U1077: '"D:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\bin\HostX86\x64\nmake.exe"' : return code '0x2' Stop.

How can I solve this?

j-rivero commented 3 years ago

The documentation and artifacts to compile on Windows are outdated. Instead of fixing the current mess, let's try to find a better approach, we'll appreciate your experience and opinions on the alternatives proposed and linked in https://github.com/osrf/gazebo/issues/2901. Thanks.