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

fail to build pyreadr with zlib 1.3.1 due to Z_ARG is removed #100

Open
hubutui opened this issue Mar 25, 2024 · 0 comments
Open

fail to build pyreadr with zlib 1.3.1 due to Z_ARG is removed #100

hubutui opened this issue Mar 25, 2024 · 0 comments

Comments

@hubutui
Copy link

hubutui commented Mar 25, 2024

python setup.py build outputs:

gcc -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -ffat-lto-objects -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -fPIC -Ipyreadr -I/usr/include/python3.11 -c pyreadr/libs/librdata/src/rdata_read.c -o build/temp.linux-x86_64-cpython-311/pyreadr/libs/librdata/src/rdata_read.o -DHAVE_ZLIB -DHAVE_BZIP2 -DHAVE_LZMA
In file included from pyreadr/libs/librdata/src/rdata_read.c:25:
pyreadr/zlib.h:1349:32: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘Z_ARG’
 1349 | ZEXTERN int ZEXPORTVA gzprintf Z_ARG((gzFile file, const char *format, ...));
      |                                ^~~~~
pyreadr/zlib.h:1758:44: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘Z_ARG’
 1758 | ZEXTERN int            ZEXPORTVA gzvprintf Z_ARG((gzFile file,
      |                                            ^~~~~
error: command '/usr/bin/gcc' failed with exit code 1

According to madler/zlib@3f635df, Z_ARG is removed.

Just remove Z_ARG from

ZEXTERN int ZEXPORTVA gzprintf Z_ARG((gzFile file, const char *format, ...));
and
ZEXTERN int ZEXPORTVA gzvprintf Z_ARG((gzFile file,
this issue might be fixed.

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

1 participant