Skip to content

BLACS, REDIST TESTING overrides function definitions with invalid void definition #148

@drew-parsons

Description

@drew-parsons

The tests in BLACS TESTING provide a local definition of Cblacs_ functions with a void (literally empty) definition. This causes a build error with the C23 standard (gcc-15):

cd /build/scalapack-2.2.2/build-openmpi/BLACS/TESTING && /usr/bin/cc -DAdd_ -DBTCINTFACE -isystem /usr/lib/x86_64-linux-gnu/openmpi/include -isystem /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi -isystem /us
r/lib/x86_64-linux-gnu/fortran/gfortran-mod-16/openmpi -g -O2 -Wno-error=implicit-function-declaration -ffile-prefix-map=/build/scalapack-2.2.2=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werro
r=format-security -fcf-protection -Wall -pedantic -MD -MT BLACS/TESTING/CMakeFiles/xCbtest.dir/Cbt.c.o -MF CMakeFiles/xCbtest.dir/Cbt.c.o.d -o CMakeFiles/xCbtest.dir/Cbt.c.o -c /build/scalapack-2.2.2/BLACS/TESTI
NG/Cbt.c
/build/scalapack-2.2.2/BLACS/TESTING/Cbt.c: In function 'blacs_gridinit_':
/build/scalapack-2.2.2/BLACS/TESTING/Cbt.c:8:4: error: too many arguments to function 'Cblacs_gridinit'; expected 0, have 4
    8 |    Cblacs_gridinit(ConTxt, order, *nprow, *npcol);
      |    ^~~~~~~~~~~~~~~ ~~~~~~
/build/scalapack-2.2.2/BLACS/TESTING/Cbt.c:6:9: note: declared here
    6 |    void Cblacs_gridinit();
      |         ^~~~~~~~~~~~~~~
/build/scalapack-2.2.2/BLACS/TESTING/Cbt.c: In function 'blacs_setup_':
/build/scalapack-2.2.2/BLACS/TESTING/Cbt.c:14:4: error: too many arguments to function 'Cblacs_setup'; expected 0, have 2
   14 |    Cblacs_setup(mypnum, nprocs);
      |    ^~~~~~~~~~~~ ~~~~~~
/build/scalapack-2.2.2/BLACS/TESTING/Cbt.c:13:9: note: declared here
   13 |    void Cblacs_setup();
      |         ^~~~~~~~~~~~
...

The same kind of problem was raised already in #129 and a patch applied in #139

But that patch did not include BLACS and BLACS/TESTING. The problem remains there,
e.g.

void Cblacs_gridinit();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions