Skip to content

Adjust CFLAGS when building ADCIRC on debian platform with intel-oneapi compiler #1717

@jasonfleming

Description

@jasonfleming

When attempting to build adcirc v56.0.4.live.0 on the debian (Ubuntu 20.04) platform with the ASGS latest master branch using intel-oneapi compiler version 2026.0.0.20260331, the metis build failed with the following error messages:

icx -c -I . -I /home/jason/Campaigns/Operations/production/asgs-intel/opt/models/adcircs/adcirc-cg-v56.0.4.live.0-intel-oneapi-debian/prep -O2 -DLINUX -xCORE-AVX2 -axCORE-AVX512 -Wno-implicit-function-declaration -o /home/jason/Campaigns/Operations/production/asgs-intel/opt/models/adcircs/adcirc-cg-v56.0.4.live.0-intel-oneapi-debian/work/odir_metis/initpart.o initpart.c
initpart.c:199:10: error: incompatible pointer types passing 'idxtype **' (aka 'int **') to parameter of type 'void **' [-Wincompatible-pointer-types]
  199 |   GKfree(&bestwhere, &queue, &touched, LTERM);
      |          ^~~~~~~~~~
./proto.h:435:20: note: passing argument to parameter here
  435 | void GKfree(void **,...);
      |                    ^
initpart.c:337:10: error: incompatible pointer types passing 'idxtype **' (aka 'int **') to parameter of type 'void **' [-Wincompatible-pointer-types]
  337 |   GKfree(&bestwhere, &queue, &touched, LTERM);
      |          ^~~~~~~~~~
./proto.h:435:20: note: passing argument to parameter here
  435 | void GKfree(void **,...);
      |                    ^
initpart.c:417:10: error: incompatible pointer types passing 'idxtype **' (aka 'int **') to parameter of type 'void **' [-Wincompatible-pointer-types]
  417 |   GKfree(&bestwhere, &perm, LTERM);
      |          ^~~~~~~~~~
./proto.h:435:20: note: passing argument to parameter here
  435 | void GKfree(void **,...);
      |                    ^
3 errors generated.
make[1]: *** [Makefile:17: /home/jason/Campaigns/Operations/production/asgs-intel/opt/models/adcircs/adcirc-cg-v56.0.4.live.0-intel-oneapi-debian/work/odir_metis/initpart.o] Error 1
make[1]: Leaving directory '/home/jason/Campaigns/Operations/production/asgs-intel/opt/models/adcircs/adcirc-cg-v56.0.4.live.0-intel-oneapi-debian/thirdparty/metis/Lib'
make: *** [makefile:522: metis] Error 2
build failed (2)

I was able to resolve this by editing cmplrflags.mk to add the -Wno-error=incompatible-pointer-types flag to CFLAGS as follows:

    CFLAGS  := $(INCDIRS) -O2 -DLINUX -xCORE-AVX2 -axCORE-AVX512 -Wno-implicit-function-declaration -Wno-error=incompatible-pointer-types

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions