taosdata / taos-tools

taos-tools are some useful tool collections for TDengine.
MIT License
25 stars 14 forks source link

编译taos-tools时failed #232

Closed freedomhust closed 2 years ago

freedomhust commented 2 years ago

问题:在源码编译TDengine时发现avro编译出错,所以过来提下问题希望能解答,需要安装的一些安装包都安装好了

系统:Ubuntu18.04 X86_64环境 uname -a Linux nvm-desktop 5.4.0-109-generic #123~18.04.1-Ubuntu SMP Fri Apr 8 09:48:52 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

详细描述: 在我运行完cmake .. 后执行make命令,发现进度在28%时,libsnappy.a找不到函数定义,后续报了一堆错误,感觉是libavro.a没有链接成功,但不知道怎么改

以下是详细输出:

cmake ..

-- The C compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.11")
 Enabled deflate codec
-- Checking for module 'snappy'
--   Found snappy, version 1.1.7
 Enabled snappy codec
-- Checking for module 'liblzma'
--   Found liblzma, version 5.2.2
 Enabled lzma codec
-- Checking for module 'jansson>=2.3'
--   Found jansson, version 2.11
 jansson found
-- Performing Test HAS_NO_FORMAT_TRUNCATION
-- Performing Test HAS_NO_FORMAT_TRUNCATION - Success
C compiler: GNU
-- Looking for include file endian.h
-- Looking for include file endian.h - found
-- Looking for include file fcntl.h
-- Looking for include file fcntl.h - found
-- Looking for include file sched.h
-- Looking for include file sched.h - found
-- Looking for include file unistd.h
-- Looking for include file unistd.h - found
-- Looking for include file sys/param.h
-- Looking for include file sys/param.h - found
-- Looking for include file sys/stat.h
-- Looking for include file sys/stat.h - found
-- Looking for include file sys/time.h
-- Looking for include file sys/time.h - found
-- Looking for include file sys/types.h
-- Looking for include file sys/types.h - found
-- Looking for close
-- Looking for close - found
-- Looking for getpid
-- Looking for getpid - found
-- Looking for gettimeofday
-- Looking for gettimeofday - found
-- Looking for open
-- Looking for open - found
-- Looking for read
-- Looking for read - found
-- Looking for sched_yield
-- Looking for sched_yield - found
-- Looking for include file stdint.h
-- Looking for include file stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of __int64
-- Check size of __int64 - failed
-- Check size of int64_t
-- Check size of int64_t - done
-- Check size of long long
-- Check size of long long - done
-- Check size of int32_t
-- Check size of int32_t - done
-- Check size of __int32
-- Check size of __int32 - failed
-- Check size of long
-- Check size of long - done
-- Check size of int
-- Check size of int - done
-- Check size of unsigned long
-- Check size of unsigned long - done
-- Check size of unsigned int
-- Check size of unsigned int - done
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Check size of uint32_t
-- Check size of uint32_t - done
-- Check size of __uint32
-- Check size of __uint32 - failed
-- Check size of uint16_t
-- Check size of uint16_t - done
-- Check size of __uint16
-- Check size of __uint16 - failed
-- Check size of uint8_t
-- Check size of uint8_t - done
-- Check size of __uint8
-- Check size of __uint8 - failed
-- Check size of ssize_t
-- Check size of ssize_t - done
-- Check size of SSIZE_T
-- Check size of SSIZE_T - failed
-- Looking for strtoll
-- Looking for strtoll - found
-- Looking for strtoq
-- Looking for strtoq - found
-- Looking for _strtoi64
-- Looking for _strtoi64 - not found
-- Looking for include file locale.h
-- Looking for include file locale.h - found
-- Looking for localeconv
-- Looking for localeconv - found
-- Looking for setlocale
-- Looking for setlocale - found
-- Performing Test HAVE_INLINE
-- Performing Test HAVE_INLINE - Success
-- Performing Test HAVE___INLINE
-- Performing Test HAVE___INLINE - Success
-- Performing Test HAVE___INLINE__
-- Performing Test HAVE___INLINE__ - Success
-- Performing Test HAVE_SYNC_BUILTINS
-- Performing Test HAVE_SYNC_BUILTINS - Success
-- Performing Test HAVE_ATOMIC_BUILTINS
-- Performing Test HAVE_ATOMIC_BUILTINS - Success
-- The CXX compiler identification is GNU 7.5.0
-- 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
-- Check if the system is big endian
-- Searching 16 bit integer
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Using unsigned short
-- Check if the system is big endian - little endian
-- Looking for byteswap.h
-- Looking for byteswap.h - found
-- Looking for sys/endian.h
-- Looking for sys/endian.h - not found
-- Looking for sys/mman.h
-- Looking for sys/mman.h - found
-- Looking for sys/resource.h
-- Looking for sys/resource.h - found
-- Looking for sys/uio.h
-- Looking for sys/uio.h - found
-- Looking for windows.h
-- Looking for windows.h - not found
-- Looking for zlibVersion in z
-- Looking for zlibVersion in z - found
-- Looking for lzo1x_1_15_compress in lzo2
-- Looking for lzo1x_1_15_compress in lzo2 - not found
-- Performing Test HAVE_VISUAL_STUDIO_ARCH_AVX
-- Performing Test HAVE_VISUAL_STUDIO_ARCH_AVX - Failed
-- Performing Test HAVE_VISUAL_STUDIO_ARCH_AVX2
-- Performing Test HAVE_VISUAL_STUDIO_ARCH_AVX2 - Failed
-- Performing Test HAVE_CLANG_MAVX
-- Performing Test HAVE_CLANG_MAVX - Success
-- Performing Test HAVE_CLANG_MBMI2
-- Performing Test HAVE_CLANG_MBMI2 - Success
-- Performing Test HAVE_BUILTIN_EXPECT
-- Performing Test HAVE_BUILTIN_EXPECT - Success
-- Performing Test HAVE_BUILTIN_CTZ
-- Performing Test HAVE_BUILTIN_CTZ - Success
-- Performing Test SNAPPY_HAVE_SSSE3
-- Performing Test SNAPPY_HAVE_SSSE3 - Failed
-- Performing Test SNAPPY_HAVE_BMI2
-- Performing Test SNAPPY_HAVE_BMI2 - Failed
-- Looking for mmap
-- Looking for mmap - found
-- Looking for sysconf
-- Looking for sysconf - found
-- Found Git: /usr/bin/git (found version "2.17.1")
Taos tools tag: 1.4.5

