All of lore.kernel.org
 help / color / mirror / Atom feed
* rocksdb related build error
@ 2016-05-03  7:05 Ming Lin
  2016-05-03 12:26 ` Sage Weil
  0 siblings, 1 reply; 7+ messages in thread
From: Ming Lin @ 2016-05-03  7:05 UTC (permalink / raw)
  To: ceph-devel; +Cc: John Spray

Hi John,

I got rocksdb related build error (commit bb7d9c15).
Any hint to fix it?

It's OK if I build in the ceph source tree.

mlin@ssi:~/ceph$ ./autogen.sh
...

mlin@ssi:~/ceph-build$ ../ceph/configure
...

mlin@ssi:~/ceph-build$ make -j8
...
make[3]: Entering directory `/home/mlin/ceph-build/src'
cd rocksdb && CC="gcc" CXX="g++" EXTRA_CXXFLAGS=-fPIC PORTABLE=1 make
-j8 static_lib
/bin/bash: line 0: cd: rocksdb: No such file or directory
make[3]: *** [rocksdb/librocksdb.a] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: Leaving directory `/home/mlin/ceph-build/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/mlin/ceph-build/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/mlin/ceph-build/src'
make: *** [all-recursive] Error 1


mlin@ssi:~/ceph-build$ ls src/
acconfig.h  client      crush         java             kv
 log       mount     os        rbd_fuse    test
arch        cls         erasure-code  journal          librados
 Makefile  msg       osd       rbd_replay  tools
auth        common      global        json_spirit      libradosstriper
 mds       objclass  osdc      rgw         tracing
civetweb    compressor  gmock         key_value_store  librbd
 mon       ocf       perfglue  stamp-h1    xxHash

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: rocksdb related build error
  2016-05-03  7:05 rocksdb related build error Ming Lin
@ 2016-05-03 12:26 ` Sage Weil
  2016-05-03 18:52   ` Jianjian Huo-SSI
  2016-05-03 21:15   ` Ming Lin
  0 siblings, 2 replies; 7+ messages in thread
From: Sage Weil @ 2016-05-03 12:26 UTC (permalink / raw)
  To: Ming Lin; +Cc: ceph-devel, John Spray

On Tue, 3 May 2016, Ming Lin wrote:
> Hi John,
> 
> I got rocksdb related build error (commit bb7d9c15).
> Any hint to fix it?
> 
> It's OK if I build in the ceph source tree.

Out of tree builds don't work currently with autotools.

sage

 
> mlin@ssi:~/ceph$ ./autogen.sh
> ...
> 
> mlin@ssi:~/ceph-build$ ../ceph/configure
> ...
> 
> mlin@ssi:~/ceph-build$ make -j8
> ...
> make[3]: Entering directory `/home/mlin/ceph-build/src'
> cd rocksdb && CC="gcc" CXX="g++" EXTRA_CXXFLAGS=-fPIC PORTABLE=1 make
> -j8 static_lib
> /bin/bash: line 0: cd: rocksdb: No such file or directory
> make[3]: *** [rocksdb/librocksdb.a] Error 1
> make[3]: *** Waiting for unfinished jobs....
> make[3]: Leaving directory `/home/mlin/ceph-build/src'
> make[2]: *** [all-recursive] Error 1
> make[2]: Leaving directory `/home/mlin/ceph-build/src'
> make[1]: *** [all] Error 2
> make[1]: Leaving directory `/home/mlin/ceph-build/src'
> make: *** [all-recursive] Error 1
> 
> 
> mlin@ssi:~/ceph-build$ ls src/
> acconfig.h  client      crush         java             kv
>  log       mount     os        rbd_fuse    test
> arch        cls         erasure-code  journal          librados
>  Makefile  msg       osd       rbd_replay  tools
> auth        common      global        json_spirit      libradosstriper
>  mds       objclass  osdc      rgw         tracing
> civetweb    compressor  gmock         key_value_store  librbd
>  mon       ocf       perfglue  stamp-h1    xxHash
> --
> 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
> 
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: rocksdb related build error
  2016-05-03 12:26 ` Sage Weil
@ 2016-05-03 18:52   ` Jianjian Huo-SSI
  2016-05-03 19:03     ` Sage Weil
  2016-05-03 21:15   ` Ming Lin
  1 sibling, 1 reply; 7+ messages in thread
