Is there any way I can force scribe to configure/compile with an earlier version of Boost? I'm using RHEL 5.2 and Boost 1.36 is not available to me from the yum repository. I'm not too keen on compiling Boost myself as it would be another install I'd have to manage myself.
Thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes, you will just need to make a small change to scribe/src/file.cpp and replace the call to filename() with leaf(). (Boost 1.36 changed the name of this function).
Then just change configure.ac to only expect boost 1.33 and not 1.36.
-Anthony
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Is there any way I can force scribe to configure/compile with an earlier version of Boost? I'm using RHEL 5.2 and Boost 1.36 is not available to me from the yum repository. I'm not too keen on compiling Boost myself as it would be another install I'd have to manage myself.
Thanks
Yes, you will just need to make a small change to scribe/src/file.cpp and replace the call to filename() with leaf(). (Boost 1.36 changed the name of this function).
Then just change configure.ac to only expect boost 1.33 and not 1.36.
-Anthony
I get some funky errors when compiling now:
[root@vdb1 scribe]# make
make all-recursive
make[1]: Entering directory `/usr/src/scribe'
Making all in .
make[2]: Entering directory `/usr/src/scribe'
make[2]: Nothing to be done for `all-am'.
make[2]: Leaving directory `/usr/src/scribe'
Making all in src
make[2]: Entering directory `/usr/src/scribe/src'
/usr/local/bin/thrift -o . -I /usr/local/share/ --cpp --py --php ../if/scribe.t hrift
[WARNING:arguments:1] -cpp is deprecated. Use --gen cpp
[WARNING:arguments:1] -py is deprecated. Use --gen py
[WARNING:arguments:1] -php is deprecated. Use --gen php
make all-am
make[3]: Entering directory `/usr/src/scribe/src'
if g++ -DPACKAGE_NAME=\"scribe\" -DPACKAGE_TARNAME=\"scribe\" -DPACKAGE_VERSION= \"1.5.0\" -DPACKAGE_STRING=\"scribe\ 1.5.0\" -DPACKAGE_BUGREPORT=\"\" -DHAVE_BOO ST= -DHAVE_BOOST_FILESYSTEM= -I. -I. -I.. -I/usr/local/include -I/usr/local/in clude/thrift -I/usr/local/include/thrift -I/usr/local/include/thrift/fb303 -I/us r/include -Wall -O3 -MT scribe.o -MD -MP -MF ".deps/scribe.Tpo" -c -o scribe .o `test -f 'gen-cpp/scribe.cpp' || echo './'`gen-cpp/scribe.cpp; \ then mv -f ".deps/scribe.Tpo" ".deps/scribe.Po"; else rm -f ".deps/scrib e.Tpo"; exit 1; fi
if g++ -DPACKAGE_NAME=\"scribe\" -DPACKAGE_TARNAME=\"scribe\" -DPACKAGE_VERSION= \"1.5.0\" -DPACKAGE_STRING=\"scribe\ 1.5.0\" -DPACKAGE_BUGREPORT=\"\" -DHAVE_BOO ST= -DHAVE_BOOST_FILESYSTEM= -I. -I. -I.. -I/usr/local/include -I/usr/local/in clude/thrift -I/usr/local/include/thrift -I/usr/local/include/thrift/fb303 -I/us r/include -Wall -O3 -MT scribe_types.o -MD -MP -MF ".deps/scribe_types.Tpo" -c -o scribe_types.o `test -f 'gen-cpp/scribe_types.cpp' || echo './'`gen-cpp/sc ribe_types.cpp; \ then mv -f ".deps/scribe_types.Tpo" ".deps/scribe_types.Po"; else rm -f ".deps/scribe_types.Tpo"; exit 1; fi
if g++ -DPACKAGE_NAME=\"scribe\" -DPACKAGE_TARNAME=\"scribe\" -DPACKAGE_VERSION= \"1.5.0\" -DPACKAGE_STRING=\"scribe\ 1.5.0\" -DPACKAGE_BUGREPORT=\"\" -DHAVE_BOO ST= -DHAVE_BOOST_FILESYSTEM= -I. -I. -I.. -I/usr/local/include -I/usr/local/in clude/thrift -I/usr/local/include/thrift -I/usr/local/include/thrift/fb303 -I/us r/include -Wall -O3 -MT scribe_constants.o -MD -MP -MF ".deps/scribe_constan ts.Tpo" -c -o scribe_constants.o `test -f 'gen-cpp/scribe_constants.cpp' || echo './'`gen-cpp/scribe_constants.cpp; \ then mv -f ".deps/scribe_constants.Tpo" ".deps/scribe_constants.Po"; els e rm -f ".deps/scribe_constants.Tpo"; exit 1; fi
rm -f libscribe.a
/usr/bin/ar cru libscribe.a scribe.o scribe_types.o scribe_constants.o
ranlib libscribe.a
if g++ -DPACKAGE_NAME=\"scribe\" -DPACKAGE_TARNAME=\"scribe\" -DPACKAGE_VERSION= \"1.5.0\" -DPACKAGE_STRING=\"scribe\ 1.5.0\" -DPACKAGE_BUGREPORT=\"\" -DHAVE_BOO ST= -DHAVE_BOOST_FILESYSTEM= -I. -I. -I.. -I/usr/local/include -I/usr/local/in clude/thrift -I/usr/local/include/thrift -I/usr/local/include/thrift/fb303 -I/us r/include -Wall -O3 -MT store.o -MD -MP -MF ".deps/store.Tpo" -c -o store.o store.cpp; \ then mv -f ".deps/store.Tpo" ".deps/store.Po"; else rm -f ".deps/store.T po"; exit 1; fi
store.cpp: In member function âbool FileStore::writeMessages(boost::shared_ptr<s td::vector<boost::shared_ptr<scribe::thrift::LogEntry>, std::allocator<boost::sh ared_ptr<scribe::thrift::LogEntry> > > >, boost::shared_ptr<FileInterface>)â:
store.cpp:615: warning: format â%luâ expects type âlong unsigned intâ, but argum ent 5 has type âsize_tâ
store.cpp: In member function âvirtual bool FileStore::readOldest(boost::shared_ ptr<std::vector<boost::shared_ptr<scribe::thrift::LogEntry>, std::allocator<boos t::shared_ptr<scribe::thrift::LogEntry> > > >, tm*)â:
store.cpp:725: warning: format â%luâ expects type âlong unsigned intâ, but argum ent 5 has type âsize_tâ
store.cpp: In member function âvirtual void BufferStore::periodicCheck()â:
store.cpp:1180: warning: format â%luâ expects type âlong unsigned intâ, but argu ment 5 has type âsize_tâ
if g++ -DPACKAGE_NAME=\"scribe\" -DPACKAGE_TARNAME=\"scribe\" -DPACKAGE_VERSION= \"1.5.0\" -DPACKAGE_STRING=\"scribe\ 1.5.0\" -DPACKAGE_BUGREPORT=\"\" -DHAVE_BOO ST= -DHAVE_BOOST_FILESYSTEM= -I. -I. -I.. -I/usr/local/include -I/usr/local/in clude/thrift -I/usr/local/include/thrift -I/usr/local/include/thrift/fb303 -I/us r/include -Wall -O3 -MT store_queue.o -MD -MP -MF ".deps/store_queue.Tpo" -c -o store_queue.o store_queue.cpp; \ then mv -f ".deps/store_queue.Tpo" ".deps/store_queue.Po"; else rm -f ". deps/store_queue.Tpo"; exit 1; fi
store_queue.cpp: In member function âvoid StoreQueue::threadMember()â:
store_queue.cpp:278: warning: format â%luâ expects type âlong unsigned intâ, but argument 5 has type âsize_tâ
if g++ -DPACKAGE_NAME=\"scribe\" -DPACKAGE_TARNAME=\"scribe\" -DPACKAGE_VERSION= \"1.5.0\" -DPACKAGE_STRING=\"scribe\ 1.5.0\" -DPACKAGE_BUGREPORT=\"\" -DHAVE_BOO ST= -DHAVE_BOOST_FILESYSTEM= -I. -I. -I.. -I/usr/local/include -I/usr/local/in clude/thrift -I/usr/local/include/thrift -I/usr/local/include/thrift/fb303 -I/us r/include -Wall -O3 -MT conf.o -MD -MP -MF ".deps/conf.Tpo" -c -o conf.o con f.cpp; \ then mv -f ".deps/conf.Tpo" ".deps/conf.Po"; else rm -f ".deps/conf.Tpo" ; exit 1; fi
if g++ -DPACKAGE_NAME=\"scribe\" -DPACKAGE_TARNAME=\"scribe\" -DPACKAGE_VERSION= \"1.5.0\" -DPACKAGE_STRING=\"scribe\ 1.5.0\" -DPACKAGE_BUGREPORT=\"\" -DHAVE_BOO ST= -DHAVE_BOOST_FILESYSTEM= -I. -I. -I.. -I/usr/local/include -I/usr/local/in clude/thrift -I/usr/local/include/thrift -I/usr/local/include/thrift/fb303 -I/us r/include -Wall -O3 -MT file.o -MD -MP -MF ".deps/file.Tpo" -c -o file.o fil e.cpp; \ then mv -f ".deps/file.Tpo" ".deps/file.Po"; else rm -f ".deps/file.Tpo" ; exit 1; fi
file.cpp: In constructor âFileInterface::FileInterface(const std::string&, bool) â:
file.cpp:52: error: class âFileInterfaceâ does not have any field named âleafâ
file.cpp: In member function âvirtual void StdFile::listImpl(const std::string&, std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char > >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocat or<char> > > >&)â:
file.cpp:212: error: âclass boost::filesystem::pathâ has no member named âfilena meâ
make[3]: *** [file.o] Error 1
make[3]: Leaving directory `/usr/src/scribe/src'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/usr/src/scribe/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/scribe'
make: *** [all] Error 2
Any thoughts?
It looks like you changed the field 'filename' instead of the function 'filename()'. The line you should change is:
file.cpp: _return.push_back(dir_iter->filename());
to
file.cpp: _return.push_back(dir_iter->leaf());
Sorry for the confusion.
-Anthony
Thanks that did the trick
Now to work out how to use it :)