taos-tools tag:1.4.5
taosdump's latest commit in short is:4dd3f85
taosbenchmark's latest commit in short is:717f5aa
taosdump's status is:
taosbenchmark's status is:
 RELEASE mode use static avro library to link for release
libstdc++.a path:/usr/lib/gcc/x86_64-linux-gnu/7/libstdc++.a
-- Configuring done
-- Generating done
-- Build files have been written to: /home/nvm/neidongfu/taos-tools/build

make

Scanning dependencies of target apache-avro
[  1%] Creating directories for 'apache-avro'
[  2%] No download step for 'apache-avro'
[  3%] No patch step for 'apache-avro'
[  4%] No update step for 'apache-avro'
[  5%] Performing configure step for 'apache-avro'
-- The C compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.11")
Enabled deflate codec
-- Found Snappy: /usr/local/lib/libsnappy.a
Enabled snappy codec
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
-- Checking for module 'liblzma'
--   Found liblzma, version 5.2.2
Enabled lzma codec
-- Checking for module 'jansson>=2.3'
--   Found jansson, version 2.11
-- Searching for asciidoc...
CMake Warning at docs/CMakeLists.txt:51 (message):
  asciidoc and/or source-highlight not found.  HTML documentation will *NOT*
  be built.

-- Configuring done
-- Generating done
-- Build files have been written to: /home/nvm/neidongfu/taos-tools/build/deps/avro/src/apache-avro-build
[  6%] Performing build step for 'apache-avro'
Scanning dependencies of target avro-static
[  1%] Building C object src/CMakeFiles/avro-static.dir/allocation.c.o
[  2%] Building C object src/CMakeFiles/avro-static.dir/array.c.o
[  3%] Building C object src/CMakeFiles/avro-static.dir/codec.c.o
[  3%] Building C object src/CMakeFiles/avro-static.dir/consumer.c.o
[  4%] Building C object src/CMakeFiles/avro-static.dir/consume-binary.c.o
[  5%] Building C object src/CMakeFiles/avro-static.dir/datafile.c.o
[  6%] Building C object src/CMakeFiles/avro-static.dir/datum.c.o
[  6%] Building C object src/CMakeFiles/avro-static.dir/datum_equal.c.o
[  7%] Building C object src/CMakeFiles/avro-static.dir/datum_read.c.o
[  8%] Building C object src/CMakeFiles/avro-static.dir/datum_size.c.o
[  9%] Building C object src/CMakeFiles/avro-static.dir/datum_skip.c.o
[  9%] Building C object src/CMakeFiles/avro-static.dir/datum_validate.c.o
[ 10%] Building C object src/CMakeFiles/avro-static.dir/datum_value.c.o
/home/nvm/neidongfu/taos-tools/deps/avro/lang/c/src/datum_value.c: In function ‘avro_datum_value_get_type’:
/home/nvm/neidongfu/taos-tools/deps/avro/lang/c/src/datum_value.c:86:2: warning: #warning "Bug: EINVAL is not of type avro_type_t." [-Wcpp]
 #warning "Bug: EINVAL is not of type avro_type_t."
  ^~~~~~~
