facebookarchive / bistro

Bistro is a flexible distributed scheduler, a high-performance framework supporting multiple paradigms while retaining ease of configuration, management, and monitoring.
https://bistro.io
MIT License
1.04k stars 158 forks source link

Bistro source code didn't match with folly library. #3

Closed rchatsiri closed 8 years ago

rchatsiri commented 8 years ago
-- Configuring done
-- Generating done
-- Build files have been written to:  workspacecpp/bistro/bistro/build/Debug
[  1%] Built target lib_bistro_sqlite
[ 17%] Built target lib_bistro_if
[ 18%] Building CXX object utils/CMakeFiles/lib_bistro_utils.dir/ProcessRunner.cpp.o
 workspacecpp/bistro/bistro/utils/ProcessRunner.cpp: In member function ‘std::unique_ptr<folly::Subprocess> facebook::bistro::ProcessRunner::makeSubprocess(facebook::bistro::ProcessRunner::WriteCallback, const boost::filesystem::path&, const std::vector<std::basic_string<char> >&, const std::vector<std::basic_string<char> >&)’:
 workspacecpp/bistro/bistro/utils/ProcessRunner.cpp:138:5: error: ‘std::string’ has no member named ‘toStdString’
   ).toStdString());
     ^
 workspacecpp/bistro/bistro/utils/ProcessRunner.cpp: In member function ‘void facebook::bistro::ProcessRunner::exceptionCallback(folly::StringPiece, folly::StringPiece, const std::exception&)’:
 workspacecpp/bistro/bistro/utils/ProcessRunner.cpp:183:5: error: ‘std::string’ has no member named ‘toStdString’
   ).toStdString());
     ^
utils/CMakeFiles/lib_bistro_utils.dir/build.make:123: recipe for target 'utils/CMakeFiles/lib_bistro_utils.dir/ProcessRunner.cpp.o' failed
make[2]: *** [utils/CMakeFiles/lib_bistro_utils.dir/ProcessRunner.cpp.o] Error 1
CMakeFiles/Makefile2:2907: recipe for target 'utils/CMakeFiles/lib_bistro_utils.dir/all' failed
make[1]: *** [utils/CMakeFiles/lib_bistro_utils.dir/all] Error 2
Makefile:86: recipe for target 'all' failed
make: *** [all] Error 2

I'm recheck with folly source code in FBString.h is return std::string.

1113 #ifndef _LIBSTDCXX_FBSTRING
1114   // Compatibility with std::string
1115   basic_fbstring & operator=(const std::string & rhs) {
1116     return assign(rhs.data(), rhs.size());
1117   }
1118
1119   // Compatibility with std::string
1120   std::string toStdString() const {
1121     return std::string(data(), size());
1122   }
1123 #else
1124   // A lot of code in fbcode still uses this method, so keep it here for now.
1125   const basic_fbstring& toStdString() const {
1126     return *this;
1127   }
1128 #endif

It should compile bistro source code completed, but after run script build.sh Debug is show an error above.

snarkmaster commented 8 years ago

I will be updating the whole codebase before long, but for the time being, you need a much older version of fbthrift & folly to get this to build. Follow this script:

https://github.com/facebook/bistro/blob/master/bistro/build/deps_ubuntu_12.04.sh

You'll want to check out fbthrift v0.28.0 and folly v0.47.0.

Sorry about the code being out of date, it's being actively worked on, I just haven't finished putting together the OSS release due to personal circumstances last year.