Skip to contentSkip to conversation

leveldb build issues in 0.44

DISCUSSION Nick Couchman 4 participants 5 messages Mar 22, 2012 – Mar 24, 2012

lore
Share & tools
lore
#0 lore raw

I'm trying to build ceph 0.44, but am running into some issues with leveldb not compiling correctly. Here is the output:

make all-recursive
make[2]: Entering directory `/home/abuild/rpmbuild/BUILD/ceph-0.44/src' Making all in ocf
make[3]: Entering directory /home/abuild/rpmbuild/BUILD/ceph-0.44/src/ocf' make[3]: Nothing to be done for all'.
make[3]: Leaving directory `/home/abuild/rpmbuild/BUILD/ceph-0.44/src/ocf' Making all in leveldb
make[3]: Entering directory `/home/abuild/rpmbuild/BUILD/ceph-0.44/src/leveldb' make all-am
make[4]: Entering directory `/home/abuild/rpmbuild/BUILD/ceph-0.44/src/leveldb'
CXX builder.o
In file included from ./db/builder.cc:5:0:
./db/builder.h:8:28: fatal error: leveldb/status.h: No such file or directory compilation terminated.
make[4]: *** [builder.o] Error 1
make[4]: Leaving directory `/home/abuild/rpmbuild/BUILD/ceph-0.44/src/leveldb' make[3]: *** [all] Error 2
make[3]: Leaving directory `/home/abuild/rpmbuild/BUILD/ceph-0.44/src/leveldb'

If I look in the src/leveldb/include directory, I see leveldb/status.h, so I'm not sure why it is failing here? Is there a dependency that I'm missing somewhere? This is an RPM build - if I download the tarball and compile manually it seems to work, though I am doing that on a different system, so that may not be a great test.

-Nick

--------

This e-mail may contain confidential and privileged material for the sole use of the intended recipient. If this email is not intended for you, or you are not responsible for the delivery of this message to the intended recipient, please note that this message may contain SEAKR Engineering (SEAKR) Privileged/Proprietary Information. In such a case, you are strictly prohibited from downloading, photocopying, distributing or otherwise using this message, its contents or attachments in any way. If you have received this message in error, please notify us immediately by replying to this e-mail and delete the message from your mailbox. Information contained in this message that does not relate to the business of SEAKR is neither endorsed by nor attributable to SEAKR.

#1 lore raw

Hmm, leveldb/include must not be in the include path. Anyone with some rpm experience know how to fix that?
-Sam

Quoted 27 lines · Nick Couchman

I'm trying to build ceph 0.44, but am running into some issues with leveldb not compiling correctly.  Here is the output:

make  all-recursive
make[2]: Entering directory `/home/abuild/rpmbuild/BUILD/ceph-0.44/src' Making all in ocf
make[3]: Entering directory /home/abuild/rpmbuild/BUILD/ceph-0.44/src/ocf' make[3]: Nothing to be done for all'.
make[3]: Leaving directory `/home/abuild/rpmbuild/BUILD/ceph-0.44/src/ocf' Making all in leveldb
make[3]: Entering directory `/home/abuild/rpmbuild/BUILD/ceph-0.44/src/leveldb' make  all-am
make[4]: Entering directory `/home/abuild/rpmbuild/BUILD/ceph-0.44/src/leveldb' CXX    builder.o
In file included from ./db/builder.cc:5:0:
./db/builder.h:8:28: fatal error: leveldb/status.h: No such file or directory compilation terminated.
make[4]: *** [builder.o] Error 1
make[4]: Leaving directory `/home/abuild/rpmbuild/BUILD/ceph-0.44/src/leveldb' make[3]: *** [all] Error 2
make[3]: Leaving directory `/home/abuild/rpmbuild/BUILD/ceph-0.44/src/leveldb'

If I look in the src/leveldb/include directory, I see leveldb/status.h, so I'm not sure why it is failing here?  Is there a dependency that I'm missing somewhere?  This is an RPM build - if I download the tarball and compile manually it seems to work, though I am doing that on a different system, so that may not be a great test.

-Nick

Quoted 6 lines

--------
This e-mail may contain confidential and privileged material for the sole use of the intended recipient.  If this email is not intended for you, or you are not responsible for the delivery of this message to the intended recipient, please note that this message may contain SEAKR Engineering (SEAKR) Privileged/Proprietary Information.  In such a case, you are strictly prohibited from downloading, photocopying, distributing or otherwise using this message, its contents or attachments in any way.  If you have received this message in error, please notify us immediately by replying to this e-mail and delete the message from your mailbox.  Information contained in this message that does not relate to the business of SEAKR is neither endorsed by nor attributable to SEAKR. --
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw
Quoted 5 lines
Quoted 1 line
Quoted 1 line · Samuel Just