[ 11%] Building C object src/CMakeFiles/avro-static.dir/datum_write.c.o
[ 12%] Building C object src/CMakeFiles/avro-static.dir/dump.c.o
[ 12%] Building C object src/CMakeFiles/avro-static.dir/encoding_binary.c.o
[ 13%] Building C object src/CMakeFiles/avro-static.dir/errors.c.o
[ 14%] Building C object src/CMakeFiles/avro-static.dir/generic.c.o
[ 15%] Building C object src/CMakeFiles/avro-static.dir/io.c.o
[ 15%] Building C object src/CMakeFiles/avro-static.dir/map.c.o
[ 16%] Building C object src/CMakeFiles/avro-static.dir/memoize.c.o
[ 17%] Building C object src/CMakeFiles/avro-static.dir/resolved-reader.c.o
[ 18%] Building C object src/CMakeFiles/avro-static.dir/resolved-writer.c.o
[ 18%] Building C object src/CMakeFiles/avro-static.dir/resolver.c.o
[ 19%] Building C object src/CMakeFiles/avro-static.dir/schema.c.o
/home/nvm/neidongfu/taos-tools/deps/avro/lang/c/src/schema.c: In function ‘avro_schema_from_json_t’:
/home/nvm/neidongfu/taos-tools/deps/avro/lang/c/src/schema.c:882:3: warning: #warning "Bug: '0' is not of type avro_type_t." [-Wcpp]
  #warning "Bug: '0' is not of type avro_type_t."
   ^~~~~~~
