DistributedR icon indicating copy to clipboard operation
DistributedR copied to clipboard

Cannot build with g++ 4.8

Open henrywoo opened this issue 10 years ago • 3 comments

I installed all the deps, but it also gave me errors. I think there are some gcc version issues.

$make make -C third_party -j8 all make[1]: Entering directory /root/src/DistributedR/third_party' make[1]: Nothing to be done forall'. make[1]: Leaving directory /root/src/DistributedR/third_party' g++ platform/worker/src/ExecutorPool.cpp -c -std=c++0x -g -O2 -fopenmp -finline-limit=10000 -DNDEBUG -DBOOST_LOG_DYN_LINK -DCSTACK_DEFNS -DHAVE_NETINET_IN_H -DHAVE_INTTYPES_H -I /root/src/DistributedR/third_party/install/include -I /root/src/DistributedR/platform/messaging/gen-cpp -I /root/src/DistributedR/third_party/boost_threadpool/threadpool -I /root/src/DistributedR/third_party/atomicio -I platform/common/usr/lib/R/bin/R CMD config --cppflags Rscript -e "Rcpp:::CxxFlags()" Rscript -e "RInside:::CxxFlags()"-lm -rdynamic -L /root/src/DistributedR/lib -Wl,-rpath,/root/src/DistributedR/lib/usr/lib/R/bin/R CMD config --ldflags-lpthread -L/root/src/DistributedR/third_party/install/lib -Wl,-rpath,/root/src/DistributedR/third_party/install/lib -lboost_thread -lboost_system -lboost_log -lboost_log_setup -lboost_chrono -lboost_filesystem -lboost_date_time -L /root/src/DistributedR/third_party/atomicio -Wl,-rpath,/root/src/DistributedR/third_party/atomicio -latomicioRscript -e "Rcpp:::LdFlags()" Rscript -e "RInside:::LdFlags()"` -lrt -Wno-deprecated-declarations -DSTRICT_R_HEADERS -fPIC -o platform/worker/src/ExecutorPool.o In file included from /usr/local/lib/R/site-library/RInside/include/RInside.h:26:0, from platform/common/ArrayData.h:38, from platform/worker/src/ExecutorPool.h:45, from platform/worker/src/ExecutorPool.cpp:31: /usr/local/lib/R/site-library/RInside/include/RInsideCommon.h:49:0: warning: "CSTACK_DEFNS" redefined [enabled by default] #define CSTACK_DEFNS ^ :0:0: note: this is the location of the previous definition platform/worker/src/ExecutorPool.cpp:52:28: error: reference to ‘unordered_set’ is ambiguous unordered_set shmem_arrays, ^ In file included from /root/src/DistributedR/third_party/install/include/boost/unordered/unordered_set.hpp:16:0, from /root/src/DistributedR/third_party/install/include/boost/unordered_set.hpp:16, from platform/worker/src/ExecutorPool.h:34, from platform/worker/src/ExecutorPool.cpp:31: /root/src/DistributedR/third_party/install/include/boost/unordered/unordered_set_fwd.hpp:27:15: note: candidates are: template<class T, class H, class P, class A> class boost::unordered::unordered_set class unordered_set; ^ In file included from /usr/include/c++/4.8/unordered_set:48:0, from /usr/local/lib/R/site-library/Rcpp/include/Rcpp/platform/compiler.h:157, from /usr/local/lib/R/site-library/Rcpp/include/RcppCommon.h:29, from /usr/local/lib/R/site-library/Rcpp/include/Rcpp.h:27, from /usr/local/lib/R/site-library/RInside/include/RInsideCommon.h:38, from /usr/local/lib/R/site-library/RInside/include/RInside.h:26, from platform/common/ArrayData.h:38, from platform/worker/src/ExecutorPool.h:45, from platform/worker/src/ExecutorPool.cpp:31: /usr/include/c++/4.8/bits/unordered_set.h:93:11: note: template<class Value, class Hash, class Pred, class Alloc> class std::unordered_set class unordered_set : check_copy_constructible<Alloc> ^ platform/worker/src/ExecutorPool.cpp:52:28: error: ‘unordered_set’ has not been declared unordered_set *shmem_arrays, ^ platform/worker/src/ExecutorPool.cpp:52:41: error: expected ‘,’ or ‘...’ before ‘<’ token unordered_set *shmem_arrays, ^ platform/worker/src/ExecutorPool.cpp:49:1: error: prototype for ‘presto::ExecutorPool::ExecutorPool(int, presto::ServerInfo, presto::MasterClient, boost::timed_mutex, int)’ does not match any in class ‘presto::ExecutorPool’ ExecutorPool::ExecutorPool(int n, ServerInfo my_location, ^ In file included from platform/worker/src/ExecutorPool.cpp:31:0: platform/worker/src/ExecutorPool.h:49:7: error: candidates are: presto::ExecutorPool::ExecutorPool(const presto::ExecutorPool&) class ExecutorPool { ^ platform/worker/src/ExecutorPool.h:51:3: error: presto::ExecutorPool::ExecutorPool(int, presto::ServerInfo, presto::MasterClient, boost::timed_mutex, boost::unordered::unordered_setstd::basic_string, const string&, int, std::string, int) ExecutorPool(int n_, ServerInfo *my_location_, MasterClient_ master_, ^ In file included from platform/common/ArrayData.h:28:0, from platform/worker/src/ExecutorPool.h:45, from platform/worker/src/ExecutorPool.cpp:31: platform/common/SharedMemory.h: In member function ‘virtual void presto::BoostSharedMemoryObject::truncate(size_t)’: platform/common/SharedMemory.h:117:45: warning: ignoring return value of ‘int lockf(int, int, off_t)’, declared with attribute warn_unused_result [-Wunused-result] lockf( shared_memory_sem, F_ULOCK, 0 ); ^ platform/common/SharedMemory.h:123:43: warning: ignoring return value of ‘int lockf(int, int, off_t)’, declared with attribute warn_unused_result [-Wunused-result] lockf( shared_memory_sem, F_ULOCK, 0 ); ^ In file included from platform/worker/src/ExecutorPool.cpp:29:0: platform/common/UpdateUtils.h: In function ‘int32_t presto::ParseUpdateLine(FILE, char, size_t, int, size_t_, size_t_, char_)’: platform/common/UpdateUtils.h:72:36: warning: ignoring return value of ‘int fscanf(FILE_, const char_, ...)’, declared with attribute warn_unused_result [-Wunused-result] fscanf(in, "\n%[^\n]", message); ^ make: *_* [platform/worker/src/ExecutorPool.o] Error 1

