-
Notifications
You must be signed in to change notification settings - Fork 191
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
Windows compilation error with MSVC >= 14.28 #525
Comments
Looks like on cf even the python 3.11 vigra package is built with MSVC |
this will indirectly force 14.1 toolset when building, otherwise there is a standing issue with 14.2 (VS2019). xref: ref: ukoethe#525
this will indirectly force 14.1 toolset when building, otherwise there is a standing issue with 14.2 (VS2019). xref: ref: ukoethe#525
chatgpt says to look at the usage of https://github.com/ukoethe/vigra/blob/master/vigranumpy/src/core/segmentation.cxx#L1176 It says that |
i'm somewhat confused, but it feel like the iterators are defined in: vigra/include/vigra/multi_array.hxx Line 755 in 502d5bc
|
bummer, when I saw you recompiling I had the vague memory of fixing this - but apparently I haven't :/ |
I think we have to introduce cbegin and cend |
Problem remains also with VS2022, see conda-forge/vigra-feedstock#129 |
@a-detiste if you have any ideas here that would be great to see! |
I think i finally figured it out. The MultiArrayView needs to implement the dereferencing pointer for the #573 passes, but breaks the call to |
I've been tracking compilation issues with VS2019 compilers (I was using
14.29
, but I've found that the problem was most likely introduced in MSVC14.28
.I haven't found a solution (yet) but also don't want to forget everything the next time I get to it (or someone else looks into it).
The symptom:
following compilation error:
in the end the error occurs in MSVC STL:
algorithm(6928): error C3892: '_First': you cannot assign to a variable that is const
more details here, note I shortened the paths a little for readability:
I found a discussion related to the above error here: https://developercommunity.visualstudio.com/t/VS2019-1684---c-const-issue:-error-C/1320890#T-N1325280
Bottom line seems to be that the vigra iterator implementation is "wrong" and de-referencing a const iterator should not return a const reference.
I followed the trail a bit to
vigra/include/vigra/multi_iterator.hxx
Lines 312 to 315 in 574de57
and
vigra/include/vigra/multi_iterator_coupled.hxx
Lines 661 to 666 in 574de57
, and finally to
vigra/include/vigra/multi_handle.hxx
Lines 932 to 940 in 574de57
.
As far as I understand the problem, the solution should be removing the const from the returned reference. However, I didn't manage to do it in a way that would compile.
The text was updated successfully, but these errors were encountered: