GEOS-DEV / thirdPartyLibs

Repository to build the GEOSX third party libraries
3 stars 12 forks source link

Compilation error with gcc-7 #5

Closed klevzoff closed 6 years ago

klevzoff commented 6 years ago

System: Ubuntu 18.04, gcc-7.3.0

When building latest master branch, the following error occurs:

In file included from /usr/lib/gcc/x86_64-linux-gnu/7/include-fixed/limits.h:194:0,
                 from /usr/lib/gcc/x86_64-linux-gnu/7/include-fixed/syslimits.h:7,
                 from /usr/lib/gcc/x86_64-linux-gnu/7/include-fixed/limits.h:34,
                 from /home/klevtsov/work/geosx/thirdPartyLibs/install-default-release/hdf5/include/H5public.h:41,
                 from /home/klevtsov/work/geosx/thirdPartyLibs/install-default-release/hdf5/include/hdf5.h:22,
                 from /home/klevtsov/work/geosx/thirdPartyLibs/build-default-release/axom/src/axom-build/include/sidre/Group.hpp:44,
                 from /home/klevtsov/work/geosx/thirdPartyLibs/build-default-release/axom/src/axom/src/components/sidre/src/spio/IOManager.hpp:35,
                 from /home/klevtsov/work/geosx/thirdPartyLibs/build-default-release/axom/src/axom/src/components/sidre/src/spio/IOManager.cpp:19:
/home/klevtsov/work/geosx/thirdPartyLibs/build-default-release/axom/src/axom-build/include/fmt/format.h: In member function ‘void fmt::internal::ArgFormatterBase<Impl, Char>::visit_char(int)’:
/home/klevtsov/work/geosx/thirdPartyLibs/build-default-release/axom/src/axom-build/include/fmt/format.h:1888:20: error: expected unqualified-id before numeric constant
     const unsigned CHAR_WIDTH = 1;
                    ^

Some searching reveals this was fixed in late 2016: https://github.com/fmtlib/fmt/issues/398 Any chance we can update or hotpatch the offending library?

I was able to build without errors earlier, but I guess that was before axom was added. I can live with previously built TPLs for now.

white238 commented 6 years ago

You can untar axom and fix apply the fix then retar it. I can fix it on Axom's end but I will be unable to test it since I don't have access to your system and it doesn't reproduce on mine. The problem is (at least I think) CHAR_WIDTH is defined in some system header for you but not for most other platforms.

klevzoff commented 6 years ago

Looks like Axom has been updated, and this is now resolved.