compiled error on centos 8
Arryboom opened this issue · 3 comments
Arryboom commented
gcc (GCC) 8.3.1 20191121 (Red Hat 8.3.1-5)
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[stack@openstack devstack]$ gcc-c++ --version
-bash: gcc-c++: command not found
[stack@openstack devstack]$ c++ --version
c++ (GCC) 8.3.1 20191121 (Red Hat 8.3.1-5)
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[stack@openstack devstack]$ sudo pip install systemd-python
Collecting systemd-python
Using cached systemd-python-234.tar.gz (53 kB)
Building wheels for collected packages: systemd-python
Building wheels for collected packages: systemd-python
Building wheel for systemd-python (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3.6 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-oqfbprfv/systemd-python/setup.py'"'"'; __file__='"'"'/tmp/pip-install-oqfbprfv/systemd-python/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-dbrwmi1t
cwd: /tmp/pip-install-oqfbprfv/systemd-python/
Complete output (32 lines):
running bdist_wheel
running build
running build_py
package init file 'systemd/test/__init__.py' not found (or not a regular file)
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/systemd
copying systemd/__init__.py -> build/lib.linux-x86_64-3.6/systemd
copying systemd/journal.py -> build/lib.linux-x86_64-3.6/systemd
copying systemd/daemon.py -> build/lib.linux-x86_64-3.6/systemd
creating build/lib.linux-x86_64-3.6/systemd/test
copying systemd/test/test_daemon.py -> build/lib.linux-x86_64-3.6/systemd/test
copying systemd/test/test_journal.py -> build/lib.linux-x86_64-3.6/systemd/test
copying systemd/test/test_login.py -> build/lib.linux-x86_64-3.6/systemd/test
running build_ext
building 'systemd/_journal' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/systemd
gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPACKAGE_VERSION="234" -DLIBSYSTEMD_VERSION=239 (239-41.el8_3) -I/usr/include/python3.6m -c systemd/_journal.c -o build/temp.linux-x86_64-3.6/systemd/_journal.o -Werror=implicit-function-declaration
gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPACKAGE_VERSION="234" -DLIBSYSTEMD_VERSION=239 (239-41.el8_3) -I/usr/include/python3.6m -c systemd/pyutil.c -o build/temp.linux-x86_64-3.6/systemd/pyutil.o -Werror=implicit-function-declaration
gcc -pthread -shared -Wl,-z,relro -Wl,-z,now -g -Wl,-z,relro -Wl,-z,now -g build/temp.linux-x86_64-3.6/systemd/_journal.o build/temp.linux-x86_64-3.6/systemd/pyutil.o -L/usr/lib64 -lsystemd -lpython3.6m -o build/lib.linux-x86_64-3.6/systemd/_journal.cpython-36m-x86_64-linux-gnu.so
building 'systemd/_reader' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPACKAGE_VERSION="234" -DLIBSYSTEMD_VERSION=239 (239-41.el8_3) -I/usr/include/python3.6m -c systemd/_reader.c -o build/temp.linux-x86_64-3.6/systemd/_reader.o -Werror=implicit-function-declaration
<command-line>: error: missing binary operator before token "("
systemd/_reader.c:41:5: note: in expansion of macro ‘LIBSYSTEMD_VERSION’
#if LIBSYSTEMD_VERSION >= 229
^~~~~~~~~~~~~~~~~~
<command-line>: error: missing binary operator before token "("
systemd/_reader.c:47:5: note: in expansion of macro ‘LIBSYSTEMD_VERSION’
#if LIBSYSTEMD_VERSION >= 230
^~~~~~~~~~~~~~~~~~
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for systemd-python
Running setup.py clean for systemd-python
Failed to build systemd-python
Installing collected packages: systemd-python
Running setup.py install for systemd-python ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3.6 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-oqfbprfv/systemd-python/setup.py'"'"'; __file__='"'"'/tmp/pip-install-oqfbprfv/systemd-python/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-ml2axpnp/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.6m/systemd-python
cwd: /tmp/pip-install-oqfbprfv/systemd-python/
Complete output (32 lines):
running install
running build
running build_py
package init file 'systemd/test/__init__.py' not found (or not a regular file)
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/systemd
copying systemd/__init__.py -> build/lib.linux-x86_64-3.6/systemd
copying systemd/journal.py -> build/lib.linux-x86_64-3.6/systemd
copying systemd/daemon.py -> build/lib.linux-x86_64-3.6/systemd
creating build/lib.linux-x86_64-3.6/systemd/test
copying systemd/test/test_daemon.py -> build/lib.linux-x86_64-3.6/systemd/test
copying systemd/test/test_journal.py -> build/lib.linux-x86_64-3.6/systemd/test
copying systemd/test/test_login.py -> build/lib.linux-x86_64-3.6/systemd/test
running build_ext
building 'systemd/_journal' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/systemd
gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPACKAGE_VERSION="234" -DLIBSYSTEMD_VERSION=239 (239-41.el8_3) -I/usr/include/python3.6m -c systemd/_journal.c -o build/temp.linux-x86_64-3.6/systemd/_journal.o -Werror=implicit-function-declaration
gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPACKAGE_VERSION="234" -DLIBSYSTEMD_VERSION=239 (239-41.el8_3) -I/usr/include/python3.6m -c systemd/pyutil.c -o build/temp.linux-x86_64-3.6/systemd/pyutil.o -Werror=implicit-function-declaration
gcc -pthread -shared -Wl,-z,relro -Wl,-z,now -g -Wl,-z,relro -Wl,-z,now -g build/temp.linux-x86_64-3.6/systemd/_journal.o build/temp.linux-x86_64-3.6/systemd/pyutil.o -L/usr/lib64 -lsystemd -lpython3.6m -o build/lib.linux-x86_64-3.6/systemd/_journal.cpython-36m-x86_64-linux-gnu.so
building 'systemd/_reader' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPACKAGE_VERSION="234" -DLIBSYSTEMD_VERSION=239 (239-41.el8_3) -I/usr/include/python3.6m -c systemd/_reader.c -o build/temp.linux-x86_64-3.6/systemd/_reader.o -Werror=implicit-function-declaration
<command-line>: error: missing binary operator before token "("
systemd/_reader.c:41:5: note: in expansion of macro ‘LIBSYSTEMD_VERSION’
#if LIBSYSTEMD_VERSION >= 229
^~~~~~~~~~~~~~~~~~
<command-line>: error: missing binary operator before token "("
systemd/_reader.c:47:5: note: in expansion of macro ‘LIBSYSTEMD_VERSION’
#if LIBSYSTEMD_VERSION >= 230
^~~~~~~~~~~~~~~~~~
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3.6 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-oqfbprfv/systemd-python/setup.py'"'"'; __file__='"'"'/tmp/pip-install-oqfbprfv/systemd-python/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-ml2axpnp/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.6m/systemd-python Check the logs for full command output.
WARNING: You are using pip version 20.2.4; however, version 20.3.1 is available.
You should consider upgrading via the '/usr/bin/python3.6 -m pip install --upgrade pip' command.
[stack@openstack devstack]$ cat /etc/centos-release
CentOS Linux release 8.3.2011
[stack@openstack devstack]$```
m3nu commented
Due to a change in the version format starting in RHEL 8.3. Also discussed here: https://bugzilla.redhat.com/show_bug.cgi?id=1862714
m3nu commented
Workaround is to use the OS-provided package python3-systemd
Arryboom commented
thanks,confirm fixed