Skip to content

pip install fails with gcc 15: error: implicit declaration of function ‘exit’ #19

@JohannesBuchner

Description

@JohannesBuchner
      gcc -pthread -B /mpcdf/soft/SLE_15/packages/x86_64/anaconda/3/2023.03/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /mpcdf/soft/SLE_15/packages/x86_64/anaconda/3/2023.03/include -fPIC -O2 -isystem /mpcdf/soft/SLE_15/packages/x86_64/anaconda/3/2023.03/include -fPIC -I/mpcdf/soft/SLE_15/packages/x86_64/anaconda/3/2023.03/include/python3.10 -c /tmp/pip-install-r_uxut03/cosmolopy_0ba95a1b745341e1b6bf8c2475bd5dbb/cosmolopy/EH/tf_fit.c -o build/temp.linux-x86_64-cpython-310/tmp/pip-install-r_uxut03/cosmolopy_0ba95a1b745341e1b6bf8c2475bd5dbb/cosmolopy/EH/tf_fit.o
      /tmp/pip-install-r_uxut03/cosmolopy_0ba95a1b745341e1b6bf8c2475bd5dbb/cosmolopy/EH/tf_fit.c: In function ‘TFfit_hmpc’:
      /tmp/pip-install-r_uxut03/cosmolopy_0ba95a1b745341e1b6bf8c2475bd5dbb/cosmolopy/EH/tf_fit.c:82:35: warning: unused variable ‘cdm_piece’ [-Wunused-variable]
         82 |     float tf_thisk, baryon_piece, cdm_piece;
            |                                   ^~~~~~~~~
      /tmp/pip-install-r_uxut03/cosmolopy_0ba95a1b745341e1b6bf8c2475bd5dbb/cosmolopy/EH/tf_fit.c:82:21: warning: unused variable ‘baryon_piece’ [-Wunused-variable]
         82 |     float tf_thisk, baryon_piece, cdm_piece;
            |                     ^~~~~~~~~~~~
      /tmp/pip-install-r_uxut03/cosmolopy_0ba95a1b745341e1b6bf8c2475bd5dbb/cosmolopy/EH/tf_fit.c: In function ‘TFset_parameters’:
      /tmp/pip-install-r_uxut03/cosmolopy_0ba95a1b745341e1b6bf8c2475bd5dbb/cosmolopy/EH/tf_fit.c:154:9: error: implicit declaration of function ‘exit’ [-Wimplicit-function-declaration]
        154 |         exit(1);
            |         ^~~~

Downgrading gcc helps, but this will affect more and more users over time.

see https://stackoverflow.com/questions/2406986/c-warning-implicit-declaration-of-function-exit

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions