From 01c590ea8c04af3571f0bbd066e4eb848fdbe9b4 Mon Sep 17 00:00:00 2001 From: akrherz Date: Tue, 3 Mar 2026 14:44:55 -0600 Subject: [PATCH 01/34] Add dfmfrq to Makefile closes #173 --- gempak/source/diaglib/df/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/gempak/source/diaglib/df/Makefile b/gempak/source/diaglib/df/Makefile index 9f29b1a0d..75e1d5d17 100644 --- a/gempak/source/diaglib/df/Makefile +++ b/gempak/source/diaglib/df/Makefile @@ -67,6 +67,7 @@ COBJS = \ $(ALIB)(dflt.o) \ $(ALIB)(dfmask.o) \ $(ALIB)(dfmass.o) \ + $(ALIB)(dfmfrq.o) \ $(ALIB)(dfmiss.o) \ $(ALIB)(dfmixr.o) \ $(ALIB)(dfmul.o) \ From ee66e4df573fe0e1f46ca186fe71da22bca9a3df Mon Sep 17 00:00:00 2001 From: akrherz Date: Tue, 3 Mar 2026 14:48:23 -0600 Subject: [PATCH 02/34] Add dependabot GHA config --- .github/dependabot.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..24e71cdbb --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,12 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "monthly" + labels: + - "Bot" + groups: + github-actions: + patterns: + - '*' From 3ff8d3de205300de01bf5923cddaef865cdeac73 Mon Sep 17 00:00:00 2001 From: akrherz Date: Tue, 3 Mar 2026 14:52:40 -0600 Subject: [PATCH 03/34] CI: update to build on Alma Linux 9+10 --- .github/workflows/main.yml | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index def9499be..055305b2f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -7,7 +7,7 @@ jobs: name: Build Ubuntu runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: build run: | @@ -21,22 +21,18 @@ jobs: make all build: - name: Build Centos (${{ matrix.OS_VERSION }}) + name: Build Alma Linux (${{ matrix.OS_VERSION }}) runs-on: ubuntu-latest strategy: matrix: - OS_VERSION: ["7", "stream8"] + OS_VERSION: ["9", "10"] env: OS_VERSION: ${{ matrix.OS_VERSION }} - OS_TYPE: "centos" + OS_TYPE: "almalinux" steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: build run: | - echo 'DOCKER_OPTS="-H tcp://127.0.0.1:2375 -H unix:///var/run/docker.sock -s devicemapper"' | sudo tee /etc/default/docker > /dev/null - sudo service docker restart - sleep 5 - sudo docker pull quay.io/centos/${OS_TYPE}:${OS_VERSION} + sudo docker pull quay.io/almalinuxorg/${OS_VERSION}-base build/setup.sh ${OS_TYPE} ${OS_VERSION} - From ceb80aadfb13f89c3b8953f1c5dae2a31539af08 Mon Sep 17 00:00:00 2001 From: akrherz Date: Tue, 3 Mar 2026 15:06:42 -0600 Subject: [PATCH 04/34] bld: replace centos with almalinux (for now) --- build/{build_centos.sh => build_almalinux.sh} | 3 +- build/setup.sh | 31 +++++++++++++------ 2 files changed, 22 insertions(+), 12 deletions(-) rename build/{build_centos.sh => build_almalinux.sh} (91%) diff --git a/build/build_centos.sh b/build/build_almalinux.sh similarity index 91% rename from build/build_centos.sh rename to build/build_almalinux.sh index ac2c28f72..c2d343354 100755 --- a/build/build_centos.sh +++ b/build/build_almalinux.sh @@ -1,7 +1,6 @@ #!/bin/sh -xe -# runs on centos7, so no dnf -yum -y -q install make gcc-gfortran git rpm-build byacc flex libX11-devel libXext libXft-devel libXp-devel libXt-devel libXtst-devel openmotif-devel xorg-x11-xbitmaps autoconf libtool automake +dnf -y -q install make gcc-gfortran git rpm-build byacc flex libX11-devel libXext libXft-devel libXp-devel libXt-devel libXtst-devel openmotif-devel xorg-x11-xbitmaps autoconf libtool automake useradd gempak diff --git a/build/setup.sh b/build/setup.sh index e9838c5d4..21e6f854e 100755 --- a/build/setup.sh +++ b/build/setup.sh @@ -1,7 +1,6 @@ #!/bin/sh -xe -# ./setup.sh centos 7 -# ./setup.sh centos stream8 -# ./setup.sh centos stream9 +# ./setup.sh almalinux 9 +# ./setup.sh almalinux 10 # ./setup.sh fedora latest # ./setup.sh ubuntu latest @@ -9,19 +8,26 @@ os_type=$1 os_version=$2 TAG=${os_type}${os_version} +if [ -z "$os_type" ] || [ -z "$os_version" ]; then + echo "Usage: $0 " >&2 + exit 2 +fi + # Run builds in Container if [ "$os_type" = "dev" ]; then - - # sudo docker run --entrypoint=/bin/bash --privileged -d -ti -e "container=docker" -v /awips2/repo/${dn}:/awips2/repo/${dn} $imgname:$imgvers-$os_version - sudo docker run -v `pwd`:/gempak:rw unidata/gempak-devel:centos6 /bin/bash -c "bash -xe /gempak/build/build_dev.sh" -elif [ "$os_type" = "centos" ]; then + # sudo docker run --entrypoint=/bin/bash --privileged -d -ti -e "container=docker" -v /awips2/repo/${dn}:/awips2/repo/${dn} $imgname:$imgvers-$os_version + sudo docker run -v `pwd`:/gempak:rw unidata/gempak-devel:centos6 /bin/bash -c "bash -xe /gempak/build/build_dev.sh" + +elif [ "$os_type" = "almalinux" ]; then - sudo docker run --privileged -d -ti -e "container=docker" -v `pwd`:/gempak:rw quay.io/centos/centos:$os_version /bin/bash - DOCKER_CONTAINER_ID=$(sudo docker ps | grep ${os_version} | awk '{print $1}' | head -1 ) + CONTAINER_IMAGE=quay.io/almalinuxorg/${os_version}-base + BUILD_SCRIPT=build_almalinux.sh + + DOCKER_CONTAINER_ID=$(sudo docker run --privileged -d -ti -e "container=docker" -v `pwd`:/gempak:rw $CONTAINER_IMAGE /bin/bash) sudo docker logs $DOCKER_CONTAINER_ID - sudo docker exec --tty $DOCKER_CONTAINER_ID /bin/bash -xec "bash -xe /gempak/build/build_${os_type}.sh ${os_version}"; + sudo docker exec --tty $DOCKER_CONTAINER_ID /bin/bash -xec "bash -xe /gempak/build/${BUILD_SCRIPT} ${os_version}"; sudo docker ps -a sudo docker stop $DOCKER_CONTAINER_ID sudo docker rm -v $DOCKER_CONTAINER_ID @@ -34,4 +40,9 @@ elif [ "$os_type" = "fedora" ]; then sudo docker run --rm=true -v `pwd`:/gempak:rw unidata/gempak-devel:$os_type /bin/bash -c "bash -xe /gempak/build/build_${os_type}.sh" +else + + echo "Unsupported os_type '$os_type'. Expected one of: dev, almalinux, ubuntu, fedora." >&2 + exit 2 + fi From f1e4e04e0a3655817f72af954f5720e73411478b Mon Sep 17 00:00:00 2001 From: akrherz Date: Tue, 3 Mar 2026 15:08:33 -0600 Subject: [PATCH 05/34] update script to python3 --- scripts/decoder/xml2gairm4nmap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/decoder/xml2gairm4nmap.py b/scripts/decoder/xml2gairm4nmap.py index 01a21ab97..77165d7be 100755 --- a/scripts/decoder/xml2gairm4nmap.py +++ b/scripts/decoder/xml2gairm4nmap.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 from __future__ import print_function import argparse From 3491b1cc30d1061d52e46b1374ad50292a3347fd Mon Sep 17 00:00:00 2001 From: akrherz Date: Tue, 3 Mar 2026 21:05:43 -0600 Subject: [PATCH 06/34] add pdmfrq to Makefile --- gempak/source/diaglib/pd/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/gempak/source/diaglib/pd/Makefile b/gempak/source/diaglib/pd/Makefile index 12c7fadff..bbdb735c1 100644 --- a/gempak/source/diaglib/pd/Makefile +++ b/gempak/source/diaglib/pd/Makefile @@ -22,6 +22,7 @@ COBJS = \ $(ALIB)(pdinmm.o) \ $(ALIB)(pdkinx.o) \ $(ALIB)(pdknms.o) \ + $(ALIB)(pdmfrq.o) \ $(ALIB)(pdmixr.o) \ $(ALIB)(pdmmin.o) \ $(ALIB)(pdmskn.o) \ From 587c844546353c3847f5a433bd916a74d0679db0 Mon Sep 17 00:00:00 2001 From: akrherz Date: Tue, 3 Mar 2026 21:06:26 -0600 Subject: [PATCH 07/34] Punt on Alma Linux 10 for the moment --- .github/workflows/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 055305b2f..bcbb57d41 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -25,7 +25,8 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - OS_VERSION: ["9", "10"] + # TODO 10 libXp-devel openmotif-devel xorg-x11-xbitmaps + OS_VERSION: ["9"] env: OS_VERSION: ${{ matrix.OS_VERSION }} OS_TYPE: "almalinux" From 989e1c2b27271061755c36d9352cafe271ca2cdf Mon Sep 17 00:00:00 2001 From: akrherz Date: Tue, 3 Mar 2026 21:53:13 -0600 Subject: [PATCH 08/34] Exit on more (not all yet) make errors --- CHANGELOG.md | 5 +++++ Makefile | 6 +++--- gempak/Makefile | 10 +++++----- gempak/source/Makefile | 8 ++++---- 4 files changed, 17 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7146ac1e3..cd88d0f03 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ # Unidata Community GEMPAK Change Log +## Unreleased Version + +- Previously when building, `make` errors would not error the build. This will + be changing going forward so to prevent broken builds. The year is 2026. + ## 7.20.0 (16 Jan 2026) This release merges NCEP NAWIPS 7.20.0. diff --git a/Makefile b/Makefile index ee98a7b6d..2ec8e1974 100644 --- a/Makefile +++ b/Makefile @@ -71,7 +71,7 @@ install : INSTALLDIRS NODIR) ;; \ *) if [ -d $$dir ]; then \ (cd $$dir; echo "Making $@ in `pwd`" ; \ - $(MAKE) $(MFLAGS) $@) ; \ + $(MAKE) $(MFLAGS) $@) || exit $$?; \ else \ echo "Skipping $$dir"; \ fi; \ @@ -85,7 +85,7 @@ install : INSTALLDIRS NODIR) ;; \ *) if [ -d $$dir ]; then \ (cd $$dir; echo "Making $@ in `pwd`" ; \ - $(MAKE) $(MFLAGS) $@) ; \ + $(MAKE) $(MFLAGS) $@) || exit $$?; \ else \ echo "Skipping $$dir"; \ fi; \ @@ -101,7 +101,7 @@ clean: NODIR) ;; \ *) if [ -d $$dir ]; then \ (cd $$dir; echo "Making $@ in `pwd`" ; \ - $(MAKE) $(MFLAGS) $@) ; \ + $(MAKE) $(MFLAGS) $@) || exit $$?; \ else \ echo "Skipping $$dir"; \ fi; \ diff --git a/gempak/Makefile b/gempak/Makefile index d3c5a44a5..fb4eb49bc 100644 --- a/gempak/Makefile +++ b/gempak/Makefile @@ -15,7 +15,7 @@ all : case $$dir in \ NODIR) ;; \ *) (cd $$dir; echo -n "making in " ; \ - pwd ; $(MAKE) $(MFLAGS) $@) ;; \ + pwd ; $(MAKE) $(MFLAGS) $@) || exit $$? ;; \ esac ; \ done @@ -24,7 +24,7 @@ programs_nc : case $$dir in \ NODIR) ;; \ *) (cd $$dir; echo -n "making programs_nc in " ; \ - pwd ; $(MAKE) $(MFLAGS) $@) ;; \ + pwd ; $(MAKE) $(MFLAGS) $@) || exit $$? ;; \ esac ; \ done @@ -33,7 +33,7 @@ programs_gf : case $$dir in \ NODIR) ;; \ *) (cd $$dir; echo -n "making programs_gf in " ; \ - pwd ; $(MAKE) $(MFLAGS) $@) ;; \ + pwd ; $(MAKE) $(MFLAGS) $@) || exit $$? ;; \ esac ; \ done @@ -44,7 +44,7 @@ FORCEinstall : case $$dir in \ NODIR) ;; \ *) (cd $$dir; echo -n "installing in " ; \ - pwd ; $(MAKE) $(MFLAGS) install) ;; \ + pwd ; $(MAKE) $(MFLAGS) install) || exit $$? ;; \ esac ; \ done @@ -53,7 +53,7 @@ clean: case $$dir in \ NODIR) ;; \ *) (cd $$dir; echo -n "making clean in " ; \ - pwd ; $(MAKE) $(MFLAGS) $@) ;; \ + pwd ; $(MAKE) $(MFLAGS) $@) || exit $$? ;; \ esac ; \ done diff --git a/gempak/source/Makefile b/gempak/source/Makefile index 148ceb5a1..b12edca00 100644 --- a/gempak/source/Makefile +++ b/gempak/source/Makefile @@ -40,7 +40,7 @@ all : case $$dir in \ NODIR) ;; \ *) (cd $$dir; echo -n "making in " ; \ - pwd ; $(MAKE) $(MFLAGS) $@) ;; \ + pwd ; $(MAKE) $(MFLAGS) $@) || exit $$? ;; \ esac ; \ done \ ;;\ @@ -49,7 +49,7 @@ all : case $$dir in \ NODIR) ;; \ *) (cd $$dir; echo "Making $@ in `pwd`" ; \ - $(MAKE) $(MFLAGS) $@) ;; \ + $(MAKE) $(MFLAGS) $@) || exit $$? ;; \ esac ; \ done \ ;; \ @@ -68,7 +68,7 @@ install: case $$dir in \ NODIR) ;; \ *) (cd $$dir; echo -n "installing in " ; \ - pwd ; $(MAKE) $(MFLAGS) $@) ;; \ + pwd ; $(MAKE) $(MFLAGS) $@) || exit $$? ;; \ esac ; \ done @@ -77,7 +77,7 @@ clean: case $$dir in \ NODIR) ;; \ *) (cd $$dir; echo -n "making clean in " ; \ - pwd ; $(MAKE) $(MFLAGS) $@) ;; \ + pwd ; $(MAKE) $(MFLAGS) $@) || exit $$? ;; \ esac ; \ done From 0145baa1b0086d2ac781478a95f81b48d3faa1c9 Mon Sep 17 00:00:00 2001 From: akrherz Date: Tue, 3 Mar 2026 22:09:29 -0600 Subject: [PATCH 09/34] Use required flags for gfortran on ubuntu --- config/Makeinc.linux64_gfortran_ubuntu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/Makeinc.linux64_gfortran_ubuntu b/config/Makeinc.linux64_gfortran_ubuntu index 358dd4501..fc0fe50f5 100644 --- a/config/Makeinc.linux64_gfortran_ubuntu +++ b/config/Makeinc.linux64_gfortran_ubuntu @@ -9,7 +9,7 @@ MOTIFINC = -I/usr/X11R6/include XWINCDIR = -I/usr/X11R6/include COPT = -fno-stack-protector -DUNDERSCORE -D$(OPSYS) $(GEMINC) $(MOTIFINC) $(PYINC) $(WITHPY) -DG_64BIT -g -O2 -FOPT = -fno-stack-protector -fno-second-underscore -fno-range-check -fd-lines-as-comments $(GEMINC) -g -O +FOPT = -fno-stack-protector -fno-second-underscore -fno-range-check -fd-lines-as-comments -fallow-invalid-boz -fallow-argument-mismatch $(GEMINC) -g -O NCII = "-I../libsrc" NCOPT = "CPPFLAGS=-DNDEBUG -Df2cFortran -I$(OS_INC)" "FFLAGS=-O -Wno-globals" "CFLAGS=-O $(NCII)" "CXX= " JASPEROPT = 'CC=$(CC)' 'CFLAGS=-O' '--disable-libjpeg' From 4a2e4758146b4b4883c5e5df5b6c338b6d8619c4 Mon Sep 17 00:00:00 2001 From: akrherz Date: Tue, 3 Mar 2026 22:12:30 -0600 Subject: [PATCH 10/34] Support system provided libxml2 and libxslt --- gempak/source/contrib/awc/airmet_bufrvgf/Makefile | 4 +++- gempak/source/contrib/awc/airmet_vgfbufr/Makefile | 4 +++- gempak/source/gemlib/da/Makefile | 4 +++- gempak/source/textlib/xml/Makefile | 5 ++++- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/gempak/source/contrib/awc/airmet_bufrvgf/Makefile b/gempak/source/contrib/awc/airmet_bufrvgf/Makefile index 64d350bcc..ebc989440 100644 --- a/gempak/source/contrib/awc/airmet_bufrvgf/Makefile +++ b/gempak/source/contrib/awc/airmet_bufrvgf/Makefile @@ -38,13 +38,15 @@ LIBINC = \ .PRECIOUS: $(ALIB) +XML2_CFLAGS = $(shell xml2-config --cflags 2>/dev/null || pkg-config --cflags libxml-2.0 2>/dev/null) + CFLAGS = $(COPT) $(BUFRFLAGS) \ -DDEBUG_PRINT=1 \ -DFNOC_KLUDGE=0 \ -DIGNORE_NESTING=1 \ -DMEMORY_DEBUG=0 \ -DTRACE_PRINT=1 \ - -I$(OS_INC)/libxml2 + -I$(OS_INC)/libxml2 $(XML2_CFLAGS) all : $(ALIB) $(PROG) diff --git a/gempak/source/contrib/awc/airmet_vgfbufr/Makefile b/gempak/source/contrib/awc/airmet_vgfbufr/Makefile index abb2b6782..519ecfee4 100644 --- a/gempak/source/contrib/awc/airmet_vgfbufr/Makefile +++ b/gempak/source/contrib/awc/airmet_vgfbufr/Makefile @@ -36,13 +36,15 @@ LIBINC = \ .PRECIOUS: $(ALIB) +XML2_CFLAGS = $(shell xml2-config --cflags 2>/dev/null || pkg-config --cflags libxml-2.0 2>/dev/null) + CFLAGS = $(COPT) $(BUFRFLAGS) \ -DDEBUG_PRINT=1 \ -DFNOC_KLUDGE=0 \ -DIGNORE_NESTING=1 \ -DMEMORY_DEBUG=0 \ -DTRACE_PRINT=1 \ - -I$(OS_INC)/libxml2 + -I$(OS_INC)/libxml2 $(XML2_CFLAGS) all : $(ALIB) $(PROG) diff --git a/gempak/source/gemlib/da/Makefile b/gempak/source/gemlib/da/Makefile index 894c5e875..f7fc0a4da 100644 --- a/gempak/source/gemlib/da/Makefile +++ b/gempak/source/gemlib/da/Makefile @@ -7,7 +7,9 @@ include $(CONFIGDIR)/$(MAKEINC) ALIB = $(GEMLIB) -CFLAGS += -I$(OS_INC)/libxml2 +XML2_CFLAGS = $(shell xml2-config --cflags 2>/dev/null || pkg-config --cflags libxml-2.0 2>/dev/null) + +CFLAGS += -I$(OS_INC)/libxml2 $(XML2_CFLAGS) COBJS = \ $(ALIB)(dagetdtc.o) \ diff --git a/gempak/source/textlib/xml/Makefile b/gempak/source/textlib/xml/Makefile index 31129d164..f8b99e56c 100644 --- a/gempak/source/textlib/xml/Makefile +++ b/gempak/source/textlib/xml/Makefile @@ -18,7 +18,10 @@ COBJS = \ GDIR = xml -CFLAGS = $(COPT) -I$(OS_INC)/libxslt -I$(OS_INC)/libxml2 +XML2_CFLAGS = $(shell xml2-config --cflags 2>/dev/null || pkg-config --cflags libxml-2.0 2>/dev/null) +XSLT_CFLAGS = $(shell xslt-config --cflags 2>/dev/null || pkg-config --cflags libxslt 2>/dev/null) + +CFLAGS = $(COPT) -I$(OS_INC)/libxslt -I$(OS_INC)/libxml2 $(XML2_CFLAGS) $(XSLT_CFLAGS) .PRECIOUS: $(ALIB) From d2dceb958e0204844ca4e4f6d492d825f8bbd6d6 Mon Sep 17 00:00:00 2001 From: akrherz Date: Tue, 3 Mar 2026 22:26:47 -0600 Subject: [PATCH 11/34] Add almalinux build rpms libxml2-devel libxslt-devel --- build/build_almalinux.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/build_almalinux.sh b/build/build_almalinux.sh index c2d343354..28cabeae6 100755 --- a/build/build_almalinux.sh +++ b/build/build_almalinux.sh @@ -1,6 +1,6 @@ #!/bin/sh -xe -dnf -y -q install make gcc-gfortran git rpm-build byacc flex libX11-devel libXext libXft-devel libXp-devel libXt-devel libXtst-devel openmotif-devel xorg-x11-xbitmaps autoconf libtool automake +dnf -y -q install make gcc-gfortran git rpm-build byacc flex libX11-devel libXext libXft-devel libXp-devel libXt-devel libXtst-devel openmotif-devel xorg-x11-xbitmaps autoconf libtool automake libxml2-devel libxslt-devel useradd gempak From 20d3f6975b36db277eb7b5d21a3c966f4c370c2a Mon Sep 17 00:00:00 2001 From: akrherz Date: Tue, 3 Mar 2026 22:32:08 -0600 Subject: [PATCH 12/34] CI: run make install for ubuntu --- .github/workflows/main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bcbb57d41..9057bf082 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,6 +11,7 @@ jobs: - name: build run: | + set -e -x sudo apt-get update sudo apt install gcc build-essential libx11-dev libxt-dev libxext-dev libxft-dev libxtst-dev sudo apt install flex byacc libmotif-common libmotif-dev libxpm4 libxpm-dev @@ -19,6 +20,7 @@ jobs: rm -f config/Makeinc.linux64_gfortran ln -s `pwd`/config/Makeinc.linux64_gfortran_ubuntu config/Makeinc.linux64_gfortran make all + make install build: name: Build Alma Linux (${{ matrix.OS_VERSION }}) From 4ed00e81e20753daee96c7d825be6a1d1e734d87 Mon Sep 17 00:00:00 2001 From: akrherz Date: Tue, 3 Mar 2026 22:33:09 -0600 Subject: [PATCH 13/34] Add Makefile stubs for gempak/utilities/tca2xml --- gempak/utilities/tca2xml/Makefile | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 gempak/utilities/tca2xml/Makefile diff --git a/gempak/utilities/tca2xml/Makefile b/gempak/utilities/tca2xml/Makefile new file mode 100644 index 000000000..b9707b434 --- /dev/null +++ b/gempak/utilities/tca2xml/Makefile @@ -0,0 +1,8 @@ +all: + @echo "Nothing to make for tca2xml" + +install: + @echo "Nothing to install for tca2xml" + +clean: + @echo "Nothing to clean for tca2xml" From a3eebfe14997daecef5b35f9add372d4c1a06870 Mon Sep 17 00:00:00 2001 From: akrherz Date: Tue, 3 Mar 2026 22:54:36 -0600 Subject: [PATCH 14/34] YOLO: trim extlib jobs --- extlibs/Makefile | 8 -------- 1 file changed, 8 deletions(-) diff --git a/extlibs/Makefile b/extlibs/Makefile index 11f533f1f..e8b58bffe 100644 --- a/extlibs/Makefile +++ b/extlibs/Makefile @@ -6,19 +6,11 @@ include $(CONFIGDIR)/$(MAKEINC) SUBDIRS = \ - zlib \ - PNG \ - bzip2 \ - HDF5 \ GPC \ AODT \ melBUFR \ ncepBUFR \ - netCDF \ OHSHEF \ - xml2 \ - xslt \ - JasPer \ NDFD \ SHAPE \ GAMET \ From fe18a3cab30405d97bd1c400a4ac34bd93ebba01 Mon Sep 17 00:00:00 2001 From: akrherz Date: Tue, 3 Mar 2026 22:55:09 -0600 Subject: [PATCH 15/34] rpm build needs extlibs step --- build/Installer.gempak/fedora.spec | 1 + build/Installer.gempak/gempak.spec | 1 + 2 files changed, 2 insertions(+) diff --git a/build/Installer.gempak/fedora.spec b/build/Installer.gempak/fedora.spec index ec4f2213b..c97cdd8f0 100644 --- a/build/Installer.gempak/fedora.spec +++ b/build/Installer.gempak/fedora.spec @@ -54,6 +54,7 @@ rm -rf Makeinc.linux64_gfortran ln -s Makeinc.linux64_gfortran_fedora Makeinc.linux64_gfortran popd +make extlibs #>& make.extlibs make gempak #>& make.gempak make install >& /dev/null make programs_gf >& /dev/null diff --git a/build/Installer.gempak/gempak.spec b/build/Installer.gempak/gempak.spec index cf9ec90b2..5c5766b8a 100644 --- a/build/Installer.gempak/gempak.spec +++ b/build/Installer.gempak/gempak.spec @@ -48,6 +48,7 @@ cat source_python.sh cat source_python.sh >> build/Installer.gempak/Gemenviron.profile . build/Installer.gempak/Gemenviron.profile # TODO: ". source_python.sh" doesn't seem to work from spec file +make extlibs #>& make.extlibs make gempak #>& make.gempak make install >& /dev/null make programs_gf >& /dev/null From ac49d87cda0b22cf240de3653f5600f8e9d7347f Mon Sep 17 00:00:00 2001 From: akrherz Date: Tue, 3 Mar 2026 22:55:23 -0600 Subject: [PATCH 16/34] Patch for newer libpng support --- gempak/source/driver/active/png/xclosp.c | 2 ++ gempak/source/driver/active/png/xpng.c | 2 +- gempak/source/programs/gd/gd2img/writepng.c | 2 +- gempak/source/programs/upc/programs/nex2gini/writepng.c | 2 +- gempak/source/programs/upc/programs/nexrcomp/writepng.c | 2 +- 5 files changed, 6 insertions(+), 4 deletions(-) diff --git a/gempak/source/driver/active/png/xclosp.c b/gempak/source/driver/active/png/xclosp.c index 755739a38..00293948a 100644 --- a/gempak/source/driver/active/png/xclosp.c +++ b/gempak/source/driver/active/png/xclosp.c @@ -2,6 +2,8 @@ #include "gemprm.h" #include "xwcmn.h" +void xwrpng ( int *iret ); + void xclosp ( int *ixsize, int *iysize, int *ncurwn, int *iret ) /************************************************************************ diff --git a/gempak/source/driver/active/png/xpng.c b/gempak/source/driver/active/png/xpng.c index df6180a2c..f6fd223c2 100644 --- a/gempak/source/driver/active/png/xpng.c +++ b/gempak/source/driver/active/png/xpng.c @@ -35,7 +35,7 @@ if (!winfo_ptr) return (-1); } -if (setjmp(write_ptr->jmpbuf)) +if (setjmp(png_jmpbuf(write_ptr))) { png_destroy_write_struct(&write_ptr, &winfo_ptr); return (-2); diff --git a/gempak/source/programs/gd/gd2img/writepng.c b/gempak/source/programs/gd/gd2img/writepng.c index bcb67342b..3103f75f3 100644 --- a/gempak/source/programs/gd/gd2img/writepng.c +++ b/gempak/source/programs/gd/gd2img/writepng.c @@ -91,7 +91,7 @@ if(!giniinfo_ptr) return; } -if(setjmp(ginipng_ptr->jmpbuf)) +if(setjmp(png_jmpbuf(ginipng_ptr))) { png_destroy_write_struct(&ginipng_ptr,&giniinfo_ptr); return; diff --git a/gempak/source/programs/upc/programs/nex2gini/writepng.c b/gempak/source/programs/upc/programs/nex2gini/writepng.c index 1aa5fae47..42cf84227 100644 --- a/gempak/source/programs/upc/programs/nex2gini/writepng.c +++ b/gempak/source/programs/upc/programs/nex2gini/writepng.c @@ -86,7 +86,7 @@ if(!giniinfo_ptr) return; } -if(setjmp(ginipng_ptr->jmpbuf)) +if(setjmp(png_jmpbuf(ginipng_ptr))) { png_destroy_write_struct(&ginipng_ptr,&giniinfo_ptr); return; diff --git a/gempak/source/programs/upc/programs/nexrcomp/writepng.c b/gempak/source/programs/upc/programs/nexrcomp/writepng.c index 1aa5fae47..42cf84227 100644 --- a/gempak/source/programs/upc/programs/nexrcomp/writepng.c +++ b/gempak/source/programs/upc/programs/nexrcomp/writepng.c @@ -86,7 +86,7 @@ if(!giniinfo_ptr) return; } -if(setjmp(ginipng_ptr->jmpbuf)) +if(setjmp(png_jmpbuf(ginipng_ptr))) { png_destroy_write_struct(&ginipng_ptr,&giniinfo_ptr); return; From 35642c0d1f970e1c649c4f09ec7040c8ce4b5a74 Mon Sep 17 00:00:00 2001 From: akrherz Date: Tue, 3 Mar 2026 23:05:47 -0600 Subject: [PATCH 17/34] Revert "YOLO: trim extlib jobs" This reverts commit a3eebfe14997daecef5b35f9add372d4c1a06870. --- extlibs/Makefile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/extlibs/Makefile b/extlibs/Makefile index e8b58bffe..11f533f1f 100644 --- a/extlibs/Makefile +++ b/extlibs/Makefile @@ -6,11 +6,19 @@ include $(CONFIGDIR)/$(MAKEINC) SUBDIRS = \ + zlib \ + PNG \ + bzip2 \ + HDF5 \ GPC \ AODT \ melBUFR \ ncepBUFR \ + netCDF \ OHSHEF \ + xml2 \ + xslt \ + JasPer \ NDFD \ SHAPE \ GAMET \ From bb689fb7a24dc4118008168b265b9469240ec11a Mon Sep 17 00:00:00 2001 From: akrherz Date: Tue, 3 Mar 2026 23:06:22 -0600 Subject: [PATCH 18/34] Fix python path issues --- source_python.sh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/source_python.sh b/source_python.sh index 6509a52e4..30f2e7f3b 100644 --- a/source_python.sh +++ b/source_python.sh @@ -7,8 +7,18 @@ if [ -d "/awips2/python" ]; then pv="`${PYHOME}/bin/python -V 2>&1 | cut -c8- | cut -d. -f1`" pr="`${PYHOME}/bin/python -V 2>&1 | cut -c8- | cut -d. -f2`" export PYTHONPATH="${PYHOME}/lib/python${pv}.${pr}/site-packages:${NAWIPS}/scripts/python" + export PYINC="-I${PYHOME}/include/python${pv}.${pr}" + export PYLIB="-lpython${pv}.${pr}" + export WITHPY="-DWITHPYTHON" + export PYDEP="-lpthread -ldl -lutil" + export LDFLAGS="-L${PYHOME}/lib -L$OS_LIB -s" else export PYTHONPATH="${NAWIPS}/scripts/python:${PYTHONPATH}" + export PYINC="" + export PYLIB="" + export WITHPY="" + export PYDEP="" + export LDFLAGS="-L$OS_LIB -s" fi if [ ! -d $NAWIPS ] ; then @@ -18,8 +28,3 @@ if [ ! -d $NAWIPS ] ; then exit fi -export PYINC="-I${PYHOME}/include/python${pv}.${pr}" -export PYLIB="-lpython${pv}.${pr}" -export WITHPY="-DWITHPYTHON" -export PYDEP="-lpthread -ldl -lutil" -export LDFLAGS="-L${PYHOME}/lib -L$OS_LIB -s" From 9f41295af9c2b974cd8318b5889b41336f13ea60 Mon Sep 17 00:00:00 2001 From: akrherz Date: Tue, 3 Mar 2026 23:20:02 -0600 Subject: [PATCH 19/34] add gcc-c++ for almalinux build --- build/build_almalinux.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/build_almalinux.sh b/build/build_almalinux.sh index 28cabeae6..8f63fbf1a 100755 --- a/build/build_almalinux.sh +++ b/build/build_almalinux.sh @@ -1,6 +1,6 @@ #!/bin/sh -xe -dnf -y -q install make gcc-gfortran git rpm-build byacc flex libX11-devel libXext libXft-devel libXp-devel libXt-devel libXtst-devel openmotif-devel xorg-x11-xbitmaps autoconf libtool automake libxml2-devel libxslt-devel +dnf -y -q install make gcc-gfortran gcc-c++ git rpm-build byacc flex libX11-devel libXext libXft-devel libXp-devel libXt-devel libXtst-devel openmotif-devel xorg-x11-xbitmaps autoconf libtool automake libxml2-devel libxslt-devel useradd gempak From b5920f07ed322d9b8a7e3b029996259f138f2532 Mon Sep 17 00:00:00 2001 From: akrherz Date: Tue, 3 Mar 2026 23:20:21 -0600 Subject: [PATCH 20/34] Revert "Patch for newer libpng support" This reverts commit ac49d87cda0b22cf240de3653f5600f8e9d7347f. --- gempak/source/driver/active/png/xclosp.c | 2 -- gempak/source/driver/active/png/xpng.c | 2 +- gempak/source/programs/gd/gd2img/writepng.c | 2 +- gempak/source/programs/upc/programs/nex2gini/writepng.c | 2 +- gempak/source/programs/upc/programs/nexrcomp/writepng.c | 2 +- 5 files changed, 4 insertions(+), 6 deletions(-) diff --git a/gempak/source/driver/active/png/xclosp.c b/gempak/source/driver/active/png/xclosp.c index 00293948a..755739a38 100644 --- a/gempak/source/driver/active/png/xclosp.c +++ b/gempak/source/driver/active/png/xclosp.c @@ -2,8 +2,6 @@ #include "gemprm.h" #include "xwcmn.h" -void xwrpng ( int *iret ); - void xclosp ( int *ixsize, int *iysize, int *ncurwn, int *iret ) /************************************************************************ diff --git a/gempak/source/driver/active/png/xpng.c b/gempak/source/driver/active/png/xpng.c index f6fd223c2..df6180a2c 100644 --- a/gempak/source/driver/active/png/xpng.c +++ b/gempak/source/driver/active/png/xpng.c @@ -35,7 +35,7 @@ if (!winfo_ptr) return (-1); } -if (setjmp(png_jmpbuf(write_ptr))) +if (setjmp(write_ptr->jmpbuf)) { png_destroy_write_struct(&write_ptr, &winfo_ptr); return (-2); diff --git a/gempak/source/programs/gd/gd2img/writepng.c b/gempak/source/programs/gd/gd2img/writepng.c index 3103f75f3..bcb67342b 100644 --- a/gempak/source/programs/gd/gd2img/writepng.c +++ b/gempak/source/programs/gd/gd2img/writepng.c @@ -91,7 +91,7 @@ if(!giniinfo_ptr) return; } -if(setjmp(png_jmpbuf(ginipng_ptr))) +if(setjmp(ginipng_ptr->jmpbuf)) { png_destroy_write_struct(&ginipng_ptr,&giniinfo_ptr); return; diff --git a/gempak/source/programs/upc/programs/nex2gini/writepng.c b/gempak/source/programs/upc/programs/nex2gini/writepng.c index 42cf84227..1aa5fae47 100644 --- a/gempak/source/programs/upc/programs/nex2gini/writepng.c +++ b/gempak/source/programs/upc/programs/nex2gini/writepng.c @@ -86,7 +86,7 @@ if(!giniinfo_ptr) return; } -if(setjmp(png_jmpbuf(ginipng_ptr))) +if(setjmp(ginipng_ptr->jmpbuf)) { png_destroy_write_struct(&ginipng_ptr,&giniinfo_ptr); return; diff --git a/gempak/source/programs/upc/programs/nexrcomp/writepng.c b/gempak/source/programs/upc/programs/nexrcomp/writepng.c index 42cf84227..1aa5fae47 100644 --- a/gempak/source/programs/upc/programs/nexrcomp/writepng.c +++ b/gempak/source/programs/upc/programs/nexrcomp/writepng.c @@ -86,7 +86,7 @@ if(!giniinfo_ptr) return; } -if(setjmp(png_jmpbuf(ginipng_ptr))) +if(setjmp(ginipng_ptr->jmpbuf)) { png_destroy_write_struct(&ginipng_ptr,&giniinfo_ptr); return; From 73f502402e18019b55fe23ccad0892946ea53f0e Mon Sep 17 00:00:00 2001 From: akrherz Date: Wed, 4 Mar 2026 05:59:29 -0600 Subject: [PATCH 21/34] Arm programs subdir Makefiles to exit on error --- gempak/source/programs/dc/Makefile | 6 +++--- gempak/source/programs/gd/Makefile | 10 +++++----- gempak/source/programs/gp/Makefile | 10 +++++----- gempak/source/programs/gui/Makefile | 6 +++--- gempak/source/programs/na/Makefile | 6 +++--- gempak/source/programs/oa/Makefile | 6 +++--- gempak/source/programs/sf/Makefile | 10 +++++----- gempak/source/programs/sn/Makefile | 10 +++++----- gempak/source/programs/util/Makefile | 6 +++--- 9 files changed, 35 insertions(+), 35 deletions(-) diff --git a/gempak/source/programs/dc/Makefile b/gempak/source/programs/dc/Makefile index 49ba2c6dd..11d77b4cb 100644 --- a/gempak/source/programs/dc/Makefile +++ b/gempak/source/programs/dc/Makefile @@ -58,7 +58,7 @@ all : case $$dir in \ NODIR) ;; \ *) (cd $$dir; echo -n "making in " ; \ - pwd ; $(MAKE) $(MFLAGS) $@) ;; \ + pwd ; $(MAKE) $(MFLAGS) $@) || exit $$? ;; \ esac ; \ done @@ -74,7 +74,7 @@ install: case $$dir in \ NODIR) ;; \ *) (cd $$dir; echo -n "installing in " ; \ - pwd ; $(MAKE) $(MFLAGS) $@) ;; \ + pwd ; $(MAKE) $(MFLAGS) $@) || exit $$? ;; \ esac ; \ done @@ -83,7 +83,7 @@ clean: case $$dir in \ NODIR) ;; \ *) (cd $$dir; echo -n "making clean in " ; \ - pwd ; $(MAKE) $(MFLAGS) $@) ;; \ + pwd ; $(MAKE) $(MFLAGS) $@) || exit $$? ;; \ esac ; \ done diff --git a/gempak/source/programs/gd/Makefile b/gempak/source/programs/gd/Makefile index e905928c4..f0b99a58c 100644 --- a/gempak/source/programs/gd/Makefile +++ b/gempak/source/programs/gd/Makefile @@ -50,7 +50,7 @@ all : case $$dir in \ NODIR) ;; \ *) (cd $$dir; echo -n "making in " ; \ - pwd ; $(MAKE) $(MFLAGS) $@) ;; \ + pwd ; $(MAKE) $(MFLAGS) $@) || exit $$? ;; \ esac ; \ done @@ -60,7 +60,7 @@ programs_nc: case $$dir in \ NODIR) ;; \ *) (cd $$dir; echo -n "making programs_nc in " ; \ - pwd ; $(MAKE) $(MFLAGS) $@) ;; \ + pwd ; $(MAKE) $(MFLAGS) $@) || exit $$? ;; \ esac ; \ done @@ -69,7 +69,7 @@ programs_gf: case $$dir in \ NODIR) ;; \ *) (cd $$dir; echo -n "making programs_gf in " ; \ - pwd ; $(MAKE) $(MFLAGS) $@) ;; \ + pwd ; $(MAKE) $(MFLAGS) $@) || exit $$? ;; \ esac ; \ done @@ -78,7 +78,7 @@ install: case $$dir in \ NODIR) ;; \ *) (cd $$dir; echo -n "installing in " ; \ - pwd ; $(MAKE) $(MFLAGS) $@) ;; \ + pwd ; $(MAKE) $(MFLAGS) $@) || exit $$? ;; \ esac ; \ done @@ -87,7 +87,7 @@ clean: case $$dir in \ NODIR) ;; \ *) (cd $$dir; echo -n "making clean in " ; \ - pwd ; $(MAKE) $(MFLAGS) $@) ;; \ + pwd ; $(MAKE) $(MFLAGS) $@) || exit $$? ;; \ esac ; \ done diff --git a/gempak/source/programs/gp/Makefile b/gempak/source/programs/gp/Makefile index b04b8e734..714001362 100644 --- a/gempak/source/programs/gp/Makefile +++ b/gempak/source/programs/gp/Makefile @@ -21,7 +21,7 @@ all : case $$dir in \ NODIR) ;; \ *) (cd $$dir; echo -n "making in " ; \ - pwd ; $(MAKE) $(MFLAGS) $@) ;; \ + pwd ; $(MAKE) $(MFLAGS) $@) || exit $$? ;; \ esac ; \ done @@ -31,7 +31,7 @@ programs_nc: case $$dir in \ NODIR) ;; \ *) (cd $$dir; echo -n "making programs_nc in " ; \ - pwd ; $(MAKE) $(MFLAGS) $@) ;; \ + pwd ; $(MAKE) $(MFLAGS) $@) || exit $$? ;; \ esac ; \ done @@ -40,7 +40,7 @@ programs_gf: case $$dir in \ NODIR) ;; \ *) (cd $$dir; echo -n "making programs_gf in " ; \ - pwd ; $(MAKE) $(MFLAGS) $@) ;; \ + pwd ; $(MAKE) $(MFLAGS) $@) || exit $$? ;; \ esac ; \ done @@ -49,7 +49,7 @@ install: case $$dir in \ NODIR) ;; \ *) (cd $$dir; echo -n "installing in " ; \ - pwd ; $(MAKE) $(MFLAGS) $@) ;; \ + pwd ; $(MAKE) $(MFLAGS) $@) || exit $$? ;; \ esac ; \ done @@ -58,7 +58,7 @@ clean: case $$dir in \ NODIR) ;; \ *) (cd $$dir; echo -n "making clean in " ; \ - pwd ; $(MAKE) $(MFLAGS) $@) ;; \ + pwd ; $(MAKE) $(MFLAGS) $@) || exit $$? ;; \ esac ; \ done diff --git a/gempak/source/programs/gui/Makefile b/gempak/source/programs/gui/Makefile index 07a308b98..d5f73f4e6 100644 --- a/gempak/source/programs/gui/Makefile +++ b/gempak/source/programs/gui/Makefile @@ -19,7 +19,7 @@ all : case $$dir in \ NODIR) ;; \ *) (cd $$dir; echo -n "making in " ; \ - pwd ; $(MAKE) $(MFLAGS) $@) ;; \ + pwd ; $(MAKE) $(MFLAGS) $@) || exit $$? ;; \ esac ; \ done @@ -35,7 +35,7 @@ install: case $$dir in \ NODIR) ;; \ *) (cd $$dir; echo -n "installing in " ; \ - pwd ; $(MAKE) $(MFLAGS) $@) ;; \ + pwd ; $(MAKE) $(MFLAGS) $@) || exit $$? ;; \ esac ; \ done @@ -44,7 +44,7 @@ clean: case $$dir in \ NODIR) ;; \ *) (cd $$dir; echo -n "making clean in " ; \ - pwd ; $(MAKE) $(MFLAGS) $@) ;; \ + pwd ; $(MAKE) $(MFLAGS) $@) || exit $$? ;; \ esac ; \ done diff --git a/gempak/source/programs/na/Makefile b/gempak/source/programs/na/Makefile index e1c956f6f..6ada7046c 100644 --- a/gempak/source/programs/na/Makefile +++ b/gempak/source/programs/na/Makefile @@ -15,7 +15,7 @@ all : case $$dir in \ NODIR) ;; \ *) (cd $$dir; echo -n "making in " ; \ - pwd ; $(MAKE) $(MFLAGS) $@) ;; \ + pwd ; $(MAKE) $(MFLAGS) $@) || exit $$? ;; \ esac ; \ done @@ -31,7 +31,7 @@ install: case $$dir in \ NODIR) ;; \ *) (cd $$dir; echo -n "installing in " ; \ - pwd ; $(MAKE) $(MFLAGS) $@) ;; \ + pwd ; $(MAKE) $(MFLAGS) $@) || exit $$? ;; \ esac ; \ done @@ -40,7 +40,7 @@ clean: case $$dir in \ NODIR) ;; \ *) (cd $$dir; echo -n "making clean in " ; \ - pwd ; $(MAKE) $(MFLAGS) $@) ;; \ + pwd ; $(MAKE) $(MFLAGS) $@) || exit $$? ;; \ esac ; \ done diff --git a/gempak/source/programs/oa/Makefile b/gempak/source/programs/oa/Makefile index 8cb94fc50..369ad15d1 100644 --- a/gempak/source/programs/oa/Makefile +++ b/gempak/source/programs/oa/Makefile @@ -14,7 +14,7 @@ all : case $$dir in \ NODIR) ;; \ *) (cd $$dir; echo -n "making in " ; \ - pwd ; $(MAKE) $(MFLAGS) $@) ;; \ + pwd ; $(MAKE) $(MFLAGS) $@) || exit $$? ;; \ esac ; \ done @@ -30,7 +30,7 @@ install: case $$dir in \ NODIR) ;; \ *) (cd $$dir; echo -n "installing in " ; \ - pwd ; $(MAKE) $(MFLAGS) $@) ;; \ + pwd ; $(MAKE) $(MFLAGS) $@) || exit $$? ;; \ esac ; \ done @@ -39,7 +39,7 @@ clean: case $$dir in \ NODIR) ;; \ *) (cd $$dir; echo -n "making clean in " ; \ - pwd ; $(MAKE) $(MFLAGS) $@) ;; \ + pwd ; $(MAKE) $(MFLAGS) $@) || exit $$? ;; \ esac ; \ done diff --git a/gempak/source/programs/sf/Makefile b/gempak/source/programs/sf/Makefile index afca5ec1e..7a3500298 100644 --- a/gempak/source/programs/sf/Makefile +++ b/gempak/source/programs/sf/Makefile @@ -25,7 +25,7 @@ all : case $$dir in \ NODIR) ;; \ *) (cd $$dir; echo -n "making in " ; \ - pwd ; $(MAKE) $(MFLAGS) $@) ;; \ + pwd ; $(MAKE) $(MFLAGS) $@) || exit $$? ;; \ esac ; \ done @@ -35,7 +35,7 @@ programs_nc: case $$dir in \ NODIR) ;; \ *) (cd $$dir; echo -n "making programs_nc in " ; \ - pwd ; $(MAKE) $(MFLAGS) $@) ;; \ + pwd ; $(MAKE) $(MFLAGS) $@) || exit $$? ;; \ esac ; \ done @@ -44,7 +44,7 @@ programs_gf: case $$dir in \ NODIR) ;; \ *) (cd $$dir; echo -n "making programs_gf in " ; \ - pwd ; $(MAKE) $(MFLAGS) $@) ;; \ + pwd ; $(MAKE) $(MFLAGS) $@) || exit $$? ;; \ esac ; \ done @@ -53,7 +53,7 @@ install: case $$dir in \ NODIR) ;; \ *) (cd $$dir; echo -n "installing in " ; \ - pwd ; $(MAKE) $(MFLAGS) $@) ;; \ + pwd ; $(MAKE) $(MFLAGS) $@) || exit $$? ;; \ esac ; \ done @@ -62,7 +62,7 @@ clean: case $$dir in \ NODIR) ;; \ *) (cd $$dir; echo -n "making clean in " ; \ - pwd ; $(MAKE) $(MFLAGS) $@) ;; \ + pwd ; $(MAKE) $(MFLAGS) $@) || exit $$? ;; \ esac ; \ done diff --git a/gempak/source/programs/sn/Makefile b/gempak/source/programs/sn/Makefile index c25fbf250..8814243c4 100644 --- a/gempak/source/programs/sn/Makefile +++ b/gempak/source/programs/sn/Makefile @@ -24,7 +24,7 @@ all : case $$dir in \ NODIR) ;; \ *) (cd $$dir; echo -n "making in " ; \ - pwd ; $(MAKE) $(MFLAGS) $@) ;; \ + pwd ; $(MAKE) $(MFLAGS) $@) || exit $$? ;; \ esac ; \ done @@ -34,7 +34,7 @@ programs_nc: case $$dir in \ NODIR) ;; \ *) (cd $$dir; echo -n "making programs_nc in " ; \ - pwd ; $(MAKE) $(MFLAGS) $@) ;; \ + pwd ; $(MAKE) $(MFLAGS) $@) || exit $$? ;; \ esac ; \ done @@ -43,7 +43,7 @@ programs_gf: case $$dir in \ NODIR) ;; \ *) (cd $$dir; echo -n "making programs_gf in " ; \ - pwd ; $(MAKE) $(MFLAGS) $@) ;; \ + pwd ; $(MAKE) $(MFLAGS) $@) || exit $$? ;; \ esac ; \ done @@ -52,7 +52,7 @@ install: case $$dir in \ NODIR) ;; \ *) (cd $$dir; echo -n "installing in " ; \ - pwd ; $(MAKE) $(MFLAGS) $@) ;; \ + pwd ; $(MAKE) $(MFLAGS) $@) || exit $$? ;; \ esac ; \ done @@ -61,7 +61,7 @@ clean: case $$dir in \ NODIR) ;; \ *) (cd $$dir; echo -n "making clean in " ; \ - pwd ; $(MAKE) $(MFLAGS) $@) ;; \ + pwd ; $(MAKE) $(MFLAGS) $@) || exit $$? ;; \ esac ; \ done diff --git a/gempak/source/programs/util/Makefile b/gempak/source/programs/util/Makefile index 7b678b326..3d3f241c5 100644 --- a/gempak/source/programs/util/Makefile +++ b/gempak/source/programs/util/Makefile @@ -54,7 +54,7 @@ all : case $$dir in \ NODIR) ;; \ *) (cd $$dir; echo -n "making in " ; \ - pwd ; $(MAKE) $(MFLAGS) $@) ;; \ + pwd ; $(MAKE) $(MFLAGS) $@) || exit $$? ;; \ esac ; \ done @@ -70,7 +70,7 @@ install: case $$dir in \ NODIR) ;; \ *) (cd $$dir; echo -n "installing in " ; \ - pwd ; $(MAKE) $(MFLAGS) $@) ;; \ + pwd ; $(MAKE) $(MFLAGS) $@) || exit $$? ;; \ esac ; \ done @@ -79,7 +79,7 @@ clean: case $$dir in \ NODIR) ;; \ *) (cd $$dir; echo -n "making clean in " ; \ - pwd ; $(MAKE) $(MFLAGS) $@) ;; \ + pwd ; $(MAKE) $(MFLAGS) $@) || exit $$? ;; \ esac ; \ done From 94c9c6e111211ef59b266332a4ed08384fb0164b Mon Sep 17 00:00:00 2001 From: akrherz Date: Wed, 4 Mar 2026 06:52:14 -0600 Subject: [PATCH 22/34] Reorder NETCDF make opts --- config/Makeinc.common_linux | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/Makeinc.common_linux b/config/Makeinc.common_linux index 536df3770..37bd643d8 100644 --- a/config/Makeinc.common_linux +++ b/config/Makeinc.common_linux @@ -88,7 +88,7 @@ UTF = $(OS_LIB)/utf.a X11LIB = -lX11 GUILIBS = $(MOTIFLIBS) $(X11LIBDIR) -lXt -lX11 -lz NETCDFINC = $(OS_INC) -NETCDF = $(OS_LIB)/libnetcdf.a -ldl -lz $(OS_LIB)/libhdf5_hl.a $(OS_LIB)/libhdf5.a +NETCDF = $(OS_LIB)/libnetcdf.a $(OS_LIB)/libhdf5_hl.a $(OS_LIB)/libhdf5.a -ldl -lz ZLIB = $(OS_LIB)/libz.a ZLIBINC = $(OS_INC) From d685a1fb8f77d67ac65eb0d7c4c8d144ca18aeea Mon Sep 17 00:00:00 2001 From: akrherz Date: Wed, 4 Mar 2026 06:52:56 -0600 Subject: [PATCH 23/34] Fix fortran syntax [dcudcd.f] --- gempak/source/programs/dc/dcuair/dcudcd.f | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/gempak/source/programs/dc/dcuair/dcudcd.f b/gempak/source/programs/dc/dcuair/dcudcd.f index 49a1d704e..30a72e2b1 100644 --- a/gempak/source/programs/dc/dcuair/dcudcd.f +++ b/gempak/source/programs/dc/dcuair/dcudcd.f @@ -242,12 +242,12 @@ SUBROUTINE DCUDCD ( curtim, gemfil, stntbl, iadstn, maxtim, C* the TTBB message, still decode the following C* PPBB winds. C - ipres = INDEX ( bultin ( 1: lenbul ), '21212' ) - IF ( ipres .ne. 0 ) THEN - IF ( part .eq. 'PPBB' ) THEN - IF ( .not. zwind ) good = .true. - END IF - END IF + ipres = INDEX ( bultin ( 1:lenbul ), '21212' ) + IF ( ipres .ne. 0 ) THEN + IF ( part .eq. 'PPBB' ) THEN + IF ( .not. zwind ) good = .true. + END IF + END IF END IF IF ( good ) THEN C From 43bef03a9dd041f934b7dd952b84cb600d444ffc Mon Sep 17 00:00:00 2001 From: akrherz Date: Wed, 4 Mar 2026 07:56:14 -0600 Subject: [PATCH 24/34] [dcgrib] cleanup invalid symlinks, harden Makefile --- gempak/source/programs/dc/dcgrib/Makefile | 11 ++++++++--- gempak/source/programs/dc/dcgrib/gbcmn.h | 1 - gempak/source/programs/dc/dcgrib/nacmn.cmn | 1 - 3 files changed, 8 insertions(+), 5 deletions(-) delete mode 120000 gempak/source/programs/dc/dcgrib/gbcmn.h delete mode 120000 gempak/source/programs/dc/dcgrib/nacmn.cmn diff --git a/gempak/source/programs/dc/dcgrib/Makefile b/gempak/source/programs/dc/dcgrib/Makefile index 4e528b261..13f31caa8 100644 --- a/gempak/source/programs/dc/dcgrib/Makefile +++ b/gempak/source/programs/dc/dcgrib/Makefile @@ -63,11 +63,16 @@ $(MANDIR)/man1/$(PROG).1 : $(PROG).1 -@cmp -s $? $@ || \ ($(AUXINSTALL) $? $@ && echo 'updated $@') -nacmn.cmn: - -$(LN) $(GEMPAK)/source/griblib/na/nacmn.cmn . +nacmn.cmn: + @$(RM) -f $@ + $(LN) $(GEMPAK)/source/griblib/na/nacmn.cmn $@ gbcmn.h: - -$(LN) $(GEMPAK)/source/griblib/gb/gbcmn.h . + @$(RM) -f $@ + $(LN) $(GEMPAK)/source/griblib/gb/gbcmn.h $@ + +put_gem_grid.o: nacmn.cmn +gemgds.o gempds.o stagger_e.o: gbcmn.h $(PROG) : $(SYMLINKS) nacmn.cmn gbcmn.h $(PROG_OBJS) $(LINK.f) $(NOFORMAIN) -o $@ \ diff --git a/gempak/source/programs/dc/dcgrib/gbcmn.h b/gempak/source/programs/dc/dcgrib/gbcmn.h deleted file mode 120000 index 5a67455a6..000000000 --- a/gempak/source/programs/dc/dcgrib/gbcmn.h +++ /dev/null @@ -1 +0,0 @@ -/home/gempak/GEMPAK7/gempak/source/griblib/gb/gbcmn.h \ No newline at end of file diff --git a/gempak/source/programs/dc/dcgrib/nacmn.cmn b/gempak/source/programs/dc/dcgrib/nacmn.cmn deleted file mode 120000 index 11fe20244..000000000 --- a/gempak/source/programs/dc/dcgrib/nacmn.cmn +++ /dev/null @@ -1 +0,0 @@ -/home/gempak/GEMPAK7/gempak/source/griblib/na/nacmn.cmn \ No newline at end of file From 4452a133cdbc89e423733c06db8a16cca11bb24f Mon Sep 17 00:00:00 2001 From: akrherz Date: Wed, 4 Mar 2026 08:00:52 -0600 Subject: [PATCH 25/34] Quiet HDF5/netCDF build warnings --- extlibs/HDF5/Makefile | 7 +++++-- extlibs/netCDF/Makefile | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/extlibs/HDF5/Makefile b/extlibs/HDF5/Makefile index 4089e2454..b82e7b65a 100644 --- a/extlibs/HDF5/Makefile +++ b/extlibs/HDF5/Makefile @@ -1,5 +1,8 @@ include $(CONFIGDIR)/$(MAKEINC) +HDF5_CFLAGS = -O2 -w +HDF5_CPPFLAGS = -w + all: $(OS_LIB)/libhdf5.a @@ -13,8 +16,8 @@ _lhdf5: INSTALLDIR -@cd libhdf; \ pwd; \ $(MAKE) distclean ; \ - ./configure '--prefix=$(OS_ROOT)' '--with-zlib=$(OS_ROOT)' --disable-debug --disable-trace ; \ - $(MAKE) all install + ./configure '--prefix=$(OS_ROOT)' '--with-zlib=$(OS_ROOT)' --disable-debug --disable-trace 'CFLAGS=$(HDF5_CFLAGS)' 'CPPFLAGS=$(HDF5_CPPFLAGS)' ; \ + $(MAKE) -s all install INSTALLDIR: @echo " Creating $(OS_ROOT)" diff --git a/extlibs/netCDF/Makefile b/extlibs/netCDF/Makefile index e49393e9c..5cfc6e989 100644 --- a/extlibs/netCDF/Makefile +++ b/extlibs/netCDF/Makefile @@ -1,6 +1,9 @@ include $(CONFIGDIR)/$(MAKEINC) include makefile.common +NETCDF_CFLAGS = -O2 -w +NETCDF_CPPFLAGS = -w + NETCDF = $(OS_LIB)/libnetcdf.a @@ -17,8 +20,8 @@ lnetcdf: INSTALLDIR pwd; \ touch macros.make; \ $(MAKE) distclean ; \ - ./configure --disable-dap '--prefix=$(OS_ROOT)'; \ - $(MAKE) all install + ./configure --disable-dap '--prefix=$(OS_ROOT)' 'CFLAGS=$(NETCDF_CFLAGS)' 'CPPFLAGS=$(NETCDF_CPPFLAGS)'; \ + $(MAKE) -s all install INSTALLDIR: @echo " Creating $(OS_ROOT)" From 79b5b80e06ad26653cc35d6fd32d2e4530b3f490 Mon Sep 17 00:00:00 2001 From: akrherz Date: Wed, 4 Mar 2026 08:31:32 -0600 Subject: [PATCH 26/34] CI: run ubuntu 24.04 through docker machinery --- .github/workflows/main.yml | 52 ++++++++++++++++++-------------------- build/build_ubuntu.sh | 20 +++++++++++++-- build/setup.sh | 2 +- 3 files changed, 44 insertions(+), 30 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9057bf082..dc6603ee8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -3,39 +3,37 @@ name: CI on: ["push", "pull_request"] jobs: - build_ubuntu: - name: Build Ubuntu - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: build - run: | - set -e -x - sudo apt-get update - sudo apt install gcc build-essential libx11-dev libxt-dev libxext-dev libxft-dev libxtst-dev - sudo apt install flex byacc libmotif-common libmotif-dev libxpm4 libxpm-dev - sudo apt install gfortran - . Gemenviron.profile - rm -f config/Makeinc.linux64_gfortran - ln -s `pwd`/config/Makeinc.linux64_gfortran_ubuntu config/Makeinc.linux64_gfortran - make all - make install - build: - name: Build Alma Linux (${{ matrix.OS_VERSION }}) + name: Build ${{ matrix.os_type }} (${{ matrix.os_version }}) runs-on: ubuntu-latest + permissions: + contents: write strategy: matrix: - # TODO 10 libXp-devel openmotif-devel xorg-x11-xbitmaps - OS_VERSION: ["9"] - env: - OS_VERSION: ${{ matrix.OS_VERSION }} - OS_TYPE: "almalinux" + include: + - os_type: ubuntu + os_version: "24.04" + container_image: ubuntu:24.04 + release_glob: build/dist/*.deb + - os_type: almalinux + os_version: "8" + container_image: quay.io/almalinuxorg/8-base + release_glob: build/dist/*.rpm steps: - uses: actions/checkout@v4 + - name: Pull container image + run: | + sudo docker pull ${{ matrix.container_image }} + - name: build run: | - sudo docker pull quay.io/almalinuxorg/${OS_VERSION}-base - build/setup.sh ${OS_TYPE} ${OS_VERSION} + build/setup.sh ${{ matrix.os_type }} ${{ matrix.os_version }} + + - name: Attach assets to GitHub Release + if: github.ref_type == 'tag' + uses: softprops/action-gh-release@v2 + with: + files: | + ${{ matrix.release_glob }} + fail_on_unmatched_files: true diff --git a/build/build_ubuntu.sh b/build/build_ubuntu.sh index 9ea4b51d3..4d1904f02 100755 --- a/build/build_ubuntu.sh +++ b/build/build_ubuntu.sh @@ -1,10 +1,20 @@ #!/bin/sh -xe ls -l /home +export DEBIAN_FRONTEND=noninteractive +apt-get update -y +apt-get install -y --no-install-recommends \ + git gcc gfortran build-essential \ + libx11-dev libxt-dev libxext-dev libxft-dev libxtst-dev \ + flex byacc libmotif-common libmotif-dev libxpm4 libxpm-dev \ + dpkg-dev ca-certificates + # Package GEMPAK source from HEAD pushd /gempak package_version=`grep "define version" build/Installer.gempak/gempak.spec | grep -v version_core| awk '{print $3}'` -git archive --format=tar --prefix=gempak-${package_version}/ HEAD | gzip >/tmp/gempak-${package_version}.tar.gz +git config --global --add safe.directory /gempak +git archive --format=tar --prefix=gempak-${package_version}/ -o /tmp/gempak-${package_version}.tar HEAD +gzip -f /tmp/gempak-${package_version}.tar # Prepare the environment mkdir -p /tmp/gempak-${package_version}/ @@ -12,9 +22,15 @@ mkdir -p /tmp/gempak-${package_version}/ cp -r /gempak/build/DEBIAN /tmp/gempak-${package_version}/ mkdir -p /home/gempak/ +srcdir=$(tar -tzf /tmp/gempak-${package_version}.tar.gz | awk -F/ 'NF>1{print $1; exit}') +if [ -z "$srcdir" ]; then + echo "Failed to determine top-level source directory from /tmp/gempak-${package_version}.tar.gz" >&2 + exit 1 +fi tar -xvzf /tmp/gempak-${package_version}.tar.gz -C /home/gempak >& /dev/null +rm -rf /home/gempak/GEMPAK7 +mv "/home/gempak/${srcdir}" /home/gempak/GEMPAK7 pushd /home/gempak -mv gempak-${package_version} GEMPAK7 cd GEMPAK7 . Gemenviron.profile export PYINC="-I/usr/include/python2.7" diff --git a/build/setup.sh b/build/setup.sh index 21e6f854e..d333b92c6 100755 --- a/build/setup.sh +++ b/build/setup.sh @@ -34,7 +34,7 @@ elif [ "$os_type" = "almalinux" ]; then elif [ "$os_type" = "ubuntu" ]; then - sudo docker run --rm=true -v `pwd`:/gempak:rw unidata/gempak-devel:$os_type /bin/bash -c "bash -xe /gempak/build/build_${os_type}.sh " + sudo docker run --rm=true -v `pwd`:/gempak:rw ubuntu:${os_version} /bin/bash -c "bash -xe /gempak/build/build_${os_type}.sh " elif [ "$os_type" = "fedora" ]; then From 0c5a7dac8a9f15aaca12454331c05e27e89acb12 Mon Sep 17 00:00:00 2001 From: akrherz Date: Wed, 4 Mar 2026 08:39:04 -0600 Subject: [PATCH 27/34] Revert "Support system provided libxml2 and libxslt" This reverts commit 4a2e4758146b4b4883c5e5df5b6c338b6d8619c4. --- gempak/source/contrib/awc/airmet_bufrvgf/Makefile | 4 +--- gempak/source/contrib/awc/airmet_vgfbufr/Makefile | 4 +--- gempak/source/gemlib/da/Makefile | 4 +--- gempak/source/textlib/xml/Makefile | 5 +---- 4 files changed, 4 insertions(+), 13 deletions(-) diff --git a/gempak/source/contrib/awc/airmet_bufrvgf/Makefile b/gempak/source/contrib/awc/airmet_bufrvgf/Makefile index ebc989440..64d350bcc 100644 --- a/gempak/source/contrib/awc/airmet_bufrvgf/Makefile +++ b/gempak/source/contrib/awc/airmet_bufrvgf/Makefile @@ -38,15 +38,13 @@ LIBINC = \ .PRECIOUS: $(ALIB) -XML2_CFLAGS = $(shell xml2-config --cflags 2>/dev/null || pkg-config --cflags libxml-2.0 2>/dev/null) - CFLAGS = $(COPT) $(BUFRFLAGS) \ -DDEBUG_PRINT=1 \ -DFNOC_KLUDGE=0 \ -DIGNORE_NESTING=1 \ -DMEMORY_DEBUG=0 \ -DTRACE_PRINT=1 \ - -I$(OS_INC)/libxml2 $(XML2_CFLAGS) + -I$(OS_INC)/libxml2 all : $(ALIB) $(PROG) diff --git a/gempak/source/contrib/awc/airmet_vgfbufr/Makefile b/gempak/source/contrib/awc/airmet_vgfbufr/Makefile index 519ecfee4..abb2b6782 100644 --- a/gempak/source/contrib/awc/airmet_vgfbufr/Makefile +++ b/gempak/source/contrib/awc/airmet_vgfbufr/Makefile @@ -36,15 +36,13 @@ LIBINC = \ .PRECIOUS: $(ALIB) -XML2_CFLAGS = $(shell xml2-config --cflags 2>/dev/null || pkg-config --cflags libxml-2.0 2>/dev/null) - CFLAGS = $(COPT) $(BUFRFLAGS) \ -DDEBUG_PRINT=1 \ -DFNOC_KLUDGE=0 \ -DIGNORE_NESTING=1 \ -DMEMORY_DEBUG=0 \ -DTRACE_PRINT=1 \ - -I$(OS_INC)/libxml2 $(XML2_CFLAGS) + -I$(OS_INC)/libxml2 all : $(ALIB) $(PROG) diff --git a/gempak/source/gemlib/da/Makefile b/gempak/source/gemlib/da/Makefile index f7fc0a4da..894c5e875 100644 --- a/gempak/source/gemlib/da/Makefile +++ b/gempak/source/gemlib/da/Makefile @@ -7,9 +7,7 @@ include $(CONFIGDIR)/$(MAKEINC) ALIB = $(GEMLIB) -XML2_CFLAGS = $(shell xml2-config --cflags 2>/dev/null || pkg-config --cflags libxml-2.0 2>/dev/null) - -CFLAGS += -I$(OS_INC)/libxml2 $(XML2_CFLAGS) +CFLAGS += -I$(OS_INC)/libxml2 COBJS = \ $(ALIB)(dagetdtc.o) \ diff --git a/gempak/source/textlib/xml/Makefile b/gempak/source/textlib/xml/Makefile index f8b99e56c..31129d164 100644 --- a/gempak/source/textlib/xml/Makefile +++ b/gempak/source/textlib/xml/Makefile @@ -18,10 +18,7 @@ COBJS = \ GDIR = xml -XML2_CFLAGS = $(shell xml2-config --cflags 2>/dev/null || pkg-config --cflags libxml-2.0 2>/dev/null) -XSLT_CFLAGS = $(shell xslt-config --cflags 2>/dev/null || pkg-config --cflags libxslt 2>/dev/null) - -CFLAGS = $(COPT) -I$(OS_INC)/libxslt -I$(OS_INC)/libxml2 $(XML2_CFLAGS) $(XSLT_CFLAGS) +CFLAGS = $(COPT) -I$(OS_INC)/libxslt -I$(OS_INC)/libxml2 .PRECIOUS: $(ALIB) From bdae523ce37c2c81581f80a12f4ddd80944abe24 Mon Sep 17 00:00:00 2001 From: akrherz Date: Wed, 4 Mar 2026 08:43:01 -0600 Subject: [PATCH 28/34] Be cute with gfortran flags --- config/Makeinc.linux64_gfortran | 4 +++- config/Makeinc.linux64_gfortran_ubuntu | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/config/Makeinc.linux64_gfortran b/config/Makeinc.linux64_gfortran index 0b3694f24..2430078fb 100644 --- a/config/Makeinc.linux64_gfortran +++ b/config/Makeinc.linux64_gfortran @@ -9,7 +9,9 @@ MOTIFINC = -I/usr/X11R6/include XWINCDIR = -I/usr/X11R6/include COPT = -DUNDERSCORE -D$(OPSYS) $(GEMINC) $(MOTIFINC) $(PYINC) $(WITHPY) -DG_64BIT -g -O2 -fPIC -FOPT = -fallow-invalid-boz -fallow-argument-mismatch -fno-second-underscore -fno-range-check -fd-lines-as-comments $(GEMINC) -g -O +FALLOW_INVALID_BOZ = $(shell tmpf=$$(mktemp /tmp/gfboz-XXXXXX.f 2>/dev/null || echo /tmp/gfboz-$$$$.f); objf=$${tmpf%.f}.o; printf " end\n" > $$tmpf; if $(FC) -fallow-invalid-boz -c $$tmpf -o $$objf >/dev/null 2>&1; then echo -fallow-invalid-boz; fi; rm -f $$tmpf $$objf) +FALLOW_ARG_MISMATCH = $(shell tmpf=$$(mktemp /tmp/gfarg-XXXXXX.f 2>/dev/null || echo /tmp/gfarg-$$$$.f); objf=$${tmpf%.f}.o; printf " end\n" > $$tmpf; if $(FC) -fallow-argument-mismatch -c $$tmpf -o $$objf >/dev/null 2>&1; then echo -fallow-argument-mismatch; fi; rm -f $$tmpf $$objf) +FOPT = $(FALLOW_INVALID_BOZ) $(FALLOW_ARG_MISMATCH) -fno-second-underscore -fno-range-check -fd-lines-as-comments $(GEMINC) -g -O NCII = "-I../libsrc" NCOPT = "CPPFLAGS=-DNDEBUG -Df2cFortran -I$(OS_INC)" "FFLAGS=-O -Wno-globals" "CFLAGS=-O $(NCII)" "CXX= " JASPEROPT = 'CC=$(CC)' 'CFLAGS=-O' '--disable-libjpeg' diff --git a/config/Makeinc.linux64_gfortran_ubuntu b/config/Makeinc.linux64_gfortran_ubuntu index fc0fe50f5..a6a3410dd 100644 --- a/config/Makeinc.linux64_gfortran_ubuntu +++ b/config/Makeinc.linux64_gfortran_ubuntu @@ -9,7 +9,9 @@ MOTIFINC = -I/usr/X11R6/include XWINCDIR = -I/usr/X11R6/include COPT = -fno-stack-protector -DUNDERSCORE -D$(OPSYS) $(GEMINC) $(MOTIFINC) $(PYINC) $(WITHPY) -DG_64BIT -g -O2 -FOPT = -fno-stack-protector -fno-second-underscore -fno-range-check -fd-lines-as-comments -fallow-invalid-boz -fallow-argument-mismatch $(GEMINC) -g -O +FALLOW_INVALID_BOZ = $(shell tmpf=$$(mktemp /tmp/gfboz-XXXXXX.f 2>/dev/null || echo /tmp/gfboz-$$$$.f); objf=$${tmpf%.f}.o; printf " end\n" > $$tmpf; if $(FC) -fallow-invalid-boz -c $$tmpf -o $$objf >/dev/null 2>&1; then echo -fallow-invalid-boz; fi; rm -f $$tmpf $$objf) +FALLOW_ARG_MISMATCH = $(shell tmpf=$$(mktemp /tmp/gfarg-XXXXXX.f 2>/dev/null || echo /tmp/gfarg-$$$$.f); objf=$${tmpf%.f}.o; printf " end\n" > $$tmpf; if $(FC) -fallow-argument-mismatch -c $$tmpf -o $$objf >/dev/null 2>&1; then echo -fallow-argument-mismatch; fi; rm -f $$tmpf $$objf) +FOPT = -fno-stack-protector -fno-second-underscore -fno-range-check -fd-lines-as-comments $(FALLOW_INVALID_BOZ) $(FALLOW_ARG_MISMATCH) $(GEMINC) -g -O NCII = "-I../libsrc" NCOPT = "CPPFLAGS=-DNDEBUG -Df2cFortran -I$(OS_INC)" "FFLAGS=-O -Wno-globals" "CFLAGS=-O $(NCII)" "CXX= " JASPEROPT = 'CC=$(CC)' 'CFLAGS=-O' '--disable-libjpeg' From 4aab819e4b317d0b0e75f22d0125cc50384c181b Mon Sep 17 00:00:00 2001 From: akrherz Date: Wed, 4 Mar 2026 08:45:05 -0600 Subject: [PATCH 29/34] ci: fix things and make errors fail --- build/build_ubuntu.sh | 10 +++++----- extlibs/Makefile | 6 +++--- gempak/source/driver/active/Makefile | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/build/build_ubuntu.sh b/build/build_ubuntu.sh index 4d1904f02..c11e78f08 100755 --- a/build/build_ubuntu.sh +++ b/build/build_ubuntu.sh @@ -33,11 +33,11 @@ mv "/home/gempak/${srcdir}" /home/gempak/GEMPAK7 pushd /home/gempak cd GEMPAK7 . Gemenviron.profile -export PYINC="-I/usr/include/python2.7" -export PYLIB="-lpython2.7" -export WITHPY="-DWITHPYTHON" -export PYDEP="-lpthread -lutil -ldl" -export LDFLAGS="-L/usr/lib -L$OS_LIB -s" +export PYINC="" +export PYLIB="" +export WITHPY="" +export PYDEP="" +export LDFLAGS="-L$OS_LIB -s" pushd config rm -rf Makeinc.linux64_gfortran diff --git a/extlibs/Makefile b/extlibs/Makefile index 11f533f1f..4a7295039 100644 --- a/extlibs/Makefile +++ b/extlibs/Makefile @@ -29,7 +29,7 @@ all : case $$dir in \ NODIR) ;; \ *) (cd $$dir; echo -n "making in " ; \ - pwd ; $(MAKE) $(MFLAGS) $@) ;; \ + pwd ; $(MAKE) $(MFLAGS) $@) || exit $$? ;; \ esac ; \ done @@ -42,7 +42,7 @@ install: case $$dir in \ NODIR) ;; \ *) (cd $$dir; echo -n "installing in " ; \ - pwd ; $(MAKE) $(MFLAGS) $@) ;; \ + pwd ; $(MAKE) $(MFLAGS) $@) || exit $$? ;; \ esac ; \ done @@ -51,7 +51,7 @@ clean: case $$dir in \ NODIR) ;; \ *) (cd $$dir; echo -n "making clean in " ; \ - pwd ; $(MAKE) $(MFLAGS) $@) ;; \ + pwd ; $(MAKE) $(MFLAGS) $@) || exit $$? ;; \ esac ; \ done diff --git a/gempak/source/driver/active/Makefile b/gempak/source/driver/active/Makefile index 4093c8cda..3035fac6f 100644 --- a/gempak/source/driver/active/Makefile +++ b/gempak/source/driver/active/Makefile @@ -26,7 +26,7 @@ all : case $$dir in \ NODIR) ;; \ *) (cd $$dir; echo -n "$(OS) making in " ; \ - pwd ; $(MAKE) $(MFLAGS) $@) ;; \ + pwd ; $(MAKE) $(MFLAGS) $@) || exit $$? ;; \ esac ; \ done @@ -38,7 +38,7 @@ install : case $$dir in \ NODIR) ;; \ *) (cd $$dir; echo -n "$(OS) installing in " ; \ - pwd ; $(MAKE) $(MFLAGS) $@) ;; \ + pwd ; $(MAKE) $(MFLAGS) $@) || exit $$? ;; \ esac ; \ done @@ -47,7 +47,7 @@ clean: case $$dir in \ NODIR) ;; \ *) (cd $$dir; echo -n "$(OS) making clean in " ; \ - pwd ; $(MAKE) $(MFLAGS) $@) ;; \ + pwd ; $(MAKE) $(MFLAGS) $@) || exit $$? ;; \ esac ; \ done From 4bd98c8e098e53c1d8003a943096743074191f0b Mon Sep 17 00:00:00 2001 From: akrherz Date: Wed, 4 Mar 2026 08:56:31 -0600 Subject: [PATCH 30/34] extlibs: skip mans in libxslt --- extlibs/xslt/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extlibs/xslt/Makefile b/extlibs/xslt/Makefile index e3f4f06aa..69a447dbd 100644 --- a/extlibs/xslt/Makefile +++ b/extlibs/xslt/Makefile @@ -10,7 +10,7 @@ _xslt: clean INSTALLDIR @(cd libxslt; echo "Making in `pwd`"; \ ( autoreconf --force --install || touch * ); \ ./configure '--prefix=$(OS_ROOT)' --disable-shared --without-debug --without-debugger '--with-libxml-prefix=$(OS_ROOT)' 'CC=$(CC)' ; \ - $(MAKE) install ) + $(MAKE) all install man_MANS= MANS= ) INSTALLDIR: @echo " Creating $(OS_ROOT)" From b0c72a5dc67512864acbffc04f0b81678fe84202 Mon Sep 17 00:00:00 2001 From: akrherz Date: Wed, 4 Mar 2026 09:11:00 -0600 Subject: [PATCH 31/34] [extlibs] tighten up HDF5/netCDF builds --- extlibs/HDF5/Makefile | 4 ++-- extlibs/netCDF/Makefile | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/extlibs/HDF5/Makefile b/extlibs/HDF5/Makefile index b82e7b65a..451c00448 100644 --- a/extlibs/HDF5/Makefile +++ b/extlibs/HDF5/Makefile @@ -13,9 +13,9 @@ $(OS_LIB)/libhdf5.a: $(MAKE) _lhdf5 $(HDFOPT) _lhdf5: INSTALLDIR - -@cd libhdf; \ + @cd libhdf; \ pwd; \ - $(MAKE) distclean ; \ + if [ -f Makefile ]; then $(MAKE) distclean ; fi ; \ ./configure '--prefix=$(OS_ROOT)' '--with-zlib=$(OS_ROOT)' --disable-debug --disable-trace 'CFLAGS=$(HDF5_CFLAGS)' 'CPPFLAGS=$(HDF5_CPPFLAGS)' ; \ $(MAKE) -s all install diff --git a/extlibs/netCDF/Makefile b/extlibs/netCDF/Makefile index 5cfc6e989..c119208ba 100644 --- a/extlibs/netCDF/Makefile +++ b/extlibs/netCDF/Makefile @@ -2,7 +2,7 @@ include $(CONFIGDIR)/$(MAKEINC) include makefile.common NETCDF_CFLAGS = -O2 -w -NETCDF_CPPFLAGS = -w +NETCDF_CPPFLAGS = -I$(OS_INC) -w NETCDF = $(OS_LIB)/libnetcdf.a @@ -13,13 +13,13 @@ install: $(NETCDF): @echo look netcdf $(NETCDF) - $(MAKE) lnetcdf $(NCOPT) $(NCENV) + $(MAKE) lnetcdf $(NCOPT) $(NCENV) || exit $$? lnetcdf: INSTALLDIR - -@cd netcdf; \ + @cd netcdf; \ pwd; \ touch macros.make; \ - $(MAKE) distclean ; \ + if [ -f Makefile ]; then $(MAKE) distclean ; fi ; \ ./configure --disable-dap '--prefix=$(OS_ROOT)' 'CFLAGS=$(NETCDF_CFLAGS)' 'CPPFLAGS=$(NETCDF_CPPFLAGS)'; \ $(MAKE) -s all install From 8f2de6d980850468485689048e8b29d8337444fc Mon Sep 17 00:00:00 2001 From: akrherz Date: Wed, 4 Mar 2026 09:35:23 -0600 Subject: [PATCH 32/34] [extlibs] tighten Makefiles more --- extlibs/AODT/Makefile | 6 +++--- extlibs/Makefile | 8 +------- extlibs/NDFD/Makefile | 4 ++-- extlibs/ncepBUFR/Makefile | 4 ++-- extlibs/netCDF/Makefile | 1 + extlibs/rsl/Makefile | 4 ++-- extlibs/zlib/Makefile | 8 ++++---- 7 files changed, 15 insertions(+), 20 deletions(-) diff --git a/extlibs/AODT/Makefile b/extlibs/AODT/Makefile index ec71f26b4..5855b2db6 100644 --- a/extlibs/AODT/Makefile +++ b/extlibs/AODT/Makefile @@ -15,17 +15,17 @@ SUBDIRS = \ all : INCDIR @for dir in $(SUBDIRS); do \ - ( cd $$dir; pwd; $(MAKE) $(MFLAGS) $@ ) ; \ + ( cd $$dir; pwd; $(MAKE) $(MFLAGS) $@ ) || exit $$?; \ done install: @for dir in $(SUBDIRS); do \ - (cd $$dir; pwd; $(MAKE) $(MFLAGS) $@ ) ; \ + (cd $$dir; pwd; $(MAKE) $(MFLAGS) $@ ) || exit $$?; \ done clean: @for dir in $(SUBDIRS); do \ - (cd $$dir; pwd; $(MAKE) $(MFLAGS) $@ ) ; \ + (cd $$dir; pwd; $(MAKE) $(MFLAGS) $@ ) || exit $$?; \ done programs_nc: diff --git a/extlibs/Makefile b/extlibs/Makefile index 4a7295039..ea9ec3835 100644 --- a/extlibs/Makefile +++ b/extlibs/Makefile @@ -38,13 +38,7 @@ programs_nc : programs_gf : install: - @for dir in NODIR $(SUBDIRS); do \ - case $$dir in \ - NODIR) ;; \ - *) (cd $$dir; echo -n "installing in " ; \ - pwd ; $(MAKE) $(MFLAGS) $@) || exit $$? ;; \ - esac ; \ - done + @echo "Nothing to install in extlibs (handled during 'all')" clean: @for dir in NODIR $(SUBDIRS); do \ diff --git a/extlibs/NDFD/Makefile b/extlibs/NDFD/Makefile index 13a364c9e..9d005e54e 100644 --- a/extlibs/NDFD/Makefile +++ b/extlibs/NDFD/Makefile @@ -12,7 +12,7 @@ SUBDIRS = \ all : @for dir in $(SUBDIRS) ; do \ (cd $$dir; echo "making $@ in `pwd` " ; \ - $(MAKE) $(MFLAGS) $@) ; $(ARSLEEP) \ + $(MAKE) $(MFLAGS) $@) || exit $$?; $(ARSLEEP) \ done install : @@ -20,5 +20,5 @@ install : clean: @for dir in $(SUBDIRS) ; do \ (cd $$dir; echo "making $@ in `pwd` " ; \ - $(MAKE) $(MFLAGS) $@) ; \ + $(MAKE) $(MFLAGS) $@) || exit $$?; \ done diff --git a/extlibs/ncepBUFR/Makefile b/extlibs/ncepBUFR/Makefile index 273bb7973..c5bca60d7 100644 --- a/extlibs/ncepBUFR/Makefile +++ b/extlibs/ncepBUFR/Makefile @@ -10,11 +10,11 @@ SUBDIRS = libncepBUFR all : @for dir in $(SUBDIRS); do \ ( cd $$dir; echo "making $@ in `pwd`" ; \ - $(MAKE) $(MFLAGS) $@ ) ; \ + $(MAKE) $(MFLAGS) $@ ) || exit $$?; \ done clean: @for dir in $(SUBDIRS); do \ ( cd libncepBUFR; echo "making $@ in `pwd`" ; \ - $(MAKE) $(MFLAGS) $@ ) ; \ + $(MAKE) $(MFLAGS) $@ ) || exit $$?; \ done diff --git a/extlibs/netCDF/Makefile b/extlibs/netCDF/Makefile index c119208ba..eaa18f438 100644 --- a/extlibs/netCDF/Makefile +++ b/extlibs/netCDF/Makefile @@ -22,6 +22,7 @@ lnetcdf: INSTALLDIR if [ -f Makefile ]; then $(MAKE) distclean ; fi ; \ ./configure --disable-dap '--prefix=$(OS_ROOT)' 'CFLAGS=$(NETCDF_CFLAGS)' 'CPPFLAGS=$(NETCDF_CPPFLAGS)'; \ $(MAKE) -s all install + @test -f $(OS_INC)/netcdf.h || (echo "ERROR: expected $(OS_INC)/netcdf.h after netCDF install" >&2; exit 1) INSTALLDIR: @echo " Creating $(OS_ROOT)" diff --git a/extlibs/rsl/Makefile b/extlibs/rsl/Makefile index bfe4ddd65..a1458bc02 100644 --- a/extlibs/rsl/Makefile +++ b/extlibs/rsl/Makefile @@ -9,13 +9,13 @@ SUBDIRS = \ all : @for dir in $(SUBDIRS); do \ - cd $$dir; pwd; $(MAKE) $(MFLAGS) $@; \ + cd $$dir; pwd; $(MAKE) $(MFLAGS) $@ || exit $$?; \ done install: clean: @for dir in $(SUBDIRS); do \ - cd $$dir; pwd; $(MAKE) $(MFLAGS) $@; \ + cd $$dir; pwd; $(MAKE) $(MFLAGS) $@ || exit $$?; \ done diff --git a/extlibs/zlib/Makefile b/extlibs/zlib/Makefile index cb8183ea3..40c1ff567 100644 --- a/extlibs/zlib/Makefile +++ b/extlibs/zlib/Makefile @@ -12,12 +12,12 @@ install: all clean: _zlib_clean $(ZLIB): - ( cd zlib; echo "making $@ in `pwd`" ; \ - make -s distclean ; \ + ( set -e; cd zlib; echo "making $@ in `pwd`"; \ + if [ -f Makefile ]; then $(MAKE) -s distclean; fi; \ ( autoreconf --force --install || touch * ); \ ./configure --static -s --prefix=$(OS_ROOT); \ - make -s all install ; \ - make -s distclean ) + $(MAKE) -s all install; \ + $(MAKE) -s distclean ) _zlib: $(ZLIB) From 3b179f108f350591fad0a95a99d45abde5024d7e Mon Sep 17 00:00:00 2001 From: akrherz Date: Wed, 4 Mar 2026 09:48:09 -0600 Subject: [PATCH 33/34] More Makefile fast failing --- Makefile | 2 +- build/Installer.gempak/gempak.spec | 9 +++++---- extlibs/xslt/Makefile | 1 - 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 2ec8e1974..1e4ab19f6 100644 --- a/Makefile +++ b/Makefile @@ -35,7 +35,7 @@ SUBDIRS = \ all : INSTALLDIRS @for dir in $(SUBDIRS); do \ ( cd $$dir; echo "Making $@ in `pwd`" ; \ - $(MAKE) $(MFLAGS) $@ ) ; \ + $(MAKE) $(MFLAGS) $@ ) || exit $$?; \ done All : all diff --git a/build/Installer.gempak/gempak.spec b/build/Installer.gempak/gempak.spec index 5c5766b8a..cb5e39c12 100644 --- a/build/Installer.gempak/gempak.spec +++ b/build/Installer.gempak/gempak.spec @@ -42,6 +42,7 @@ tar -xvzf /tmp/rpmbuild/SOURCES/gempak-%{version}.tar.gz -C %{prefix}/ >& /dev/n %install # create build root directory +set -ex pushd %{gem_home} export NAWIPS=`pwd` cat source_python.sh @@ -50,10 +51,10 @@ cat source_python.sh >> build/Installer.gempak/Gemenviron.profile # TODO: ". source_python.sh" doesn't seem to work from spec file make extlibs #>& make.extlibs make gempak #>& make.gempak -make install >& /dev/null -make programs_gf >& /dev/null -make programs_nc >& /dev/null -make clean >& /dev/null +make install +make programs_gf +make programs_nc +make clean #grep -i error make.gempak #rm -rf make.gempak diff --git a/extlibs/xslt/Makefile b/extlibs/xslt/Makefile index 69a447dbd..b67a5b2b7 100644 --- a/extlibs/xslt/Makefile +++ b/extlibs/xslt/Makefile @@ -8,7 +8,6 @@ $(OS_LIB)/libxslt.a: _xslt: clean INSTALLDIR @(cd libxslt; echo "Making in `pwd`"; \ - ( autoreconf --force --install || touch * ); \ ./configure '--prefix=$(OS_ROOT)' --disable-shared --without-debug --without-debugger '--with-libxml-prefix=$(OS_ROOT)' 'CC=$(CC)' ; \ $(MAKE) all install man_MANS= MANS= ) From 7b3b43aa0046afd94659c0db54883291c9fd7e03 Mon Sep 17 00:00:00 2001 From: akrherz Date: Wed, 4 Mar 2026 10:05:47 -0600 Subject: [PATCH 34/34] Update libgfortran deps for deb build --- build/DEBIAN/control | 2 +- build/build_ubuntu.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build/DEBIAN/control b/build/DEBIAN/control index 883828ce1..2b229d2f7 100644 --- a/build/DEBIAN/control +++ b/build/DEBIAN/control @@ -3,5 +3,5 @@ Version: 7.20.0 Maintainer: Daryl Herzmann Architecture: all Description: Unidata GEMPAK Distribution -Depends: libgfortran3, libx11-6, libxm4, libxtst6, libxt6 +Depends: libgfortran5 | libgfortran4 | libgfortran3, libx11-6, libxm4, libxtst6, libxt6 Homepage: https://www.unidata.ucar.edu/software/gempak/ diff --git a/build/build_ubuntu.sh b/build/build_ubuntu.sh index c11e78f08..d3e30575f 100755 --- a/build/build_ubuntu.sh +++ b/build/build_ubuntu.sh @@ -77,4 +77,4 @@ cp gempak-${package_version}.deb /gempak/build/dist/ # Confirm install with dependencies apt-get update -y dpkg -i gempak-${package_version}.deb -apt-get -f install +apt-get -f install -y