Tencent / mars

Mars is a cross-platform network component developed by WeChat.
Other
17.34k stars 3.63k forks source link

本地编译失败,在线等挺急的 #835

Open CLlongaotian opened 4 years ago

CLlongaotian commented 4 years ago

D:\AndroidApps\mars\mars-master\mars>python build_android.py Enter menu:

  1. Clean && build mars.
  2. Build incrementally mars.
  3. Clean && build xlog.
  4. Exit 23 ndk path:E:\1\localBuild\ndk-r16b\android-ndk-r16b [[==BUILD_DESCRIPTION==]]Revision:                   
    PublicComponent
    KEYVALUE
    Branch
    BuildTag
    BuildTime2020-08-11 15:46:54
    Revision
    build cmd:cmake "D:\AndroidApps\mars\mars-master\mars" -G "Unix Makefiles" -DANDROID_ABI="armeabi-v7a" -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=E:\1\localBuild\ndk-r16b\android-ndk-r16b/build/cmake/android.toolchain.cmake -DANDROID_TOOLCHAIN=clang -DANDROID_NDK=E:\1\localBuild\ndk-r16b\android-ndk-r16b -DANDROID_PLATFORM=android-16 -DANDROID_STL="c++_shared" && cmake --build . --config Release -- -j8 -- CMAKE_INSTALL_PREFIX=D:/AndroidApps/mars/mars-master/mars/cmake_build/Android -- CMAKE_INSTALL_PREFIX=D:/AndroidApps/mars/mars-master/mars/cmake_build/Android CMake Warning at E:/1/localBuild/ndk-r16b/android-ndk-r16b/build/cmake/android.toolchain.cmake:63 (message): Using custom NDK path (ANDROID_NDK is set): E:\1\localBuild\ndk-r16b\android-ndk-r16b Call Stack (most recent call first): E:/1/localBuild/cmake/share/cmake-3.18/Modules/CMakeDetermineSystem.cmake:93 (include) comm/CMakeLists.txt:6 (project)

-- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: E:/1/localBuild/ndk-r16b/android-ndk-r16b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: E:/1/localBuild/ndk-r16b/android-ndk-r16b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- ==============config comm==================== -- CMAKE_INSTALL_PREFIX=D:/AndroidApps/mars/mars-master/mars/cmake_build/Android CMake Warning at E:/1/localBuild/ndk-r16b/android-ndk-r16b/build/cmake/android.toolchain.cmake:63 (message): Using custom NDK path (ANDROID_NDK is set): E:\1\localBuild\ndk-r16b\android-ndk-r16b Call Stack (most recent call first): cmake_build/Android/CMakeFiles/3.18.1/CMakeSystem.cmake:6 (include) boost/CMakeLists.txt:6 (project)

-- ==============config mars-boost==================== -- The ASM compiler identification is Clang -- Found assembler: E:/1/localBuild/ndk-r16b/android-ndk-r16b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe -- CMAKE_INSTALL_PREFIX=D:/AndroidApps/mars/mars-master/mars/cmake_build/Android CMake Warning at E:/1/localBuild/ndk-r16b/android-ndk-r16b/build/cmake/android.toolchain.cmake:63 (message): Using custom NDK path (ANDROID_NDK is set): E:\1\localBuild\ndk-r16b\android-ndk-r16b Call Stack (most recent call first): cmake_build/Android/CMakeFiles/3.18.1/CMakeSystem.cmake:6 (include) app/CMakeLists.txt:6 (project)

-- ==============config app==================== -- CMAKE_INSTALL_PREFIX=D:/AndroidApps/mars/mars-master/mars/cmake_build/Android CMake Warning at E:/1/localBuild/ndk-r16b/android-ndk-r16b/build/cmake/android.toolchain.cmake:63 (message): Using custom NDK path (ANDROID_NDK is set): E:\1\localBuild\ndk-r16b\android-ndk-r16b Call Stack (most recent call first): cmake_build/Android/CMakeFiles/3.18.1/CMakeSystem.cmake:6 (include) baseevent/CMakeLists.txt:6 (project)

-- ==============config baseevent==================== -- CMAKE_INSTALL_PREFIX=D:/AndroidApps/mars/mars-master/mars/cmake_build/Android CMake Warning at E:/1/localBuild/ndk-r16b/android-ndk-r16b/build/cmake/android.toolchain.cmake:63 (message): Using custom NDK path (ANDROID_NDK is set): E:\1\localBuild\ndk-r16b\android-ndk-r16b Call Stack (most recent call first): cmake_build/Android/CMakeFiles/3.18.1/CMakeSystem.cmake:6 (include) log/CMakeLists.txt:6 (project)

-- ==============config xlog==================== -- CMAKE_INSTALL_PREFIX=D:/AndroidApps/mars/mars-master/mars/cmake_build/Android CMake Warning at E:/1/localBuild/ndk-r16b/android-ndk-r16b/build/cmake/android.toolchain.cmake:63 (message): Using custom NDK path (ANDROID_NDK is set): E:\1\localBuild\ndk-r16b\android-ndk-r16b Call Stack (most recent call first): cmake_build/Android/CMakeFiles/3.18.1/CMakeSystem.cmake:6 (include) sdt/CMakeLists.txt:6 (project)