Hmm, leveldb/include must not be in the include path. Anyone with some rpm experience know how to fix that?
-Sam

I actually figured out partially what the issue is. In the spec file, the make command sets CFLAGS and CXXFLAGS with a bunch of options. In the src/leveldb/Makefile(.in,.am), leveldb is setting up its own CFLAGS and CXXFLAGS, and one of those flags in the include for the header files for leveldb. So, I was able to get around it by changing the CFLAGS = and CXXFLAGS = lines to "override CFLAGS +=" and "override CXXFLAGS +=", which keeps the command-line specified variables, but adds them on to the ones in the Makefile. I don't know if that's the proper way to do it, or if the Makefile needs some tweaking to place includes elsewhere, outside of the CFLAGS/CXXFLAGS variables.

So, I got past that issue and promptly ran into another one:

CXX ceph_dencoder.o
In file included from ./rgw/rgw_common.h:18:0,

                 from ./rgw/rgw_access.h:11,
                 from test/encoding/types.h:87,
                 from test/encoding/ceph_dencoder.cc:13:

./common/ceph_crypto.h:44:22: fatal error: pk11pub.h: No such file or directory compilation terminated.
make[3]: *** [ceph_dencoder.o] Error 1

I'm suspecting something similar - a Makefile that has an issue with CFLAGS/CXXFLAGS being overriden, but now I get to track that one down :-).

-Nick

--------

This e-mail may contain confidential and privileged material for the sole use of the intended recipient. If this email is not intended for you, or you are not responsible for the delivery of this message to the intended recipient, please note that this message may contain SEAKR Engineering (SEAKR) Privileged/Proprietary Information. In such a case, you are strictly prohibited from downloading, photocopying, distributing or otherwise using this message, its contents or attachments in any way. If you have received this message in error, please notify us immediately by replying to this e-mail and delete the message from your mailbox. Information contained in this message that does not relate to the business of SEAKR is neither endorsed by nor attributable to SEAKR.

#3 lore raw
In reply to Nick Couchman
Quoted 4 lines · Nick Couchman

./db/builder.h:8:28: fatal error: leveldb/status.h: No such file or directory compilation terminated.

This is an RPM build

This patch fixed it for me.

leveldb adds -I flags to CFLAGS and CXXFLAGS, but if these macros are overridden in the make command line, the flags are dropped, and the build fails. leveldb should probably use AM_CFLAGS instead, but the spec file can specify the preferred CFLAGS in the configure command line, and then everything will work as expected.

---
 ceph.spec.in |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
ceph.spec.in +5 -4
index b8b2d1f..e5df113 100644
@@ -217,6 +217,8 @@ MY_CONF_OPT="$MY_CONF_OPT --with-gtk2"
 MY_CONF_OPT="$MY_CONF_OPT --without-gtk2"
 %endif
 
+export RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed -e 's/i386/i486/'`
+
 # be explicit about --with/without-tcmalloc because the
 # autoconf default differs from what's needed for rpm
 %{configure}	--prefix=/usr \
@@ -227,7 +229,8 @@ MY_CONF_OPT="$MY_CONF_OPT --without-gtk2"
 		--without-hadoop \
 		$MY_CONF_OPT \
 		%{?_with_ocf} \
-		%{?with_tcmalloc:--with-tcmalloc} %{!?with_tcmalloc:--without-tcmalloc}
+		%{?with_tcmalloc:--with-tcmalloc} %{!?with_tcmalloc:--without-tcmalloc} \
+		CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS"
 
 # fix bug in specific version of libedit-devel
 %if 0%{defined suse_version}
@@ -236,9 +239,7 @@ sed -i -e "s/-lcurses/-lncurses/g" src/Makefile
 sed -i -e "s/-lcurses/-lncurses/g" man/Makefile
 %endif
 
-export RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed -e 's/i386/i486/'`
-
-make -j$(getconf _NPROCESSORS_ONLN) CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS"
+make -j$(getconf _NPROCESSORS_ONLN)
 
 %install
 make DESTDIR=$RPM_BUILD_ROOT install
Signature · 1 line
1.7.7.6
Signature · 5 lines
-- 
Alexandre Oliva, freedom fighter    http://FSFLA.org/~lxoliva/
You must be the change you wish to see in the world. -- Gandhi
Be Free! -- http://FSFLA.org/   FSF Latin America board member
Free Software Evangelist      Red Hat Brazil Compiler Engineer
#4 lore raw

Hey Nick-

Can you confirm this fixes your problem? If so I can apply this to the stable branch (for 0.44.1).

Thanks!
sage

Quoted 10 lines · Alexandre Oliva
Quoted 4 lines · Nick Couchman

./db/builder.h:8:28: fatal error: leveldb/status.h: No such file or directory compilation terminated.

This is an RPM build

This patch fixed it for me.