ukoethe / vigra

a generic C++ library for image analysis
http://ukoethe.github.io/vigra/
Other
412 stars 192 forks source link

Testsuite error with gcc 7 #409

Open ametzler opened 7 years ago

ametzler commented 7 years ago

Hello,

vigra 1.11.1 has a testsuite error when built with gcc 7:

[ 37%] Linking CXX executable test_blockwisewatersheds cd /tmp/VIGRA/vigra-Version-1-11-1/obj/test/blockwisealgorithms && /usr/bin/cmake -E cmake_link_script CMakeFiles/test_blockwisewatersheds.dir/link.txt --verbose=1 /usr/lib/ccache/g++-7 -std=c++11 -pthread -W -Wall -Wextra -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -pipe -Wdate-time -D_FORTIFY_SOURCE=2 CMakeFiles/test_blockwisewatersheds.dir/test_watersheds.cxx.o CMakeFiles/test_blockwisewatersheds.dir/testsuccess.cxx.o -o test_blockwisewatersheds -rdynamic Running test_blockwisewatersheds cd /tmp/VIGRA/vigra-Version-1-11-1/obj/test/blockwisealgorithms && ./run_test_blockwisewatersheds.sh Entering test suite blockwise watershed test

Failure in BlockwiseWatershedTest::fourDimensionalRandomTest() Assertion failed: labeling not equivalent array shape: (1, 1, 1, 1) block shape: (2, 2, 2, 2) neighborhood: 0 data: 1 expected labels: 1 got 1 (/tmp/VIGRA/vigra-Version-1-11-1/test/blockwisealgorithms/test_watersheds.cxx:168)

1 of 3 tests failed in test suite blockwise watershed test Leaving test suite blockwise watershed test

test/blockwisealgorithms/CMakeFiles/test_blockwisewatersheds.dir/build.make:123: recipe for target 'test/blockwisealgorithms/test_blockwisewatersheds' failed make[3]: *** [test/blockwisealgorithms/test_blockwisewatersheds] Error 1

ukoethe commented 7 years ago

Thanks for reporting. The failure is probably signaled by the function equivalentLabels(). Can you locate more precisely which assertion fires, and at which point?

ametzler commented 7 years ago

Hello,

I am not sure what exactly you are looking. Error happens in test_watersheds.cxx in fourDimensionalRandomTest(). Adding some printf ... --- ./vigra-Version-1-11-1/test/blockwisealgorithms/test_watersheds.cxx 2017-05-19 17:01:08.000000000 +0200 +++ ./libvigraimpex-1.11.1/test/blockwisealgorithms/test_watersheds.cxx 2017-05-22 19:41:18.811468408 +0200 @@ -149,6 +149,8 @@ correct_labels.begin(), correct_labels.end())) { ostringstream oss;

... yields:

cd /tmp/VIGRA/libvigraimpex-1.11.1/obj/test/blockwisealgorithms && ./run_test_blockwisewatersheds.sh
i=[0] j=[1] k=[0]
testedln=[2] correctln=[1]
Entering test suite blockwise watershed test

Failure in BlockwiseWatershedTest::fourDimensionalRandomTest()
Assertion failed: labeling not equivalent
array shape: (1, 1, 1, 1)
block shape: (2, 2, 2, 2)
neighborhood: 0
data:
1
expected labels:
1
got
1
 (/tmp/VIGRA/libvigraimpex-1.11.1/test/blockwisealgorithms/test_watersheds.cxx:170)

1 of 3 tests failed in test suite blockwise watershed test
danstender commented 7 years ago

We have a build break on the reverse-dependency Saga with gcc7. This is from the buildlog: I haven't checked it deeper yet but this might be interesting in this context:

                 from /usr/include/vigra/edgedetection.hxx:46,
                 from vigra_edges.cpp:65:
/usr/include/vigra/imagecontainer.hxx:770:53: note:   mismatched types 'std::__cxx11::basic_stringbuf<_CharT, _Traits, _Alloc>' and 'int'
         std::swap(highestLevel_, other.highestLevel_);
                                                     ^
Makefile:539: recipe for target 'vigra_fft.lo' failed
make[7]: *** [vigra_fft.lo] Error 1
make[7]: *** Waiting for unfinished jobs....
Makefile:539: recipe for target 'vigra_smoothing.lo' failed
make[7]: *** [vigra_smoothing.lo] Error 1
In file included from /usr/include/vigra/random_forest_hdf5_impex.hxx:41:0,
                 from vigra_random_forest.cpp:73:
/usr/include/vigra/hdf5impex.hxx: In member function 'bool vigra::HDF5File::isOpen() const':
/usr/include/vigra/hdf5impex.hxx:615:10: note: candidate 1: bool vigra::HDF5HandleShared::operator!=(hid_t) const
     bool operator!=(hid_t h) const
          ^~~~~~~~
/usr/include/vigra/hdf5impex.hxx:1146:31: note: candidate 2: operator!=(hid_t {aka long int}, int) <built-in>
         return fileHandle_ != 0;
                               ^
Makefile:539: recipe for target 'vigra_watershed.lo' failed
make[7]: *** [vigra_watershed.lo] Error 1
ametzler commented 7 years ago

Daniel, how did you get the saga error? When trying to build saga against vigra 1.10 I get the ImagePyramid swap error fixed in vigra commit 18675a51fca27b324eb4e4b49593bcee9bc4535e. OTOH building saga 2.3.1 against vigra 1.11.1 simply succeeds for me.

danstender commented 7 years ago

That's coming from https://bugs.debian.org/853650 ...

ametzler commented 7 years ago

Okay, that is 1.10, i.e. the already fixed ImagePyramid::swap error.

ametzler commented 7 years ago

Hello,

with current vigra GIT head two tests fail: test_blockwiselabeling and test_blockwisewatersheds. Building test/blockwisealgorithms/test_labeling.cxx and test/blockwisealgorithms/test_watersheds.cxx with -O1 (instead of -O2) would let the tests succeed.

cu Andreas

danstender commented 7 years ago

Great! I've employed that, a new package is in the Git repo (Debian source).

ArchangeGabriel commented 6 years ago

I’m also seeing a test failure with GCC 7 in test_blockwiselabeling:

[ 15%] Linking CXX executable test_blockwiselabeling
Running test_blockwiselabeling
Entering test suite blockwise labeling test

Failure in BlockwiseLabelingTest::oneDimensionalRandomTest()
Assertion failed: labeling not equivalent
with background: true
array shape: (1)
block shape: (2)
neighborhood: 0
data: 
2 
expected_labels: 
1 
got
1 
 (/build/vigra/src/vigra-1.11.1/test/blockwisealgorithms/test_labeling.cxx:130)

1 of 5 tests failed in test suite blockwise labeling test
Leaving test suite blockwise labeling test

make[3]: *** [test/blockwisealgorithms/CMakeFiles/test_blockwiselabeling.dir/build.make:123: test/blockwisealgorithms/test_blockwiselabeling] Error 1
make[3]: *** Deleting file 'test/blockwisealgorithms/test_blockwiselabeling'
make[3]: Target 'test/blockwisealgorithms/CMakeFiles/test_blockwiselabeling.dir/build' not remade because of errors.
make[2]: *** [CMakeFiles/Makefile2:1509: test/blockwisealgorithms/CMakeFiles/test_blockwiselabeling.dir/all] Error 2
themaddoctor commented 6 years ago

I can confirm the error in blockwiselabeling with gcc 7.1.0:

Running tests... Test project /building/libreoffice/vigra-1.11.1/build Start 1: test_adjacency_list_graph 1/58 Test #1: test_adjacency_list_graph ........ Passed 0.00 sec Start 2: test_binary_forest 2/58 Test #2: test_binary_forest ............... Passed 0.00 sec Start 3: test_blockwiselabeling 3/58 Test #3: test_blockwiselabeling ...........***Failed 0.00 sec Start 4: test_blockwisewatersheds 4/58 Test #4: test_blockwisewatersheds ......... Passed 3.16 sec Start 5: test_blockwiseconvolution 5/58 Test #5: test_blockwiseconvolution ........ Passed 0.02 sec Start 6: test_classifier 6/58 Test #6: test_classifier .................. Passed 25.87 sec Start 7: classifier_speed_comparison 7/58 Test #7: classifier_speed_comparison ...... Passed 2.18 sec Start 8: test_colorspaces 8/58 Test #8: test_colorspaces ................. Passed 0.00 sec Start 9: test_convolution 9/58 Test #9: test_convolution ................. Passed 0.77 sec Start 10: test_coordinateiterator 10/58 Test #10: test_coordinateiterator .......... Passed 0.00 sec Start 11: test_correlation 11/58 Test #11: test_correlation ................. Passed 0.01 sec Start 12: test_counting_iterator 12/58 Test #12: test_counting_iterator ........... Passed 0.00 sec Start 13: test_delegates 13/58 Test #13: test_delegates ................... Passed 0.00 sec Start 14: test_error 14/58 Test #14: test_error ....................... Passed 0.00 sec Start 15: test_features 15/58 Test #15: test_features .................... Passed 0.05 sec Start 16: test_filter_iterator 16/58 Test #16: test_filter_iterator ............. Passed 0.00 sec Start 17: test_filters 17/58 Test #17: test_filters ..................... Passed 0.06 sec Start 18: test_fourier 18/58 Test #18: test_fourier ..................... Passed 0.13 sec Start 19: test_functorexpression 19/58 Test #19: test_functorexpression ........... Passed 0.00 sec Start 20: test_graph_algorithm 20/58 Test #20: test_graph_algorithm ............. Passed 0.00 sec Start 21: test_gridgraph 21/58 Test #21: test_gridgraph ................... Passed 0.09 sec Start 22: test_gridgraph_LEMON 22/58 Test #22: test_gridgraph_LEMON ............. Passed 0.09 sec Start 23: test_hdf5impex 23/58 Test #23: test_hdf5impex ................... Passed 0.35 sec Start 24: test_image 24/58 Test #24: test_image ....................... Passed 0.01 sec Start 25: test_imgproc 25/58 Test #25: test_imgproc ..................... Passed 0.14 sec Start 26: test_impex 26/58 Test #26: test_impex ....................... Passed 0.12 sec Start 27: test_integral_image 27/58 Test #27: test_integral_image .............. Passed 0.01 sec Start 28: test_math 28/58 Test #28: test_math ........................ Passed 0.09 sec Start 29: test_merge_graph_adaptor 29/58 Test #29: test_merge_graph_adaptor ......... Passed 0.00 sec Start 30: test_morphology 30/58 Test #30: test_morphology .................. Passed 0.00 sec Start 31: test_multiarray 31/58 Test #31: test_multiarray .................. Passed 0.13 sec Start 32: test_multiarray_chunked 32/58 Test #32: test_multiarray_chunked .......... Passed 24.04 sec Start 33: test_multiconvolution 33/58 Test #33: test_multiconvolution ............ Passed 8.02 sec Start 34: test_multiconvolution_speed 34/58 Test #34: test_multiconvolution_speed ...... Passed 0.15 sec Start 35: test_multidistance 35/58 Test #35: test_multidistance ............... Passed 0.72 sec Start 36: test_multimorphology 36/58 Test #36: test_multimorphology ............. Passed 0.01 sec Start 37: test_objectfeatures 37/58 Test #37: test_objectfeatures .............. Passed 0.00 sec Start 38: test_objectfeatures_lemon 38/58 Test #38: test_objectfeatures_lemon ........ Passed 0.01 sec Start 39: test_stand_alone_acc_chain 39/58 Test #39: test_stand_alone_acc_chain ....... Passed 0.00 sec Start 40: test_optimization 40/58 Test #40: test_optimization ................ Passed 0.63 sec Start 41: test_permutation 41/58 Test #41: test_permutation ................. Passed 0.00 sec Start 42: test_pixeltypes 42/58 Test #42: test_pixeltypes .................. Passed 0.00 sec Start 43: test_polygon 43/58 Test #43: test_polygon ..................... Passed 0.01 sec Start 44: test_polytope 44/58 Test #44: test_polytope .................... Passed 0.02 sec Start 45: test_random_forest_new 45/58 Test #45: test_random_forest_new ........... Passed 0.34 sec Start 46: test_registration 46/58 Test #46: test_registration ................ Passed 14.80 sec Start 47: test_sampler 47/58 Test #47: test_sampler ..................... Passed 0.03 sec Start 48: test_seededRegionGrowing3d 48/58 Test #48: test_seededRegionGrowing3d ....... Passed 0.01 sec Start 49: test_sifImport 49/58 Test #49: test_sifImport ................... Passed 0.01 sec Start 50: test_simpleanalysis 50/58 Test #50: test_simpleanalysis .............. Passed 0.16 sec Start 51: test_slic2d 51/58 Test #51: test_slic2d ...................... Passed 0.05 sec Start 52: test_tensorimaging 52/58 Test #52: test_tensorimaging ............... Passed 0.67 sec Start 53: test_threadpool 53/58 Test #53: test_threadpool .................. Passed 1.16 sec Start 54: test_unsupervised 54/58 Test #54: test_unsupervised ................ Passed 0.31 sec Start 55: test_utilities 55/58 Test #55: test_utilities ................... Passed 0.02 sec Start 56: test_volumelabeling 56/58 Test #56: test_volumelabeling .............. Passed 0.01 sec Start 57: test_voxelneighborhood 57/58 Test #57: test_voxelneighborhood ........... Passed 0.01 sec Start 58: test_watersheds3d 58/58 Test #58: test_watersheds3d ................ Passed 1.37 sec

98% tests passed, 1 tests failed out of 58

Total Test time (real) = 85.92 sec

The following tests FAILED: 3 - test_blockwiselabeling (Failed)

themaddoctor commented 6 years ago

Still fails for me with -O1