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

Wrapping Typedefs ITKOptimizersBase fails on VS2017 LEGACY_REMOVE #1442

Closed
aylward opened this issue Nov 25, 2019 · 4 comments

Comments

@aylward
Copy link
Member

@aylward aylward commented Nov 25, 2019

On VS2017 (fully updated) I get the following error message:
cmd.exe /C "cd /D C:\src\ITK-Release\Wrapping\Typedefs\python && C:\src\ITK-Release\Wrapping\Generators\SwigInterface\swigwin-3.0.12\swig.exe -c++ -python -O -features autodoc=1 -py3 -Werror -w302 -w303 -w312 -w314 -w361 -w362 -w350 -w383 -w384 -w389 -w394 -w395 -w467 -w508 -w509 -o C:/src/ITK-Release/Wrapping/Modules/ITKOptimizers/ITKOptimizersBasePython.cpp -IC:/src/ITK-Release/Wrapping/Generators/SwigInterface/swig/share/swig/3.0.12/python -IC:/src/ITK-Release/Wrapping/Generators/SwigInterface/swig/share/swig/3.0.12 -IC:/src/ITK/Wrapping/Generators -IC:/src/ITK-Release/Wrapping/Typedefs/python -IC:/src/ITK-Release/Wrapping/Typedefs -outdir C:/src/ITK-Release/lib C:/src/ITK-Release/Wrapping/Typedefs/ITKOptimizersBase.i"
Assertion failed: Getattr(n, "sym:name"), file Modules/lang.cxx, line 1657
ninja: build stopped: subcommand failed.

The last checkout that works is:
f426a2a

Suggesting that the error was introduced in
35865ca

This bug persists in Master/Head today.

CMake options used
ITK_LEGACY_REMOVE = ON

I thought it was due to the removal of the conditional defined(ITK_WRAPPING_PARSER) in several places, but restoring them does not fix the issue.

@dzenanz

This comment has been minimized.

Copy link
Member

@dzenanz dzenanz commented Nov 25, 2019

I can reproduce this:

1>------ Build started: Project: castxml (ExternalProjectTargets\castxml\castxml), Configuration: Debug x64 ------
2>------ Build started: Project: swig (ExternalProjectTargets\swig\swig), Configuration: Debug x64 ------
3>------ Build started: Project: ITKCommonCastXML, Configuration: Debug x64 ------
4>------ Build started: Project: ITKStatisticsCastXML, Configuration: Debug x64 ------
5>------ Build started: Project: ITKOptimizersCastXML, Configuration: Debug x64 ------
6>------ Build started: Project: ITKCommonSwig, Configuration: Debug x64 ------
7>------ Build started: Project: ITKStatisticsSwig, Configuration: Debug x64 ------
8>------ Build started: Project: ITKOptimizersSwig, Configuration: Debug x64 ------
9>------ Build started: Project: ITKOptimizersPython, Configuration: Debug x64 ------
9>Generating ITKCostFunctionsPython.cpp, ../../../lib/ITKCostFunctionsPython.py
9>Generating ITKOptimizersBasePython.cpp, ../../../lib/ITKOptimizersBasePython.py
9>Assertion failed: Getattr(n, "sym:name"), file Modules/lang.cxx, line 1657
9>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Microsoft\VC\v150\Microsoft.CppCommon.targets(209,5): error MSB6006: "cmd.exe" exited with code 3.
9>Done building project "ITKOptimizersPython.vcxproj" -- FAILED.
========== Build: 8 succeeded, 1 failed, 107 up-to-date, 0 skipped ==========

I guess that this is a bug in SWIG.

@dzenanz

This comment has been minimized.

Copy link
Member

@dzenanz dzenanz commented Nov 25, 2019

The file mentioned in the error message is C:\Dev\ITK-2017\Wrapping\Generators\SwigInterface\swigwin-3.0.12\Source\Modules\lang.cxx.

@thewtex thewtex added this to the ITK v5.1rc01 milestone Nov 26, 2019
@thewtex thewtex assigned thewtex and unassigned hjmjohnson Dec 3, 2019
@thewtex

This comment has been minimized.

Copy link
Member

@thewtex thewtex commented Dec 3, 2019

I have a patch for this coming :-) -- will push after I have finished testing variants.

@thewtex

This comment has been minimized.

Copy link
Member

@thewtex thewtex commented Dec 5, 2019

Our Windows Azure Python is green again 💚 🎉

@thewtex thewtex closed this Dec 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.