From: Jianjian Huo-SSI @ 2016-05-03 18:52 UTC (permalink / raw)
  To: Sage Weil, Ming Lin; +Cc: ceph-devel@vger.kernel.org, John Spray

Hi Sage,

When we are going to pull in latest RocksDB release? We are still using code base from last year.
RocksDB stops working with Bluestore after 6 hours writes, maybe it's related to old RocksDB code or recycled log files?
http://tracker.ceph.com/issues/15600

Jianjian

On Tue, May 3, 2016 at 5:26 AM, Sage Weil <sage@newdream.net> wrote:
> On Tue, 3 May 2016, Ming Lin wrote:
>> Hi John,
>>
>> I got rocksdb related build error (commit bb7d9c15).
>> Any hint to fix it?
>>
>> It's OK if I build in the ceph source tree.
>
> Out of tree builds don't work currently with autotools.
>
> sage
>
>
>> mlin@ssi:~/ceph$ ./autogen.sh
>> ...
>>
>> mlin@ssi:~/ceph-build$ ../ceph/configure
>> ...
>>
>> mlin@ssi:~/ceph-build$ make -j8
>> ...
>> make[3]: Entering directory `/home/mlin/ceph-build/src'
>> cd rocksdb && CC="gcc" CXX="g++" EXTRA_CXXFLAGS=-fPIC PORTABLE=1 make
>> -j8 static_lib
>> /bin/bash: line 0: cd: rocksdb: No such file or directory
>> make[3]: *** [rocksdb/librocksdb.a] Error 1
>> make[3]: *** Waiting for unfinished jobs....
>> make[3]: Leaving directory `/home/mlin/ceph-build/src'
>> make[2]: *** [all-recursive] Error 1
>> make[2]: Leaving directory `/home/mlin/ceph-build/src'
>> make[1]: *** [all] Error 2
>> make[1]: Leaving directory `/home/mlin/ceph-build/src'
>> make: *** [all-recursive] Error 1
>>
>>
>> mlin@ssi:~/ceph-build$ ls src/
>> acconfig.h  client      crush         java             kv
>>  log       mount     os        rbd_fuse    test
>> arch        cls         erasure-code  journal          librados
>>  Makefile  msg       osd       rbd_replay  tools
>> auth        common      global        json_spirit      libradosstriper
>>  mds       objclass  osdc      rgw         tracing
>> civetweb    compressor  gmock         key_value_store  librbd
>>  mon       ocf       perfglue  stamp-h1    xxHash
>> --
>> 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
>>
>>
> --
> 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: rocksdb related build error
  2016-05-03 18:52   ` Jianjian Huo-SSI
@ 2016-05-03 19:03     ` Sage Weil
  0 siblings, 0 replies; 7+ messages in thread
From: Sage Weil @ 2016-05-03 19:03 UTC (permalink / raw)
  To: Jianjian Huo-SSI; +Cc: Ming Lin, ceph-devel@vger.kernel.org, John Spray

On Tue, 3 May 2016, Jianjian Huo-SSI wrote:
> Hi Sage,
> 
> When we are going to pull in latest RocksDB release? We are still using code base from last year.
> RocksDB stops working with Bluestore after 6 hours writes, maybe it's related to old RocksDB code or recycled log files?
> http://tracker.ceph.com/issues/15600

Hmm, I was about to blame bluefs, but it looks you had it turned off.
I'll do a refresh.

sage