henrywoo avatar Apr 14 '15 18:04 henrywoo

I have solved it by explicitly use boost version instead c++1y. The code is pushed here: https://github.com/henrywoo/DistributedR

henrywoo avatar Apr 14 '15 19:04 henrywoo

Hi Fusheng,

Can you send us a pull request? We can review and merge your changes.

Thanks -Jorge

On Tue, Apr 14, 2015 at 12:29 PM, Fuheng Wu [email protected] wrote:

I have solved it by explicitly use boost version instead c++1y. The code is pushed here: https://github.com/henrywoo/DistributedR

— Reply to this email directly or view it on GitHub https://github.com/vertica/DistributedR/issues/6#issuecomment-93029748.

jorgemarsal avatar Apr 14 '15 19:04 jorgemarsal

https://github.com/vertica/DistributedR/pull/7

On Tue, Apr 14, 2015 at 12:34 PM, Jorge Martinez [email protected] wrote:

Hi Fusheng,

Can you send us a pull request? We can review and merge your changes.

Thanks -Jorge

On Tue, Apr 14, 2015 at 12:29 PM, Fuheng Wu [email protected] wrote:

I have solved it by explicitly use boost version instead c++1y. The code is pushed here: https://github.com/henrywoo/DistributedR

— Reply to this email directly or view it on GitHub <https://github.com/vertica/DistributedR/issues/6#issuecomment-93029748 .

— Reply to this email directly or view it on GitHub https://github.com/vertica/DistributedR/issues/6#issuecomment-93032117.

henrywoo avatar Apr 14 '15 20:04 henrywoo