From patchwork Tue Aug 6 14:58:11 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: huang jun X-Patchwork-Id: 2839437 Return-Path: X-Original-To: patchwork-ceph-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D24CC9F479 for ; Tue, 6 Aug 2013 14:58:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3ABAA201EA for ; Tue, 6 Aug 2013 14:58:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 57E17201E5 for ; Tue, 6 Aug 2013 14:58:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755100Ab3HFO6Y (ORCPT ); Tue, 6 Aug 2013 10:58:24 -0400 Received: from mail-pd0-f178.google.com ([209.85.192.178]:36254 "EHLO mail-pd0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755075Ab3HFO6X (ORCPT ); Tue, 6 Aug 2013 10:58:23 -0400 Received: by mail-pd0-f178.google.com with SMTP id w10so387807pde.23 for ; Tue, 06 Aug 2013 07:58:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=s0Yn2WfATECy0jlGOg8/oJCxNw4xJF0URh8hxsj3fLc=; b=v4je/YMrRkbxDMoVdzs2mWe6cgALrkab+vkOlbzwfbKd+Kv29AcmLI/OxbMZOLHG2m yAqdyk619wWdW4E5O+GwhASvjri7+HNpQCWTIGvbrQccnto2g3ZK1VO2yGS/3PoJhRH0 KnsjNDky0TkUY5nsTCOW7fNteA22pnvIWXOweGccbGsc/l68MPDH3XlI+74d4Uvoqzm5 7N1bnKGmy+5G8DbQJxSB3uqVQvBZGnYvHRADYP99gNlupVPljDjkYtPnPeYOqX+SZHnj wa2g8ZPxwX2T3OAr7+BGwrHWqOloQ3ql+GCeJB22RCG1NYRpFnu2jyzg3Y+eeBh3bqmO gf5A== X-Received: by 10.67.23.36 with SMTP id hx4mr3804742pad.54.1375801102463; Tue, 06 Aug 2013 07:58:22 -0700 (PDT) Received: from [192.168.1.104] ([58.51.149.217]) by mx.google.com with ESMTPSA id om2sm2448457pbc.30.2013.08.06.07.58.16 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 06 Aug 2013 07:58:21 -0700 (PDT) Message-ID: <52010F03.7060806@gmail.com> Date: Tue, 06 Aug 2013 22:58:11 +0800 From: huangjun User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 MIME-Version: 1.0 To: Sage Weil CC: ceph-devel@vger.kernel.org, mark.nelson@inktank.com, Nick Couchman Subject: Re: [ceph-users] compile error on centos 5.9 References: <51FF1100.2000004@gmail.com> <51FF759F.1060502@gmail.com> In-Reply-To: <51FF759F.1060502@gmail.com> Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP ? 2013/8/5 17:51, huangjun ??: > ? 2013/8/5 12:03, Sage Weil ??: >> [Moving to ceph-devel] >> >> On Mon, 5 Aug 2013, huangjun wrote: >>> hi,all >>> i compiled ceph 0.61.3 on centos 5.9,the "sh autogen.sh" and >>> "./configure " is ok, but when i "make", an error occurs, the err log: >>> /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/concurrence.h: >>> >>> In function ?int rados::cls::lock::lock(librados::IoCtx*, const >>> std::string&, const std::string&, ClsLockType, const std::string&, >>> const >>> std::string&, const std::string&, const utime_t&, uint8_t)?: >>> /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/concurrence.h:83: >>> >>> error: ?class __gnu_cxx::lock? is not a function, >>> cls/lock/cls_lock_client.cc:59: error: conflict with ?int >>> rados::cls::lock::lock(librados::IoCtx*, const std::string&, const >>> std::string&, ClsLockType, const std::string&, const std::string&, >>> const >>> std::string&, const utime_t&, uint8_t)? >>> cls/lock/cls_lock_client.cc:62: error: in call to ?lock? >>> /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/concurrence.h: >>> >>> In member function ?void >>> rados::cls::lock::Lock::lock_shared(librados::ObjectWriteOperation*)?: >>> /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/concurrence.h:83: >>> >>> error: ?class __gnu_cxx::lock? is not a function, >>> cls/lock/cls_lock_client.cc:59: error: conflict with ?int >>> rados::cls::lock::lock(librados::IoCtx*, const std::string&, const >>> std::string&, ClsLockType, const std::string&, const std::string&, >>> const >>> std::string&, const utime_t&, uint8_t)? >>> cls/lock/cls_lock_client.cc:181: error: in call to ?lock? >>> /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/concurrence.h: >>> >>> In member function ?int >>> rados::cls::lock::Lock::lock_shared(librados::IoCtx*, const >>> std::string&)?: >>> /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/concurrence.h:83: >>> >>> error: ?class __gnu_cxx::lock? is not a function, >>> cls/lock/cls_lock_client.cc:59: error: conflict with ?int >>> rados::cls::lock::lock(librados::IoCtx*, const std::string&, const >>> std::string&, ClsLockType, const std::string&, const std::string&, >>> const >>> std::string&, const utime_t&, uint8_t)? >>> cls/lock/cls_lock_client.cc:187: error: in call to ?lock? >>> /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/concurrence.h: >>> >>> In member function ?void >>> rados::cls::lock::Lock::lock_exclusive(librados::ObjectWriteOperation*)?: >>> >>> /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/concurrence.h:83: >>> >>> error: ?class __gnu_cxx::lock? is not a function, >>> cls/lock/cls_lock_client.cc:59: error: conflict with ?int >>> rados::cls::lock::lock(librados::IoCtx*, const std::string&, const >>> std::string&, ClsLockType, const std::string&, const std::string&, >>> const >>> std::string&, const utime_t&, uint8_t)? >>> cls/lock/cls_lock_client.cc:193: error: in call to ?lock? >>> /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/concurrence.h: >>> >>> In member function ?int >>> rados::cls::lock::Lock::lock_exclusive(librados::IoCtx*, const >>> std::string&)?: >>> /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/concurrence.h:83: >>> >>> error: ?class __gnu_cxx::lock? is not a function, >>> cls/lock/cls_lock_client.cc:59: error: conflict with ?int >>> rados::cls::lock::lock(librados::IoCtx*, const std::string&, const >>> std::string&, ClsLockType, const std::string&, const std::string&, >>> const >>> std::string&, const utime_t&, uint8_t)? >>> cls/lock/cls_lock_client.cc:199: error: in call to ?lock? >>> make[3]: *** [cls_lock_client.o] Error 1 >>> >>> the gcc version is 4.1.2, does this make a difference? >> I suspect so. Mark Nelson successfully built on RHEL5 a while back but >> needed to use a newer gcc. >> >>> what should i do if i want to use ceph-fuse client on centos 5.9? must >>> compile the ceph? or just compile the ceph-fuse code? >> Right.. you only need the ceph-fuse code. 'make ceph-fuse' may do the >> trick. Otherwise, you'll need to just strip out the osd stuff from >> Makefile.am. >> >> Either way, let us know how it goes, as others would benefit from >> this as >> well! >> >> Thanks- >> sage > unfortunatly, i installed gcc4.4.7 and recompiled source code, but > failed again: > > /usr/include/sys/types.h:46: error: conflicting declaration ‘typedef > __loff_t loff_t’ > /usr/include/linux/types.h:30: error: ‘loff_t’ has a previous > declaration as ‘typedef __kernel_loff_t loff_t’ > /usr/include/sys/types.h:62: error: conflicting declaration ‘typedef > __dev_t dev_t’ > /usr/include/linux/types.h:13: error: ‘dev_t’ has a previous > declaration as ‘typedef __kernel_dev_t dev_t’ > In file included from /usr/include/sys/types.h:133, > from /usr/include/stdlib.h:438, > from ./include/buffer.h:29, > from mds/Capability.h:19, > from mds/Capability.cc:15: > /usr/include/time.h:105: error: conflicting declaration ‘typedef void* > timer_t’ > /usr/include/linux/types.h:22: error: ‘timer_t’ has a previous > declaration as ‘typedef __kernel_timer_t timer_t’ > In file included from /usr/include/stdlib.h:438, > from ./include/buffer.h:29, > from mds/Capability.h:19, > from mds/Capability.cc:15: > /usr/include/sys/types.h:198: error: conflicting declaration ‘typedef > long int int64_t’ > /usr/include/linux/types.h:98: error: ‘int64_t’ has a previous > declaration as ‘typedef __s64 int64_t’ > /usr/include/sys/types.h:204: error: conflicting declaration ‘typedef > long unsigned int u_int64_t’ > /usr/include/linux/types.h:97: error: ‘u_int64_t’ has a previous > declaration as ‘typedef __u64 u_int64_t’ > In file included from /usr/include/sys/types.h:220, > from /usr/include/stdlib.h:438, > from ./include/buffer.h:29, > from mds/Capability.h:19, > from mds/Capability.cc:15: > /usr/include/sys/select.h:78: error: conflicting declaration ‘typedef > struct fd_set fd_set’ > /usr/include/linux/types.h:12: error: ‘fd_set’ has a previous > declaration as ‘typedef struct __kernel_fd_set fd_set’ > In file included from /usr/include/stdlib.h:438, > from ./include/buffer.h:29, > from mds/Capability.h:19, > from mds/Capability.cc:15: > /usr/include/sys/types.h:248: error: conflicting declaration ‘typedef > __blkcnt64_t blkcnt_t’ > /usr/include/linux/types.h:114: error: ‘blkcnt_t’ has a previous > declaration as ‘typedef long unsigned int blkcnt_t’ > In file included from ./include/buffer.h:48, > from mds/Capability.h:19, > from mds/Capability.cc:15: > /usr/include/stdint.h:56: error: conflicting declaration ‘typedef long > unsigned int uint64_t’ > /usr/include/linux/types.h:96: error: ‘uint64_t’ has a previous > declaration as ‘typedef __u64 uint64_t’ > In file included from mds/Capability.h:24, > from mds/Capability.cc:15: > mds/mdstypes.h: In member function ‘size_t > __gnu_cxx::hash::operator()(const vinodeno_t&) const’: > mds/mdstypes.h:252: error: no match for call to ‘(__gnu_cxx::hash long unsigned int>) (const snapid_t&)’ > mds/mdstypes.h: In member function ‘void > dentry_key_t::encode(ceph::bufferlist&) const’: > mds/mdstypes.h:531: warning: format ‘%lx’ expects type ‘long unsigned > int’, but argument 4 has type ‘uint64_t’ > mds/mdstypes.h:531: warning: format ‘%lx’ expects type ‘long unsigned > int’, but argument 4 has type ‘uint64_t’ > mds/mdstypes.h: In member function ‘size_t > __gnu_cxx::hash::operator()(const metareqid_t&) const’: > mds/mdstypes.h:673: error: no match for call to ‘(__gnu_cxx::hash long unsigned int>) (int64_t)’ > mds/mdstypes.h:673: error: no match for call to ‘(__gnu_cxx::hash long unsigned int>) (int)’ > mds/mdstypes.h:673: error: no match for call to ‘(__gnu_cxx::hash long unsigned int>) (const uint64_t&)’ > make[3]: *** [Capability.o] Error 1 > > Mark, do you have meet this problem before, and would you like to > share your experiences on centos 5? > > thanks! hi,all today,i have make the ceph compiled successfully on centos 5.9. there are two points to take care of so far: 1)install the required packages ***boost1.41*** a) download the epel package on website: http://dl.fedoraproject.org/pub/epel/5/x86_64/ b) rpm -Uvh epel-release*rpm c) yum install boost141* ***automake,aclocal(1.11.1)*** wget http://ftp.gnu.org/gnu/automake/automake-1.11.1.tar.gz tar xzvf automake-1.11.1.tar.gz cd automake-1.11.1 ./configure make -j4 make install ***gcc44*** yum install gcc44* export CC=/usr/bin/gcc44 export CXX=/usr/bin/g++44 ***other packages*** yum install libtool autoconf autoheader autoreconf e2fsprogs-devel keyutils-libs-devel fuse-devel fuse nss-devel nss libxml2-devel sharutils java-devel expat expat-devel cryptopp cryptopp-devel libatomic_ops-devel gperftools-libs gperftools-devel libaio libaio-devel wget http://pkgs.repoforge.org/libedit/libedit-20090923-3.0_1.el5.rf.x86_64.rpm wget http://pkgs.repoforge.org/libedit/libedit-devel-20090923-3.0_1.el5.rf.x86_64.rpm wget http://pkgs.repoforge.org/snappy/snappy-devel-1.0.5-1.el5.rf.x86_64.rpm wget http://pkgs.repoforge.org/snappy/snappy-1.0.5-1.el5.rf.x86_64.rpm 2)change the include order in src/include/buffer.h ps: does this has effect on other modules? then you can compile ceph on centos5 by "sh autogen && ./configure && make -j4 && make install" welcome to check it! thanks! huangjun --- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/src/include/buffer.h b/src/include/buffer.h index 99c1985..d485c3f 100644 --- a/src/include/buffer.h +++ b/src/include/buffer.h @@ -16,17 +16,19 @@ #define CEPH_BUFFER_H #if defined(__linux__) +#include #include #elif defined(__FreeBSD__) #include #include "include/inttypes.h" +#include #endif #ifndef _XOPEN_SOURCE # define _XOPEN_SOURCE 600 #endif -#include +//#include #include #ifdef DARWIN