Open stmatengss opened 6 years ago
How do you compile the library?
I first run cmake .
and make a new release directory. Then I make all to install this library.
These are configurations.
Build type -- RELEASE
Compiler version: GNU 4.8.5
System: Linux version: 3.13.0-35-generic
Target architecture: x86_64
Compiler flags: -O3 -DNDEBUG -std=c++11;-mcx16 -Wall;-Wextra;-pedantic
Exe flags:
-- Boost version: 1.60.0
-- Found the following Boost libraries:
-- system
-- thread
-- chrono
-- date_time
-- atomic
Boost: 1_60 in /home/mateng/boost/boost_1_60_0, lib /home/mateng/boost/boost_1_60_0/stage/
lib
GTest: /usr/include, lib: /usr/local/lib/libgtest.a
Hmm... Your trouble is a surprise for me... I have no reasonable answer. I suspect, the cause is some kind of misconfiguration in your environment. To find solution, get latest Clang or GCC, build libcds with asan instrumentation and run the test.
Example:
cmake -G "Unix Makefiles" \
-DCMAKE_BUILD_TYPE=RELEASE \
-DCMAKE_C_COMPILER=$CLANG6_ROOT/bin/clang \
-DCMAKE_CXX_COMPILER=$CLANG6_ROOT/bin/clang++ \
-DCMAKE_CXX_FLAGS="-stdlib=libc++ -Wdocumentation -std=c++17" \
-DCMAKE_EXE_LINKER_FLAGS="-L$CLANG6_ROOT/lib -Wl,-rpath=$CLANG6_ROOT/lib" \
-DCDS_BIN_DIR=$BIN_ROOT \
-DWITH_TESTS=ON \
-DWITH_ASAN=ON \
-DBOOST_ROOT=$LIB_ROOT/boost_1_65_1 \
-DBOOST_LIBRARYDIR=$LIB_ROOT/boost_1_65_1/stage64-clang6-asan/lib \
-DGTEST_INCLUDE_DIRS=$GTEST_ROOT/googletest/include \
-DGTEST_LIBRARIES=$GTEST_ROOT/lib-clang6/libgtest.a \
$CDS_SOURCE && \
make -j 10
Thx for your help. I will try it again or make tests on another platform.
I plan to migrate these data structures to hpx [https://github.com/STEllAR-GROUP/hpx] (a GSoC project). I want to test the performance of libcds, so I run these test cases in test directory. Unfortunately, there are some scenarios cannot pass the tests, I guess maybe I adopt a un-correct method to compile libcds.
There are three main factors to cause errors.
So can someone help me to solve these issues? I will be appreciated.