[ 20%] Building C object src/CMakeFiles/avro-static.dir/schema_equal.c.o
[ 21%] Building C object src/CMakeFiles/avro-static.dir/st.c.o
/home/nvm/neidongfu/taos-tools/deps/avro/lang/c/src/st.c: In function ‘st_foreach’:
/home/nvm/neidongfu/taos-tools/deps/avro/lang/c/src/st.c:467:8: warning: this statement may fall through [-Wimplicit-fallthrough=]
     if (!tmp) {
        ^
/home/nvm/neidongfu/taos-tools/deps/avro/lang/c/src/st.c:476:4: note: here
    case ST_CONTINUE:
    ^~~~
[ 21%] Building C object src/CMakeFiles/avro-static.dir/string.c.o
[ 22%] Building C object src/CMakeFiles/avro-static.dir/value.c.o
[ 23%] Building C object src/CMakeFiles/avro-static.dir/value-hash.c.o
/home/nvm/neidongfu/taos-tools/deps/avro/lang/c/src/value-hash.c: In function ‘hash_buffer’:
/home/nvm/neidongfu/taos-tools/deps/avro/lang/c/src/value-hash.c:109:14: warning: this statement may fall through [-Wimplicit-fallthrough=]
   case 3: k1 ^= tail[2] << 16;
           ~~~^~~~~~~~~~~~~~~~
/home/nvm/neidongfu/taos-tools/deps/avro/lang/c/src/value-hash.c:110:3: note: here
   case 2: k1 ^= tail[1] << 8;
   ^~~~
/home/nvm/neidongfu/taos-tools/deps/avro/lang/c/src/value-hash.c:110:14: warning: this statement may fall through [-Wimplicit-fallthrough=]
   case 2: k1 ^= tail[1] << 8;
           ~~~^~~~~~~~~~~~~~~
/home/nvm/neidongfu/taos-tools/deps/avro/lang/c/src/value-hash.c:111:3: note: here
   case 1: k1 ^= tail[0];
   ^~~~
[ 24%] Building C object src/CMakeFiles/avro-static.dir/value-json.c.o
[ 24%] Building C object src/CMakeFiles/avro-static.dir/value-read.c.o
[ 25%] Building C object src/CMakeFiles/avro-static.dir/value-sizeof.c.o
[ 26%] Building C object src/CMakeFiles/avro-static.dir/value-write.c.o
[ 26%] Building C object src/CMakeFiles/avro-static.dir/wrapped-buffer.c.o
[ 27%] Linking C static library libavro.a
[ 27%] Built target avro-static
Scanning dependencies of target avrocat
[ 27%] Building C object src/CMakeFiles/avrocat.dir/avrocat.c.o
[ 28%] Linking C executable avrocat
/usr/local/lib/libsnappy.a(snappy.cc.o): In function `snappy::internal::WorkingMemory::WorkingMemory(unsigned long)':
snappy.cc:(.text+0x81d): undefined reference to `std::allocator<char>::allocator()'
snappy.cc:(.text+0x84f): undefined reference to `std::allocator<char>::~allocator()'
snappy.cc:(.text+0x8af): undefined reference to `std::allocator<char>::~allocator()'
/usr/local/lib/libsnappy.a(snappy.cc.o): In function `snappy::internal::WorkingMemory::~WorkingMemory()':
snappy.cc:(.text+0x8ed): undefined reference to `std::allocator<char>::allocator()'
snappy.cc:(.text+0x917): undefined reference to `std::allocator<char>::~allocator()'
/usr/local/lib/libsnappy.a(snappy.cc.o): In function `snappy::Uncompress(char const*, unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)':
snappy.cc:(.text+0x1bc0): undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::max_size() const'
/usr/local/lib/libsnappy.a(snappy.cc.o): In function `snappy::Compress(char const*, unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)':
snappy.cc:(.text+0x1e71): undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::resize(unsigned long)'
/usr/local/lib/libsnappy.a(snappy.cc.o): In function `snappy::STLStringResizeUninitialized(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, unsigned long)':
snappy.cc:(.text._ZN6snappy28STLStringResizeUninitializedEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm[_ZN6snappy28STLStringResizeUninitializedEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm]+0x1f): undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::resize(unsigned long)'
/usr/local/lib/libsnappy.a(snappy.cc.o): In function `snappy::string_as_array(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)':
snappy.cc:(.text._ZN6snappy15string_as_arrayEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN6snappy15string_as_arrayEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x23): undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::empty() const'
snappy.cc:(.text._ZN6snappy15string_as_arrayEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN6snappy15string_as_arrayEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x3a): undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::begin()'
/usr/local/lib/libsnappy.a(snappy.cc.o): In function `snappy::SnappySinkAllocator::Allocate(int)':
snappy.cc:(.text._ZN6snappy19SnappySinkAllocator8AllocateEi[_ZN6snappy19SnappySinkAllocator8AllocateEi]+0x2e): undefined reference to `operator new[](unsigned long)'
/usr/local/lib/libsnappy.a(snappy.cc.o): In function `snappy::SnappySinkAllocator::Deleter(void*, char const*, unsigned long)':
snappy.cc:(.text._ZN6snappy19SnappySinkAllocator7DeleterEPvPKcm[_ZN6snappy19SnappySinkAllocator7DeleterEPvPKcm]+0x23): undefined reference to `operator delete[](void*)'
/usr/local/lib/libsnappy.a(snappy.cc.o): In function `__gnu_cxx::new_allocator<char>::allocate(unsigned long, void const*)':
snappy.cc:(.text._ZN9__gnu_cxx13new_allocatorIcE8allocateEmPKv[_ZN9__gnu_cxx13new_allocatorIcE8allocateEmPKv]+0x2c): undefined reference to `std::__throw_bad_alloc()'
snappy.cc:(.text._ZN9__gnu_cxx13new_allocatorIcE8allocateEmPKv[_ZN9__gnu_cxx13new_allocatorIcE8allocateEmPKv]+0x38): undefined reference to `operator new(unsigned long)'
/usr/local/lib/libsnappy.a(snappy.cc.o): In function `__gnu_cxx::new_allocator<char>::deallocate(char*, unsigned long)':
snappy.cc:(.text._ZN9__gnu_cxx13new_allocatorIcE10deallocateEPcm[_ZN9__gnu_cxx13new_allocatorIcE10deallocateEPcm]+0x1c): undefined reference to `operator delete(void*)'
/usr/local/lib/libsnappy.a(snappy.cc.o): In function `void std::vector<snappy::SnappySinkAllocator::Datablock, std::allocator<snappy::SnappySinkAllocator::Datablock> >::_M_realloc_insert<snappy::SnappySinkAllocator::Datablock const&>(__gnu_cxx::__normal_iterator<snappy::SnappySinkAllocator::Datablock*, std::vector<snappy::SnappySinkAllocator::Datablock, std::allocator<snappy::SnappySinkAllocator::Datablock> > >, snappy::SnappySinkAllocator::Datablock const&)':
snappy.cc:(.text._ZNSt6vectorIN6snappy19SnappySinkAllocator9DatablockESaIS2_EE17_M_realloc_insertIJRKS2_EEEvN9__gnu_cxx17__normal_iteratorIPS2_S4_EEDpOT_[_ZNSt6vectorIN6snappy19SnappySinkAllocator9DatablockESaIS2_EE17_M_realloc_insertIJRKS2_EEEvN9__gnu_cxx17__normal_iteratorIPS2_S4_EEDpOT_]+0x1ec): undefined reference to `__cxa_begin_catch'
snappy.cc:(.text._ZNSt6vectorIN6snappy19SnappySinkAllocator9DatablockESaIS2_EE17_M_realloc_insertIJRKS2_EEEvN9__gnu_cxx17__normal_iteratorIPS2_S4_EEDpOT_[_ZNSt6vectorIN6snappy19SnappySinkAllocator9DatablockESaIS2_EE17_M_realloc_insertIJRKS2_EEEvN9__gnu_cxx17__normal_iteratorIPS2_S4_EEDpOT_]+0x254): undefined reference to `__cxa_rethrow'
snappy.cc:(.text._ZNSt6vectorIN6snappy19SnappySinkAllocator9DatablockESaIS2_EE17_M_realloc_insertIJRKS2_EEEvN9__gnu_cxx17__normal_iteratorIPS2_S4_EEDpOT_[_ZNSt6vectorIN6snappy19SnappySinkAllocator9DatablockESaIS2_EE17_M_realloc_insertIJRKS2_EEEvN9__gnu_cxx17__normal_iteratorIPS2_S4_EEDpOT_]+0x25c): undefined reference to `__cxa_end_catch'
/usr/local/lib/libsnappy.a(snappy.cc.o): In function `std::vector<snappy::SnappySinkAllocator::Datablock, std::allocator<snappy::SnappySinkAllocator::Datablock> >::_M_check_len(unsigned long, char const*) const':
snappy.cc:(.text._ZNKSt6vectorIN6snappy19SnappySinkAllocator9DatablockESaIS2_EE12_M_check_lenEmPKc[_ZNKSt6vectorIN6snappy19SnappySinkAllocator9DatablockESaIS2_EE12_M_check_lenEmPKc]+0x5b): undefined reference to `std::__throw_length_error(char const*)'
/usr/local/lib/libsnappy.a(snappy.cc.o): In function `__gnu_cxx::new_allocator<snappy::SnappySinkAllocator::Datablock>::deallocate(snappy::SnappySinkAllocator::Datablock*, unsigned long)':
snappy.cc:(.text._ZN9__gnu_cxx13new_allocatorIN6snappy19SnappySinkAllocator9DatablockEE10deallocateEPS3_m[_ZN9__gnu_cxx13new_allocatorIN6snappy19SnappySinkAllocator9DatablockEE10deallocateEPS3_m]+0x1c): undefined reference to `operator delete(void*)'
/usr/local/lib/libsnappy.a(snappy.cc.o): In function `__gnu_cxx::new_allocator<snappy::SnappySinkAllocator::Datablock>::allocate(unsigned long, void const*)':
snappy.cc:(.text._ZN9__gnu_cxx13new_allocatorIN6snappy19SnappySinkAllocator9DatablockEE8allocateEmPKv[_ZN9__gnu_cxx13new_allocatorIN6snappy19SnappySinkAllocator9DatablockEE8allocateEmPKv]+0x2c): undefined reference to `std::__throw_bad_alloc()'
snappy.cc:(.text._ZN9__gnu_cxx13new_allocatorIN6snappy19SnappySinkAllocator9DatablockEE8allocateEmPKv[_ZN9__gnu_cxx13new_allocatorIN6snappy19SnappySinkAllocator9DatablockEE8allocateEmPKv]+0x3c): undefined reference to `operator new(unsigned long)'
/usr/local/lib/libsnappy.a(snappy.cc.o): In function `__gnu_cxx::new_allocator<char*>::deallocate(char**, unsigned long)':
snappy.cc:(.text._ZN9__gnu_cxx13new_allocatorIPcE10deallocateEPS1_m[_ZN9__gnu_cxx13new_allocatorIPcE10deallocateEPS1_m]+0x1c): undefined reference to `operator delete(void*)'
/usr/local/lib/libsnappy.a(snappy.cc.o): In function `snappy::SnappySinkAllocator::Datablock* std::__uninitialized_copy<false>::__uninit_copy<std::move_iterator<snappy::SnappySinkAllocator::Datablock*>, snappy::SnappySinkAllocator::Datablock*>(std::move_iterator<snappy::SnappySinkAllocator::Datablock*>, std::move_iterator<snappy::SnappySinkAllocator::Datablock*>, snappy::SnappySinkAllocator::Datablock*)':
snappy.cc:(.text._ZNSt20__uninitialized_copyILb0EE13__uninit_copyISt13move_iteratorIPN6snappy19SnappySinkAllocator9DatablockEES6_EET0_T_S9_S8_[_ZNSt20__uninitialized_copyILb0EE13__uninit_copyISt13move_iteratorIPN6snappy19SnappySinkAllocator9DatablockEES6_EET0_T_S9_S8_]+0x77): undefined reference to `__cxa_begin_catch'
snappy.cc:(.text._ZNSt20__uninitialized_copyILb0EE13__uninit_copyISt13move_iteratorIPN6snappy19SnappySinkAllocator9DatablockEES6_EET0_T_S9_S8_[_ZNSt20__uninitialized_copyILb0EE13__uninit_copyISt13move_iteratorIPN6snappy19SnappySinkAllocator9DatablockEES6_EET0_T_S9_S8_]+0x8f): undefined reference to `__cxa_rethrow'
snappy.cc:(.text._ZNSt20__uninitialized_copyILb0EE13__uninit_copyISt13move_iteratorIPN6snappy19SnappySinkAllocator9DatablockEES6_EET0_T_S9_S8_[_ZNSt20__uninitialized_copyILb0EE13__uninit_copyISt13move_iteratorIPN6snappy19SnappySinkAllocator9DatablockEES6_EET0_T_S9_S8_]+0x97): undefined reference to `__cxa_end_catch'
/usr/local/lib/libsnappy.a(snappy.cc.o): In function `void std::vector<char*, std::allocator<char*> >::_M_realloc_insert<char* const&>(__gnu_cxx::__normal_iterator<char**, std::vector<char*, std::allocator<char*> > >, char* const&)':
snappy.cc:(.text._ZNSt6vectorIPcSaIS0_EE17_M_realloc_insertIJRKS0_EEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_[_ZNSt6vectorIPcSaIS0_EE17_M_realloc_insertIJRKS0_EEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_]+0x1ee): undefined reference to `__cxa_begin_catch'
snappy.cc:(.text._ZNSt6vectorIPcSaIS0_EE17_M_realloc_insertIJRKS0_EEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_[_ZNSt6vectorIPcSaIS0_EE17_M_realloc_insertIJRKS0_EEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_]+0x257): undefined reference to `__cxa_rethrow'
snappy.cc:(.text._ZNSt6vectorIPcSaIS0_EE17_M_realloc_insertIJRKS0_EEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_[_ZNSt6vectorIPcSaIS0_EE17_M_realloc_insertIJRKS0_EEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_]+0x25f): undefined reference to `__cxa_end_catch'
/usr/local/lib/libsnappy.a(snappy.cc.o): In function `std::vector<char*, std::allocator<char*> >::_M_check_len(unsigned long, char const*) const':
snappy.cc:(.text._ZNKSt6vectorIPcSaIS0_EE12_M_check_lenEmPKc[_ZNKSt6vectorIPcSaIS0_EE12_M_check_lenEmPKc]+0x5b): undefined reference to `std::__throw_length_error(char const*)'
/usr/local/lib/libsnappy.a(snappy.cc.o): In function `__gnu_cxx::new_allocator<char*>::allocate(unsigned long, void const*)':
snappy.cc:(.text._ZN9__gnu_cxx13new_allocatorIPcE8allocateEmPKv[_ZN9__gnu_cxx13new_allocatorIPcE8allocateEmPKv]+0x2c): undefined reference to `std::__throw_bad_alloc()'
snappy.cc:(.text._ZN9__gnu_cxx13new_allocatorIPcE8allocateEmPKv[_ZN9__gnu_cxx13new_allocatorIPcE8allocateEmPKv]+0x3c): undefined reference to `operator new(unsigned long)'
/usr/local/lib/libsnappy.a(snappy.cc.o):(.data.rel.local.DW.ref.__gxx_personality_v0[DW.ref.__gxx_personality_v0]+0x0): undefined reference to `__gxx_personality_v0'
/usr/local/lib/libsnappy.a(snappy-sinksource.cc.o): In function `snappy::Source::~Source()':
snappy-sinksource.cc:(.text+0x3a): undefined reference to `operator delete(void*)'
/usr/local/lib/libsnappy.a(snappy-sinksource.cc.o): In function `snappy::Sink::~Sink()':
snappy-sinksource.cc:(.text+0x7a): undefined reference to `operator delete(void*)'
/usr/local/lib/libsnappy.a(snappy-sinksource.cc.o): In function `snappy::ByteArraySource::~ByteArraySource()':
snappy-sinksource.cc:(.text+0x162): undefined reference to `operator delete(void*)'
/usr/local/lib/libsnappy.a(snappy-sinksource.cc.o): In function `snappy::UncheckedByteArraySink::~UncheckedByteArraySink()':
snappy-sinksource.cc:(.text+0x228): undefined reference to `operator delete(void*)'
/usr/local/lib/libsnappy.a(snappy-sinksource.cc.o):(.data.rel.ro._ZTVN6snappy4SinkE[_ZTVN6snappy4SinkE]+0x20): undefined reference to `__cxa_pure_virtual'
/usr/local/lib/libsnappy.a(snappy-sinksource.cc.o):(.data.rel.ro._ZTVN6snappy6SourceE[_ZTVN6snappy6SourceE]+0x20): undefined reference to `__cxa_pure_virtual'
/usr/local/lib/libsnappy.a(snappy-sinksource.cc.o):(.data.rel.ro._ZTVN6snappy6SourceE[_ZTVN6snappy6SourceE]+0x28): undefined reference to `__cxa_pure_virtual'
/usr/local/lib/libsnappy.a(snappy-sinksource.cc.o):(.data.rel.ro._ZTVN6snappy6SourceE[_ZTVN6snappy6SourceE]+0x30): undefined reference to `__cxa_pure_virtual'
/usr/local/lib/libsnappy.a(snappy-sinksource.cc.o):(.data.rel.ro._ZTIN6snappy22UncheckedByteArraySinkE[_ZTIN6snappy22UncheckedByteArraySinkE]+0x0): undefined reference to `vtable for __cxxabiv1::__si_class_type_info'
/usr/local/lib/libsnappy.a(snappy-sinksource.cc.o):(.data.rel.ro._ZTIN6snappy15ByteArraySourceE[_ZTIN6snappy15ByteArraySourceE]+0x0): undefined reference to `vtable for __cxxabiv1::__si_class_type_info'
/usr/local/lib/libsnappy.a(snappy-sinksource.cc.o):(.data.rel.ro._ZTIN6snappy6SourceE[_ZTIN6snappy6SourceE]+0x0): undefined reference to `vtable for __cxxabiv1::__class_type_info'
/usr/local/lib/libsnappy.a(snappy-sinksource.cc.o):(.data.rel.ro._ZTIN6snappy4SinkE[_ZTIN6snappy4SinkE]+0x0): undefined reference to `vtable for __cxxabiv1::__class_type_info'
collect2: error: ld returned 1 exit status
src/CMakeFiles/avrocat.dir/build.make:97: recipe for target 'src/avrocat' failed
make[5]: *** [src/avrocat] Error 1
CMakeFiles/Makefile2:127: recipe for target 'src/CMakeFiles/avrocat.dir/all' failed
make[4]: *** [src/CMakeFiles/avrocat.dir/all] Error 2
Makefile:162: recipe for target 'all' failed
make[3]: *** [all] Error 2
deps/CMakeFiles/apache-avro.dir/build.make:110: recipe for target 'deps/avro/src/apache-avro-stamp/apache-avro-build' failed
make[2]: *** [deps/avro/src/apache-avro-stamp/apache-avro-build] Error 2
CMakeFiles/Makefile2:96: recipe for target 'deps/CMakeFiles/apache-avro.dir/all' failed
make[1]: *** [deps/CMakeFiles/apache-avro.dir/all] Error 2
Makefile:151: recipe for target 'all' failed
make: *** [all] Error 2

哦对,在这台服务器上安装cmake时,有一个提示,是 libcurl.so.4: no version information available 我通过 sudo ln -s /usr/lib/x86_64-linux-gnu/libcurl.so.4.5.0 /usr/local/lib/libcurl.so.4 解决了,不知道会不会有影响

很感谢

sangshuduo commented 2 years ago

应该还是环境问题,建议参考官方 README https://github.com/taosdata/TDengine/blob/develop/README.md 步骤完整重复一遍

freedomhust commented 2 years ago

应该还是环境问题,建议参考官方 README https://github.com/taosdata/TDengine/blob/develop/README.md 步骤完整重复一遍

我就是按照官方的步骤走的,在另一台服务器上按照相同的流程试过,另一台服务器上是可以成功的,但那台性能不太好,这台性能好很多所以想过来问问有没有解决的办法

sangshuduo commented 2 years ago

我们发版机器就是 Ubuntu 1804 标准版,也有 CI 编译保证,不会有问题的。如果你在另外一个机器可以,现在这个服务器完全重装一下肯定没问题的

freedomhust commented 2 years ago

好的,谢谢

freedomhust commented 2 years ago

问题已经解决,找了一下发现是snappy静态链接库的问题,在和另外一台服务器的输出做对比时发现另一台服务器找的是动态链接库

-- Found Snappy: /usr/lib/x86_64-linux-gnu/libsnappy.so
Enabled snappy codec

而这一台是先找到的静态链接库

-- Found Snappy: /usr/local/lib/libsnappy.a
Enabled snappy codec

手动将所有link.txt中的/usr/local/lib/libsnappy.a替换成-lsnappy后成功编译 image