Derecho-Project / derecho

The main code repository for the Derecho project.
BSD 3-Clause "New" or "Revised" License
186 stars 47 forks source link

Build failure on ubuntu x64 g++ #25

Closed scottslewis closed 6 years ago

scottslewis commented 6 years ago

I was able to install the prerequisites on an Ubuntu x64 machine I have access to, and using cmake/g++ I got the following output:

slewis@ecf-services:~/git/derecho-unified/Release$ cmake -DCMAKE_BUILD_TYPE=Release ..
-- The CXX compiler identification is GNU 5.4.0
-- Check for working CXX compiler: /usr/bin/g++
-- Check for working CXX compiler: /usr/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- The C compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/slewis/git/derecho-unified/Release
slewis@ecf-services:~/git/derecho-unified/Release$ ls
CMakeCache.txt  cmake_install.cmake  Makefile    rdmc  target
CMakeFiles      derecho              persistent  sst   tcp
slewis@ecf-services:~/git/derecho-unified/Release$ make
Scanning dependencies of target persistent
[  0%] Building CXX object persistent/CMakeFiles/persistent.dir/Persistent.cpp.o
[  1%] Building CXX object persistent/CMakeFiles/persistent.dir/PersistLog.cpp.o
[  1%] Building CXX object persistent/CMakeFiles/persistent.dir/FilePersistLog.cpp.o
[  2%] Building CXX object persistent/CMakeFiles/persistent.dir/HLC.cpp.o
[  3%] Linking CXX shared library ../target/usr/local/lib/libpersistent.so
[  3%] Built target persistent
Scanning dependencies of target mutils_target
[  3%] Built target mutils_target
Scanning dependencies of target mutils_serialization_target
[  3%] Built target mutils_serialization_target
Scanning dependencies of target tcp
[  4%] Building CXX object tcp/CMakeFiles/tcp.dir/tcp.cpp.o
[  4%] Linking CXX shared library libtcp.so
[  4%] Built target tcp
Scanning dependencies of target rdmc
[  4%] Building CXX object rdmc/CMakeFiles/rdmc.dir/rdmc.cpp.o
[  5%] Building CXX object rdmc/CMakeFiles/rdmc.dir/util.cpp.o
[  6%] Building CXX object rdmc/CMakeFiles/rdmc.dir/group_send.cpp.o
[  6%] Building CXX object rdmc/CMakeFiles/rdmc.dir/verbs_helper.cpp.o
[  7%] Building CXX object rdmc/CMakeFiles/rdmc.dir/schedule.cpp.o
[  7%] Linking CXX shared library librdmc.so
[  7%] Built target rdmc
Scanning dependencies of target sst
[  7%] Building CXX object sst/CMakeFiles/sst.dir/verbs.cpp.o
[  8%] Building CXX object sst/CMakeFiles/sst.dir/poll_utils.cpp.o
[  9%] Building CXX object sst/CMakeFiles/sst.dir/__/derecho/connection_manager.cpp.o
[  9%] Linking CXX shared library libsst.so
[  9%] Built target sst
Scanning dependencies of target derecho
[  9%] Building CXX object derecho/CMakeFiles/derecho.dir/derecho_sst.cpp.o
[ 10%] Building CXX object derecho/CMakeFiles/derecho.dir/view.cpp.o
[ 10%] Building CXX object derecho/CMakeFiles/derecho.dir/view_manager.cpp.o
[ 11%] Building CXX object derecho/CMakeFiles/derecho.dir/rpc_manager.cpp.o
[ 12%] Building CXX object derecho/CMakeFiles/derecho.dir/multicast_group.cpp.o
[ 12%] Building CXX object derecho/CMakeFiles/derecho.dir/raw_subgroup.cpp.o
[ 13%] Building CXX object derecho/CMakeFiles/derecho.dir/subgroup_functions.cpp.o
[ 13%] Building CXX object derecho/CMakeFiles/derecho.dir/connection_manager.cpp.o
[ 14%] Linking CXX shared library libderecho.so
[ 14%] Built target derecho
Scanning dependencies of target subgroup_function_tester
[ 15%] Building CXX object derecho/CMakeFiles/subgroup_function_tester.dir/subgroup_function_tester.cpp.o
[ 16%] Linking CXX executable subgroup_function_tester
[ 16%] Built target subgroup_function_tester
Scanning dependencies of target persistent_latency_test
[ 16%] Building CXX object derecho/experiments/CMakeFiles/persistent_latency_test.dir/persistent_latency_test.cpp.o
[ 17%] Building CXX object derecho/experiments/CMakeFiles/persistent_latency_test.dir/block_size.cpp.o
[ 17%] Building CXX object derecho/experiments/CMakeFiles/persistent_latency_test.dir/initialize.cpp.o
[ 18%] Linking CXX executable persistent_latency_test
[ 18%] Built target persistent_latency_test
Scanning dependencies of target persistent_temporal_stability_test
[ 19%] Building CXX object derecho/experiments/CMakeFiles/persistent_temporal_stability_test.dir/persistent_temporal_stability_test.cpp.o
/home/slewis/git/derecho-unified/derecho/experiments/persistent_temporal_stability_test.cpp: In function ‘int main(int, char**)’:
/home/slewis/git/derecho-unified/derecho/experiments/persistent_temporal_stability_test.cpp:187:7: warning: unused variable ‘num_datapoints’ [-Wunused-variable]
   int num_datapoints = 0; // number of data points
       ^
