noaa-ocs-modeling / CoastalApp

CoastalApp will be deprecated. Please switch to https://github.com/oceanmodeling/ufs-coastal . CoastalApp is a NUOPC application implemented following UFS best practices to couple coastal ocean models and other domains (Sea Ice, Atmosphere, Wave, Inland Hydrology, ...)
https://github.com/oceanmodeling/ufs-coastal
Creative Commons Zero v1.0 Universal
13 stars 32 forks source link

GKlib fails to build on gnu systems #130

Open platipodium opened 2 years ago

platipodium commented 2 years ago

Generally, it is now preferred to build these libraries outside of CoastalApp. There is, however, the option to include the build with the --thirdparty option to ./build.sh.

On strand (linux), I get

In file included from /gpfs/home/lemmen/devel/noaa/CoastalApp/thirdparty_open/parmetis/GKlib/./GKlib.h:41:0,
                 from /gpfs/home/lemmen/devel/noaa/CoastalApp/thirdparty_open/parmetis/GKlib/string.c:21:
/usr/include/signal.h:156:29: error: unknown type name ‘siginfo_t’
 extern void psiginfo (const siginfo_t *__pinfo, const char *__s);

On quoll., I get (M1 with gcc12/openmpi toolchain)

/opt/local/bin/gcc  -I/Users/Lemmen/devel/noaa/CoastalApp/thirdparty_open/parmetis/GKlib/. -I/Users/Lemmen/devel/noaa/CoastalApp/thirdparty_open/parmetis/GKlib/test -falign-functions=8 -DLINUX -D_FILE_OFFSET_BITS=64 -std=c99 -fno-strict-aliasing -march=native -fPIC -Werror -Wall -pedantic -Wno-unused-function -Wno-unused-but-set-variable -Wno-unused-variable -Wno-unknown-pragmas -Wno-unused-label -DNDEBUG -DNDEBUG2 -DHAVE_EXECINFO_H -DHAVE_GETLINE -O3 -arch arm64 -isysroot /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk -MD -MT CMakeFiles/GKlib.dir/graph.c.o -MF CMakeFiles/GKlib.dir/graph.c.o.d -o CMakeFiles/GKlib.dir/graph.c.o -c /Users/Lemmen/devel/noaa/CoastalApp/thirdparty_open/parmetis/GKlib/graph.c
/Users/Lemmen/devel/noaa/CoastalApp/thirdparty_open/parmetis/GKlib/graph.c: In function 'gk_graph_Read':
/Users/Lemmen/devel/noaa/CoastalApp/thirdparty_open/parmetis/GKlib/graph.c:297:26: error: format '%lld' expects argument of type 'long long int *', but argument 3 has type 'ssize_t *' {aka 'long int *'} [-Werror=format=]
  297 |         if (fscanf(fpin, "%"SCNd64" %"SCNd64, &i, &i) != 2)
      |                          ^~~                  ~~
      |                                               |
      |                                               ssize_t * {aka long int *}
platipodium commented 1 year ago

This is fixed on Ubuntu with the develop_build branch. But not yet on quoll, strand not tested, see #139 and #138