-- ==============config sdt==================== -- CMAKE_INSTALL_PREFIX=D:/AndroidApps/mars/mars-master/mars/cmake_build/Android CMake Warning at E:/1/localBuild/ndk-r16b/android-ndk-r16b/build/cmake/android.toolchain.cmake:63 (message): Using custom NDK path (ANDROID_NDK is set): E:\1\localBuild\ndk-r16b\android-ndk-r16b Call Stack (most recent call first): cmake_build/Android/CMakeFiles/3.18.1/CMakeSystem.cmake:6 (include) stn/CMakeLists.txt:7 (project)

-- ==============config stn==================== CMake Warning (dev) at E:/1/localBuild/cmake/share/cmake-3.18/Modules/GNUInstallDirs.cmake:225 (message): Unable to determine default CMAKE_INSTALL_LIBDIR directory because no target architecture is known. Please enable at least one language before including GNUInstallDirs. Call Stack (most recent call first): CMakeLists.txt:21 (include) This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning at E:/1/localBuild/ndk-r16b/android-ndk-r16b/build/cmake/android.toolchain.cmake:63 (message): Using custom NDK path (ANDROID_NDK is set): E:\1\localBuild\ndk-r16b\android-ndk-r16b Call Stack (most recent call first): cmake_build/Android/CMakeFiles/3.18.1/CMakeSystem.cmake:6 (include) zstd/build/cmake/lib/CMakeLists.txt:10 (project)

CMake Warning at E:/1/localBuild/ndk-r16b/android-ndk-r16b/build/cmake/android.toolchain.cmake:63 (message): Using custom NDK path (ANDROID_NDK is set): E:\1\localBuild\ndk-r16b\android-ndk-r16b Call Stack (most recent call first): cmake_build/Android/CMakeFiles/3.18.1/CMakeSystem.cmake:6 (include) CMakeLists.txt:24 (project)

