robotology / funny-things

A collection of "funny" yet useful behaviors for the iCub
https://robotology.github.io/funny-things
GNU General Public License v2.0
6 stars 12 forks source link

Error when using CMake 3.16.2 with Visual Studio 2019 on Windows #13

Closed traversaro closed 4 years ago

traversaro commented 4 years ago

Error message:

2020-02-01T09:50:17.9191272Z     Copying D:/a/robotology-superbuild/robotology-superbuild/robotology/funny-things/app/scripts/lua/baricub.lua to D:/a/robotology-superbuild/robotology-superbuild/build/robotology/funny-things/bin/Debug/  Copying D:/a/robotology-superbuild/robotology-superbuild/robotology/funny-things/app/scripts/lua/gaze.lua to D:/a/robotology-superbuild/robotology-superbuild/build/robotology/funny-things/bin/Debug/  Copying D:/a/robotology-superbuild/robotology-superbuild/robotology/funny-things/app/scripts/lua/look-pixel.lua to D:/a/robotology-superbuild/robotology-superbuild/build/robotology/funny-things/bin/Debug/
2020-02-01T09:50:18.1045347Z C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(470,5): error MSB3191: Unable to create directory "D:\a\robotology-superbuild\robotology-superbuild\build\robotology\funny-things\bin\Debug\". Cannot create "D:\a\robotology-superbuild\robotology-superbuild\build\robotology\funny-things\bin\Debug" because a file or directory with the same name already exists. [D:\a\robotology-superbuild\robotology-superbuild\build\robotology\funny-things\modules\funnyPostures\funnyPostures.vcxproj] [D:\a\robotology-superbuild\robotology-superbuild\build\funny-things.vcxproj]
2020-02-01T09:50:18.1376515Z C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(470,5): error MSB3191: Unable to create directory "D:\a\robotology-superbuild\robotology-superbuild\build\robotology\funny-things\bin\Debug\". Cannot create "D:\a\robotology-superbuild\robotology-superbuild\build\robotology\funny-things\bin\Debug" because a file or directory with the same name already exists. [D:\a\robotology-superbuild\robotology-superbuild\build\robotology\funny-things\modules\iCubBlinker\iCubBlinker.vcxproj] [D:\a\robotology-superbuild\robotology-superbuild\build\funny-things.vcxproj]
2020-02-01T09:50:18.1630166Z C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(470,5): error MSB3191: Unable to create directory "D:\a\robotology-superbuild\robotology-superbuild\build\robotology\funny-things\bin\Debug\". Cannot create "D:\a\robotology-superbuild\robotology-superbuild\build\robotology\funny-things\bin\Debug" because a file or directory with the same name already exists. [D:\a\robotology-superbuild\robotology-superbuild\build\robotology\funny-things\modules\iCubBreather\iCubBreather.vcxproj] [D:\a\robotology-superbuild\robotology-superbuild\build\funny-things.vcxproj]

Complete failure log: https://github.com/robotology/robotology-superbuild/pull/338/checks?check_run_id=420671419 .

pattacini commented 4 years ago

In https://github.com/robotology/funny-things/commit/6637f682c25e3d3656d49b5a954169601973f459 I've streamlined a little bit the cmake code but nothing really to address this failure.

Configuring+building+installing worked just fine on my Windows with VS 2019 and CMake 3.16.3. Required further inspection.

pattacini commented 4 years ago

This is the piece of cmake code responsible for copying out scripts in Release/Debug: https://github.com/robotology/funny-things/blob/6637f682c25e3d3656d49b5a954169601973f459/app/CMakeLists.txt#L16-L21

This is a quite steady snippet, which is also used in other repos. Thus, isn't there any difference on the GH runner wrt a standard building environment that could explain this failure?

traversaro commented 4 years ago

Did you try to compile/install the project in both Debug and Release mode? The GH failure is happening in Debug.

pattacini commented 4 years ago

Yep, working both in Release and Debug.

pattacini commented 4 years ago

@traversaro can we consider this solved?

traversaro commented 4 years ago

Unfortunately not, I plan to work on this in the next few days.

traversaro commented 4 years ago

I reproduced the problem locally. It does not appear if the target are executed each one manually as in cmake --build . --config Release --target copy_lua_in_build, but it appears instead if you run on a clean build cmake --build . --config Release.