> 
> Jianjian
> 
> On Tue, May 3, 2016 at 5:26 AM, Sage Weil <sage@newdream.net> wrote:
> > On Tue, 3 May 2016, Ming Lin wrote:
> >> Hi John,
> >>
> >> I got rocksdb related build error (commit bb7d9c15).
> >> Any hint to fix it?
> >>
> >> It's OK if I build in the ceph source tree.
> >
> > Out of tree builds don't work currently with autotools.
> >
> > sage
> >
> >
> >> mlin@ssi:~/ceph$ ./autogen.sh
> >> ...
> >>
> >> mlin@ssi:~/ceph-build$ ../ceph/configure
> >> ...
> >>
> >> mlin@ssi:~/ceph-build$ make -j8
> >> ...
> >> make[3]: Entering directory `/home/mlin/ceph-build/src'
> >> cd rocksdb && CC="gcc" CXX="g++" EXTRA_CXXFLAGS=-fPIC PORTABLE=1 make
> >> -j8 static_lib
> >> /bin/bash: line 0: cd: rocksdb: No such file or directory
> >> make[3]: *** [rocksdb/librocksdb.a] Error 1
> >> make[3]: *** Waiting for unfinished jobs....
> >> make[3]: Leaving directory `/home/mlin/ceph-build/src'
> >> make[2]: *** [all-recursive] Error 1
> >> make[2]: Leaving directory `/home/mlin/ceph-build/src'
> >> make[1]: *** [all] Error 2
> >> make[1]: Leaving directory `/home/mlin/ceph-build/src'
> >> make: *** [all-recursive] Error 1
> >>
> >>
> >> mlin@ssi:~/ceph-build$ ls src/
> >> acconfig.h  client      crush         java             kv
> >>  log       mount     os        rbd_fuse    test
> >> arch        cls         erasure-code  journal          librados
> >>  Makefile  msg       osd       rbd_replay  tools
> >> auth        common      global        json_spirit      libradosstriper
> >>  mds       objclass  osdc      rgw         tracing
> >> civetweb    compressor  gmock         key_value_store  librbd
> >>  mon       ocf       perfglue  stamp-h1    xxHash
> >> --
> >> 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
> >>
> >>
> > --
> > 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
> 
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: rocksdb related build error
  2016-05-03 12:26 ` Sage Weil
  2016-05-03 18:52   ` Jianjian Huo-SSI
@ 2016-05-03 21:15   ` Ming Lin
  2016-05-03 22:58     ` Marcus Watts
  1 sibling, 1 reply; 7+ messages in thread
From: Ming Lin @ 2016-05-03 21:15 UTC (permalink / raw)
  To: Sage Weil; +Cc: ceph-devel, John Spray

On Tue, May 3, 2016 at 5:26 AM, Sage Weil <sage@newdream.net> wrote:
> On Tue, 3 May 2016, Ming Lin wrote:
>> Hi John,
>>
>> I got rocksdb related build error (commit bb7d9c15).
>> Any hint to fix it?
>>
>> It's OK if I build in the ceph source tree.
>
> Out of tree builds don't work currently with autotools.

I just learned a bit about autotools.
https://en.wikipedia.org/wiki/GNU_Build_System

Could you share what the problem is here to support out-of-tree build?
I'll try to write a patch to fix it.