[ 19%] Building CXX object derecho/experiments/CMakeFiles/persistent_temporal_stability_test.dir/block_size.cpp.o
[ 20%] Building CXX object derecho/experiments/CMakeFiles/persistent_temporal_stability_test.dir/initialize.cpp.o
[ 20%] Linking CXX executable persistent_temporal_stability_test
[ 20%] Built target persistent_temporal_stability_test
Scanning dependencies of target volatile_temporal_stability_test
[ 21%] Building CXX object derecho/experiments/CMakeFiles/volatile_temporal_stability_test.dir/volatile_temporal_stability_test.cpp.o
/home/slewis/git/derecho-unified/derecho/experiments/volatile_temporal_stability_test.cpp: In function ‘int main(int, char**)’:
/home/slewis/git/derecho-unified/derecho/experiments/volatile_temporal_stability_test.cpp:186:7: warning: unused variable ‘num_datapoints’ [-Wunused-variable]
   int num_datapoints = 0; // number of data points
       ^
[ 21%] Building CXX object derecho/experiments/CMakeFiles/volatile_temporal_stability_test.dir/block_size.cpp.o
[ 22%] Building CXX object derecho/experiments/CMakeFiles/volatile_temporal_stability_test.dir/initialize.cpp.o
[ 23%] Linking CXX executable volatile_temporal_stability_test
[ 23%] Built target volatile_temporal_stability_test
Scanning dependencies of target volatile_typed_subgroup_bw_test
[ 23%] Building CXX object derecho/experiments/CMakeFiles/volatile_typed_subgroup_bw_test.dir/volatile_typed_subgroup_bw_test.cpp.o
[ 24%] Building CXX object derecho/experiments/CMakeFiles/volatile_typed_subgroup_bw_test.dir/block_size.cpp.o
[ 24%] Building CXX object derecho/experiments/CMakeFiles/volatile_typed_subgroup_bw_test.dir/initialize.cpp.o
[ 25%] Linking CXX executable volatile_typed_subgroup_bw_test
[ 25%] Built target volatile_typed_subgroup_bw_test
Scanning dependencies of target persistent_typed_subgroup_bw_test
[ 26%] Building CXX object derecho/experiments/CMakeFiles/persistent_typed_subgroup_bw_test.dir/persistent_typed_subgroup_bw_test.cpp.o
[ 26%] Building CXX object derecho/experiments/CMakeFiles/persistent_typed_subgroup_bw_test.dir/block_size.cpp.o
[ 27%] Building CXX object derecho/experiments/CMakeFiles/persistent_typed_subgroup_bw_test.dir/initialize.cpp.o
[ 28%] Linking CXX executable persistent_typed_subgroup_bw_test
[ 28%] Built target persistent_typed_subgroup_bw_test
Scanning dependencies of target typed_subgroup_bw_test
[ 29%] Building CXX object derecho/experiments/CMakeFiles/typed_subgroup_bw_test.dir/typed_subgroup_bw_test.cpp.o
/home/slewis/git/derecho-unified/derecho/experiments/typed_subgroup_bw_test.cpp: In function ‘int main(int, char**)’:
/home/slewis/git/derecho-unified/derecho/experiments/typed_subgroup_bw_test.cpp:119:36: warning: unused variable ‘replies’ [-Wunused-variable]
       decltype(results)::ReplyMap& replies = results.get();
                                    ^