-- ==============config mars==================== -- Configuring done -- Generating done -- Build files have been written to: D:/AndroidApps/mars/mars-master/mars/cmake_build/Android Scanning dependencies of target libzstd_static Scanning dependencies of target comm Scanning dependencies of target xlog Scanning dependencies of target mars-boost Scanning dependencies of target stn Scanning dependencies of target app Scanning dependencies of target baseevent Scanning dependencies of target sdt [ 1%] Building C object zstd/CMakeFiles/libzstd_static.dir////lib/common/debug.c.o [ 1%] Building C object zstd/CMakeFiles/libzstd_static.dir////lib/common/entropy_common.c.o [ 1%] Building CXX object xlog/CMakeFiles/xlog.dir/src/appender.cc.o [ 1%] Building CXX object app/CMakeFiles/app.dir/app_logic.cc.o [ 1%] Building CXX object baseevent/CMakeFiles/baseevent.dir/src/active_logic.cc.o [ 1%] Building CXX object boost/CMakeFiles/mars-boost.dir/libs/atomic/src/lockpool.cpp.o [ 2%] Building C object zstd/CMakeFiles/libzstd_static.dir////lib/common/error_private.c.o [ 3%] Building CXX object sdt/CMakeFiles/sdt.dir/sdt_logic.cc.o [ 3%] Building C object zstd/CMakeFiles/libzstd_static.dir////lib/common/fse_decompress.c.o [ 4%] Building CXX object boost/CMakeFiles/mars-boost.dir/libs/date_time/src/gregorian/date_generators.cpp.o[ 5%] Building C object comm/CMakeFiles/comm.dir/adler32.c.o [ 6%] Building CXX object stn/CMakeFiles/stn.dir/src/anti_avalanche.cc.o [ 7%] Building C object zstd/CMakeFiles/libzstd_static.dir////lib/common/pool.c.o [ 7%] Building CXX object comm/CMakeFiles/comm.dir/alarm.cc.o [ 7%] Building C object zstd/CMakeFiles/libzstd_static.dir///__/lib/common/threading.c.o [ 7%] Building CXX object boost/CMakeFiles/mars-boost.dir/libs/date_time/src/gregorian/gregorian_types.cpp.o [ 8%] Building C object zstd/CMakeFiles/libzstd_static.dir////lib/common/xxhash.c.o [ 9%] Building CXX object app/CMakeFiles/app.dir/src/traffic_statistics.cc.o [ 10%] Building CXX object boost/CMakeFiles/mars-boost.dir/libs/date_time/src/gregorian/greg_month.cpp.o [ 10%] Building C object zstd/CMakeFiles/libzstd_static.dir////lib/common/zstd_common.c.o [ 11%] Building CXX object xlog/CMakeFiles/xlog.dir/src/formater.cc.o [ 12%] Building C object zstd/CMakeFiles/libzstd_static.dir////lib/compress/fse_compress.c.o [ 12%] Building CXX object stn/CMakeFiles/stn.dir/src/dynamic_timeout.cc.o [ 13%] Building CXX object comm/CMakeFiles/comm.dir/anr.cc.o [ 13%] Building C object zstd/CMakeFiles/libzstd_static.dir////lib/compress/hist.c.o [ 13%] Building CXX object xlog/CMakeFiles/xlog.dir/src/log_base_buffer.cc.o [ 14%] Building C object zstd/CMakeFiles/libzstd_static.dir///__/lib/compress/huf_compress.c.o [ 15%] Building CXX object stn/CMakeFiles/stn.dir/src/flow_limit.cc.o [ 16%] Building CXX object xlog/CMakeFiles/xlog.dir/src/log_zlib_buffer.cc.o [ 16%] Building C object zstd/CMakeFiles/libzstd_static.dir////lib/compress/zstd_compress.c.o [ 16%] Building CXX object app/CMakeFiles/app.dir/jni/com_tencent_mars_app_AppLogic_C2Java.cc.o [ 16%] Building CXX object boost/CMakeFiles/mars-boost.dir/libs/date_time/src/gregorian/greg_weekday.cpp.o [ 16%] Building CXX object xlog/CMakeFiles/xlog.dir/src/log_zstd_buffer.cc.o [ 17%] Building CXX object baseevent/CMakeFiles/baseevent.dir/src/baseprj.cc.o [ 17%] Building CXX object stn/CMakeFiles/stn.dir/src/frequency_limit.cc.o [ 17%] Building CXX object sdt/CMakeFiles/sdt.dir/src/sdt_core.cc.o [ 18%] Building CXX object boost/CMakeFiles/mars-boost.dir/libs/date_time/src/posix_time/posix_time_types.cpp.o [ 19%] Building CXX object xlog/CMakeFiles/xlog.dir/crypt/log_crypt.cc.o [ 20%] Building C object zstd/CMakeFiles/libzstd_static.dir////lib/compress/zstd_compress_literals.c.o [ 20%] Building CXX object boost/CMakeFiles/mars-boost.dir/libs/exception/src/clone_current_exception_non_intrusive.cpp.o [ 21%] Linking CXX static library libapp.a [ 21%] Building C object zstd/CMakeFiles/libzstd_static.dir///__/lib/compress/zstd_compress_sequences.c.o [ 21%] Building C object xlog/CMakeFiles/xlog.dir/crypt/micro-ecc-master/uECC.c.o [ 22%] Building CXX object stn/CMakeFiles/stn.dir/src/longlink.cc.o [ 22%] Built target app [ 23%] Building CXX object boost/CMakeFiles/mars-boost.dir/libs/filesystem/src/codecvt_error_category.cpp.o Scanning dependencies of target libzstd.pc [ 24%] Building C object zstd/CMakeFiles/libzstd_static.dir////lib/compress/zstd_double_fast.c.o [ 24%] Creating pkg-config file [ 24%] Built target libzstd.pc [ 24%] Building CXX object boost/CMakeFiles/mars-boost.dir/libs/filesystem/src/operations.cpp.o [ 25%] Building C object xlog/CMakeFiles/xlog.dir//comm/xlogger/xloggerbase.c.o [ 25%] Building CXX object xlog/CMakeFiles/xlog.dir/jni/ConsoleLog.cc.o [ 25%] Building CXX object comm/CMakeFiles/comm.dir/autobuffer.cc.o [ 26%] Building CXX object xlog/CMakeFiles/xlog.dir/jni/Java2C_Xlog.cc.o [ 27%] Building CXX object boost/CMakeFiles/mars-boost.dir/libs/filesystem/src/path.cpp.o [ 28%] Building CXX object comm/CMakeFiles/comm.dir/basepacker.cc.o [ 28%] Building C object zstd/CMakeFiles/libzstd_static.dir////lib/compress/zstd_fast.c.o [ 28%] Building CXX object comm/CMakeFiles/comm.dir/boost_exception.cc.o [ 29%] Linking CXX static library libxlog.a [ 30%] Building CXX object sdt/CMakeFiles/sdt.dir/src/activecheck/basechecker.cc.o [ 30%] Building CXX object boost/CMakeFiles/mars-boost.dir/libs/filesystem/src/path_traits.cpp.o [ 30%] Built target xlog [ 31%] Building C object zstd/CMakeFiles/libzstd_static.dir////lib/compress/zstd_lazy.c.o [ 32%] Building CXX object boost/CMakeFiles/mars-boost.dir/libs/filesystem/src/portability.cpp.o [ 33%] Building CXX object comm/CMakeFiles/comm.dir/comm_frequency_limit.cc.o [ 33%] Building CXX object boost/CMakeFiles/mars-boost.dir/libs/filesystem/src/unique_path.cpp.o [ 33%] Building CXX object sdt/CMakeFiles/sdt.dir/src/activecheck/dnschecker.cc.o [ 34%] Building CXX object boost/CMakeFiles/mars-boost.dir/libs/filesystem/src/utf8_codecvt_facet.cpp.o [ 34%] Building CXX object comm/CMakeFiles/comm.dir/http.cc.o [ 34%] Building CXX object boost/CMakeFiles/mars-boost.dir/libs/filesystem/src/windows_file_codecvt.cpp.o [ 34%] Building CXX object baseevent/CMakeFiles/baseevent.dir/src/baseprjevent.cc.o [ 35%] Building CXX object boost/CMakeFiles/mars-boost.dir/libs/iostreams/src/file_descriptor.cpp.o [ 35%] Building CXX object boost/CMakeFiles/mars-boost.dir/libs/iostreams/src/mapped_file.cpp.o [ 36%] Building CXX object boost/CMakeFiles/mars-boost.dir/libs/smart_ptr/src/sp_collector.cpp.o [ 36%] Building CXX object boost/CMakeFiles/mars-boost.dir/libs/smart_ptr/src/sp_debug_hooks.cpp.o [ 37%] Building CXX object boost/CMakeFiles/mars-boost.dir/libs/system/src/error_code.cpp.o [ 37%] Building CXX object boost/CMakeFiles/mars-boost.dir/libs/thread/src/future.cpp.o [ 37%] Building C object zstd/CMakeFiles/libzstd_static.dir////lib/compress/zstd_ldm.c.o [ 38%] Building CXX object sdt/CMakeFiles/sdt.dir/src/activecheck/httpchecker.cc.o [ 39%] Building CXX object comm/CMakeFiles/comm.dir/memdbg.cc.o [ 40%] Building CXX object boost/CMakeFiles/mars-boost.dir/libs/context/src/execution_context.cpp.o [ 40%] Building CXX object boost/CMakeFiles/mars-boost.dir/libs/context/src/posix/stack_traits.cpp.o [ 41%] Building C object zstd/CMakeFiles/libzstd_static.dir////lib/compress/zstd_opt.c.o [ 42%] Building CXX object boost/CMakeFiles/mars-boost.dir/libs/coroutine/src/detail/coroutine_context.cpp.o [ 42%] Building CXX object comm/CMakeFiles/comm.dir/mmap_util.cc.o [ 42%] Building CXX object boost/CMakeFiles/mars-boost.dir/libs/coroutine/src/exceptions.cpp.o [ 43%] Building CXX object boost/CMakeFiles/mars-boost.dir/libs/coroutine/src/posix/stack_traits.cpp.o [ 43%] Building ASM object boost/CMakeFiles/mars-boost.dir/libs/context/src/asm/jump_arm_aapcs_elf_gas.S.o [ 44%] Building ASM object boost/CMakeFiles/mars-boost.dir/libs/context/src/asm/make_arm_aapcs_elf_gas.S.o [ 45%] Building CXX object comm/CMakeFiles/comm.dir/ptrbuffer.cc.o [ 45%] Building CXX object sdt/CMakeFiles/sdt.dir/src/activecheck/pingchecker.cc.o [ 45%] Building CXX object comm/CMakeFiles/comm.dir/singleton.cc.o [ 46%] Building CXX object comm/CMakeFiles/comm.dir/strutil.cc.o[ 46%] Building CXX object stn/CMakeFiles/stn.dir/src/longlink_connect_monitor.cc.o [ 47%] Building CXX object baseevent/CMakeFiles/baseevent.dir/jni/com_tencent_mars_BaseEvent.cc.o [ 48%] Building CXX object sdt/CMakeFiles/sdt.dir/src/activecheck/tcpchecker.cc.o [ 48%] Linking CXX static library libmars-boost.a [ 48%] Built target mars-boost [ 48%] Building CXX object sdt/CMakeFiles/sdt.dir/src/checkimpl/base_netinfo_query.cc.o [ 48%] Linking CXX static library libbaseevent.a [ 48%] Built target baseevent [ 49%] Building CXX object sdt/CMakeFiles/sdt.dir/src/checkimpl/dnsquery.cc.o [ 49%] Building CXX object comm/CMakeFiles/comm.dir/tickcount.cc.o [ 50%] Building C object comm/CMakeFiles/comm.dir/time_utils.c.o [ 51%] Building CXX object sdt/CMakeFiles/sdt.dir/src/checkimpl/http_detector.cc.o [ 51%] Building CXX object comm/CMakeFiles/comm.dir/tinyxml2.cc.o [ 51%] Building CXX object sdt/CMakeFiles/sdt.dir/src/checkimpl/httpquery.cc.o D:/AndroidApps/mars/mars-master/mars/stn/src/longlink_connectmonitor.cc:268:14: warning: unused variable 'ret' [-Wunused-variable] bool ret = longlink.MakeSureConnected(&newone); ^ [ 52%] Building C object comm/CMakeFiles/comm.dir/assert/__assert.c.o D:/AndroidApps/mars/mars-master/mars/stn/src/longlink_connect_monitor.cc:47:27: warning: unused variable 'kTimeCheckPeriod' [-Wunused-const-variable] static const unsigned int kTimeCheckPeriod = 10 1000; // 10s ^ D:/AndroidApps/mars/mars-master/mars/stn/src/longlink_connect_monitor.cc:48:27: warning: unused variable 'kStartCheckPeriod' [-Wunused-const-variable] static const unsigned int kStartCheckPeriod = 3 1000; // 3s ^ [ 53%] Building CXX object sdt/CMakeFiles/sdt.dir/src/checkimpl/pingquery.cc.o [ 53%] Building CXX object comm/CMakeFiles/comm.dir/crypt/ibase64.cc.o [ 53%] Building CXX object sdt/CMakeFiles/sdt.dir/src/checkimpl/tcpquery.cc.o D:/AndroidApps/mars/mars-master/mars/comm/crypt/ibase64.cc:173:20: warning: array subscript is of type 'char' [-Wchar-subscripts] char_to_base64 ['+'] = 62; ^~~~ D:/AndroidApps/mars/mars-master/mars/comm/crypt/ibase64.cc:174:20: warning: array subscript is of type 'char' [-Wchar-subscripts] char_to_base64 ['/'] = 63; ^~~~ 2 warnings generated. [ 54%] Building C object comm/CMakeFiles/comm.dir/crypt/pkcs7_padding.c.o [ 54%] Building CXX object comm/CMakeFiles/comm.dir/network/getaddrinfo_with_timeout.cc.o [ 55%] Building CXX object sdt/CMakeFiles/sdt.dir/src/tools/netchecker_trafficmonitor.cc.o D:/AndroidApps/mars/mars-master/mars/sdt/src/checkimpl/pingquery.cc:55:18: warning: unused variable 'kAlarmType' [-Wunused-const-variable] static const int kAlarmType = 101; ^ [ 56%] Building CXX object comm/CMakeFiles/comm.dir/network/getdnssvraddrs.cc.o 1 warning generated. [ 56%] Building C object zstd/CMakeFiles/libzstd_static.dir////lib/compress/zstdmt_compress.c.o [ 56%] Building CXX object sdt/CMakeFiles/sdt.dir/jni/com_tencent_mars_sdt_SdtLogic_C2Java.cc.o [ 57%] Building CXX object sdt/CMakeFiles/sdt.dir/jni/com_tencent_mars_sdt_SdtLogic_Java2C.cc.o [ 57%] Building C object comm/CMakeFiles/comm.dir/network/getgateway.c.o [ 58%] Building C object zstd/CMakeFiles/libzstd_static.dir////lib/decompress/huf_decompress.c.o [ 59%] Building CXX object comm/CMakeFiles/comm.dir/network/getifaddrs.cc.o [ 59%] Building CXX object comm/CMakeFiles/comm.dir/network/local_routetable.cc.o [ 59%] Building C object zstd/CMakeFiles/libzstd_static.dir////lib/decompress/zstd_ddict.c.o [ 60%] Building C object zstd/CMakeFiles/libzstd_static.dir////lib/decompress/zstd_decompress.c.o [ 60%] Building C object zstd/CMakeFiles/libzstd_static.dir///__/lib/decompress/zstd_decompress_block.c.o [ 61%] Building C object zstd/CMakeFiles/libzstd_static.dir////lib/dictBuilder/cover.c.o [ 61%] Linking CXX static library libsdt.a [ 61%] Building C object zstd/CMakeFiles/libzstd_static.dir////lib/dictBuilder/divsufsort.c.o 3 warnings generated. [ 62%] Building CXX object comm/CMakeFiles/comm.dir/network/netinfo_util.cc.o [ 62%] Building CXX object comm/CMakeFiles/comm.dir/socket/block_socket.cc.o [ 62%] Built target sdt [ 63%] Building C object zstd/CMakeFiles/libzstd_static.dir///__/lib/dictBuilder/fastcover.c.o [ 64%] Building CXX object comm/CMakeFiles/comm.dir/socket/complexconnect.cc.o [ 64%] Building C object zstd/CMakeFiles/libzstd_static.dir////lib/dictBuilder/zdict.c.o [ 65%] Building CXX object stn/CMakeFiles/stn.dir/src/longlink_identify_checker.cc.o [ 66%] Building C object zstd/CMakeFiles/libzstd_static.dir////lib/deprecated/zbuff_common.c.o [ 67%] Building C object zstd/CMakeFiles/libzstd_static.dir////lib/deprecated/zbuff_compress.c.o [ 67%] Building CXX object comm/CMakeFiles/comm.dir/socket/getsocktcpinfo.cc.o [ 67%] Building C object zstd/CMakeFiles/libzstd_static.dir///__/lib/deprecated/zbuff_decompress.c.o [ 68%] Building CXX object comm/CMakeFiles/comm.dir/socket/local_ipstack.cc.o [ 68%] Building CXX object comm/CMakeFiles/comm.dir/socket/nat64_prefix_util.cc.o [ 68%] Building CXX object stn/CMakeFiles/stn.dir/src/longlink_metadata.cc.o [ 69%] Building CXX object comm/CMakeFiles/comm.dir/socket/socket_address.cc.o [ 70%] Building CXX object stn/CMakeFiles/stn.dir/src/longlink_speed_test.cc.o [ 71%] Linking C static library libzstd.a D:/AndroidApps/mars/mars-master/mars/comm/socket/local_ipstack.cc:106:30: warning: use of GNU old-style field designator extension [-Wgnu-designator] sockaddr_union addr = { in6:sin6_test }; ^~~~ .in6 = D:/AndroidApps/mars/mars-master/mars/comm/socket/local_ipstack.cc:123:9: warning: use of GNU old-style field designator extension [-Wgnu-designator] sin_family:AF_INET, ^~~ .sin_family = D:/AndroidApps/mars/mars-master/mars/comm/socket/local_ipstack.cc:124:9: warning: use of GNU old-style field designator extension [-Wgnu-designator] sin_port:80, ^~~~~ .sin_port = D:/AndroidApps/mars/mars-master/mars/comm/socket/local_ipstack.cc:127:29: warning: use of GNU old-style field designator extension [-Wgnu-designator] sockaddr_union addr = { in:sin_test }; ^~~ .in = 4 warnings generated. [ 71%] Building CXX object comm/CMakeFiles/comm.dir/socket/tcpclient.cc.o [ 72%] Building CXX object comm/CMakeFiles/comm.dir/socket/tcpclient_fsm.cc.o [ 72%] Built target libzstd_static [ 72%] Building CXX object comm/CMakeFiles/comm.dir/socket/tcpserver.cc.o [ 72%] Building CXX object stn/CMakeFiles/stn.dir/src/longlink_task_manager.cc.o [ 73%] Building CXX object comm/CMakeFiles/comm.dir/socket/tcpserver_fsm.cc.o [ 74%] Building CXX object stn/CMakeFiles/stn.dir/src/net_channel_factory.cc.o [ 74%] Building CXX object comm/CMakeFiles/comm.dir/socket/udpclient.cc.o [ 75%] Building CXX object comm/CMakeFiles/comm.dir/socket/udpserver.cc.o [ 75%] Building CXX object comm/CMakeFiles/comm.dir/socket/unix_socket.cc.o [ 76%] Building C object comm/CMakeFiles/comm.dir/xlogger/loginfo_extract.c.o [ 77%] Building CXX object comm/CMakeFiles/comm.dir/xlogger/xlogger.cc.o [ 77%] Building C object comm/CMakeFiles/comm.dir/xlogger/xloggerbase.c.o [ 78%] Building CXX object comm/CMakeFiles/comm.dir/corepattern/coreservice_base.cc.o [ 78%] Building CXX object stn/CMakeFiles/stn.dir/src/net_check_logic.cc.o [ 78%] Building CXX object comm/CMakeFiles/comm.dir/dns/dns.cc.o [ 79%] Building CXX object comm/CMakeFiles/comm.dir/messagequeue/message_queue.cc.o [ 79%] Building CXX object comm/CMakeFiles/comm.dir/unix/socket/socketbreaker.cc.o [ 80%] Building CXX object stn/CMakeFiles/stn.dir/src/net_core.cc.o [ 80%] Building CXX object stn/CMakeFiles/stn.dir/src/net_source.cc.o [ 81%] Building CXX object comm/CMakeFiles/comm.dir/unix/socket/socketpoll.cc.o [ 81%] Building CXX object comm/CMakeFiles/comm.dir/unix/socket/socketselect.cc.o [ 82%] Building CXX object comm/CMakeFiles/comm.dir/android/dumpcrash_stack.cc.o [ 82%] Building C object comm/CMakeFiles/comm.dir/android/getprocessname.c.o [ 83%] Building CXX object comm/CMakeFiles/comm.dir/android/wakeuplock.cc.o [ 83%] Building C object comm/CMakeFiles/comm.dir/jni/ifaddrs.c.o [ 84%] Building CXX object stn/CMakeFiles/stn.dir/src/netsource_timercheck.cc.o [ 85%] Building CXX object comm/CMakeFiles/comm.dir/jni/platform_comm.cc.o [ 85%] Building CXX object comm/CMakeFiles/comm.dir/jni/util/comm_function.cc.o [ 86%] Building CXX object comm/CMakeFiles/comm.dir/jni/util/scope_jenv.cc.o [ 86%] Building CXX object comm/CMakeFiles/comm.dir/jni/util/scoped_jstring.cc.o [ 87%] Building CXX object comm/CMakeFiles/comm.dir/jni/util/var_cache.cc.o In file included from D:/AndroidApps/mars/mars-master/mars/comm/jni/platform_comm.cc:33: In file included from D:/AndroidApps/mars/mars-master/mars/comm/../..\mars/comm/coroutine/coroutine.h:18: In file included from D:/AndroidApps/mars/mars-master/mars/comm/..\boost/coroutine/all.hpp:14: In file included from D:/AndroidApps/mars/mars-master/mars/comm/..\boost/coroutine/protected_stack_allocator.hpp:12: D:/AndroidApps/mars/mars-master/mars/comm/..\boost/coroutine/posix/protected_stack_allocator.hpp:71:19: warning: unused variable 'result' [-Wunused-variable] const int result( ::mprotect( limit, traits_type::page_size(), PROT_NONE) ); ^ [ 87%] Building CXX object stn/CMakeFiles/stn.dir/src/proxy_test.cc.o [ 87%] Building CXX object comm/CMakeFiles/comm.dir/jni/xlogger_threadinfo.cc.o [ 88%] Building CXX object stn/CMakeFiles/stn.dir/src/shortlink.cc.o [ 88%] Building CXX object stn/CMakeFiles/stn.dir/src/shortlink_task_manager.cc.o [ 89%] Building CXX object stn/CMakeFiles/stn.dir/src/signalling_keeper.cc.o 1 warning generated. [ 89%] Building CXX object stn/CMakeFiles/stn.dir/src/simple_ipport_sort.cc.o [ 90%] Building CXX object stn/CMakeFiles/stn.dir/src/smart_heartbeat.cc.o [ 91%] Linking CXX static library libcomm.a [ 91%] Building CXX object stn/CMakeFiles/stn.dir/src/task_profile.cc.o [ 91%] Built target comm Scanning dependencies of target marsxlog [ 91%] Building CXX object CMakeFiles/marsxlog.dir/libraries/mars_android_sdk/jni/JNI_OnLoad.cc.o [ 92%] Building CXX object stn/CMakeFiles/stn.dir/src/timing_sync.cc.o [ 92%] Building CXX object stn/CMakeFiles/stn.dir/src/weak_network_logic.cc.o [ 93%] Building CXX object CMakeFiles/marsxlog.dir/libraries/mars_xlog_sdk/jni/import.cc.o [ 93%] Linking CXX shared library libmarsxlog.so [ 93%] Built target marsxlog [ 94%] Building CXX object stn/CMakeFiles/stn.dir/src/zombie_task_manager.cc.o [ 94%] Building CXX object stn/CMakeFiles/stn.dir/stn.cc.o [ 95%] Building CXX object stn/CMakeFiles/stn.dir/stn_callback_bridge.cc.o [ 95%] Building CXX object stn/CMakeFiles/stn.dir/stn_logic.cc.o [ 96%] Building CXX object stn/CMakeFiles/stn.dir/jni/com_tencent_mars_stn_StnLogic_C2Java.cc.o [ 96%] Building CXX object stn/CMakeFiles/stn.dir/jni/com_tencent_mars_stn_StnLogic_Java2C.cc.o [ 97%] Linking CXX static library libstn.a [ 97%] Built target stn Scanning dependencies of target marsstn [ 98%] Building CXX object CMakeFiles/marsstn.dir/libraries/mars_android_sdk/jni/JNI_OnLoad.cc.o [ 98%] Building CXX object CMakeFiles/marsstn.dir/libraries/mars_android_sdk/jni/import.cc.o [ 99%] Building CXX object CMakeFiles/marsstn.dir/libraries/mars_android_sdk/jni/longlink_packer.cc.o [ 99%] Building CXX object CMakeFiles/marsstn.dir/libraries/mars_android_sdk/jni/shortlink_packer.cc.o [100%] Linking CXX shared library libmarsstn.so D:/AndroidApps/mars/mars-master/mars/log/src/appender.cc:650: error: undefined reference to 'PtrBuffer::PtrBuffer(void, unsigned int, unsigned int)' D:/AndroidApps/mars/mars-master/mars/log/src/appender.cc:654: error: undefined reference to 'PtrBuffer::Ptr()' D:/AndroidApps/mars/mars-master/mars/log/src/appender.cc:654: error: undefined reference to 'PtrBuffer::Length() const' D:/AndroidApps/mars/mars-master/mars/log/src/appender.cc:657: error: undefined reference to 'PtrBuffer::~PtrBuffer()' D:/AndroidApps/mars/mars-master/mars/log/src/appender.cc:664: error: undefined reference to 'PtrBuffer::PtrBuffer(void, unsigned int, unsigned int)' D:/AndroidApps/mars/mars-master/mars/log/src/appender.cc:667: error: undefined reference to 'PtrBuffer::Length() const' D:/AndroidApps/mars/mars-master/mars/log/src/appender.cc:668: error: undefined reference to 'PtrBuffer::Length() const' D:/AndroidApps/mars/mars-master/mars/log/src/appender.cc:669: error: undefined reference to 'PtrBuffer::Length(long, unsigned int)' D:/AndroidApps/mars/mars-master/mars/log/src/appender.cc:672: error: undefined reference to 'PtrBuffer::Ptr()' D:/AndroidApps/mars/mars-master/mars/log/src/appender.cc:672: error: undefined reference to 'PtrBuffer::Length() const' D:/AndroidApps/mars/mars-master/mars/log/src/appender.cc:678: error: undefined reference to 'PtrBuffer::~PtrBuffer()' D:/AndroidApps/mars/mars-master/mars/log/src/appender.cc:706: error: undefined reference to 'PtrBuffer::PtrBuffer(void, unsigned int, unsigned int)' D:/AndroidApps/mars/mars-master/mars/log/src/appender.cc:713: error: undefined reference to 'PtrBuffer::~PtrBuffer()' D:/AndroidApps/mars/mars-master/mars/log/src/appender.cc:927: error: undefined reference to 'OpenMmapFile(char const, unsigned int, mars_boost::iostreams::mapped_file&)' D:/AndroidApps/mars/mars-master/mars/log/..\boost/iostreams/device/mapped_file.hpp:299: error: undefined reference to 'mars_boost::iostreams::mapped_file_source::flags() const' D:/AndroidApps/mars/mars-master/mars/log/..\boost/iostreams/device/mapped_file.hpp:299: error: undefined reference to 'mars_boost::iostreams::mapped_file_source::flags() const' D:/AndroidApps/mars/mars-master/mars/log/..\boost/iostreams/device/mapped_file.hpp:466: error: undefined reference to 'mars_boost::iostreams::mapped_file_source::data() const' D:/AndroidApps/mars/mars-master/mars/log/..\boost/iostreams/device/mapped_file.hpp:466: error: undefined reference to 'mars_boost::iostreams::mapped_file_source::data() const' D:/AndroidApps/mars/mars-master/mars/log/src/appender.cc:944: error: undefined reference to 'PtrBuffer::Ptr()' D:/AndroidApps/mars/mars-master/mars/log/..\boost/iostreams/device/mapped_file.hpp:295: error: undefined reference to 'mars_boost::iostreams::mapped_file_source::is_open() const' D:/AndroidApps/mars/mars-master/mars/log/src/appender.cc:945: error: undefined reference to 'CloseMmapFile(mars_boost::iostreams::mapped_file&)' D:/AndroidApps/mars/mars-master/mars/log/..\boost/iostreams/device/mapped_file.hpp:295: error: undefined reference to 'mars_boost::iostreams::mapped_file_source::is_open() const' D:/AndroidApps/mars/mars-master/mars/log/..\boost/iostreams/device/mapped_file.hpp:298: error: undefined reference to 'mars_boost::iostreams::mapped_file_source::operator!() const' D:/AndroidApps/mars/mars-master/mars/log/..\boost/iostreams/device/mapped_file.hpp:299: error: undefined reference to 'mars_boost::iostreams::mapped_file_source::flags() const' D:/AndroidApps/mars/mars-master/mars/log/src/appender.cc:1050: error: undefined reference to 'PtrBuffer::Ptr()' D:/AndroidApps/mars/mars-master/mars/log/..\boost/iostreams/device/mapped_file.hpp:466: error: undefined reference to 'mars_boost::iostreams::mapped_file_source::data() const' D:/AndroidApps/mars/mars-master/mars/log/src/appender.cc:1047: error: undefined reference to 'CloseMmapFile(mars_boost::iostreams::mapped_file&)' D:/AndroidApps/mars/mars-master/mars/log/..\boost/iostreams/device/mapped_file.hpp:243: error: undefined reference to 'mars_boost::iostreams::mapped_file_source::mapped_file_source()' D:/AndroidApps/mars/mars-master/mars/log/src/formater.cc:55: error: undefined reference to 'PtrBuffer::MaxLength() const' D:/AndroidApps/mars/mars-master/mars/log/src/formater.cc:73: error: undefined reference to 'ExtractFileName' D:/AndroidApps/mars/mars-master/mars/log/src/formater.cc:102: error: undefined reference to 'PtrBuffer::PosPtr()' D:/AndroidApps/mars/mars-master/mars/log/src/formater.cc:59: error: undefined reference to 'PtrBuffer::MaxLength() const' D:/AndroidApps/mars/mars-master/mars/log/src/formater.cc:60: error: undefined reference to 'PtrBuffer::PosPtr()' D:/AndroidApps/mars/mars-master/mars/log/src/formater.cc:61: error: undefined reference to 'PtrBuffer::Pos() const' D:/AndroidApps/mars/mars-master/mars/log/src/formater.cc:61: error: undefined reference to 'PtrBuffer::Length(long, unsigned int)' D:/AndroidApps/mars/mars-master/mars/log/../..\mars/comm/ptrbuffer.h:45: error: undefined reference to 'PtrBuffer::Write(void const, unsigned int)' D:/AndroidApps/mars/mars-master/mars/log/src/formater.cc:108: error: undefined reference to 'PtrBuffer::Pos() const' D:/AndroidApps/mars/mars-master/mars/log/src/formater.cc:108: error: undefined reference to 'PtrBuffer::Length(long, unsigned int)' D:/AndroidApps/mars/mars-master/mars/log/src/formater.cc:117: error: undefined reference to 'PtrBuffer::MaxLength() const' D:/AndroidApps/mars/mars-master/mars/log/src/formater.cc:117: error: undefined reference to 'PtrBuffer::MaxLength() const' D:/AndroidApps/mars/mars-master/mars/log/src/formater.cc:121: error: undefined reference to 'PtrBuffer::Write(void const, unsigned int)' D:/AndroidApps/mars/mars-master/mars/log/src/formater.cc:128: error: undefined reference to 'PtrBuffer::PosPtr()' D:/AndroidApps/mars/mars-master/mars/log/src/formater.cc:128: error: undefined reference to 'PtrBuffer::Write(void const, unsigned int)' D:/AndroidApps/mars/mars-master/mars/log/src/log_base_buffer.cc:184: error: undefined reference to 'PtrBuffer::PtrBuffer()' D:/AndroidApps/mars/mars-master/mars/log/src/log_base_buffer.cc:187: error: undefined reference to 'PtrBuffer::Attach(void, unsigned int)' D:/AndroidApps/mars/mars-master/mars/log/src/log_base_buffer.cc:287: error: undefined reference to 'PtrBuffer::Length(long, unsigned int)' D:/AndroidApps/mars/mars-master/mars/log/src/log_base_buffer.cc:193: error: undefined reference to 'PtrBuffer::~PtrBuffer()' D:/AndroidApps/mars/mars-master/mars/log/src/log_base_buffer.cc:234: error: undefined reference to 'PtrBuffer::PosPtr()' D:/AndroidApps/mars/mars-master/mars/log/src/log_base_buffer.cc:240: error: undefined reference to 'PtrBuffer::Write(void const, unsigned int)' D:/AndroidApps/mars/mars-master/mars/log/src/log_base_buffer.cc:250: error: undefined reference to 'PtrBuffer::Write(void const, unsigned int, long)' D:/AndroidApps/mars/mars-master/mars/log/jni/ConsoleLog.cc:31: error: undefined reference to 'ExtractFileName' clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: [CMakeFiles/marsstn.dir/build.make:163: libmarsstn.so] Error 1 make[1]: [CMakeFiles/Makefile2:305: CMakeFiles/marsstn.dir/all] Error 2 make: *** [Makefile:149: all] Error 2 !!!!!!!!!!!!!!!!!!build fail!!!!!!!!!!!!!!!!!!!!

liao123abc commented 4 years ago

在windows编译碰到同样错误

E:/github/mars/mars/log/jni/ConsoleLog.cc:31: undefined reference to `ExtractFileName'
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [CMakeFiles/marsstn.dir/build.make:163: libmarsstn.so] Error 1
make[1]: *** [CMakeFiles/Makefile2:305: CMakeFiles/marsstn.dir/all] Error 2
make: *** [Makefile:149: all] Error 2
!!!!!!!!!!!!!!!!!!build fail!!!!!!!!!!!!!!!!!!!!
dreamcoder commented 4 years ago

在 log模块的CMakeLists.txt中增加comm库的依赖: image

dreamcoder commented 4 years ago

@liao123abc @CLlongaotian 修改log路径的CMakeFile.txt 如下: elseif(ANDROID) file(GLOB SELF_ANDROID_SRC_FILES RELATIVE ${PROJECT_SOURCE_DIR} jni/*.cc ../mk_template/JNI_OnLoad.cpp)

list(APPEND SELF_SRC_FILES ${SELF_ANDROID_SRC_FILES})

get_filename_component(EXPORT_EXP_FILE jni/export.exp ABSOLUTE)
set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--version-script=${EXPORT_EXP_FILE}")
link_directories(../comm)
link_libraries(comm)

endif()