plstcharles / litiv

C++ implementation pool for computer vision R&D projects.
http://www.polymtl.ca/litiv/en/
Other
101 stars 30 forks source link

Build fails on pragma with GCC 6.2.1 #6

Closed tvdstaaij closed 8 years ago

tvdstaaij commented 8 years ago

Attempted to build without any bells or whistles:

$ mkdir build
$ cd build
$ cmake ..
$ make

But fails with:

[ 46%] Building CXX object modules/datasets/CMakeFiles/litiv_datasets.dir/src/impl/BSDS500.cpp.o
/tmp/build/litiv/modules/datasets/src/impl/BSDS500.cpp:42:32: error: ‘-pedantic-errors’ is not an option that controls warnings [-Werror=pragmas]
 #pragma GCC diagnostic ignored "-pedantic-errors"
                                ^~~~~~~~~~~~~~~~~~
compilation terminated due to -Wfatal-errors.
cc1plus: all warnings being treated as errors
make[2]: *** [modules/datasets/CMakeFiles/litiv_datasets.dir/build.make:159: modules/datasets/CMakeFiles/litiv_datasets.dir/src/impl/BSDS500.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:219: modules/datasets/CMakeFiles/litiv_datasets.dir/all] Error 2
make: *** [Makefile:128: all] Error 2
plstcharles commented 8 years ago

Hmm, that's interesting, it seems that in 6.2, GCC no longer allows '-pedantic-errors' to be temporarily pushed away along with other warnings. In this case, it doesn't really matter, as pedantic errors are no longer found in the BSDS500 3rd party includes (I must have cleaned them up a while ago). Or at least, I just built without the offending line, and it works with GCC 5.4.

I'll be pushing a new version (1.3) of the framework probably this afternoon with some major refactoring to the datasets module; I'll include a fix for this at the same time.

Thanks for reporting!

tvdstaaij commented 8 years ago

Great! Build works for me now.