>
> sage

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: rocksdb related build error
  2016-05-03 21:15   ` Ming Lin
@ 2016-05-03 22:58     ` Marcus Watts
  2016-05-03 23:28       ` Ming Lin
  0 siblings, 1 reply; 7+ messages in thread
From: Marcus Watts @ 2016-05-03 22:58 UTC (permalink / raw)
  To: Ming Lin; +Cc: Sage Weil, ceph-devel, John Spray

On Tue, May 03, 2016 at 02:15:49PM -0700, Ming Lin wrote:
> On Tue, May 3, 2016 at 5:26 AM, Sage Weil <sage@newdream.net> wrote:
> > On Tue, 3 May 2016, Ming Lin wrote:
> >> Hi John,
> >>
> >> I got rocksdb related build error (commit bb7d9c15).
> >> Any hint to fix it?
> >>
> >> It's OK if I build in the ceph source tree.
> >
> > Out of tree builds don't work currently with autotools.
> 
> I just learned a bit about autotools.
> https://en.wikipedia.org/wiki/GNU_Build_System
> 
> Could you share what the problem is here to support out-of-tree build?
> I'll try to write a patch to fix it.

I looked at this fairly recently.

rocksdb comes with a cmake (only used for windows), and makefile build.
The makefile build doesn't use autotools, it's just a gnu makefile.
gnu make does support out of tree builds, but the rocksdb file doesn't
do that.  So, it wants to find all its source wherever it's installed,
and it puts all the .o's in the same place - So: no separate build possible.
This is a problem for both automake & cmake.

You could change the makefile to work "out of tree", but it won't
be pretty.  Probably you would be adding some "VPATH" statements,
add -I as necessary, and you'd have to work within the structure
of the file which I think seemed a bit more complicated than necessary.

You could switch to using a more regular "auto tools" build.  There are
lots of choices here.  Also some drawbacks, so this won't be the fastest
approach.  Will work and is fairly standard.  You will definitely know a
lot more about automake when you get through with this.  Also rocksdb is
actually be a pretty good starting point to learn this.

You could fix up the cmake stuff to work with unix instead.  This will
be way faster than cobbling up automake.  Especially because you
can just steal my work.  Uh, here,
	http://people.redhat.com/mwatts/rocksdb/

It should quite easy to plug rocskdb + cmake into ceph.  And I suppose
you could build rocskdb using cmake even if you were building ceph
with automake - won't be (much) worse than what's happening today with
the makefile.

But, after I got to this point with rocksdb, I decided that instead
of teaching ceph how to build rocksdb in tree, I could just install
it separately.  The web page above has sample rpm's for just this.
I called the resulting packages just "rocksdb" - but the discussion
folks had about this on ceph was towards the direction of packages
named "ceph-rocksdb".

I also have some changes for ceph to make it work with the
externally installed rocksdb,
	https://github.com/mdw-at-linuxbox/ceph/commit/a753c5619c916214a80c200fb46c38a09b191647

This is probably down a different direction than you want to go, but
feel free to use any bits that are useful and ignore what isn't.

					-Marcus Watts

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: rocksdb related build error
  2016-05-03 22:58     ` Marcus Watts
