Bug #19271
closedCannot build Ceph
0%
Description
Hi guys,
I tried to build ceph source code on CentOS 7.2.1511. After executing ./install-deps.sh that install required libraries and tools, when executing cmake, I got an error:
-- MergeStaticLibraries: cephd: remaining m;/usr/lib64/libdl.so;cls_journal_client;librados;cls_lock_client;cls_rgw_client;cls_refcount_client;cls_log_client;cls_statelog_client;cls_timeindex_client;cls_version_client;cls_replica_log_client;cls_user_client;ceph-common;/usr/lib64/libcurl.so;/usr/lib64/libexpat.so;/usr/lib64/libldap.so;/usr/lib64/liblber.so;/usr/lib64/libssl3.so;/usr/lib64/libsmime3.so;/usr/lib64/libnss3.so;/usr/lib64/libnssutil3.so;/usr/lib64/libplds4.so;/usr/lib64/libplc4.so;/usr/lib64/libnspr4.so;/usr/lib64/libfcgi.so;rt;resolv;/root/ceph/build/boost/lib/libboost_thread.a;/root/ceph/build/boost/lib/libboost_system.a;/root/ceph/build/boost/lib/libboost_regex.a;/root/ceph/build/boost/lib/libboost_random.a;/root/ceph/build/boost/lib/libboost_program_options.a;/root/ceph/build/boost/lib/libboost_date_time.a;/root/ceph/build/boost/lib/libboost_iostreams.a;/usr/lib64/libblkid.so;-lpthread;dl;/usr/lib64/libz.so;/usr/lib64/libatomic_ops.a;/lib64/libleveldb.so;/usr/lib64/libtcmalloc.so;/lib64/libsnappy.so;liblua;/lib64/libaio.so;/usr/lib64/libfuse.so
-- Configuring incomplete, errors occurred!
See also "/root/ceph/build/CMakeFiles/CMakeOutput.log".
See also "/root/ceph/build/CMakeFiles/CMakeError.log".
Here is the error message form CMakeError.log:
Run Build Command:/usr/bin/gmake "cmTryCompileExec2997869652/fast"
/usr/bin/gmake f CMakeFiles/cmTryCompileExec2997869652.dir/build.make CMakeFiles/cmTryCompileExec2997869652.dir/build>st_mtimespec.tv_nsec;
gmake1: Entering directory `/root/ceph/build/CMakeFiles/CMakeTmp'
/usr/bin/cmake -E cmake_progress_report /root/ceph/build/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec2997869652.dir/src.c.o
/usr/bin/cc -DHAVE_STAT_ST_MTIMESPEC_TV_NSEC -o CMakeFiles/cmTryCompileExec2997869652.dir/src.c.o -c /root/ceph/build/CMakeFiles/CMakeTmp/src.c
/root/ceph/build/CMakeFiles/CMakeTmp/src.c: In function ‘main’:
/root/ceph/build/CMakeFiles/CMakeTmp/src.c:7:7: error: ‘struct stat’ has no member named ‘st_mtimespec’
tmp
^
gmake1: Leaving directory `/root/ceph/build/CMakeFiles/CMakeTmp'
gmake1: * [CMakeFiles/cmTryCompileExec2997869652.dir/src.c.o] Error 1
gmake: * [cmTryCompileExec2997869652/fast] Error 2
Source file was:
#include <sys/stat.h>
int main()
{
struct stat* tmp;
tmp->st_mtimespec.tv_nsec;
return 0;
}
I guess the problem maybe some library is too old. Can anyone help me solve this problem? Thanks!
Files
Updated by Brad Hubbard about 7 years ago
That error is expected on CentOS 7.2.
Try this.
git clone https://github.com/ceph/ceph.git
cd ceph/
./run-make-check.sh
Updated by Brad Hubbard about 7 years ago
- Category set to build
- Assignee set to Brad Hubbard
- Source set to Community (user)
Updated by Jing Li about 7 years ago
Hi Brad,
I tried ./run-make-check.sh and still get the same error.
-- Configuring incomplete, errors occurred! See also "/root/ceph/build/CMakeFiles/CMakeOutput.log". See also "/root/ceph/build/CMakeFiles/CMakeError.log".
Error message in /root/ceph/build/CMakeFiles/CMakeError.log:
Run Build Command:/usr/bin/gmake "cmTryCompileExec2997869652/fast" /usr/bin/gmake -f CMakeFiles/cmTryCompileExec2997869652.dir/build.make CMakeFiles/cmTryCompileExec2997869652.dir/build gmake[1]: Entering directory `/root/ceph/build/CMakeFiles/CMakeTmp' /usr/bin/cmake -E cmake_progress_report /root/ceph/build/CMakeFiles/CMakeTmp/CMakeFiles 1 Building C object CMakeFiles/cmTryCompileExec2997869652.dir/src.c.o /usr/bin/cc -DHAVE_STAT_ST_MTIMESPEC_TV_NSEC -o CMakeFiles/cmTryCompileExec2997869652.dir/src.c.o -c /root/ceph/build/CMakeFiles/CMakeTmp/src.c /root/ceph/build/CMakeFiles/CMakeTmp/src.c: In function ‘main’: /root/ceph/build/CMakeFiles/CMakeTmp/src.c:7:7: error: ‘struct stat’ has no member named ‘st_mtimespec’ tmp->st_mtimespec.tv_nsec; ^ gmake[1]: Leaving directory `/root/ceph/build/CMakeFiles/CMakeTmp' gmake[1]: *** [CMakeFiles/cmTryCompileExec2997869652.dir/src.c.o] Error 1 gmake: *** [cmTryCompileExec2997869652/fast] Error 2 Source file was: #include <sys/stat.h> int main() { struct stat* tmp; tmp->st_mtimespec.tv_nsec; return 0; }
Should I update some lib or something? Thanks!
Updated by Brad Hubbard about 7 years ago
Hi Jane,
I get that error on centOS 7.2 as well, it's not the problem.
Can you attach the CMakeOutput.log and CMakeError.log files please?
Updated by Jing Li about 7 years ago
- File CMakeError.log CMakeError.log added
- File CMakeOutput.log CMakeOutput.log added
Hi Brad,
The file is attached.
Updated by Brad Hubbard about 7 years ago
No luck there I'm afraid.
From the ceph directory could you do the following?
rm -rf build
mkdir build && cd $_
cmake .. &> /tmp/cmakeout.txt
cd ..
rm -rf build
mkdir build && cd $_
cmake --trace .. &> /tmp/cmaketraceout.txt
Then compress and upload /tmp/cmakeout.txt and /tmp/cmaketraceout.txt
Updated by Jing Li about 7 years ago
- File cmakeout.zip cmakeout.zip added
Hi Brad,
cmakeout.txt and cmaketraceout.txt is attached.Thanks!
Updated by Brad Hubbard about 7 years ago
Here we go.
CMake Error at /usr/share/cmake/Modules/ExternalProject.cmake:1426 (message): error: no download info for 'zstd_ext' -- please specify existing/non-empty SOURCE_DIR or one of URL, CVS_REPOSITORY and CVS_MODULE, SVN_REPOSITORY, GIT_REPOSITORY, HG_REPOSITORY or DOWNLOAD_COMMAND Call Stack (most recent call first): /usr/share/cmake/Modules/ExternalProject.cmake:1805 (_ep_add_download_command) src/compressor/zstd/CMakeLists.txt:7 (ExternalProject_Add)
Could you please paste the output of "rpm -q cmake"
Updated by Jing Li about 7 years ago
Here is output.
[root@Ctrust tmp]# rpm -q cmake cmake-2.8.12.2-2.el7.x86_64
Updated by Brad Hubbard about 7 years ago
OK, that looks fine. I guess, for whatever reason, the subdirectory src/zstd is missing or perhaps empty as the error message suggests or has some other problem causing this message.
Could you try running the following?
git submodule foreach --recursive git clean -fdx
git submodule update --init --recursive
Then try ./run-make-check.sh again.
If that doesn't work please try cloning the ceph repo again and see if the same thing happens with a fresh copy.
Updated by Jing Li about 7 years ago
Hi Brad,
Thanks for your helpful advice. But I get a new error... After cloning src/zstd, ./run-make-check.sh went well until 97%.
This is the error message:
Linking CXX executable ../../../bin/rbd [ 97%] Built target rbd Scanning dependencies of target ceph-dencoder Traceback (most recent call last): File "/root/ceph/src/pybind/cephfs/setup.py", line 18, in <module> from setuptools import setup File "/usr/lib/python2.7/site-packages/setuptools/__init__.py", line 2, in <module> from setuptools.extension import Extension, Library File "/usr/lib/python2.7/site-packages/setuptools/extension.py", line 5, in <module> from setuptools.dist import _get_unpatched File "/usr/lib/python2.7/site-packages/setuptools/dist.py", line 7, in <module> from setuptools.command.install import install File "/usr/lib/python2.7/site-packages/setuptools/command/__init__.py", line 8, in <module> from setuptools.command import install_scripts File "/usr/lib/python2.7/site-packages/setuptools/command/install_scripts.py", line 3, in <module> from pkg_resources import Distribution, PathMetadata, ensure_directory File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 72, in <module> import packaging.requirements File "/usr/lib/python2.7/site-packages/packaging/requirements.py", line 59, in <module> MARKER_EXPR = originalTextFor(MARKER_EXPR())("marker") TypeError: __call__() takes exactly 2 arguments (1 given) make[3]: *** [src/pybind/cephfs/CMakeFiles/cython_cephfs] Error 1 make[2]: *** [src/pybind/cephfs/CMakeFiles/cython_cephfs.dir/all] Error 2 make[2]: *** Waiting for unfinished jobs....
Besides, I was confused about build ceph. The official doc says these steps are enough:
cd ceph
./install-deps.sh
mkdir build
cd build
cmake ..
make
Should I execute ./do_cmake.sh or anything else after ./run-make-check.sh?
Updated by Brad Hubbard about 7 years ago
./run-make-check.sh is a script that runs all of the above and also runs the tests (you don't need to do this) so sure, you can run the other commands. It's just easier for me to specify one command that runs all the commands in a known sequence.
Your current problem looks like some issue with a python and pip version mismatch. What versions do you get when you run "python -V" and "pip -V"?
https://bugzilla.redhat.com/show_bug.cgi?id=1417613 is one example I found. On my test system pip is only installed at "/tmp/ceph-disk-virtualenv/bin/pip" and "/tmp/ceph-detect-init-virtualenv/bin/pip"
- rpm -q pyparsing
pyparsing-1.5.6-9.el7.noarch - rpm -q python2-pip
package python2-pip is not installed - rpm -q python
python-2.7.5-48.el7.x86_64
Updated by Jing Li about 7 years ago
Thanks Brad. It seems to be the problem of pip. At first, my enviroment was like this:
[root@Ctrust ceph]# python -V Python 2.7.5 [root@Ctrust ceph]# pip -V pip 9.0.1 from /usr/lib/python2.7/site-packages (python 2.7) [root@Ctrust ceph]# rpm -q pyparsing pyparsing-1.5.6-9.el7.noarch [root@Ctrust ceph]# rpm -q python2-pip package python2-pip is not installed [root@Ctrust ceph]# rpm -q python python-2.7.5-48.el7.x86_64
So I tried to install python2-pip, and pip crashed.
Then followed the guide https://bugzilla.redhat.com/show_bug.cgi?id=1416577, and execute these:
yum install ftp://mirror.switch.ch/pool/4/mirror/centos/7.3.1611/cloud/x86_64/openstack-kilo/common/pyparsing-2.0.3-1.el7.noarch.rpm pip install docutils pip install --upgrade pip
In the end, ceph was built successfully.
Updated by Brad Hubbard about 7 years ago
Good to hear Jane.
If it's OK with you I'll close this out then?