Project

General

Profile

Bug #14059

Can't build Ceph with --with-rbd (Cython)

Added by Piotr Dalek over 8 years ago. Updated almost 8 years ago.

Status:
Resolved
Priority:
High
Assignee:
-
Target version:
-
% Done:

0%

Source:
Community (dev)
Tags:
Backport:
Regression:
Yes
Severity:
2 - major
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

When using Cython version 0.14.1 and

CXXFLAGS="-g -ggdb" ./configure \
--without-fuse --prefix=/usr --localstatedir=/var --sysconfdir=/etc \
--with-nss --without-cryptopp --with-rest-bench --without-lttng \
--disable-gitversion --without-man-page --disable-cephfs-java \
--without-libzs --without-babeltrace --with-debug

build fails:


building 'rbd' extension
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mt
une=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-
size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -iquote /home/dalekp/ceph-bp-smallpglog/ceph/src/include -Wall -Wtype-limits -Wignored-
qualifiers -Winit-self -Wpointer-arith -fno-strict-aliasing -fsigned-char -rdynamic -O2 -g -pipe -Wall -Wp,-U_FORTIFY_SOURCE -Wp,-D_FORTIFY_SO
URCE=2 -fexceptions --param=ssp-buffer-size=4 -fPIE -fstack-protector -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builti
n-free -g -O2 -iquote /home/dalekp/ceph-bp-smallpglog/ceph/src/include -D__CEPH__ -D_FILE_OFFSET_BITS=64 -D_THREAD_SAFE -D__STDC_FORMAT_MACROS
-D_GNU_SOURCE -DCEPH_LIBDIR=/usr/lib -DCEPH_PKGLIBDIR=/usr/lib/ceph -DGTEST_USE_OWN_TR1_TUPLE=0 -D_REENTRANT -fPIC -I/usr/include/python2.6 -
c rbd.c -o /home/dalekp/ceph-bp-smallpglog/ceph/src/build/temp.linux-x86_64-2.6/rbd.o
gcc: rbd.c: No such file or directory
gcc: no input files
error: command 'gcc' failed with exit status 1

Possibly introduced with https://github.com/ceph/ceph/pull/6768.

If Cython 0.14.1 is deliberately not supported, it should be stated so during "configure" step (Cython presence is already checked).

Associated revisions

Revision ebdb0a9c (diff)
Added by Josh Durgin about 8 years ago

packaging: add build dependency on python devel package

This is required for building python modules with cython, but for some
reason is not a direct dependency (on debian only a recommends) for
the cython package itself.

Refs: #14059
Signed-off-by: Josh Durgin <>

History

#1 Updated by Piotr Dalek over 8 years ago

  • Regression changed from No to Yes

#2 Updated by Loïc Dachary over 8 years ago

  • Subject changed from Can't build Ceph with --with-rbd to Can't build Ceph with --with-rbd (Cython)

#3 Updated by Piotr Dalek over 8 years ago

  • Status changed from New to 12

Also doesn't work right away on CentOS 7 with Cython 0.19:


creating /ceph/src/build
creating /ceph/src/build/temp.linux-x86_64-2.7
gcc -pthread -fno-strict-aliasing -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 -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 -iquote /ceph/src/include -Wall -Wtype-limits -Wignored-qualifiers -Winit-self -Wpointer-arith -fno-strict-aliasing -fsigned-char -rdynamic -O2 -g -pipe -Wall -Wp,-U_FORTIFY_SOURCE -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -fPIE -fstack-protector -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free -g -O2 -iquote /ceph/src/include -D__CEPH__ -D_FILE_OFFSET_BITS=64 -D_THREAD_SAFE -D__STDC_FORMAT_MACROS -D_GNU_SOURCE -DCEPH_LIBDIR=/usr/lib -DCEPH_PKGLIBDIR=/usr/lib/ceph -DGTEST_USE_OWN_TR1_TUPLE=0 -D_REENTRANT -fPIC -I/usr/include/python2.7 -c rbd.c -o /ceph/src/build/temp.linux-x86_64-2.7/rbd.o
rbd.c:8:22: fatal error: pyconfig.h: No such file or directory
#include "pyconfig.h"
^
compilation terminated.
error: command 'gcc' failed with exit status 1
make[3]: *** [pybind-all] Error 1
[branch@localhost ceph]$ cython -V
Cython version 0.19

Installing python-devel helps in this case.

#4 Updated by Josh Durgin over 8 years ago

Thanks for looking into this Piotr. Sorry for the trouble - looks like we missed adding a lower bound on cython version to configure, and a build-requires for the packages on python-devel.

The latter didn't hit the gitbuilders since they already have python-devel for building the docs.

#5 Updated by Piotr Dalek over 8 years ago

I'll investigate this further, currently I'm on CentOS 6 and even installing Cython 0.24 doesn't help. I hope I'll be able to make it work there again.

#6 Updated by Josh Durgin over 8 years ago

Do you have everything that install-deps.sh would install? Cython 0.20.1 was the earliest version I tried on, but I did not check el6 distros.

If you have a current error I may be able to help too.

#7 Updated by Piotr Dalek over 8 years ago

Here's what I get on CentOS 6 with Cython 0.24 any python-devel package installed:


