conda-forge / libignition-physics-feedstock

A conda-smithy repository for libignition-physics.
BSD 3-Clause "New" or "Revised" License
1 stars 3 forks source link

Add sdformat to win build #8

Closed Tobias-Fischer closed 3 years ago

Tobias-Fischer commented 3 years ago

Adding it currently leads to lots and lots of errors: https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=237032&view=logs&jobId=a70f640f-cc53-5cd3-6cdc-236a1aa90802

@traversaro's comment for a potential fix:

The failure on Windows may be due to the advanced template machinery that may require VS2019. As a workaround, we may considering using clang-cl. pinocchio-feedstock is an example of feedstock that uses this strategy.

traversaro commented 3 years ago

Adding it currently leads to lots and lots of errors: https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=237032&view=logs&jobId=a70f640f-cc53-5cd3-6cdc-236a1aa90802

@traversaro's comment for a potential fix:

The failure on Windows may be due to the advanced template machinery that may require VS2019. As a workaround, we may considering using clang-cl. pinocchio-feedstock is an example of feedstock that uses this strategy.

Interestingly, the fix necessary to get dartsim to work on Windows instead requires MSVC and not clang-cl: https://github.com/dartsim/dart/pull/1541 .

traversaro commented 3 years ago

Indeed, the problem is still there (from https://github.com/conda-forge/libignition-physics-feedstock/pull/12):

2021-03-19T14:45:32.5078990Z [12/104] Building CXX object src\CMakeFiles\UNIT_FeatureList_TEST.dir\FeatureList_TEST.cc.obj
2021-03-19T14:45:32.5080329Z FAILED: src/CMakeFiles/UNIT_FeatureList_TEST.dir/FeatureList_TEST.cc.obj 
2021-03-19T14:45:32.5083553Z C:\PROGRA~2\MICROS~1\2017\ENTERP~1\VC\Tools\MSVC\1416~1.270\bin\Hostx64\x64\cl.exe  /nologo /TP -DBOOST_ALL_NO_LIB -DBOOST_TEST_DYN_LINK -DIGN_PROFILER_ENABLE=0 -DNOMINMAX -DWIN32_LEAN_AND_MEAN -I..\include -Iinclude -I..\ -I. -I..\test\gtest\include -Icore\include -I%PREFIX%\Library\include\eigen3 -I%PREFIX%\Library\include\ignition\math6 -I%PREFIX%\Library\include\ignition\plugin1 -I%PREFIX%\Library\include\ignition\cmake2 /DWIN32 /D_WINDOWS /W3 /GR /EHsc /MD /O2 /Ob2 /DNDEBUG /Gy /W2 /Zi /GL /EHsc -std:c++17 /showIncludes /Fosrc\CMakeFiles\UNIT_FeatureList_TEST.dir\FeatureList_TEST.cc.obj /Fdsrc\CMakeFiles\UNIT_FeatureList_TEST.dir\ /FS -c ..\src\FeatureList_TEST.cc
2021-03-19T14:45:32.5086744Z cl : Command line warning D9025 : overriding '/W3' with '/W2'
2021-03-19T14:45:32.5088144Z %SRC_DIR%\include\ignition/physics/detail/FeatureList.hh(615): error C3546: '...': there are no parameter packs available to expand
2021-03-19T14:45:32.5090030Z %SRC_DIR%\include\ignition/physics/detail/FeatureList.hh(396): note: see reference to class template instantiation 'ignition::physics::FeatureWithRequirements<FeatureA>::RequiredFeatures' being compiled
2021-03-19T14:45:32.5092114Z %SRC_DIR%\include\ignition/physics/detail/FeatureList.hh(418): note: see reference to class template instantiation 'ignition::physics::detail::CombineListsImpl<std::tuple<>,RequiresFeatureA>' being compiled
2021-03-19T14:45:32.5094313Z %SRC_DIR%\include\ignition/physics/FeatureList.hh(58): note: see reference to class template instantiation 'ignition::physics::detail::CombineLists<RequiresFeatureA>' being compiled
2021-03-19T14:45:32.5096119Z ..\src\FeatureList_TEST.cc(173): note: see reference to class template instantiation 'ignition::physics::FeatureList<RequiresFeatureA>' being compiled
2021-03-19T14:45:32.5097742Z %SRC_DIR%\include\ignition/physics/detail/FeatureList.hh(615): error C3520: 'Features': parameter pack must be expanded in this context
2021-03-19T14:45:32.5107639Z %SRC_DIR%\include\ignition/physics/detail/FeatureList.hh(150): error C2338: FEATURELIST ERROR: YOU ARE ATTEMPTING TO ADD A CLASS WHICH IS NOT A Feature TO A FeatureList! MAKE SURE THAT YOUR CLASS VIRTUALLY INHERITS THE Feature BASE CLASS!
2021-03-19T14:45:32.5134388Z %SRC_DIR%\include\ignition/physics/detail/FeatureList.hh(174): note: see reference to class template instantiation 'ignition::physics::detail::VerifyFeatures<F>' being compiled
2021-03-19T14:45:32.5135978Z         with
2021-03-19T14:45:32.5137203Z         [
2021-03-19T14:45:32.5138366Z             F=ignition::physics::FeatureWithRequirements<FeatureA>::RequiredFeatures
2021-03-19T14:45:32.5139607Z         ]
2021-03-19T14:45:32.5141277Z %SRC_DIR%\include\ignition/physics/detail/FeatureList.hh(396): note: see reference to class template instantiation 'ignition::physics::detail::ExtractFeatures<ignition::physics::FeatureWithRequirements<FeatureA>::RequiredFeatures,void>' being compiled
2021-03-19T14:45:32.5143943Z %SRC_DIR%\include\ignition/physics/detail/FeatureList.hh(434): error C2903: 'ConflictsWith': symbol is neither a class template nor a function template
2021-03-19T14:45:32.5146107Z %SRC_DIR%\include\ignition/physics/detail/FeatureList.hh(564): note: see reference to class template instantiation 'ignition::physics::detail::ConflictingLists<SomeFeatureList,true,std::tuple<RequiresFeatureA,F>>' being compiled
2021-03-19T14:45:32.5155159Z         with
2021-03-19T14:45:32.5156007Z         [
2021-03-19T14:45:32.5157252Z             SomeFeatureList=ignition::physics::FeatureList<RequiresFeaturesBC>,
2021-03-19T14:45:32.5159679Z             F=ignition::physics::FeatureWithRequirements<FeatureA>::RequiredFeatures
2021-03-19T14:45:32.5160866Z         ]
traversaro commented 3 years ago

@traversaro's comment for a potential fix:

The failure on Windows may be due to the advanced template machinery that may require VS2019. As a workaround, we may considering using clang-cl. pinocchio-feedstock is an example of feedstock that uses this strategy.

Interestingly, the fix necessary to get dartsim to work on Windows instead requires MSVC and not clang-cl: dartsim/dart#1541 .

Using clang-cl proved to be able to avoid the sdformat problems in https://github.com/conda-forge/libignition-physics-feedstock/pull/12 . I am awaiting for the change of dartsim on windows PRs (see https://github.com/conda-forge/libode-feedstock/pull/5) to test if that works fine also with DART. If clang-cl create problems, apparently it is possible to opt-in in VS2019: https://gitter.im/conda-forge/conda-forge.github.io?at=60586c99bc554b42d6178f87 .

traversaro commented 3 years ago

Related: https://github.com/conda-forge/faiss-split-feedstock/pull/27 and https://github.com/conda-forge/faiss-split-feedstock/pull/27/commits/15fe1bf33ecc3ad2405bd452814a5c75f2b9885f .