@ 2016-05-03 23:28       ` Ming Lin
  0 siblings, 0 replies; 7+ messages in thread
From: Ming Lin @ 2016-05-03 23:28 UTC (permalink / raw)
  To: Marcus Watts; +Cc: Sage Weil, ceph-devel, John Spray

On Tue, 2016-05-03 at 18:58 -0400, Marcus Watts wrote:
> On Tue, May 03, 2016 at 02:15:49PM -0700, Ming Lin wrote:
> > On Tue, May 3, 2016 at 5:26 AM, Sage Weil <sage@newdream.net>
> > wrote:
> > > On Tue, 3 May 2016, Ming Lin wrote:
> > > > Hi John,
> > > > 
> > > > I got rocksdb related build error (commit bb7d9c15).
> > > > Any hint to fix it?
> > > > 
> > > > It's OK if I build in the ceph source tree.
> > > 
> > > Out of tree builds don't work currently with autotools.
> > 
> > I just learned a bit about autotools.
> > https://en.wikipedia.org/wiki/GNU_Build_System
> > 
> > Could you share what the problem is here to support out-of-tree
> > build?
> > I'll try to write a patch to fix it.
> 
> I looked at this fairly recently.
> 
> rocksdb comes with a cmake (only used for windows), and makefile
> build.
> The makefile build doesn't use autotools, it's just a gnu makefile.
> gnu make does support out of tree builds, but the rocksdb file
> doesn't
> do that.  So, it wants to find all its source wherever it's
> installed,
> and it puts all the .o's in the same place - So: no separate build
> possible.
> This is a problem for both automake & cmake.
> 
> You could change the makefile to work "out of tree", but it won't
> be pretty.  Probably you would be adding some "VPATH" statements,
> add -I as necessary, and you'd have to work within the structure
> of the file which I think seemed a bit more complicated than
> necessary.

Here is my quick hack. Just add ${srcdir}
It's not real "out of tree" because rocksdb is still build in the tree
actually.

diff --git a/src/kv/Makefile.am b/src/kv/Makefile.am
index b876171..0dd754c 100644
--- a/src/kv/Makefile.am
+++ b/src/kv/Makefile.am
@@ -21,8 +21,8 @@ if FREEBSD
         NPROC = sysctl -n hw.ncpu
 endif
 rocksdb/librocksdb.a:
-	cd rocksdb && CC="${CC}" CXX="${CXX}" EXTRA_CXXFLAGS=-fPIC PORTABLE=1 $(MAKE) -j$(shell ${NPROC}) static_lib
-libkv_a_CXXFLAGS += -I rocksdb/include -fPIC
+	cd ${srcdir}/rocksdb && CC="${CC}" CXX="${CXX}" EXTRA_CXXFLAGS=-fPIC PORTABLE=1 $(MAKE) -j$(shell ${NPROC}) static_lib
+libkv_a_CXXFLAGS += -I ${srcdir}/rocksdb/include -fPIC
 libkv_a_SOURCES += kv/RocksDBStore.cc
 libkv_a_LIBADD += rocksdb/librocksdb.a
 noinst_HEADERS += kv/RocksDBStore.h
diff --git a/src/os/Makefile.am b/src/os/Makefile.am
index 6d22778..4305fe2 100644
--- a/src/os/Makefile.am
+++ b/src/os/Makefile.am
@@ -61,7 +61,7 @@ if WITH_LIBZFS
 libos_a_SOURCES += os/filestore/ZFSFileStoreBackend.cc
 endif
 
-libos_a_CXXFLAGS = ${AM_CXXFLAGS} -I rocksdb/include -fPIC
+libos_a_CXXFLAGS = ${AM_CXXFLAGS} -I ${srcdir}/rocksdb/include -fPIC
 libos_a_LIBADD = libos_types.a libkv.a
 noinst_LIBRARIES += libos.a
 
diff --git a/src/test/Makefile-server.am b/src/test/Makefile-server.am
index fbb42e4..2aaa635 100644
--- a/src/test/Makefile-server.am
+++ b/src/test/Makefile-server.am
@@ -227,7 +227,7 @@ endif # WITH_OSD
 if WITH_SLIBROCKSDB
 unittest_rocksdb_option_static_SOURCES = test/objectstore/TestRocksdbOptionParse.cc
 unittest_rocksdb_option_static_LDADD = $(LIBOS) $(UNITTEST_LDADD) $(CEPH_GLOBAL)
-unittest_rocksdb_option_static_CXXFLAGS = $(UNITTEST_CXXFLAGS) ${AM_CXXFLAGS} ${LIBROCKSDB_CFLAGS} -I rocksdb/include
+unittest_rocksdb_option_static_CXXFLAGS = $(UNITTEST_CXXFLAGS) ${AM_CXXFLAGS} ${LIBROCKSDB_CFLAGS} -I ${srcdir}/rocksdb/include
 check_TESTPROGRAMS += unittest_rocksdb_option_static
 endif
 
--
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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-05-03 23:28 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-03  7:05 rocksdb related build error Ming Lin
2016-05-03 12:26 ` Sage Weil
2016-05-03 18:52   ` Jianjian Huo-SSI
2016-05-03 19:03     ` Sage Weil
2016-05-03 21:15   ` Ming Lin
2016-05-03 22:58     ` Marcus Watts
2016-05-03 23:28       ` Ming Lin

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.