CXXLD ceph_test_librbd_fsx
cd ./pybind; CPPFLAGS="-iquote \/home/dalekp/ceph-bp-smallpglog/ceph/src/include -D__CEPH__ -D_FILE_OFFSET_BITS=64 -D_THREAD_SAFE -D__STDC_FORMAT_MACROS -D_GNU_SOURCE -DCEPH_LIBDIR=\"/usr/lib\" -DCEPH_PKGLIBDIR=\"/usr/lib/ceph\" -DGTEST_USE_OWN_TR1_TUPLE=0 -D_REENTRANT " CFLAGS="-iquote \/home/dalekp/ceph-bp-smallpglog/ceph/src/include -Wall -Wtype-limits -Wignored-qualifiers -Winit-self -Wpointer-arith -fno-strict-aliasing -fsigned-char -rdynamic -O2 -g -pipe -Wall -Wp,-U_FORTIFY_SOURCE -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -fPIE -fstack-protector -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free -g -O2" LDFLAGS="-L\/home/dalekp/ceph-bp-smallpglog/ceph/src/.libs -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -latomic_ops " CYTHON_BUILD_DIR="/home/dalekp/ceph-bp-smallpglog/ceph/src/build" /usr/bin/python ./setup.py build \
--build-base /home/dalekp/ceph-bp-smallpglog/ceph/src/build \
--verbose
CXXLD rbd
CXXLD rbd-nbd
copying selected object files to avoid basename conflicts...
Traceback (most recent call last):
File "./setup.py", line 47, in <module>
], build_dir=os.environ.get("CYTHON_BUILD_DIR", None)),
File "/usr/lib64/python2.6/site-packages/Cython-0.23.4-py2.6-linux-x86_64.egg/Cython/Build/Dependencies.py", line 832, in cythonize
copy_to_build_dir(source)
File "/usr/lib64/python2.6/site-packages/Cython-0.23.4-py2.6-linux-x86_64.egg/Cython/Build/Dependencies.py", line 776, in copy_to_build_dir
shutil.copy(filepath, mod_dir)
File "/usr/lib64/python2.6/shutil.py", line 84, in copy
copyfile(src, dst)
File "/usr/lib64/python2.6/shutil.py", line 50, in copyfile
with open(src, 'rb') as fsrc:
IOError: [Errno 2] No such file or directory: 'rbd.c'
make[3]: *** [pybind-all] Error 1
make[3]: *** Waiting for unfinished jobs....

#8 Updated by Piotr Dalek over 8 years ago

Just FYI: on CentOS 6:

$ yum list installed | grep python-devel
python-devel.x86_64 2.6.6-64.el6 @base

#9 Updated by Piotr Dalek over 8 years ago

On CentOS 7:

$ yum list installed | grep python-devel
python-devel.x86_64 2.7.5-18.el7_1.1 @updates

#10 Updated by Sage Weil about 8 years ago

  • Project changed from Ceph to rbd
  • Assignee set to Josh Durgin

#11 Updated by Alfredo Deza about 8 years ago

We are unable to get 10.0.2 because of the `pyconfig.h` error:

creating /tmp/buildd/ceph-10.0.2/src/build/temp.linux-x86_64-2.7/tmp/buildd/ceph-10.0.2/src/build
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -iquote /tmp/buildd/ceph-10.0.2/src/include -Wall -Wtype-limits -Wignored-qualifiers -Winit-self -Wpointer-arith -fno-strict-aliasing -fsigned-char -rdynamic -O2 -g -pipe -Wall -Wp,-U_FORTIFY_SOURCE -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -fPIE -fstack-protector-strong -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free -g -O2 -iquote /tmp/buildd/ceph-10.0.2/src/include -D__CEPH__ -D_FILE_OFFSET_BITS=64 -D_THREAD_SAFE -D__STDC_FORMAT_MACROS -D_GNU_SOURCE -DCEPH_LIBDIR=/usr/lib -DCEPH_PKGLIBDIR=/usr/lib/ceph -DGTEST_USE_OWN_TR1_TUPLE=0 -D_REENTRANT -fPIC -I/usr/include/python2.7 -c /tmp/buildd/ceph-10.0.2/src/build/rbd.c -o /tmp/buildd/ceph-10.0.2/src/build/temp.linux-x86_64-2.7/tmp/buildd/ceph-10.0.2/src/build/rbd.o
/tmp/buildd/ceph-10.0.2/src/build/rbd.c:8:22: fatal error: pyconfig.h: No such file or directory
 #include "pyconfig.h" 
                      ^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

https://jenkins.ceph.com/job/ceph-build/ARCH=x86_64,DIST=jessie,MACHINE_SIZE=huge/55/console

#12 Updated by Josh Durgin about 8 years ago

  • Assignee deleted (Josh Durgin)

#13 Updated by Jason Dillaman almost 8 years ago

  • Status changed from 12 to Need More Info

@Piotr: is this still an issue for you and the Jewel release?

#14 Updated by Jason Dillaman almost 8 years ago

  • Status changed from Need More Info to Resolved

Jewel doesn't officially support stock CentOS 6 and no known issues with CentOS 7.

Also available in: Atom PDF