Coder Social home page Coder Social logo

pyquota's People

Contributors

tjumyk avatar

Watchers

 avatar  avatar

pyquota's Issues

Cannot compile C on CentOS 7

I can't compile the C code on CentOS 7. Here are the versions:

$ uname -a
Linux user-c7 3.10.0-1160.71.1.el7.x86_64 #1 SMP Tue Jun 28 15:37:28 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
$ python -V
Python 3.8.11
$ quota --version
Quota utilities version 4.01.
Compiled with: USE_LDAP_MAIL_LOOKUP EXT2_DIRECT HOSTS_ACCESS RPC RPC_SETQUOTA BSD_BEHAVIOUR
Bugs to [email protected]

I'm using the SCL Python 3.8 binaries distributed by Red Hat. We need quota-devel for the quota headers, and rh-python38-python-devel for the Python headers.

When building a wheel with python setup.py sdist bdist_wheel, I get this compiler error:

building 'pyquota' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -I/opt/rh/rh-python38/root/usr/include -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -I/opt/rh/rh-python38/root/usr/include -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/home/safonso/Projects/3rdParty/pyquota/.venv/include -I/opt/rh/rh-python38/root/usr/include/python3.8 -c pyquota.c -o build/temp.linux-x86_64-cpython-38/pyquota.o
In file included from /opt/rh/rh-python38/root/usr/include/python3.8/Python.h:137:0,
                 from pyquota.c:3:
pyquota.c: In function ‘PyInit_pyquota’:
pyquota.c:490:34: error: ‘DQF_ROOT_SQUASH’ undeclared (first use in this function)
     PyModule_AddIntMacro(module, DQF_ROOT_SQUASH);
                                  ^
/opt/rh/rh-python38/root/usr/include/python3.8/modsupport.h:139:67: note: in definition of macro ‘PyModule_AddIntMacro’
 #define PyModule_AddIntMacro(m, c) PyModule_AddIntConstant(m, #c, c)
                                                                   ^
pyquota.c:490:34: note: each undeclared identifier is reported only once for each function it appears in
     PyModule_AddIntMacro(module, DQF_ROOT_SQUASH);
                                  ^
/opt/rh/rh-python38/root/usr/include/python3.8/modsupport.h:139:67: note: in definition of macro ‘PyModule_AddIntMacro’
 #define PyModule_AddIntMacro(m, c) PyModule_AddIntConstant(m, #c, c)
                                                                   ^
pyquota.c:491:34: error: ‘DQF_SYS_FILE’ undeclared (first use in this function)
     PyModule_AddIntMacro(module, DQF_SYS_FILE);
                                  ^
/opt/rh/rh-python38/root/usr/include/python3.8/modsupport.h:139:67: note: in definition of macro ‘PyModule_AddIntMacro’
 #define PyModule_AddIntMacro(m, c) PyModule_AddIntConstant(m, #c, c)
                                                                   ^
error: command '/usr/bin/gcc' failed with exit code 1

DQF_ROOT_SQUASH and DQF_SYS_FILE are not defined for this older versions of everything.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.