Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ci] run cpp tests at CI #4166

Merged
merged 3 commits into from
Apr 16, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions .ci/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ if [[ "${TASK}" == "r-package" ]]; then
exit 0
fi

if [[ "$TASK" == "cpp-tests" ]]; then
mkdir $BUILD_DIRECTORY/build && cd $BUILD_DIRECTORY/build
cmake -DBUILD_CPP_TEST=ON -DUSE_OPENMP=OFF ..
Copy link
Collaborator Author

@StrikerRUS StrikerRUS Apr 7, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why with USE_OPENMP=OFF?
Because OpenMP is not fully supported yet due to linking problems (#3555 (comment), #4125) and to prevent compatibility problems with sanitizers:

// ... Note that OpenMP needs to be
// disabled, otherwise thread sanitizer will also report false
// positives.
https://github.com/dmlc/xgboost/blob/f6fe15d11fd05ff1cfe77441fa6c5d7280ee2131/tests/cpp/test_learner.cc#L196-L199

# one error caused by a false positive between valgrind and openmp is allowed
# ==2063== 336 bytes in 1 blocks are possibly lost in loss record 153 of 2,709
# ==2063== at 0x483DD99: calloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
# ==2063== by 0x40149CA: allocate_dtv (dl-tls.c:286)
# ==2063== by 0x40149CA: _dl_allocate_tls (dl-tls.c:532)
# ==2063== by 0x5702322: allocate_stack (allocatestack.c:622)
# ==2063== by 0x5702322: pthread_create@@GLIBC_2.2.5 (pthread_create.c:660)
# ==2063== by 0x56D0DDA: ??? (in /usr/lib/x86_64-linux-gnu/libgomp.so.1.0.0)
# ==2063== by 0x56C88E0: GOMP_parallel (in /usr/lib/x86_64-linux-gnu/libgomp.so.1.0.0)
# ==2063== by 0x1544D29C: LGBM_DatasetCreateFromCSC (c_api.cpp:1286)
# ==2063== by 0x1546F980: LGBM_DatasetCreateFromCSC_R (lightgbm_R.cpp:91)
# ==2063== by 0x4941E2F: R_doDotCall (dotcode.c:634)
# ==2063== by 0x494CCC6: do_dotcall (dotcode.c:1281)
# ==2063== by 0x499FB01: bcEval (eval.c:7078)
# ==2063== by 0x498B67F: Rf_eval (eval.c:727)
# ==2063== by 0x498E414: R_execClosure (eval.c:1895)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that's ok! Even if we're disabled openmp, this test is still an incremental improvement in test coverage that will catch other issues.

make testlightgbm -j4 || exit -1
./../testlightgbm || exit -1
exit 0
fi

conda create -q -y -n $CONDA_ENV python=$PYTHON_VERSION
source activate $CONDA_ENV

Expand Down Expand Up @@ -71,9 +79,9 @@ fi
if [[ $TASK == "if-else" ]]; then
conda install -q -y -n $CONDA_ENV numpy
mkdir $BUILD_DIRECTORY/build && cd $BUILD_DIRECTORY/build && cmake .. && make lightgbm -j4 || exit -1
cd $BUILD_DIRECTORY/tests/cpp_test && ../../lightgbm config=train.conf convert_model_language=cpp convert_model=../../src/boosting/gbdt_prediction.cpp && ../../lightgbm config=predict.conf output_result=origin.pred || exit -1
cd $BUILD_DIRECTORY/tests/cpp_tests && ../../lightgbm config=train.conf convert_model_language=cpp convert_model=../../src/boosting/gbdt_prediction.cpp && ../../lightgbm config=predict.conf output_result=origin.pred || exit -1
cd $BUILD_DIRECTORY/build && make lightgbm -j4 || exit -1
cd $BUILD_DIRECTORY/tests/cpp_test && ../../lightgbm config=predict.conf output_result=ifelse.pred && python test.py || exit -1
cd $BUILD_DIRECTORY/tests/cpp_tests && ../../lightgbm config=predict.conf output_result=ifelse.pred && python test.py || exit -1
exit 0
fi

Expand Down
8 changes: 8 additions & 0 deletions .ci/test_windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ if ($env:TASK -eq "r-package") {
Exit 0
}

if ($env:TASK -eq "cpp-tests") {
mkdir $env:BUILD_SOURCESDIRECTORY/build; cd $env:BUILD_SOURCESDIRECTORY/build
cmake -DBUILD_CPP_TEST=ON -DUSE_OPENMP=OFF -A x64 ..
cmake --build . --target testlightgbm --config Debug ; Check-Output $?
Start-Process -FilePath "./../Debug/testlightgbm.exe" -NoNewWindow -Wait ; Check-Output $?
Exit 0
}

# setup for Python
conda init powershell
conda activate
Expand Down
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ include/ @guolinke @chivee @btrotta @shiyu1994
src/ @guolinke @chivee @btrotta @shiyu1994
CMakeLists.txt @guolinke @chivee @Laurae2 @jameslamb @wxchan @henry0312 @StrikerRUS @huanzhang12 @btrotta @shiyu1994
tests/c_api_test/ @guolinke @chivee @btrotta @shiyu1994
tests/cpp_test/ @guolinke @chivee @btrotta @shiyu1994
tests/cpp_tests/ @guolinke @chivee @btrotta @shiyu1994
tests/data/ @guolinke @chivee @btrotta @shiyu1994
windows/ @guolinke @chivee @btrotta @StrikerRUS @shiyu1994

Expand Down
6 changes: 6 additions & 0 deletions .vsts-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ jobs:
METHOD: source
swig:
TASK: swig
cpp_tests:
TASK: cpp-tests
steps:
- script: |
echo "##vso[task.setvariable variable=BUILD_DIRECTORY]$BUILD_SOURCESDIRECTORY"
Expand Down Expand Up @@ -222,6 +224,8 @@ jobs:
TASK: bdist
swig:
TASK: swig
cpp_tests:
TASK: cpp-tests
steps:
- script: |
echo "##vso[task.setvariable variable=BUILD_DIRECTORY]$BUILD_SOURCESDIRECTORY"
Expand Down Expand Up @@ -258,6 +262,8 @@ jobs:
TASK: bdist
swig:
TASK: swig
cpp_tests:
TASK: cpp-tests
steps:
- powershell: |
Write-Host "##vso[task.prependpath]$env:CONDA\Scripts"
Expand Down
16 changes: 15 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,21 @@ if(BUILD_CPP_TEST)
FetchContent_MakeAvailable(googletest)
add_library(GTest::GTest ALIAS gtest)
endif()
file(GLOB CPP_TEST_SOURCES tests/cpp_test/*.cpp)
file(GLOB CPP_TEST_SOURCES tests/cpp_tests/*.cpp)
if(MSVC)
set(
CompilerFlags
CMAKE_CXX_FLAGS
CMAKE_CXX_FLAGS_DEBUG
CMAKE_CXX_FLAGS_RELEASE
CMAKE_C_FLAGS
CMAKE_C_FLAGS_DEBUG
CMAKE_C_FLAGS_RELEASE
)
foreach(CompilerFlag ${CompilerFlags})
string(REPLACE "/MD" "/MT" ${CompilerFlag} "${${CompilerFlag}}")
endforeach()
endif(MSVC)
Comment on lines +482 to +495
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will really appreciate a better fix for

2021-04-06T22:10:57.1565306Z Mode                LastWriteTime         Length Name                                                                  
2021-04-06T22:10:57.1584531Z ----                -------------         ------ ----                                                                  
2021-04-06T22:10:57.1617169Z d-----         4/6/2021  10:10 PM                build                                                                 
2021-04-06T22:10:57.4916368Z -- Building for: Visual Studio 15 2017
2021-04-06T22:11:07.9836078Z -- The C compiler identification is MSVC 19.16.27045.0
2021-04-06T22:11:13.1909917Z -- The CXX compiler identification is MSVC 19.16.27045.0
2021-04-06T22:11:13.3431297Z -- Detecting C compiler ABI info
2021-04-06T22:11:17.4588793Z -- Detecting C compiler ABI info - done
2021-04-06T22:11:17.4593135Z -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe - skipped
2021-04-06T22:11:17.4599664Z -- Detecting C compile features
2021-04-06T22:11:17.4651492Z -- Detecting C compile features - done
2021-04-06T22:11:17.4980533Z -- Detecting CXX compiler ABI info
2021-04-06T22:11:21.1424232Z -- Detecting CXX compiler ABI info - done
2021-04-06T22:11:21.1475161Z -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe - skipped
2021-04-06T22:11:21.1478317Z -- Detecting CXX compile features
2021-04-06T22:11:21.1480287Z -- Detecting CXX compile features - done
2021-04-06T22:11:21.1556711Z -- Performing Test MM_PREFETCH
2021-04-06T22:11:24.3085860Z -- Performing Test MM_PREFETCH - Failed
2021-04-06T22:11:24.3105639Z -- Performing Test MM_MALLOC
2021-04-06T22:11:27.5986948Z -- Performing Test MM_MALLOC - Failed
2021-04-06T22:11:28.1181796Z -- Could NOT find GTest (missing: GTest_DIR)
2021-04-06T22:11:28.1183438Z -- Did not find Google Test in the system root. Fetching Google Test now...
2021-04-06T22:11:41.3052573Z CMake Deprecation Warning at build/_deps/googletest-src/CMakeLists.txt:4 (cmake_minimum_required):
2021-04-06T22:11:41.3054388Z   Compatibility with CMake < 2.8.12 will be removed from a future version of
2021-04-06T22:11:41.3055402Z   CMake.
2021-04-06T22:11:41.3055953Z 
2021-04-06T22:11:41.3057670Z   Update the VERSION argument <min> value or use a ...<max> suffix to tell
2021-04-06T22:11:41.3058876Z   CMake that the project does not need compatibility with older versions.
2021-04-06T22:11:41.3059566Z 
2021-04-06T22:11:41.3059900Z 
2021-04-06T22:11:41.3176568Z CMake Deprecation Warning at build/_deps/googletest-src/googlemock/CMakeLists.txt:45 (cmake_minimum_required):
2021-04-06T22:11:41.3178071Z   Compatibility with CMake < 2.8.12 will be removed from a future version of
2021-04-06T22:11:41.3179681Z   CMake.
2021-04-06T22:11:41.3180144Z 
2021-04-06T22:11:41.3180991Z   Update the VERSION argument <min> value or use a ...<max> suffix to tell
2021-04-06T22:11:41.3182251Z   CMake that the project does not need compatibility with older versions.
2021-04-06T22:11:41.3183020Z 
2021-04-06T22:11:41.3183365Z 
2021-04-06T22:11:41.3305871Z CMake Deprecation Warning at build/_deps/googletest-src/googletest/CMakeLists.txt:56 (cmake_minimum_required):
2021-04-06T22:11:41.3310024Z   Compatibility with CMake < 2.8.12 will be removed from a future version of
2021-04-06T22:11:41.3311007Z   CMake.
2021-04-06T22:11:41.3311568Z 
2021-04-06T22:11:41.3312360Z   Update the VERSION argument <min> value or use a ...<max> suffix to tell
2021-04-06T22:11:41.3313392Z   CMake that the project does not need compatibility with older versions.
2021-04-06T22:11:41.3314023Z 
2021-04-06T22:11:41.3314665Z 
2021-04-06T22:11:41.3863389Z -- Found PythonInterp: C:/Miniconda/python.exe (found version "3.8.5") 
2021-04-06T22:11:41.4053683Z -- Looking for pthread.h
2021-04-06T22:11:44.7393837Z -- Looking for pthread.h - not found
2021-04-06T22:11:44.7412796Z -- Found Threads: TRUE  
2021-04-06T22:11:44.7894406Z -- Configuring done
2021-04-06T22:11:44.9491383Z -- Generating done
2021-04-06T22:11:44.9543741Z -- Build files have been written to: D:/a/1/s/build
2021-04-06T22:11:45.5481853Z Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework
2021-04-06T22:11:45.5483099Z Copyright (C) Microsoft Corporation. All rights reserved.
2021-04-06T22:11:45.5483613Z 
2021-04-06T22:11:48.0754940Z   Checking Build System
2021-04-06T22:11:48.3779632Z   Building Custom Rule D:/a/1/s/build/_deps/googletest-src/googletest/CMakeLists.txt
2021-04-06T22:11:48.5894505Z   gtest-all.cc
2021-04-06T22:11:53.1813481Z   gtest.vcxproj -> D:\a\1\s\build\lib\Debug\gtestd.lib
2021-04-06T22:11:53.2716388Z   Building Custom Rule D:/a/1/s/CMakeLists.txt
2021-04-06T22:11:53.5030397Z   test_chunked_array.cpp
2021-04-06T22:11:53.5109146Z   test_main.cpp
2021-04-06T22:11:53.5117049Z   boosting.cpp
2021-04-06T22:11:53.5132276Z   gbdt.cpp
2021-04-06T22:11:55.4797676Z   gbdt_model_text.cpp
2021-04-06T22:11:56.0985635Z   gbdt_prediction.cpp
2021-04-06T22:11:58.8616676Z   prediction_early_stop.cpp
2021-04-06T22:11:59.7677306Z   bin.cpp
2021-04-06T22:12:00.6241309Z   config.cpp
2021-04-06T22:12:01.3760941Z   config_auto.cpp
2021-04-06T22:12:03.6802785Z   dataset.cpp
2021-04-06T22:12:04.6198482Z   dataset_loader.cpp
2021-04-06T22:12:07.0636355Z   file_io.cpp
2021-04-06T22:12:07.0979910Z   json11.cpp
2021-04-06T22:12:08.2189784Z   metadata.cpp
2021-04-06T22:12:08.7899835Z   parser.cpp
2021-04-06T22:12:10.1240412Z   train_share_states.cpp
2021-04-06T22:12:11.9001722Z   tree.cpp
2021-04-06T22:12:12.9684078Z   dcg_calculator.cpp
2021-04-06T22:12:14.0760386Z   metric.cpp
2021-04-06T22:12:14.1135976Z   ifaddrs_patch.cpp
2021-04-06T22:12:14.2921789Z   linker_topo.cpp
2021-04-06T22:12:17.5142019Z   linkers_mpi.cpp
2021-04-06T22:12:17.9066854Z   linkers_socket.cpp
2021-04-06T22:12:17.9330324Z   network.cpp
2021-04-06T22:12:18.1373644Z   objective_function.cpp
2021-04-06T22:12:20.0896087Z   cuda_tree_learner.cpp
2021-04-06T22:12:20.1438999Z   data_parallel_tree_learner.cpp
2021-04-06T22:12:23.7209841Z   feature_parallel_tree_learner.cpp
2021-04-06T22:12:23.8376042Z   gpu_tree_learner.cpp
2021-04-06T22:12:23.9035045Z   linear_tree_learner.cpp
2021-04-06T22:12:24.4934814Z   serial_tree_learner.cpp
2021-04-06T22:12:32.7172173Z   tree_learner.cpp
2021-04-06T22:12:34.4550116Z   voting_parallel_tree_learner.cpp
2021-04-06T22:12:38.3540546Z   c_api.cpp
2021-04-06T22:12:49.1493219Z gtestd.lib(gtest-all.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in test_chunked_array.obj [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.2287390Z msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: struct _Cvtvec __cdecl std::_Locinfo::_Getcvt(void)const " (?_Getcvt@_Locinfo@std@@QEBA?AU_Cvtvec@@XZ) already defined in gtestd.lib(gtest-all.obj) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.2332465Z msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: bool __cdecl std::ios_base::good(void)const " (?good@ios_base@std@@QEBA_NXZ) already defined in gtestd.lib(gtest-all.obj) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.2337976Z msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: int __cdecl std::ios_base::flags(void)const " (?flags@ios_base@std@@QEBAHXZ) already defined in gtestd.lib(gtest-all.obj) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.2342823Z msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: __int64 __cdecl std::ios_base::width(void)const " (?width@ios_base@std@@QEBA_JXZ) already defined in gtestd.lib(gtest-all.obj) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.2348743Z msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: __int64 __cdecl std::ios_base::width(__int64)" (?width@ios_base@std@@QEAA_J_J@Z) already defined in gtestd.lib(gtest-all.obj) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.2386686Z msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "protected: __cdecl std::basic_streambuf<char,struct std::char_traits<char> >::basic_streambuf<char,struct std::char_traits<char> >(void)" (??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAA@XZ) already defined in gtestd.lib(gtest-all.obj) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.2389826Z msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: virtual __cdecl std::basic_streambuf<char,struct std::char_traits<char> >::~basic_streambuf<char,struct std::char_traits<char> >(void)" (??1?$basic_streambuf@DU?$char_traits@D@std@@@std@@UEAA@XZ) already defined in gtestd.lib(gtest-all.obj) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.2431411Z msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: int __cdecl std::basic_streambuf<char,struct std::char_traits<char> >::sputc(char)" (?sputc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHD@Z) already defined in gtestd.lib(gtest-all.obj) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.2437098Z msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: __int64 __cdecl std::basic_streambuf<char,struct std::char_traits<char> >::sputn(char const *,__int64)" (?sputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JPEBD_J@Z) already defined in gtestd.lib(gtest-all.obj) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.2440903Z msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "protected: char * __cdecl std::basic_streambuf<char,struct std::char_traits<char> >::eback(void)const " (?eback@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ) already defined in gtestd.lib(gtest-all.obj) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.2446798Z msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "protected: char * __cdecl std::basic_streambuf<char,struct std::char_traits<char> >::gptr(void)const " (?gptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ) already defined in gtestd.lib(gtest-all.obj) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.2460697Z msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "protected: char * __cdecl std::basic_streambuf<char,struct std::char_traits<char> >::pbase(void)const " (?pbase@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ) already defined in gtestd.lib(gtest-all.obj) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.2463552Z msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "protected: char * __cdecl std::basic_streambuf<char,struct std::char_traits<char> >::pptr(void)const " (?pptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ) already defined in gtestd.lib(gtest-all.obj) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.2467634Z msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "protected: char * __cdecl std::basic_streambuf<char,struct std::char_traits<char> >::egptr(void)const " (?egptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ) already defined in gtestd.lib(gtest-all.obj) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.2470380Z msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "protected: void __cdecl std::basic_streambuf<char,struct std::char_traits<char> >::gbump(int)" (?gbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXH@Z) already defined in gtestd.lib(gtest-all.obj) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.2475999Z msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "protected: void __cdecl std::basic_streambuf<char,struct std::char_traits<char> >::setg(char *,char *,char *)" (?setg@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAD00@Z) already defined in gtestd.lib(gtest-all.obj) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.2478913Z msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "protected: char * __cdecl std::basic_streambuf<char,struct std::char_traits<char> >::epptr(void)const " (?epptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ) already defined in gtestd.lib(gtest-all.obj) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.2480940Z msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "protected: void __cdecl std::basic_streambuf<char,struct std::char_traits<char> >::setp(char *,char *)" (?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAD0@Z) already defined in gtestd.lib(gtest-all.obj) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.2482613Z msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "protected: void __cdecl std::basic_streambuf<char,struct std::char_traits<char> >::setp(char *,char *,char *)" (?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAD00@Z) already defined in gtestd.lib(gtest-all.obj) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.2484122Z msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "protected: char * __cdecl std::basic_streambuf<char,struct std::char_traits<char> >::_Pninc(void)" (?_Pninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ) already defined in gtestd.lib(gtest-all.obj) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.2486457Z msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: virtual __cdecl std::basic_ios<char,struct std::char_traits<char> >::~basic_ios<char,struct std::char_traits<char> >(void)" (??1?$basic_ios@DU?$char_traits@D@std@@@std@@UEAA@XZ) already defined in gtestd.lib(gtest-all.obj) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.2488815Z msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: void __cdecl std::basic_ios<char,struct std::char_traits<char> >::setstate(int,bool)" (?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXH_N@Z) already defined in gtestd.lib(gtest-all.obj) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.2490444Z msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: class std::basic_ostream<char,struct std::char_traits<char> > * __cdecl std::basic_ios<char,struct std::char_traits<char> >::tie(void)const " (?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_ostream@DU?$char_traits@D@std@@@2@XZ) already defined in gtestd.lib(gtest-all.obj) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.2492212Z msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: class std::basic_streambuf<char,struct std::char_traits<char> > * __cdecl std::basic_ios<char,struct std::char_traits<char> >::rdbuf(void)const " (?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@XZ) already defined in gtestd.lib(gtest-all.obj) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.2494129Z msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: char __cdecl std::basic_ios<char,struct std::char_traits<char> >::fill(void)const " (?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBADXZ) already defined in gtestd.lib(gtest-all.obj) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.2498512Z msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "protected: __cdecl std::basic_ios<char,struct std::char_traits<char> >::basic_ios<char,struct std::char_traits<char> >(void)" (??0?$basic_ios@DU?$char_traits@D@std@@@std@@IEAA@XZ) already defined in gtestd.lib(gtest-all.obj) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.2500337Z msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: void __cdecl std::basic_ostream<char,struct std::char_traits<char> >::_Osfx(void)" (?_Osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAXXZ) already defined in gtestd.lib(gtest-all.obj) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.2502546Z msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl std::basic_ostream<char,struct std::char_traits<char> >::operator<<(int)" (??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@H@Z) already defined in gtestd.lib(gtest-all.obj) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.2504798Z msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl std::basic_ostream<char,struct std::char_traits<char> >::operator<<(unsigned __int64)" (??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@_K@Z) already defined in gtestd.lib(gtest-all.obj) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.2506854Z msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl std::basic_ostream<char,struct std::char_traits<char> >::flush(void)" (?flush@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@XZ) already defined in gtestd.lib(gtest-all.obj) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.2509310Z msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: __cdecl std::basic_iostream<char,struct std::char_traits<char> >::basic_iostream<char,struct std::char_traits<char> >(class std::basic_streambuf<char,struct std::char_traits<char> > *)" (??0?$basic_iostream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z) already defined in gtestd.lib(gtest-all.obj) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.2511843Z msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: virtual __cdecl std::basic_iostream<char,struct std::char_traits<char> >::~basic_iostream<char,struct std::char_traits<char> >(void)" (??1?$basic_iostream@DU?$char_traits@D@std@@@std@@UEAA@XZ) already defined in gtestd.lib(gtest-all.obj) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.2612734Z msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: __cdecl std::locale::id::operator unsigned __int64(void)" (??Bid@locale@std@@QEAA_KXZ) already defined in gtestd.lib(gtest-all.obj) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.2683411Z msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "protected: char * __cdecl std::basic_streambuf<char,struct std::char_traits<char> >::_Gninc(void)" (?_Gninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ) already defined in gtestd.lib(gtest-all.obj) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.2687558Z msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "protected: __int64 __cdecl std::basic_streambuf<char,struct std::char_traits<char> >::_Gnavail(void)const " (?_Gnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBA_JXZ) already defined in gtestd.lib(gtest-all.obj) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.2690374Z msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "protected: void __cdecl std::basic_streambuf<char,struct std::char_traits<char> >::pbump(int)" (?pbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXH@Z) already defined in gtestd.lib(gtest-all.obj) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.2692652Z msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "protected: __int64 __cdecl std::basic_streambuf<char,struct std::char_traits<char> >::_Pnavail(void)const " (?_Pnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBA_JXZ) already defined in gtestd.lib(gtest-all.obj) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.2695870Z msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "protected: void __cdecl std::basic_streambuf<char,struct std::char_traits<char> >::_Init(void)" (?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXXZ) already defined in gtestd.lib(gtest-all.obj) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.2699303Z msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "protected: virtual __int64 __cdecl std::basic_streambuf<char,struct std::char_traits<char> >::xsgetn(char *,__int64)" (?xsgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JPEAD_J@Z) already defined in gtestd.lib(gtest-all.obj) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.2702755Z msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "protected: virtual __int64 __cdecl std::basic_streambuf<char,struct std::char_traits<char> >::xsputn(char const *,__int64)" (?xsputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JPEBD_J@Z) already defined in gtestd.lib(gtest-all.obj) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.2707310Z msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl std::basic_ostream<char,struct std::char_traits<char> >::operator<<(double)" (??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@N@Z) already defined in gtestd.lib(gtest-all.obj) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.2711060Z msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: __cdecl std::basic_istream<char,struct std::char_traits<char> >::basic_istream<char,struct std::char_traits<char> >(class std::basic_streambuf<char,struct std::char_traits<char> > *,bool)" (??0?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z) already defined in gtestd.lib(gtest-all.obj) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.2715423Z msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: virtual __cdecl std::basic_istream<char,struct std::char_traits<char> >::~basic_istream<char,struct std::char_traits<char> >(void)" (??1?$basic_istream@DU?$char_traits@D@std@@@std@@UEAA@XZ) already defined in gtestd.lib(gtest-all.obj) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.2719577Z msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: void __cdecl std::basic_ios<char,struct std::char_traits<char> >::clear(int,bool)" (?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXH_N@Z) already defined in gtestd.lib(gtest-all.obj) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.2721787Z msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: __cdecl std::basic_ostream<char,struct std::char_traits<char> >::basic_ostream<char,struct std::char_traits<char> >(class std::basic_streambuf<char,struct std::char_traits<char> > *,bool)" (??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z) already defined in gtestd.lib(gtest-all.obj) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.2724129Z msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: virtual __cdecl std::basic_ostream<char,struct std::char_traits<char> >::~basic_ostream<char,struct std::char_traits<char> >(void)" (??1?$basic_ostream@DU?$char_traits@D@std@@@std@@UEAA@XZ) already defined in gtestd.lib(gtest-all.obj) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.2726240Z msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: char __cdecl std::basic_ios<char,struct std::char_traits<char> >::widen(char)const " (?widen@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBADD@Z) already defined in gtestd.lib(gtest-all.obj) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.2727868Z msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: __cdecl std::_Locinfo::_Locinfo(char const *)" (??0_Locinfo@std@@QEAA@PEBD@Z) already defined in gtestd.lib(gtest-all.obj) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.2729724Z msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: __cdecl std::_Locinfo::~_Locinfo(void)" (??1_Locinfo@std@@QEAA@XZ) already defined in gtestd.lib(gtest-all.obj) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.2731088Z msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: struct lconv const * __cdecl std::_Locinfo::_Getlconv(void)const " (?_Getlconv@_Locinfo@std@@QEBAPEBUlconv@@XZ) already defined in gtestd.lib(gtest-all.obj) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.2732658Z msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: char const * __cdecl std::_Locinfo::_Getfalse(void)const " (?_Getfalse@_Locinfo@std@@QEBAPEBDXZ) already defined in gtestd.lib(gtest-all.obj) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.2734345Z msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: char const * __cdecl std::_Locinfo::_Gettrue(void)const " (?_Gettrue@_Locinfo@std@@QEBAPEBDXZ) already defined in gtestd.lib(gtest-all.obj) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.2736980Z msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: char const * __cdecl std::_Yarn<char>::c_str(void)const " (?c_str@?$_Yarn@D@std@@QEBAPEBDXZ) already defined in gtestd.lib(gtest-all.obj) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.2738434Z msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: static void * __cdecl std::_Crt_new_delete::operator new(unsigned __int64)" (??2_Crt_new_delete@std@@SAPEAX_K@Z) already defined in gtestd.lib(gtest-all.obj) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.2739648Z msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: static void __cdecl std::_Crt_new_delete::operator delete(void *)" (??3_Crt_new_delete@std@@SAXPEAX@Z) already defined in gtestd.lib(gtest-all.obj) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.2740851Z msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "protected: __cdecl std::locale::facet::facet(unsigned __int64)" (??0facet@locale@std@@IEAA@_K@Z) already defined in gtestd.lib(gtest-all.obj) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.2741985Z msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "protected: virtual __cdecl std::locale::facet::~facet(void)" (??1facet@locale@std@@MEAA@XZ) already defined in gtestd.lib(gtest-all.obj) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.2743367Z msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl std::basic_ostream<char,struct std::char_traits<char> >::operator<<(unsigned int)" (??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@I@Z) already defined in gtestd.lib(gtest-all.obj) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.2745145Z msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl std::basic_ostream<char,struct std::char_traits<char> >::operator<<(float)" (??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@M@Z) already defined in gtestd.lib(gtest-all.obj) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.3924775Z libcpmtd.lib(locale0.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in test_chunked_array.obj [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.3937371Z libcpmtd.lib(locale0.obj) : error LNK2005: "void __cdecl std::_Facet_Register(class std::_Facet_base *)" (?_Facet_Register@std@@YAXPEAV_Facet_base@1@@Z) already defined in msvcprtd.lib(locale0_implib.obj) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.3940959Z libcpmtd.lib(locale0.obj) : error LNK2005: "private: static class std::locale::_Locimp * __cdecl std::locale::_Getgloballocale(void)" (?_Getgloballocale@locale@std@@CAPEAV_Locimp@12@XZ) already defined in msvcprtd.lib(MSVCP140D.dll) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.3943035Z libcpmtd.lib(locale0.obj) : error LNK2005: "private: static class std::locale::_Locimp * __cdecl std::locale::_Init(bool)" (?_Init@locale@std@@CAPEAV_Locimp@12@_N@Z) already defined in msvcprtd.lib(MSVCP140D.dll) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.3945309Z libcpmtd.lib(locale0.obj) : error LNK2005: "public: static void __cdecl std::_Locinfo::_Locinfo_ctor(class std::_Locinfo *,char const *)" (?_Locinfo_ctor@_Locinfo@std@@SAXPEAV12@PEBD@Z) already defined in msvcprtd.lib(MSVCP140D.dll) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.3947179Z libcpmtd.lib(locale0.obj) : error LNK2005: "public: static void __cdecl std::_Locinfo::_Locinfo_dtor(class std::_Locinfo *)" (?_Locinfo_dtor@_Locinfo@std@@SAXPEAV12@@Z) already defined in msvcprtd.lib(MSVCP140D.dll) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.3949725Z libcpmtd.lib(locale0.obj) : error LNK2005: "public: static class std::locale const & __cdecl std::locale::classic(void)" (?classic@locale@std@@SAAEBV12@XZ) already defined in msvcprtd.lib(MSVCP140D.dll) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.4054561Z libcpmtd.lib(cerr.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in test_chunked_array.obj [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.4069026Z libcpmtd.lib(cerr.obj) : error LNK2005: "public: static unsigned __int64 __cdecl std::codecvt<char,char,struct _Mbstatet>::_Getcat(class std::locale::facet const * *,class std::locale const *)" (?_Getcat@?$codecvt@DDU_Mbstatet@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z) already defined in msvcprtd.lib(MSVCP140D.dll) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.4072313Z libcpmtd.lib(cerr.obj) : error LNK2005: "protected: char * __cdecl std::basic_streambuf<char,struct std::char_traits<char> >::_Gndec(void)" (?_Gndec@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ) already defined in msvcprtd.lib(MSVCP140D.dll) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.4075031Z libcpmtd.lib(cerr.obj) : error LNK2005: "protected: void __cdecl std::basic_streambuf<char,struct std::char_traits<char> >::_Init(char * *,char * *,int *,char * *,char * *,int *)" (?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAPEAD0PEAH001@Z) already defined in msvcprtd.lib(MSVCP140D.dll) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.4076844Z libcpmtd.lib(cerr.obj) : error LNK2005: "public: bool __cdecl std::codecvt_base::always_noconv(void)const " (?always_noconv@codecvt_base@std@@QEBA_NXZ) already defined in msvcprtd.lib(MSVCP140D.dll) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.4089057Z libcpmtd.lib(cerr.obj) : error LNK2005: "public: int __cdecl std::codecvt<char,char,struct _Mbstatet>::in(struct _Mbstatet &,char const *,char const *,char const * &,char *,char *,char * &)const " (?in@?$codecvt@DDU_Mbstatet@@@std@@QEBAHAEAU_Mbstatet@@PEBD1AEAPEBDPEAD3AEAPEAD@Z) already defined in msvcprtd.lib(MSVCP140D.dll) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.4092394Z libcpmtd.lib(cerr.obj) : error LNK2005: "public: int __cdecl std::codecvt<char,char,struct _Mbstatet>::out(struct _Mbstatet &,char const *,char const *,char const * &,char *,char *,char * &)const " (?out@?$codecvt@DDU_Mbstatet@@@std@@QEBAHAEAU_Mbstatet@@PEBD1AEAPEBDPEAD3AEAPEAD@Z) already defined in msvcprtd.lib(MSVCP140D.dll) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.4095004Z libcpmtd.lib(cerr.obj) : error LNK2005: "public: int __cdecl std::codecvt<char,char,struct _Mbstatet>::unshift(struct _Mbstatet &,char *,char *,char * &)const " (?unshift@?$codecvt@DDU_Mbstatet@@@std@@QEBAHAEAU_Mbstatet@@PEAD1AEAPEAD@Z) already defined in msvcprtd.lib(MSVCP140D.dll) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.4231548Z libcpmtd.lib(locale.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in test_chunked_array.obj [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.4239169Z libcpmtd.lib(locale.obj) : error LNK2005: "public: static unsigned __int64 __cdecl std::codecvt<char,char,struct _Mbstatet>::_Getcat(class std::locale::facet const * *,class std::locale const *)" (?_Getcat@?$codecvt@DDU_Mbstatet@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z) already defined in msvcprtd.lib(MSVCP140D.dll) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.4268306Z libcpmtd.lib(locale.obj) : error LNK2005: "public: int __cdecl std::basic_streambuf<char,struct std::char_traits<char> >::sbumpc(void)" (?sbumpc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ) already defined in msvcprtd.lib(MSVCP140D.dll) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.4271810Z libcpmtd.lib(locale.obj) : error LNK2005: "public: int __cdecl std::basic_streambuf<char,struct std::char_traits<char> >::sgetc(void)" (?sgetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ) already defined in msvcprtd.lib(MSVCP140D.dll) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.4328223Z libcpmtd.lib(iosptrs.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in test_chunked_array.obj [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.4332463Z libcpmtd.lib(xlock.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in test_chunked_array.obj [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.4335320Z libcpmtd.lib(xlock.obj) : error LNK2005: "public: __cdecl std::_Lockit::_Lockit(int)" (??0_Lockit@std@@QEAA@H@Z) already defined in msvcprtd.lib(MSVCP140D.dll) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.4337412Z libcpmtd.lib(xlock.obj) : error LNK2005: "public: __cdecl std::_Lockit::~_Lockit(void)" (??1_Lockit@std@@QEAA@XZ) already defined in msvcprtd.lib(MSVCP140D.dll) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.4339972Z libcpmtd.lib(xthrow.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in test_chunked_array.obj [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.4345452Z libcpmtd.lib(xthrow.obj) : error LNK2005: "void __cdecl std::_Xbad_alloc(void)" (?_Xbad_alloc@std@@YAXXZ) already defined in msvcprtd.lib(MSVCP140D.dll) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.4347779Z libcpmtd.lib(xthrow.obj) : error LNK2005: "void __cdecl std::_Xbad_function_call(void)" (?_Xbad_function_call@std@@YAXXZ) already defined in msvcprtd.lib(MSVCP140D.dll) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.4350803Z libcpmtd.lib(xthrow.obj) : error LNK2005: "void __cdecl std::_Xinvalid_argument(char const *)" (?_Xinvalid_argument@std@@YAXPEBD@Z) already defined in msvcprtd.lib(MSVCP140D.dll) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.4352802Z libcpmtd.lib(xthrow.obj) : error LNK2005: "void __cdecl std::_Xlength_error(char const *)" (?_Xlength_error@std@@YAXPEBD@Z) already defined in msvcprtd.lib(MSVCP140D.dll) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.4354982Z libcpmtd.lib(xthrow.obj) : error LNK2005: "void __cdecl std::_Xout_of_range(char const *)" (?_Xout_of_range@std@@YAXPEBD@Z) already defined in msvcprtd.lib(MSVCP140D.dll) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.4549418Z libcpmtd.lib(wlocale.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in test_chunked_array.obj [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.4674655Z libcpmtd.lib(wlocale.obj) : error LNK2005: "public: char const * __cdecl std::_Locinfo::_Getdays(void)const " (?_Getdays@_Locinfo@std@@QEBAPEBDXZ) already defined in msvcprtd.lib(MSVCP140D.dll) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.4731513Z libcpmtd.lib(wlocale.obj) : error LNK2005: "public: char const * __cdecl std::_Locinfo::_Getmonths(void)const " (?_Getmonths@_Locinfo@std@@QEBAPEBDXZ) already defined in msvcprtd.lib(MSVCP140D.dll) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.4739436Z libcpmtd.lib(wlocale.obj) : error LNK2005: "public: unsigned short const * __cdecl std::_Locinfo::_W_Getdays(void)const " (?_W_Getdays@_Locinfo@std@@QEBAPEBGXZ) already defined in msvcprtd.lib(MSVCP140D.dll) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.4742257Z libcpmtd.lib(wlocale.obj) : error LNK2005: "public: unsigned short const * __cdecl std::_Locinfo::_W_Getmonths(void)const " (?_W_Getmonths@_Locinfo@std@@QEBAPEBGXZ) already defined in msvcprtd.lib(MSVCP140D.dll) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.4963951Z libcpmtd.lib(xlocale.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in test_chunked_array.obj [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.4990269Z libcpmtd.lib(xlocale.obj) : error LNK2005: "public: char const * __cdecl std::_Locinfo::_Getdays(void)const " (?_Getdays@_Locinfo@std@@QEBAPEBDXZ) already defined in msvcprtd.lib(MSVCP140D.dll) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.4992302Z libcpmtd.lib(xlocale.obj) : error LNK2005: "public: char const * __cdecl std::_Locinfo::_Getmonths(void)const " (?_Getmonths@_Locinfo@std@@QEBAPEBDXZ) already defined in msvcprtd.lib(MSVCP140D.dll) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.5048325Z libcpmtd.lib(xlocale.obj) : error LNK2005: "public: unsigned short const * __cdecl std::_Locinfo::_W_Getdays(void)const " (?_W_Getdays@_Locinfo@std@@QEBAPEBGXZ) already defined in msvcprtd.lib(MSVCP140D.dll) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.5051309Z libcpmtd.lib(xlocale.obj) : error LNK2005: "public: unsigned short const * __cdecl std::_Locinfo::_W_Getmonths(void)const " (?_W_Getmonths@_Locinfo@std@@QEBAPEBGXZ) already defined in msvcprtd.lib(MSVCP140D.dll) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.5060900Z libcpmtd.lib(xlocale.obj) : error LNK2005: "public: int __cdecl std::basic_streambuf<char,struct std::char_traits<char> >::sbumpc(void)" (?sbumpc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ) already defined in msvcprtd.lib(MSVCP140D.dll) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.5065098Z libcpmtd.lib(xlocale.obj) : error LNK2005: "public: int __cdecl std::basic_streambuf<char,struct std::char_traits<char> >::sgetc(void)" (?sgetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ) already defined in msvcprtd.lib(MSVCP140D.dll) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.5169277Z libcpmtd.lib(xdateord.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in test_chunked_array.obj [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.5172130Z libcpmtd.lib(xwctomb.obj) : error LNK2005: _Getcvt already defined in msvcprtd.lib(MSVCP140D.dll) [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.5194795Z libcpmtd.lib(winapisupp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in test_chunked_array.obj [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.5225007Z libcpmtd.lib(StlCompareStringA.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in test_chunked_array.obj [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.5252917Z libcpmtd.lib(winapinls.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in test_chunked_array.obj [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.5255657Z libcpmtd.lib(StlCompareStringW.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in test_chunked_array.obj [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.5258458Z libcpmtd.lib(StlLCMapStringW.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in test_chunked_array.obj [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.5260184Z libcpmtd.lib(StlLCMapStringA.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in test_chunked_array.obj [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.5407026Z      Creating library D:/a/1/s/Debug/testlightgbm.lib and object D:/a/1/s/Debug/testlightgbm.exp
2021-04-06T22:12:49.7419208Z LINK : warning LNK4098: defaultlib 'LIBCMTD' conflicts with use of other libs; use /NODEFAULTLIB:library [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:49.8759059Z D:\a\1\s\Debug\testlightgbm.exe : fatal error LNK1169: one or more multiply defined symbols found [D:\a\1\s\build\testlightgbm.vcxproj]
2021-04-06T22:12:50.1701335Z ##[error]Cmd.exe exited with code '-1'.
2021-04-06T22:12:50.2731417Z ##[section]Finishing: Test

Refer to https://stackoverflow.com/a/42187576 and https://stackoverflow.com/a/14172871.

add_executable(testlightgbm ${CPP_TEST_SOURCES} ${SOURCES})
target_link_libraries(testlightgbm PRIVATE GTest::GTest)
endif()
Expand Down
8 changes: 7 additions & 1 deletion docs/Development-Guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Code Structure
+---------------------+------------------------------------------------------------------------------------------------------------------------------------+

Documents API
~~~~~~~~~~~~~
-------------

Refer to `docs README <./README.rst>`__.

Expand All @@ -75,6 +75,12 @@ C API

Refer to `C API <./C-API.rst>`__ or the comments in `c\_api.h <https://github.com/microsoft/LightGBM/blob/master/include/LightGBM/c_api.h>`__ file, from which the documentation is generated.

Tests
-----

C++ unit tests are located in the ``./tests/cpp_tests`` folder and written with the help of Google Test framework.
To run tests locally first refer to the `Installation Guide <./Installation-Guide.rst#build-c-unit-tests>`__ for how to build tests and then simply run compiled executable file.

High Level Language Package
---------------------------

Expand Down
98 changes: 97 additions & 1 deletion docs/Installation-Guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,6 @@ The ``.jar`` file will be in ``LightGBM/build`` folder and the ``.dll`` files wi
It is recommended to use **VS Build Tools (Visual Studio)** since it has better multithreading efficiency in **Windows** for many-core systems
(see `Question 4 <./FAQ.rst#i-am-using-windows-should-i-use-visual-studio-or-mingw-for-compiling-lightgbm>`__ and `Question 8 <./FAQ.rst#cpu-usage-is-low-like-10-in-windows-when-using-lightgbm-on-very-large-datasets-with-many-core-systems>`__).


Also, you may want to read `gcc Tips <./gcc-Tips.rst>`__.

Linux
Expand Down Expand Up @@ -769,6 +768,103 @@ gcc

Also, you may want to read `gcc Tips <./gcc-Tips.rst>`__.

Build C++ Unit Tests
~~~~~~~~~~~~~~~~~~~~

Windows
^^^^^^^

On Windows a C++ unit tests of LightGBM can be built using **CMake** and **VS Build Tools**.
StrikerRUS marked this conversation as resolved.
Show resolved Hide resolved

1. Install `Git for Windows`_, `CMake`_ (3.8 or higher) and `VS Build Tools`_ (**VS Build Tools** is not needed if **Visual Studio** (2015 or newer) is already installed).

2. Run the following commands:

.. code::

git clone --recursive https://github.com/microsoft/LightGBM
cd LightGBM
mkdir build
cd build
cmake -A x64 -DBUILD_CPP_TEST=ON -DUSE_OPENMP=OFF ..
cmake --build . --target testlightgbm --config Debug

The ``.exe`` file will be in ``LightGBM/Debug`` folder.

Linux
^^^^^

On Linux a C++ unit tests of LightGBM can be built using **CMake** and **gcc** or **Clang**.

1. Install `CMake`_.

2. Run the following commands:

.. code::

git clone --recursive https://github.com/microsoft/LightGBM
cd LightGBM
mkdir build
cd build
cmake -DBUILD_CPP_TEST=ON -DUSE_OPENMP=OFF ..
make testlightgbm -j4

**Note**: glibc >= 2.14 is required.

macOS
^^^^^

On macOS a C++ unit tests of LightGBM can be built using **CMake** and **Apple Clang** or **gcc**.

Apple Clang
***********

Only **Apple Clang** version 8.1 or higher is supported.

1. Install `CMake`_ (3.16 or higher):

.. code::

brew install cmake

2. Run the following commands:

.. code::

git clone --recursive https://github.com/microsoft/LightGBM
cd LightGBM
mkdir build
cd build
cmake -DBUILD_CPP_TEST=ON -DUSE_OPENMP=OFF ..
make testlightgbm -j4

gcc
***

1. Install `CMake`_ (3.2 or higher):

.. code::

brew install cmake

2. Install **gcc**:

.. code::

brew install gcc

3. Run the following commands:

.. code::

git clone --recursive https://github.com/microsoft/LightGBM
cd LightGBM
export CXX=g++-7 CC=gcc-7 # replace "7" with version of gcc installed on your machine
mkdir build
cd build
cmake -DBUILD_CPP_TEST=ON -DUSE_OPENMP=OFF ..
make testlightgbm -j4


.. |download artifacts| image:: ./_static/images/artifacts-not-available.svg
:target: https://lightgbm.readthedocs.io/en/latest/Installation-Guide.html
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.