Closed sharon-tickell closed 10 months ago
What gcc version does Debian 12 come with? EMS compliance is 10.x at the moment, I think 11.x is okay but hasn't been qualified for anything newer
@frizwi : https://packages.debian.org/search?searchon=names&keywords=gcc
Debian 12 (bookworm) comes with gcc 12.2 at the moment, while Debian 11 (bullseye) is on 10.2. There is a gcc-11 package for bookworm, but it appears that gcc-10 is no longer available.
RECOM2 needs a python 3.11 base image, which can be Debian 11 or 12, but Debian 11 is old enough that it tends to raise a bunch of red flags for unpatched libraries with security scans: we'd really like to upgrade if we can, but not being able to build EMS (or trust that it has been tested) will be the showstopper for that if it's not actually supported.
For Ubuntu-flavours: 20.04 (focal) has 9.3 by default, with 10.5 installable and 22.04 (Jammy) has 11.2 by default and 10.5 still installable.
@frizwi : FYI I also note that according to the gcc site at https://gcc.gnu.org/, the supported gcc releases are currently 13.2, 12.3 and 11.4 - notably v10.x is not in that list
Fixed in latest. Now 11.x compliant. Have opened up EMS-248 in our internal bitbucket to address dynamic linking issue with gcc 12.x
I am attempting to build ems v1.5.0 on Debian 12 with all of the latest hdf5 and netcdf libraries for use in RECOM2. With the combination of dependencies specified in this Dockerfile, the build fails due to a conflict between the
min
andmax
macros defined inemsmath.h
and the macros of the same names defined instl_algobase.h
from the standard libraries.I've can provide a complete build log if that's needed, but the critical bits are:
(note: same error with the unwrapped gcc as for mpicc)
The macros in
emsmath.h
are only conditionally defined, but unfortunatelyemsmath.h
is @included byems.h
before anything includes the standard library, so theemsmath.h
versions with an incorrect number of arguments win.Adding
#include <math.h>
to the top ofemsmath.h
so that the standard library macros get defined first appears to be enough to resolve this issue and allow the build to succeed.