From: Tommi Virtanen <tommi.virtanen@dreamhost.com>
To: Rutger ter Borg <rutger@terborg.net>
Cc: ceph-devel@vger.kernel.org
Subject: Re: Question about librados
Date: Tue, 5 Apr 2011 09:57:59 -0700 [thread overview]
Message-ID: <20110405165759.GA1710@dreamer> (raw)
In-Reply-To: <inedo0$3v2$1@dough.gmane.org>
On Tue, Apr 05, 2011 at 08:44:15AM +0200, Rutger ter Borg wrote:
> >>I'm in the progress of evaluating librados as an object store. I'm using
> >>Debian's latest packages as of today, and noted that I need to define
> >>NO_ATOMIC_OPS to get something compiled that includes librados.hpp.
> >Hmmm, that's not right! Can you elaborate? It just doesn't build
> >librados.hpp unless you define NO_ATOMIC_OPS? Is there a build error
> >at some point?
> thanks for the elaborate answer! With respect to the compile error,
> I got this in an empty file with just including rados/librados.hpp
>
> $ g++ ./rados.cpp
> In file included from /usr/include/rados/buffer.h:55:0,
> from /usr/include/rados/librados.hpp:10,
> from ./rados.cpp:6:
> /usr/include/rados/atomic.h:25:24: fatal error: atomic_ops.h: No
> such file or directory
>
> compilation terminated.
Ahhh, now I got it. You're not trying to compile Ceph, you're trying
to build software using librados.
The problem here is that whatever our autoconf setup detects, and
whatever libraries it decides to use, might not be available at the
time the external software using librados is compiles. That is, Ceph
compilation environment is different from the end user compilation
environment.
And, even more so, we don't use the autoconfig results at all in the
include files; nothing defines __CEPH__ in this case.
18 #ifdef __CEPH__
19 # include "acconfig.h"
20 #endif
So when atomic.h says:
23 #ifndef NO_ATOMIC_OPS
24 //libatomic_ops implementation
25 #include <atomic_ops.h>
26 namespace ceph {
27
Yup, that'll fail if you don't have atomic-ops development libraries
available.
And even if it compiles, there's no quarantee it works right! Because
what if the actual Ceph compilation really was *without* atomic-ops.
I need to file a few more bug reports next, but after that I'll look
into this more and try to come up with a better recommendation.
Short term, your best bet is to try to match the environment where the
Deb was compiled; install the packages listed on the Build-Depends
line at
http://ceph.newdream.net/git/?p=ceph.git;a=blob;f=debian/control;hb=HEAD
-- you can do that quickly with "sudo apt-get build-dep ceph"
--
:(){ :|:&};:
prev parent reply other threads:[~2011-04-05 16:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-04 11:33 Question about librados Rutger ter Borg
2011-04-04 16:09 ` Gregory Farnum
2011-04-05 6:44 ` Rutger ter Borg
2011-04-05 13:42 ` Gregory Farnum
2011-04-05 13:50 ` Rutger ter Borg
2011-04-05 14:07 ` Wido den Hollander
2011-04-05 16:57 ` Tommi Virtanen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110405165759.GA1710@dreamer \
--to=tommi.virtanen@dreamhost.com \
--cc=ceph-devel@vger.kernel.org \
--cc=rutger@terborg.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.