[ 29%] Building CXX object derecho/experiments/CMakeFiles/typed_subgroup_bw_test.dir/block_size.cpp.o
[ 30%] Building CXX object derecho/experiments/CMakeFiles/typed_subgroup_bw_test.dir/initialize.cpp.o
[ 30%] Linking CXX executable typed_subgroup_bw_test
[ 30%] Built target typed_subgroup_bw_test
Scanning dependencies of target smart_membership_function_test
[ 31%] Building CXX object derecho/experiments/CMakeFiles/smart_membership_function_test.dir/smart_membership_function_test.cpp.o
[ 31%] Building CXX object derecho/experiments/CMakeFiles/smart_membership_function_test.dir/initialize.cpp.o
[ 32%] Linking CXX executable smart_membership_function_test
[ 32%] Built target smart_membership_function_test
Scanning dependencies of target latency_test
[ 33%] Building CXX object derecho/experiments/CMakeFiles/latency_test.dir/latency_test.cpp.o
[ 33%] Building CXX object derecho/experiments/CMakeFiles/latency_test.dir/block_size.cpp.o
[ 34%] Linking CXX executable latency_test
[ 34%] Built target latency_test
Scanning dependencies of target p2p_query_test
[ 35%] Building CXX object derecho/experiments/CMakeFiles/p2p_query_test.dir/p2p_query_test.cpp.o
/home/slewis/git/derecho-unified/derecho/experiments/p2p_query_test.cpp: In function ‘int main(int, char**)’:
/home/slewis/git/derecho-unified/derecho/experiments/p2p_query_test.cpp:100:30: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(my_rank = 0; my_rank < members.size(); ++my_rank) {
                              ^
g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-5/README.Bugs> for instructions.
derecho/experiments/CMakeFiles/p2p_query_test.dir/build.make:62: recipe for target 'derecho/experiments/CMakeFiles/p2p_query_test.dir/p2p_query_test.cpp.o' failed
make[2]: *** [derecho/experiments/CMakeFiles/p2p_query_test.dir/p2p_query_test.cpp.o] Error 4
CMakeFiles/Makefile2:720: recipe for target 'derecho/experiments/CMakeFiles/p2p_query_test.dir/all' failed
make[1]: *** [derecho/experiments/CMakeFiles/p2p_query_test.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
slewis@ecf-services:~/git/derecho-unified/Release$
scottslewis commented 6 years ago

Ken left comment:

Well, the nature of the problem is pretty obvious! This is either Sagar’s error (the P2P query stuff is his), or perhaps Edward changed the type of the size getter for the view?

Ken

etremel commented 6 years ago

I am unable to reproduce this bug on my Ubuntu x64 system with g++ 5.4. I cloned a fresh copy of Derecho into a new directory, used cmake and make, and got the attached output (I saved it to a file to avoid making an excessively long post). build-output.txt

scottslewis commented 6 years ago

Hi Ed. Thanks for attempting to reproduce. I tried again with c++ and got a similar (internal) compiler error. I suspect what's happening is that this system is somewhat memory limited, and it might be running out of mem at that point in build.

I'll experiment a bit more on this system, and attempt to get access to a less memory-limited system. I'll close this issue now but as I figure out what's going on on this system or successfully build on some other system I'll notify on this issue what was necessary.

Sorry about the head fake and thanks again for checking.

scottslewis commented 6 years ago

Some more information: If I I change line 99 from:

int my_rank;

to

unsigned int my_rank;

I do not get the warning given here:

/home/slewis/git/derecho-unified/derecho/experiments/p2p_query_test.cpp:100:30: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(my_rank = 0; my_rank < members.size(); ++my_rank) {
                              ^

But on my system I still get the internal compiler error. So it seems that this warning has nothing to do with the subsequent compiler error.

Before I focus on some other system, here's the output of gcc -v and c++ -v on this system, in case it ends up being helpful

slewis@ecf-services:~/git/derecho-unified/derecho/experiments$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.4.0-6ubuntu1~16.04.9' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.9)

Ouptut of c++ -v

slewis@ecf-services:~/git/derecho-unified/derecho/experiments$ c++ -v
Using built-in specs.
COLLECT_GCC=c++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.4.0-6ubuntu1~16.04.9' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.9)
mpmilano commented 6 years ago

I believe you are correct regarding g++'s internal error; Derecho can take a large amount of RAM to compile (nearly a gigabyte for a big cooked example). Template expansion is not kind. Given my make options, a full Derecho build on my machine consumes about 3GB of ram.