Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sbank doesn't build with clang 16.0 on macOS due to implicit function declarations #56

Closed
duncanmmacleod opened this issue Apr 22, 2024 · 2 comments

Comments

@duncanmmacleod
Copy link
Member

Attempting to build sbank with clang 16.0 on macOS results in errors from undeclared functions:

$ python3 setup.py build_ext
Compiling sbank/overlap_cpu.pyx because it changed.
[1/1] Cythonizing sbank/overlap_cpu.pyx
/Users/duncanmacleod/opt/mambaforge/envs/sbank/lib/python3.12/site-packages/setuptools/__init__.py:81: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
!!

        ********************************************************************************
        Requirements should be satisfied by a PEP 517 installer.
        If you are using pip, you can try `pip install --use-pep517`.
        ********************************************************************************

!!
  dist.fetch_build_eggs(dist.setup_requires)
running build_ext
building 'sbank.overlap_cpu' extension
creating build
creating build/temp.macosx-10.9-x86_64-cpython-312
creating build/temp.macosx-10.9-x86_64-cpython-312/sbank
x86_64-apple-darwin13.4.0-clang -fno-strict-overflow -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /Users/duncanmacleod/opt/mambaforge/envs/sbank/include -fPIC -O2 -isystem /Users/duncanmacleod/opt/mambaforge/envs/sbank/include -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fstack-protector-strong -O2 -pipe -isystem /Users/duncanmacleod/opt/mambaforge/envs/sbank/include -D_FORTIFY_SOURCE=2 -isystem /Users/duncanmacleod/opt/mambaforge/envs/sbank/include -Isbank -I/Users/duncanmacleod/opt/mambaforge/envs/sbank/lib/python3.12/site-packages/numpy/core/include -I/Users/duncanmacleod/opt/mambaforge/envs/sbank/include/python3.12 -c sbank/overlap_cpu.c -o build/temp.macosx-10.9-x86_64-cpython-312/sbank/overlap_cpu.o -O3 -w -ffast-math -ffinite-math-only -std=c99
In file included from sbank/overlap_cpu.c:1267:
sbank/overlap_cpu_lib.c:70:5: error: call to undeclared function 'XLALPrintError'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    CHECK_OOM(workspace_cache, "unable to allocate workspace\n");
    ^
sbank/overlap_cpu_lib.c:62:43: note: expanded from macro 'CHECK_OOM'
#define CHECK_OOM(ptr, msg) if (!(ptr)) { XLALPrintError((msg)); exit(-1); }
                                          ^
sbank/overlap_cpu_lib.c:101:5: error: call to undeclared function 'XLALPrintError'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    CHECK_OOM(ptr->zf->data, "unable to allocate workspace array zf\n");
    ^
sbank/overlap_cpu_lib.c:62:43: note: expanded from macro 'CHECK_OOM'
#define CHECK_OOM(ptr, msg) if (!(ptr)) { XLALPrintError((msg)); exit(-1); }
                                          ^
sbank/overlap_cpu_lib.c:105:5: error: call to undeclared function 'XLALPrintError'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    CHECK_OOM(ptr->zf->data, "unable to allocate workspace array zt\n");
    ^
sbank/overlap_cpu_lib.c:62:43: note: expanded from macro 'CHECK_OOM'
#define CHECK_OOM(ptr, msg) if (!(ptr)) { XLALPrintError((msg)); exit(-1); }
                                          ^
sbank/overlap_cpu_lib.c:110:5: error: call to undeclared function 'XLALPrintError'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    CHECK_OOM(ptr->plan, "unable to allocate plan");
    ^
sbank/overlap_cpu_lib.c:62:43: note: expanded from macro 'CHECK_OOM'
#define CHECK_OOM(ptr, msg) if (!(ptr)) { XLALPrintError((msg)); exit(-1); }
                                          ^
sbank/overlap_cpu_lib.c:156:9: error: call to undeclared function 'XLALPrintError'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
        XLALPrintError("out of space in the workspace_cache\n");
        ^
sbank/overlap_cpu_lib.c:164:5: error: call to undeclared function 'XLALCOMPLEX8VectorFFT'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    XLALCOMPLEX8VectorFFT(ws->zt, ws->zf, ws->plan); /* plan is reverse */
    ^
sbank/overlap_cpu_lib.c:203:9: error: call to undeclared function 'XLALPrintError'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
        XLALPrintError("out of space in the workspace_cache\n");
        ^
sbank/overlap_cpu_lib.c:211:5: error: call to undeclared function 'XLALCOMPLEX8VectorFFT'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    XLALCOMPLEX8VectorFFT(ws->zt, ws->zf, ws->plan); /* plan is reverse */
    ^
sbank/overlap_cpu_lib.c:241:9: error: call to undeclared function 'XLALPrintError'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
        XLALPrintError("out of space in the workspace_cache\n");
        ^
sbank/overlap_cpu_lib.c:246:9: error: call to undeclared function 'XLALPrintError'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
        XLALPrintError("out of space in the workspace_cache\n");
        ^
sbank/overlap_cpu_lib.c:255:5: error: call to undeclared function 'XLALCOMPLEX8VectorFFT'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    XLALCOMPLEX8VectorFFT(ws1->zt, ws1->zf, ws1->plan); /* plan is reverse */
    ^
sbank/overlap_cpu_lib.c:314:9: error: call to undeclared function 'XLALPrintError'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
        XLALPrintError("out of space in the workspace_cache\n");
        ^
sbank/overlap_cpu_lib.c:319:9: error: call to undeclared function 'XLALPrintError'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
        XLALPrintError("out of space in the workspace_cache\n");
        ^
sbank/overlap_cpu_lib.c:328:5: error: call to undeclared function 'XLALCOMPLEX8VectorFFT'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    XLALCOMPLEX8VectorFFT(ws1->zt, ws1->zf, ws1->plan); /* plan is reverse */
    ^
14 errors generated.
error: command '/Users/duncanmacleod/opt/mambaforge/envs/sbank/bin/x86_64-apple-darwin13.4.0-clang' failed with exit code 1

This is preventing new builds for conda-forge, see conda-forge/sbank-feedstock#12.

@spxiwh
Copy link
Collaborator

spxiwh commented Apr 26, 2024

Fixed by #58

duncanmmacleod added a commit to duncanmmacleod/sbank that referenced this issue Apr 29, 2024
@spxiwh
Copy link
Collaborator

spxiwh commented May 1, 2024

@duncanmmacleod This should now be fixed, and a v1.0.3 release has been made.

@spxiwh spxiwh closed this as completed May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants