neutronimaging / imagingsuite

Sources for imaging related tools
GNU General Public License v3.0
18 stars 9 forks source link

Build failure on Linux #705

Open vlocateli opened 6 days ago

vlocateli commented 6 days ago

Uppon running conan I get this:

FAILED: core/kipl/UnitTests/tLogging/CMakeFiles/tLogging.dir/tst_logging.cpp.o 
/usr/bin/c++ -DARMA_DONT_USE_ARPACK -DARMA_DONT_USE_ATLAS -DARMA_DONT_USE_SUPERLU -DARMA_DONT_USE_WRAPPER -DARMA_NO_DEBUG -DARMA_USE_BLAS -DARMA_USE_HDF5 -DARMA_USE_LAPACK -DIMGSUITE_VERSION=\"v4.4.2-71-g71c5e2e5\" -DQT_CORE_LIB -DQT_NO_DEBUG -DQT_TESTCASE_BUILDDIR=\"/home/victor/Documents/git/build-imagingsuite/Release/core/kipl/UnitTests/tLogging\" -DQT_TESTCASE_SOURCEDIR=\"/home/victor/Documents/git/imagingsuite/core/kipl/UnitTests/tLogging\" -DQT_TESTLIB_LIB -DVERSION=\"v4.4.2-71-g71c5e2e5\" -I/home/victor/Documents/git/build-imagingsuite/Release/core/kipl/UnitTests/tLogging -I/home/victor/Documents/git/imagingsuite/core/kipl/UnitTests/tLogging -I/home/victor/Documents/git/build-imagingsuite/Release/core/kipl/UnitTests/tLogging/tLogging_autogen/include -I/home/victor/Documents/git/imagingsuite/core/kipl/UnitTests/tLogging/../../kipl/include -isystem /usr/include/x86_64-linux-gnu/qt6/QtTest -isystem /usr/include/x86_64-linux-gnu/qt6 -isystem /usr/include/x86_64-linux-gnu/qt6/QtCore -isystem /usr/lib/x86_64-linux-gnu/qt6/mkspecs/linux-g++ -isystem /home/victor/.conan2/p/libxmaad11bb541103/p/include -isystem /home/victor/.conan2/p/libxmaad11bb541103/p/include/libxml2 -isystem /home/victor/.conan2/p/libicfabc069649a0c/p/include -isystem /home/victor/.conan2/p/zlib94980e21071ae/p/include -isystem /home/victor/.conan2/p/libtiead1bfcb34a8d/p/include -isystem /home/victor/.conan2/p/cfitsbbab7ca9247ef/p/include -isystem /home/victor/.conan2/p/openb8ecd93e6ce652/p/include -isystem /home/victor/.conan2/p/openb8ecd93e6ce652/p/include/openblas -isystem /home/victor/.conan2/p/armad1133983a13e6d/p/include -isystem /home/victor/.conan2/p/fftwc06f0f88fc474/p/include -m64 -fno-omit-frame-pointer -O3 -DNDEBUG -std=c++17 -Wall -Wextra -Wpedantic -Wunused -Wshadow -Winit-self -Wpointer-arith -Woverloaded-virtual -Wold-style-cast -Wcast-qual -Wcast-align -fno-operator-names -fPIC -fopenmp -MD -MT core/kipl/UnitTests/tLogging/CMakeFiles/tLogging.dir/tst_logging.cpp.o -MF core/kipl/UnitTests/tLogging/CMakeFiles/tLogging.dir/tst_logging.cpp.o.d -o core/kipl/UnitTests/tLogging/CMakeFiles/tLogging.dir/tst_logging.cpp.o -c /home/victor/Documents/git/imagingsuite/core/kipl/UnitTests/tLogging/tst_logging.cpp
/home/victor/Documents/git/imagingsuite/core/kipl/UnitTests/tLogging/tst_logging.cpp: In member function ‘void LoggingTests::testLogStreamWriter()’:
/home/victor/Documents/git/imagingsuite/core/kipl/UnitTests/tLogging/tst_logging.cpp:76:55: error: expected primary-expression before ‘,’ token
   76 |     QVERIFY_THROWS_EXCEPTION(kipl::base::KiplException, kipl::logging::LogStreamWriter badlw("sdfsdfsdfsfsg/dsfs.log"));
      |                                                       ^
