-
-
Notifications
You must be signed in to change notification settings - Fork 116
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
Compilation with Visual Studio #1381
Comments
Do you have more information on why tests are not passing ? I do not have VS to check these tests. |
I will try to provide more details. |
Actually, I think you can replicate at least some of the errors by compiling wih gcc with the flag -D_GLIBCXX_DEBUG I will try to detail what I have found in the following messages. |
testFMM fail is due to the use of an invalid iterator at src/DGtal/geometry/volumes/distance/FMM.ih:416
If erase() is called, 'it' becomes invalid and then we compare an invalid iterator with 'itEnd' I think that just switching the checks in the first 'if' solves the problem:
|
testChamferDT and testChamferVoro fails are due to several dereferences of out of range vector iterators. One error common to the two tests is at src/DGtal/geometry/volumes/distance/ChamferNorm2D.ih:288
If we have I don't understand the code enough to propose a patch. There is probably a check to add here... It seems there are other errors in tests/geometry/volumes/distance/testChamferDT.cpp, in testChamferSimple(), lines 120, 148, 163, where we have code like:
Here if We could add checks before these traces. But maybe these errors are related to the first one... |
testContourHelper fail is also due to an access to an out of range iterator. The error come from tests/geometry/testContourHelper.cpp:90
Here, if |
thx a lot @BorisMansencal for this very insightful details.. |
Ping @kerautret and @troussil on this one ;). I’ll hanlde the chamferDT |
@dcoeurjo yes I look it, and thanks @BorisMansencal for the details ;) |
testCubicalComplex, testVoxelComplex and testParDirCollapse fails seem all related to the same problem : comparison of iterators from different sequence at src/DGtal/topology/CubicalComplexFunctions.ih:180 and 185.
Here are the call stacks if it may help:
|
Thanks for the report. Ping @phcerdan |
That's interesting, @JacquesOlivierLachaud might have more insight as the implementor of CubicalComplexFunctions. I can have a look it too if @JacquesOlivierLachaud is out of time. Let me know! |
I just had a look. I see the potential error. I use d+1 different std::map<Cell,Value> to speed up cell look-up. |
I am not sure if there is a fix that keeps the same efficiency. I have to think about it. Here maximal faces can have any dimension, so the only fix I can think about is to make d+1 loops (one per dimension). |
Wait. Perhaps I can use an unitialized iterator and a boolean value. |
Currently, there are still 4 tests still failing (with Visual Studio Community 17, version 15.9.8, and Visual 19 preview, version 16.0.0 Preview 4.1 SVC1): Something I forgot to mention previously about Visual compilation: when configuring DGtal with ITK, DGtal needs to be configured with the same build type as ITK, otherwise configuration fails. But if ITK is built in Debug and DGtal in Release, I think we have the same problem. I build from the command line using the "Ninja" generator. For reference, here is the command line I use to be able to compile:
|
I have similar issues with following module failed by running RUN_TESTS: 96% tests passed, 8 tests failed out of 205 Compiler: Visual Studio Community 2015 Release x64 BTW, in order to compile with ITK without cpp11 error, I need to comment out |
Compilation of DGtal head fails on Windows 10 (1809) with Visual Studio Community 17 (15.9.5).
PR #1380 makes the code compile with Visual Studio (15.9.5).
It makes also the following tests pass :
testLongVol
testPNMReader
testVolReader
testGenericReader
testPNMRawWriter
testGenericWriter
In Release mode, the following 4 tests still fail:
testCloneAndAliases
testClone2
testVoxelComplex
testNeighborhoodConfigurations
In Debug mode, the code does not compile.
I get an error on tutorial-examples/shortcuts-geometry.cpp
error C1128 "number of sections exceeded object file format limit: compile with /bigobj".
The file has to be split or the CMakeLists.txt has to be changed to compile with /bigobj on Windows with Visual.
If I comment out some code in shortcults-geometry.cpp to make it compile, everything else compiles correctly.
However, 11 tests still fail:
testCloneAndAliases
testClone2
testContourHelper
testCombinFSS
testFMM
testChamferDT
testChamferVoro
testCubicalComplex
testVoxelComplex
testNeighborhoodConfigurations
testParDirCollapse
Visual Studio (15.9.5) seems to check more things regarding the STL use.
The compilation outputs some frightening error messages:
...
The text was updated successfully, but these errors were encountered: