pmem / libpmemobj-cpp

C++ bindings & containers for libpmemobj
https://pmem.io
Other
107 stars 76 forks source link

make error! #1250

Closed zjjone1023 closed 2 years ago

zjjone1023 commented 2 years ago

Scanning dependencies of target allocator [ 0%] Bulding CXX object tests/CMakeFiles/allocator.dir/allocator/allocator.cpp.o [ 0%] Linking CXX executable allocator collect2: error: ld terminated with signal 9 [Killed] make[2]: [tests/allocator] Error 1 make[2]: Deleting file 'tests/allocator' make[1]: [tests/CMakeFiles/allocator.dir/all] Error 2 make: [all] Error 2

I've observed this carefully while compiling, and every time I get to this point I'm increasing my memory until I run out of 100%.

igchor commented 2 years ago

Can you please provide us with the full log, including the command which you used to compile the tests?

Also, could you please try executing: make allocator?

zjjone1023 commented 2 years ago

I am installing the Linux standard compilation that is given above. mkdir -> cd build -> cmake.. -> make Error when executing make and I do not find any source code to execute make allocator.

zjjone1023 commented 2 years ago

image [root@localhost build]# cmake .. -- The C compiler identification is GNU 4.8.5 -- The CXX compiler identification is GNU 4.8.5 -- 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 -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- CMAKE_BUILD_TYPE not set, setting the default one: RelWithDebInfo fatal: Not a git repository (or any of the parent directories): .git -- TEST_DIR set to: "/dcpmm/libpmemobj-cpp-master/build/test" -- Found Perl: /usr/bin/perl (found version "5.16.3") -- Looking for include file pthread.h -- Looking for include file pthread.h - found -- Looking for pthread_create -- Looking for pthread_create - not found -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - found -- Found Threads: TRUE -- Found Valgrind in '/usr/local/lib/valgrind' (version: 3.19.0) -- Performing Test CXX_HASDLIBPMEMOBJ_CPP_VG_MEMCHECK_ENABLED_1 -- Performing Test CXX_HASDLIBPMEMOBJ_CPP_VG_MEMCHECK_ENABLED_1 - Success -- Performing Test CXX_HASDLIBPMEMOBJ_CPP_VG_DRD_ENABLED_1 -- Performing Test CXX_HASDLIBPMEMOBJ_CPP_VG_DRD_ENABLED_1 - Success -- Performing Test CXX_HASDLIBPMEMOBJ_CPP_VG_HELGRIND_ENABLED_1 -- Performing Test CXX_HASDLIBPMEMOBJ_CPP_VG_HELGRIND_ENABLED_1 - Success CMake Warning at cmake/functions.cmake:198 (message): Valgrind pmemcheck NOT found. Pmemcheck tests will not be performed. Call Stack (most recent call first): CMakeLists.txt:152 (find_pmemcheck)

-- checking for module 'libpmemobj>=1.9' -- found libpmemobj, version 1.9.3+git.bbd93c8c4c3 -- checking for module 'libpmem>=1.7' -- found libpmem, version 1.9.3+git.bbd93c8c4c3 -- Performing Test NO_SHARED_MUTEX_BUG -- Performing Test NO_SHARED_MUTEX_BUG - Failed -- Performing Test NO_GCC_VARIADIC_TEMPLATE_BUG -- Performing Test NO_GCC_VARIADIC_TEMPLATE_BUG - Success -- Performing Test NO_GCC_AGGREGATE_INITIALIZATION_BUG -- Performing Test NO_GCC_AGGREGATE_INITIALIZATION_BUG - Failed -- Performing Test NO_CLANG_BRACE_INITIALIZATION_NEWEXPR_BUG -- Performing Test NO_CLANG_BRACE_INITIALIZATION_NEWEXPR_BUG - Success -- Performing Test NO_CLANG_TEMPLATE_BUG -- Performing Test NO_CLANG_TEMPLATE_BUG - Success -- Performing Test NO_CHRONO_BUG -- Performing Test NO_CHRONO_BUG - Success CMake Warning at cmake/check_compiling_issues.cmake:122 (message): volatile_state not supported (required C++14 compliant compiler) Call Stack (most recent call first): CMakeLists.txt:306 (include)

-- Performing Test MAX_ALIGN_TYPE_EXISTS -- Performing Test MAX_ALIGN_TYPE_EXISTS - Failed -- Performing Test AGGREGATE_INITIALIZATION_AVAILABLE -- Performing Test AGGREGATE_INITIALIZATION_AVAILABLE - Failed -- Performing Test CXX_HASWall -- Performing Test CXX_HAS__Wall - Success -- Performing Test CXX_HASU_FORTIFY_SOURCED_FORTIFY_SOURCE_2 -- Performing Test CXX_HASU_FORTIFY_SOURCED_FORTIFY_SOURCE_2 - Success -- Performing Test CXX_HASWpointer_arith -- Performing Test CXX_HASWpointer_arith - Success -- Performing Test CXX_HASWunused_macros -- Performing Test CXX_HASWunused_macros - Success -- Performing Test CXX_HASWsign_conversion -- Performing Test CXX_HASWsign_conversion - Success -- Performing Test CXX_HASWsign_compare -- Performing Test CXX_HASWsign_compare - Success -- Performing Test CXX_HASWunreachable_code_return -- Performing Test CXX_HASWunreachable_code_return - Failed -- Performing Test CXX_HAS__Wmissing_variable_declarations -- Performing Test CXX_HASWmissing_variable_declarations - Failed -- Performing Test CXX_HASfno_common -- Performing Test CXX_HASfno_common - Success -- Performing Test CXX_HASWno_maybe_uninitialized -- Performing Test CXX_HAS__Wno_maybe_uninitialized - Success -- Performing Test CXX_HASggdb -- Performing Test CXX_HASggdb - Success -- Performing Test CXX_HAS__DDEBUG -- Performing Test CXX_HASDDEBUG - Success CMake Warning at tests/ctest_helpers.cmake:44 (message): libunwind not found. Stack traces from tests will not be reliable Call Stack (most recent call first): tests/CMakeLists.txt:77 (find_packages)

-- Checking for module 'tbb' CMake Warning at cmake/tbb.cmake:46 (find_package): By not providing "FindTBB.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "TBB", but CMake did not find one.

Could not find a package configuration file provided by "TBB" with any of the following names:

TBBConfig.cmake
tbb-config.cmake

Add the installation prefix of "TBB" to CMAKE_PREFIX_PATH or set "TBB_DIR" to a directory containing one of the above files. If "TBB" provides a separate development package or SDK, be sure it has been installed. Call Stack (most recent call first): tests/CMakeLists.txt:80 (include)

CMake Warning at tests/CMakeLists.txt:108 (message): Skipping pmreorder tests because of no pmreorder support

CMake Warning at tests/CMakeLists.txt:146 (message): Skipping aggregate initialization test because of no compiler support

CMake Warning at tests/external/CMakeLists.txt:82 (message): Skipping some array tests because max align type exists

-- Performing Test NO_SIGN_CONVERSION_FLAG -- Performing Test NO_SIGN_CONVERSION_FLAG - Success -- Performing Test wno_array_bounds_flag -- Performing Test wno_array_bounds_flag - Success -- Performing Test deprecated_declarations -- Performing Test deprecated_declarations - Success CMake Warning at tests/CMakeLists.txt:632 (message): Skipping concurrent_hash_map_tbb tests - disabled by cmake TESTS_TBB option

-- Found Doxygen: /usr/bin/doxygen (found version "1.8.5") CMake Warning at doc/CMakeLists.txt:22 (message): Dot tool not found - documentation will not be generated

CMake Warning at examples/CMakeLists.txt:149 (message): SFML 2.4 or newer not found - pmpong won't be build

-- Configuring done -- Generating done -- Build files have been written to: /dcpmm/libpmemobj-cpp-master/build [root@localhost build]# make Scanning dependencies of target checkers [ 0%] Built target checkers Scanning dependencies of target test_backtrace [ 0%] Building C object tests/CMakeFiles/test_backtrace.dir/test_backtrace.c.o [ 0%] Linking C static library libtest_backtrace.a [ 0%] Built target test_backtrace Scanning dependencies of target valgrind_internal [ 0%] Building CXX object tests/CMakeFiles/valgrind_internal.dir/valgrind_internal.cpp.o [ 0%] Linking CXX static library libvalgrind_internal.a [ 0%] Built target valgrind_internal Scanning dependencies of target allocator [ 0%] Building CXX object tests/CMakeFiles/allocator.dir/allocator/allocator.cpp.o [ 0%] Linking CXX executable allocator collect2: error: ld terminated with signal 9 [Killed] make[2]: [tests/allocator] Error 1 make[2]: Deleting file `tests/allocator' make[1]: [tests/CMakeFiles/allocator.dir/all] Error 2 make: [all] Error 2 [root@localhost build]#

Run the make command and exit with an error when memory is full.

lukaszstolarczuk commented 2 years ago

Hi, few things we can try here (as I see it):

  1. I can see you're using quite old GCC, perhaps you could try to update it to at least 4.9.0 (see our README for explanation),
  2. If I'm not mistaken, you're storing your code repository on dimms ("/dcpmm/libpmemobj-cpp-master/"), perhaps try to move it on to a regular storage device (some SDD or HDD),
  3. allocator executable is a test, you may try to disable building tests, if you don't need them (using CMake flag cmake .. -DBUILD_TESTS=OFF).
zjjone1023 commented 2 years ago

Thank you very much lukaszstolarczuk. Using cmake..-dbuild_tests =OFF None of the above errors occurred.

zjjone1023 commented 2 years ago

vector.hpp:1715:26:error:parameter packs not expanded with '...':tmp(std::forward(args)...) I used GCC4.9.1

lukaszstolarczuk commented 2 years ago

vector.hpp:1715:26:error:parameter packs not expanded with '...':tmp(std::forward(args)...) I used GCC4.9.1

Did this error happen with BUILD_TESTS=OFF flag set? Can you please send a full log and what steps/commands led to this issue?

zjjone1023 commented 2 years ago

The problem with vector.hpp has been resolved.GCC version problem, upgrade OK. Thank lukaszstolarczuk

lukaszstolarczuk commented 2 years ago

Ok, great to hear that. If you have any more questions/problems, don't hesitate to file a new issue.