/home/victor/Documents/git/imagingsuite/core/kipl/UnitTests/tLogging/tst_logging.cpp:76:88: error: expected primary-expression before ‘badlw’
   76 |     QVERIFY_THROWS_EXCEPTION(kipl::base::KiplException, kipl::logging::LogStreamWriter badlw("sdfsdfsdfsfsg/dsfs.log"));
      |                                                                                        ^~~~~
/home/victor/Documents/git/imagingsuite/core/kipl/UnitTests/tLogging/tst_logging.cpp:76:5: error: ‘QVERIFY_THROWS_EXCEPTION’ was not declared in this scope
   76 |     QVERIFY_THROWS_EXCEPTION(kipl::base::KiplException, kipl::logging::LogStreamWriter badlw("sdfsdfsdfsfsg/dsfs.log"));
      |     ^~~~~~~~~~~~~~~~~~~~~~~~
[272/423] Building CXX object core/kipl/UnitTests/tkiplfilters/CMakeFiles/tkiplfilters.dir/tst_kiplfilters.cpp.o
In file included from /home/victor/.conan2/p/armad1133983a13e6d/p/include/armadillo:112,
                 from /home/victor/Documents/git/imagingsuite/core/kipl/UnitTests/tkiplfilters/../../kipl/include/filters/core/savitzkygolayfilter.hpp:9,
                 from /home/victor/Documents/git/imagingsuite/core/kipl/UnitTests/tkiplfilters/../../kipl/include/filters/savitzkygolayfilter.h:54,
                 from /home/victor/Documents/git/imagingsuite/core/kipl/UnitTests/tkiplfilters/tst_kiplfilters.cpp:7:

This happens because there's only the type in the macro, if I put the variable e.g. excep

QVERIFY_THROWS_EXCEPTION(kipl::base::KiplException excep, kipl::logging::LogStreamWriter badlw("sdfsdfsdfsfsg/dsfs.log"));

it stops this error, but this error occurs in other locations where this macro appears.

all occurences (grep -nr "QVERIFY_THROWS_EXCEPTION" .):

./core/algorithms/UnitTests/tImagingAlgorithms/tst_testImagingAlgorithms.cpp:126:    QVERIFY_THROWS_EXCEPTION(kipl::base::KiplException, cleaner.setConnectivity(kipl::base::conn6));
./core/algorithms/UnitTests/tImagingAlgorithms/tst_testImagingAlgorithms.cpp:127:    QVERIFY_THROWS_EXCEPTION(kipl::base::KiplException, cleaner.setConnectivity(kipl::base::conn18));
./core/algorithms/UnitTests/tImagingAlgorithms/tst_testImagingAlgorithms.cpp:128:    QVERIFY_THROWS_EXCEPTION(kipl::base::KiplException, cleaner.setConnectivity(kipl::base::conn26));
./core/algorithms/UnitTests/tImagingAlgorithms/tst_testImagingAlgorithms.cpp:233:    QVERIFY_THROWS_EXCEPTION(kipl::base::KiplException, string2enum("qwerty",mdm));
./core/algorithms/UnitTests/tImagingAlgorithms/tst_testImagingAlgorithms.cpp:525:    QVERIFY_THROWS_EXCEPTION(ImagingException, pf.setFilter(ImagingAlgorithms::ProjectionFilterButterworth,1.0f,3.0f));
./core/algorithms/UnitTests/tImagingAlgorithms/tst_testImagingAlgorithms.cpp:526:    QVERIFY_THROWS_EXCEPTION(ImagingException, pf.setFilter(ImagingAlgorithms::ProjectionFilterButterworth,-1.0f,3.0f));
./core/algorithms/UnitTests/tImagingAlgorithms/tst_testImagingAlgorithms.cpp:587:   QVERIFY_THROWS_EXCEPTION(ImagingException,sf.checkDims(dims));
./core/algorithms/UnitTests/tImagingAlgorithms/tst_testImagingAlgorithms.cpp:589:   QVERIFY_THROWS_EXCEPTION(ImagingException,sf.checkDims(dims));
./core/algorithms/UnitTests/tImagingAlgorithms/tst_testImagingAlgorithms.cpp:591:   QVERIFY_THROWS_EXCEPTION(ImagingException,sf.checkDims(dims));
./core/algorithms/UnitTests/tImagingAlgorithms/tst_testImagingAlgorithms.cpp:604:   QVERIFY_THROWS_EXCEPTION(ImagingException,sf2.checkDims(dims));
./core/algorithms/UnitTests/tImagingAlgorithms/tst_testImagingAlgorithms.cpp:606:   QVERIFY_THROWS_EXCEPTION(ImagingException,sf2.checkDims(dims));
./core/algorithms/UnitTests/tImagingAlgorithms/tst_testImagingAlgorithms.cpp:608:   QVERIFY_THROWS_EXCEPTION(ImagingException,sf2.checkDims(dims));
./core/algorithms/UnitTests/tImagingAlgorithms/tst_testImagingAlgorithms.cpp:647:    QVERIFY_THROWS_EXCEPTION(ImagingException,enum2string(em));
./core/algorithms/UnitTests/tImagingAlgorithms/tst_testImagingAlgorithms.cpp:648:    QVERIFY_THROWS_EXCEPTION(ImagingException,string2enum("flipfolp",em));
./core/algorithms/UnitTests/tImagingAlgorithms/tst_testImagingAlgorithms.cpp:666:        QVERIFY_THROWS_EXCEPTION(ImagingException,enum2string(em));
./core/algorithms/UnitTests/tImagingAlgorithms/tst_testImagingAlgorithms.cpp:667:        QVERIFY_THROWS_EXCEPTION(ImagingException,string2enum("flipfolp",em));
./core/algorithms/UnitTests/tImagingAlgorithms/tst_testImagingAlgorithms.cpp:683:        QVERIFY_THROWS_EXCEPTION(ImagingException,enum2string(em));
./core/algorithms/UnitTests/tImagingAlgorithms/tst_testImagingAlgorithms.cpp:684:        QVERIFY_THROWS_EXCEPTION(ImagingException,string2enum("flipfolp",em));
./core/modules/UnitTests/tReaderConfig/tst_treaderconfigtest.cpp:100:    QVERIFY_THROWS_EXCEPTION(kipl::base::KiplException,{string2enum("xyz",et);});
./core/modules/UnitTests/tReaderConfig/tst_treaderconfigtest.cpp:115:    QVERIFY_THROWS_EXCEPTION(kipl::base::KiplException,{enum2string(static_cast<readers::eExtensionTypes>(999));});
./core/modules/UnitTests/tReaderConfig/tst_treaderconfigtest.cpp:279:     QVERIFY_THROWS_EXCEPTION(ReaderException,reader.imageSize("dfgdgdfbvxssrgsxdf.fits"));
./core/modules/UnitTests/tReaderConfig/tst_treaderconfigtest.cpp:322:    QVERIFY_THROWS_EXCEPTION(ReaderException,{
./core/modules/UnitTests/tReaderConfig/tst_treaderconfigtest.cpp:372:    QVERIFY_THROWS_EXCEPTION(ReaderException,{ CheckFolders(path1,false); });
./core/modules/UnitTests/tModuleConfig/tst_configbasetest.cpp:152:    QVERIFY_THROWS_EXCEPTION(ModuleException, config.EvalArg(arg,group,var,value));
./core/modules/UnitTests/tModuleConfig/tst_configbasetest.cpp:156:    QVERIFY_THROWS_EXCEPTION(ModuleException, config.EvalArg(arg,group,var,value));
./core/kipl/UnitTests/tKIPLbaseTImage/tst_tkiplbasetimagetest.cpp:93:    QVERIFY_THROWS_EXCEPTION(kipl::base::KiplException,kipl::base::core::buffer<float> c(100000000000000UL));
./core/kipl/UnitTests/tKIPLbaseTImage/tst_tkiplbasetimagetest.cpp:115:    QVERIFY_THROWS_EXCEPTION(kipl::base::KiplException,img1D.Size(1));
./core/kipl/UnitTests/tKIPLbaseTImage/tst_tkiplbasetimagetest.cpp:122:    QVERIFY_THROWS_EXCEPTION(kipl::base::KiplException,img2D.Size(2));
./core/kipl/UnitTests/tKIPLbaseTImage/tst_tkiplbasetimagetest.cpp:130:    QVERIFY_THROWS_EXCEPTION(kipl::base::KiplException,img3D.Size(3));
./core/kipl/UnitTests/tKIPLMathFunctions/tst_MathFunctions.cpp:225:    QVERIFY_THROWS_EXCEPTION(std::runtime_error, kipl::math::entropy(vec));
./core/kipl/UnitTests/tkiplbasetest/tst_kiplbase.cpp:765:    QVERIFY_THROWS_EXCEPTION(kipl::base::KiplException,string2enum("OSMacos",oe));
./core/kipl/UnitTests/tkiplbasetest/tst_kiplbase.cpp:789:    QVERIFY_THROWS_EXCEPTION(kipl::base::KiplException,string2enum("RotationDirectionclockwise",oe));
./core/kipl/UnitTests/tKIPL_IO/tst_kipl_io.cpp:103:    QVERIFY_THROWS_EXCEPTION( kipl::base::KiplException, kipl::io::ReadTIFF(img,fname,roi3,0));
./core/kipl/UnitTests/tKIPL_IO/tst_kipl_io.cpp:106:    QVERIFY_THROWS_EXCEPTION(kipl::base::KiplException,kipl::io::ReadTIFF(img,fname,roi4,0));
./core/kipl/UnitTests/tLogging/tst_logging.cpp:76:    QVERIFY_THROWS_EXCEPTION(kipl::base::KiplException, kipl::logging::LogStreamWriter badlw("sdfsdfsdfsfsg/dsfs.log"));
anderskaestner commented 6 days ago

Pull latest master branch. I merged many branches since yesterday. They all compiled n the build server.

A few tests still fail.

Sent from my iPhone

On 26 Jun 2024, at 19:14, Victor Locateli @.***> wrote:



Assigned #705https://github.com/neutronimaging/imagingsuite/issues/705 to @anderskaestnerhttps://github.com/anderskaestner.

— Reply to this email directly, view it on GitHubhttps://github.com/neutronimaging/imagingsuite/issues/705#event-13301806523, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACVIDXG3FOJUD2LUMXKSMQLZJLZI3AVCNFSM6AAAAABJ6J7GQWVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJTGMYDCOBQGY2TEMY. You are receiving this because you were assigned.Message ID: @.***>

vlocateli commented 6 days ago

I did: git pull origin master

From github.com:neutronimaging/imagingsuite
 * branch              master     -> FETCH_HEAD
Already up to date.

I get the same error.

anderskaestner commented 6 days ago

I see… which Qt version do you use?

I fixed Qt depreciation warnings and there is a difference between 6.2 and 6.5

Install Qt 6.5.3 and change the QTPATH variable to the new version.


Paul Scherrer Institute Dr. Anders Kaestner Scientist, Applied Materials Group Laboratory for Neutron Scattering and Imaging (LNS) WBBA 110 CH-5232 Villigen PSI Switzerland

Phone: +41 56 310 42 86 Fax: +41 56 310 31 31 email: @.*** web: http://www.psi.ch/lns http://www.psi.ch/niag

On 27 Jun 2024, at 01:54, Victor Locateli @.***> wrote:

I did: git pull origin master

From github.com:neutronimaging/imagingsuite

I get the same error.

— Reply to this email directly, view it on GitHubhttps://github.com/neutronimaging/imagingsuite/issues/705#issuecomment-2192806883, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACVIDXE5EXWJDDYORL6JMI3ZJNIDXAVCNFSM6AAAAABJ6J7GQWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJSHAYDMOBYGM. You are receiving this because you were mentioned.Message ID: @.***>

vlocateli commented 6 days ago

Ok. Mine is 6.2.4. I'll update.

vlocateli commented 3 days ago

Ok. I updated to 6.7.1 but I needed to change to a rolling-release distribution (Manjaro), since Kubuntu is an older version and the chance of updating QT and breaking everything is gigantic... I could make it conan run, the only problem is I get an error at line 232 of file lambdaest.h, it doesn't have an operator = for when compiling with operands:

std::vector<long int>

and

std::vector<std::pair<float, long unsigned int>>
232:/home/victor/Documents/git/imagingsuite/core/algorithms/pyadvancedfilters/../AdvancedFilters/lambdaest.h:184:27: error: no match for ‘operator=’ (operand
types are ‘std::vector<long int>’ and ‘std::vector<std::pair<float, long unsigned int> >’) 
anderskaestner commented 3 days ago

I'll look into it. A fix will come with the next cleanup issue. You can follow issue #706.

anderskaestner commented 2 days ago

You can try now.