Open what-is-me opened 4 days ago
I want to know if this is because the higher version of clang, or there are something wrong in my comfiguration.
edit v1: This is already on the roadmap, so if you don't have time to do it, I will pick it up later. Hi, Leo @what-is-me :) At present, this codebase does not support the clang-18 build. We are still using clang-17. https://github.com/timeplus-io/proton/blob/8e6b79732115d34d1afe25c8ea1447642b28599a/BUILD.md
The warning you encountered is due to a new compiler check introduced in clang-18.
do you have time to contribute? To enable clang-18, we need to address the compiler warning and update the version in the CI workflow. This is already on the roadmap, so if you don't have time to do it, I will pick it up later.
After adding no_warning(switch-default)
, it reports another error:
[build] In file included from /home/what-is-me/develop/proton/base/poco/Data/src/SessionPool.cpp:15:
[build] In file included from /home/what-is-me/develop/proton/base/poco/Data/include/Poco/Data/SessionPool.h:25:
[build] In file included from /home/what-is-me/develop/proton/base/poco/Foundation/include/Poco/HashMap.h:22:
[build] /home/what-is-me/develop/proton/base/poco/Foundation/include/Poco/LinearHashTable.h:70:35: error: 'iterator<std::forward_iterator_tag, Poco::HashMapEntry<std::string, bool>>' is deprecated [-Werror,-Wdeprecated-declarations]
[build] 70 | class ConstIterator: public std::iterator<std::forward_iterator_tag, Value>
[build] | ^
[build] /home/what-is-me/develop/proton/base/poco/Foundation/include/Poco/LinearHashTable.h:171:25: note: in instantiation of member class 'Poco::LinearHashTable<Poco::HashMapEntry<std::string, bool>, Poco::HashMapEntryHash<Poco::HashMapEntry<std::string, bool>, Poco::Hash<std::string>>>::ConstIterator' requested here
[build] 171 | class Iterator: public ConstIterator
[build] | ^
[build] /home/what-is-me/develop/proton/contrib/llvm-project/libcxx/include/__utility/pair.h:48:9: note: in instantiation of member class 'Poco::LinearHashTable<Poco::HashMapEntry<std::string, bool>, Poco::HashMapEntryHash<Poco::HashMapEntry<std::string, bool>, Poco::Hash<std::string>>>::Iterator' requested here
[build] 48 | _T1 first;
[build] | ^
[build] /home/what-is-me/develop/proton/base/poco/Data/src/SessionPool.cpp:172:14: note: in instantiation of template class 'std::pair<Poco::LinearHashTable<Poco::HashMapEntry<std::string, bool>, Poco::HashMapEntryHash<Poco::HashMapEntry<std::string, bool>, Poco::Hash<std::string>>>::Iterator, bool>' requested here
[build] 172 | _featureMap.insert(FeatureMap::ValueType(name, state));
[build] | ^
[build] /home/what-is-me/develop/proton/contrib/llvm-project/libcxx/include/__iterator/iterator.h:24:29: note: 'iterator<std::forward_iterator_tag, Poco::HashMapEntry<std::string, bool>>' has been explicitly marked deprecated here
[build] 24 | struct _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 iterator
[build] | ^
[build] /home/what-is-me/develop/proton/contrib/llvm-project/libcxx/include/__config:812:41: note: expanded from macro '_LIBCPP_DEPRECATED_IN_CXX17'
[build] 812 | # define _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_DEPRECATED
[build] | ^
[build] /home/what-is-me/develop/proton/contrib/llvm-project/libcxx/include/__config:785:49: note: expanded from macro '_LIBCPP_DEPRECATED'
[build] 785 | # define _LIBCPP_DEPRECATED __attribute__((deprecated))
[build] |
So, no_warning(deprecated-declarations)
also should be added.
let's add together
[build] In file included from /home/what-is-me/develop/proton/programs/klog/klog.cpp:7:
[build] In file included from /home/what-is-me/develop/proton/src/KafkaLog/KafkaWAL.h:5:
[build] /home/what-is-me/develop/proton/src/KafkaLog/KafkaWALSettings.h:61:60: error: missing field 'username' initializer [-Werror,-Wmissing-field-initializers]
[build] 61 | KafkaWALAuth auth = { .security_protocol = "plaintext" };
[build] | ^
[build] 1 error generated.
[build] /home/what-is-me/develop/proton/src/Interpreters/Context.cpp:2209:20: error: returning variable 'keeper_dispatcher' by reference requires holding mutex 'shared->keeper_dispatcher_mutex' exclusively [-Werror,-Wthread-safety-reference-return]
[build] 2209 | return shared->keeper_dispatcher;
[build] | ^
[build] /home/what-is-me/develop/proton/src/Interpreters/Context.cpp:2204:1: note: thread warning in function 'getKeeperDispatcher'
[build] 2204 | {
[build] | ^
[build] /home/what-is-me/develop/proton/src/Interpreters/Context.cpp:2267:20: error: returning variable 'metastore_dispatcher' by reference requires holding mutex 'shared->metastore_dispatcher_mutex' exclusively [-Werror,-Wthread-safety-reference-return]
[build] 2267 | return shared->metastore_dispatcher;
[build] | ^
[build] /home/what-is-me/develop/proton/src/Interpreters/Context.cpp:2262:1: note: thread warning in function 'getMetaStoreDispatcher'
[build] 2262 | {
[build] | ^
[build] /home/what-is-me/develop/proton/src/Interpreters/Context.cpp:2340:20: error: returning variable 'remote_host_filter' by reference requires holding mutex 'shared->mutex' [-Werror,-Wthread-safety-reference-return]
[build] 2340 | return shared->remote_host_filter;
[build] | ^
[build] /home/what-is-me/develop/proton/src/Interpreters/Context.cpp:2338:1: note: thread warning in function 'getRemoteHostFilter'
[build] 2338 | {
[build] | ^
[build] 3 errors generated.
These can also be solved by adding no_warning(missing-field-initializers)
and no_warning(thread-safety-reference-return)
.
However, finally, it fails with error:
[build] FAILED: utils/memcpy-bench/memcpy-bench
[build] : && /usr/bin/clang++-18 --target=x86_64-linux-gnu --sysroot=/home/what-is-me/develop/proton/cmake/linux/../../contrib/sysroot/linux-x86_64/x86_64-linux-gnu/libc --gcc-toolchain=/home/what-is-me/develop/proton/cmake/linux/../../contrib/sysroot/linux-x86_64 -g -fno-omit-frame-pointer -DSANITIZER -fsanitize=address -fsanitize-address-use-after-scope -lresolv -fdiagnostics-color=always -Xclang -fuse-ctor-homing -Wno-enum-constexpr-conversion -fsized-deallocation -gdwarf-aranges -pipe -mssse3 -msse4.1 -msse4.2 -mpclmul -mpopcnt -fasynchronous-unwind-tables -falign-functions=32 -mbranches-within-32B-boundaries -Wall -Wno-unused-command-line-argument -fdiagnostics-absolute-paths -fstrict-vtable-pointers -Wall -Wextra -Weverything -Wpedantic -Wno-zero-length-array -Wno-c++98-compat-pedantic -Wno-c++98-compat -Wno-c++20-compat -Wno-sign-conversion -Wno-implicit-int-conversion -Wno-implicit-int-float-conversion -Wno-shorten-64-to-32 -Wno-ctad-maybe-unsupported -Wno-disabled-macro-expansion -Wno-documentation-unknown-command -Wno-double-promotion -Wno-exit-time-destructors -Wno-float-equal -Wno-global-constructors -Wno-missing-prototypes -Wno-missing-variable-declarations -Wno-padded -Wno-switch-enum -Wno-undefined-func-template -Wno-unused-template -Wno-vla -Wno-weak-template-vtables -Wno-weak-vtables -Wno-thread-safety-negative -Wno-enum-constexpr-conversion -Wno-unsafe-buffer-usage -Wno-switch-default -Wno-deprecated-declarations -Wno-missing-field-initializers -Wno-thread-safety-reference-return -g -O0 -g -gdwarf-4 -D_LIBCPP_DEBUG=0 --gcc-toolchain=/home/what-is-me/develop/proton/cmake/linux/../../contrib/sysroot/linux-x86_64 --ld-path=/usr/bin/ld.lld-18 -rdynamic -Wl,--gdb-index -Wl,--build-id=sha1 src/CMakeFiles/clickhouse_malloc.dir/Common/malloc.cpp.o utils/memcpy-bench/CMakeFiles/memcpy-bench.dir/memcpy-bench.cpp.o utils/memcpy-bench/CMakeFiles/memcpy-bench.dir/FastMemcpy.cpp.o utils/memcpy-bench/CMakeFiles/memcpy-bench.dir/FastMemcpy_Avx.cpp.o utils/memcpy-bench/CMakeFiles/memcpy-bench.dir/memcpy_jart.S.o utils/memcpy-bench/CMakeFiles/memcpy-bench.dir/glibc/memcpy-ssse3.S.o utils/memcpy-bench/CMakeFiles/memcpy-bench.dir/glibc/memcpy-ssse3-back.S.o utils/memcpy-bench/CMakeFiles/memcpy-bench.dir/glibc/memmove-sse2-unaligned-erms.S.o utils/memcpy-bench/CMakeFiles/memcpy-bench.dir/glibc/memmove-avx-unaligned-erms.S.o utils/memcpy-bench/CMakeFiles/memcpy-bench.dir/glibc/memmove-avx512-unaligned-erms.S.o utils/memcpy-bench/CMakeFiles/memcpy-bench.dir/glibc/memmove-avx512-no-vzeroupper.S.o -o utils/memcpy-bench/memcpy-bench src/libclickhouse_new_deleted.a src/libdbmsd.a contrib/boost-cmake/lib_boost_program_optionsd.a src/Storages/ExternalStream/libexternal_streamd.a src/KafkaLog/libklogd.a src/NativeLog/libnlogd.a src/Storages/ExternalTable/libexternal_tabled.a src/Checkpoint/libcheckpointd.a contrib/llvm-project/llvm/lib/libLLVMExecutionEngined.a contrib/llvm-project/llvm/lib/libLLVMOrcTargetProcessd.a contrib/llvm-project/llvm/lib/libLLVMOrcSharedd.a contrib/llvm-project/llvm/lib/libLLVMRuntimeDyldd.a contrib/llvm-project/llvm/lib/libLLVMPassesd.a contrib/llvm-project/llvm/lib/libLLVMCoroutinesd.a contrib/llvm-project/llvm/lib/libLLVMObjCARCOptsd.a contrib/llvm-project/llvm/lib/libLLVMipod.a contrib/llvm-project/llvm/lib/libLLVMFrontendOpenMPd.a contrib/llvm-project/llvm/lib/libLLVMIRReaderd.a contrib/llvm-project/llvm/lib/libLLVMAsmParserd.a contrib/llvm-project/llvm/lib/libLLVMLinkerd.a contrib/llvm-project/llvm/lib/libLLVMVectorized.a contrib/llvm-project/llvm/lib/libLLVMX86CodeGend.a contrib/llvm-project/llvm/lib/libLLVMAsmPrinterd.a contrib/llvm-project/llvm/lib/libLLVMGlobalISeld.a contrib/llvm-project/llvm/lib/libLLVMSelectionDAGd.a contrib/llvm-project/llvm/lib/libLLVMCodeGend.a contrib/llvm-project/llvm/lib/libLLVMBitWriterd.a contrib/llvm-project/llvm/lib/libLLVMScalarOptsd.a contrib/llvm-project/llvm/lib/libLLVMAggressiveInstCombined.a contrib/llvm-project/llvm/lib/libLLVMInstCombined.a contrib/llvm-project/llvm/lib/libLLVMInstrumentationd.a contrib/llvm-project/llvm/lib/libLLVMTransformUtilsd.a contrib/llvm-project/llvm/lib/libLLVMTargetd.a contrib/llvm-project/llvm/lib/libLLVMAnalysisd.a contrib/llvm-project/llvm/lib/libLLVMProfileDatad.a contrib/llvm-project/llvm/lib/libLLVMSymbolized.a contrib/llvm-project/llvm/lib/libLLVMDebugInfoDWARFd.a contrib/llvm-project/llvm/lib/libLLVMDebugInfoPDBd.a contrib/llvm-project/llvm/lib/libLLVMObjectd.a contrib/llvm-project/llvm/lib/libLLVMBitReaderd.a contrib/llvm-project/llvm/lib/libLLVMMCParserd.a contrib/llvm-project/llvm/lib/libLLVMTextAPId.a contrib/llvm-project/llvm/lib/libLLVMDebugInfoMSFd.a contrib/llvm-project/llvm/lib/libLLVMX86Descd.a contrib/llvm-project/llvm/lib/libLLVMMCDisassemblerd.a contrib/llvm-project/llvm/lib/libLLVMX86Infod.a contrib/llvm-project/llvm/lib/libLLVMMCd.a contrib/llvm-project/llvm/lib/libLLVMDebugInfoCodeViewd.a contrib/llvm-project/llvm/lib/libLLVMCFGuardd.a contrib/llvm-project/llvm/lib/libLLVMCored.a contrib/llvm-project/llvm/lib/libLLVMRemarksd.a contrib/llvm-project/llvm/lib/libLLVMBitstreamReaderd.a contrib/llvm-project/llvm/lib/libLLVMBinaryFormatd.a contrib/llvm-project/llvm/lib/libLLVMSupportd.a contrib/llvm-project/llvm/lib/libLLVMDemangled.a contrib/croaring-cmake/lib_roaringd.a contrib/librdkafka-cmake/lib_rdkafkad.a contrib/cyrus-sasl-cmake/lib_sasl2d.a contrib/krb5-cmake/lib_krb5d.a contrib/nuraft-cmake/lib_nuraftd.a contrib/boost-cmake/lib_boost_coroutined.a src/V8/libV8d.a contrib/v8-cmake/libv8_compilerd.a contrib/v8-cmake/libv8_base_without_compilerd.a contrib/v8-cmake/libv8_snapshotd.a contrib/v8-cmake/libv8_inspectord.a contrib/v8-cmake/libv8_libplatformd.a contrib/v8-cmake/libv8_libsamplerd.a contrib/v8-cmake/libv8_libbased.a contrib/v8-cmake/libv8_initializersd.a contrib/v8-cmake/libv8_torque_generatedd.a src/Common/Config/libclickhouse_common_configd.a contrib/yaml-cpp-cmake/lib_yaml_cppd.a src/Common/ZooKeeper/libclickhouse_common_zookeeperd.a src/Dictionaries/Embedded/libclickhouse_dictionaries_embeddedd.a src/Parsers/libclickhouse_parsersd.a src/Access/Common/libclickhouse_common_accessd.a src/libclickhouse_common_iod.a contrib/boost-cmake/lib_boost_program_optionsd.a contrib/gwpasan-cmake/lib_gwp_asand.a contrib/muduo-cmake/net/lib_muduo_netd.a contrib/muduo-cmake/base/lib_muduo_based.a base/widechar_width/libwidechar_widthd.a base/base/libcommond.a base/poco/NetSSL_OpenSSL/lib_poco_net_ssld.a base/poco/Net/lib_poco_netd.a base/poco/Crypto/lib_poco_cryptod.a base/poco/Util/lib_poco_utild.a base/poco/XML/lib_poco_xmld.a base/poco/XML/lib_poco_xml_expatd.a contrib/replxx-cmake/lib_replxxd.a contrib/cctz-cmake/lib_cctzd.a -Wl,--whole-archive /home/what-is-me/develop/proton/build/contrib/cctz-cmake/libtzdatad.a -Wl,--no-whole-archive contrib/fmtlib-cmake/lib_fmtd.a contrib/dragonbox-cmake/lib_dragonbox_to_charsd.a contrib/re2-cmake/libre2_std.a contrib/cityhash102/lib_cityhashd.a contrib/xz-cmake/lib_liblzmad.a contrib/liburing-cmake/lib_liburingd.a contrib/bzip2-cmake/lib_bzip2d.a base/poco/JSON/lib_poco_jsond.a base/poco/Foundation/lib_poco_foundationd.a base/poco/Foundation/lib_poco_foundation_pcred.a base/poco/JSON/lib_poco_json_pdjsond.a src/Common/StringUtils/libstring_utilsd.a contrib/boost-cmake/lib_boost_systemd.a contrib/arrow-cmake/lib_parquetd.a contrib/arrow-cmake/lib_arrowd.a contrib/boost-cmake/lib_boost_filesystemd.a contrib/double-conversion-cmake/lib_double-conversiond.a contrib/brotli-cmake/lib_brotlid.a contrib/flatbuffers/libflatbuffersd.a contrib/arrow-cmake/lib_orcd.a contrib/thrift-cmake/lib_thriftd.a contrib/boost-cmake/lib_boost_regexd.a contrib/avro-cmake/lib_avrocppd.a contrib/boost-cmake/lib_boost_iostreamsd.a src/Server/grpc_protos/libclickhouse_grpc_protosd.a contrib/grpc/libgrpc++d.a contrib/protobuf-cmake/lib_libprotobufd.a contrib/grpc/libgrpcd.a contrib/re2-cmake/libre2d.a contrib/c-ares-cmake/lib_c-aresd.a contrib/abseil-cpp/absl/hash/libabsl_hashd.a contrib/abseil-cpp/absl/hash/libabsl_cityd.a contrib/abseil-cpp/absl/types/libabsl_bad_variant_accessd.a contrib/abseil-cpp/absl/hash/libabsl_low_level_hashd.a contrib/abseil-cpp/absl/container/libabsl_raw_hash_setd.a contrib/abseil-cpp/absl/container/libabsl_hashtablez_samplerd.a contrib/boringssl-cmake/lib_ssld.a contrib/boringssl-cmake/lib_cryptod.a contrib/abseil-cpp/absl/status/libabsl_statusd.a contrib/abseil-cpp/absl/strings/libabsl_cordd.a contrib/abseil-cpp/absl/strings/libabsl_cordz_infod.a contrib/abseil-cpp/absl/strings/libabsl_cord_internald.a contrib/abseil-cpp/absl/strings/libabsl_cordz_functionsd.a contrib/abseil-cpp/absl/profiling/libabsl_exponential_biasedd.a contrib/abseil-cpp/absl/strings/libabsl_cordz_handled.a contrib/abseil-cpp/absl/types/libabsl_bad_optional_accessd.a contrib/grpc/libaddress_sortingd.a contrib/grpc/libupbd.a contrib/grpc/libgprd.a -ldl -lpthread -lrt contrib/abseil-cpp/absl/synchronization/libabsl_synchronizationd.a contrib/abseil-cpp/absl/debugging/libabsl_stacktraced.a contrib/abseil-cpp/absl/debugging/libabsl_symbolized.a contrib/abseil-cpp/absl/debugging/libabsl_debugging_internald.a contrib/abseil-cpp/absl/debugging/libabsl_demangle_internald.a contrib/abseil-cpp/absl/synchronization/libabsl_graphcycles_internald.a contrib/abseil-cpp/absl/base/libabsl_malloc_internald.a contrib/abseil-cpp/absl/time/libabsl_timed.a contrib/abseil-cpp/absl/time/libabsl_civil_timed.a contrib/abseil-cpp/absl/time/libabsl_time_zoned.a contrib/abseil-cpp/absl/strings/libabsl_str_format_internald.a contrib/abseil-cpp/absl/strings/libabsl_stringsd.a contrib/abseil-cpp/absl/strings/libabsl_strings_internald.a contrib/abseil-cpp/absl/base/libabsl_based.a contrib/abseil-cpp/absl/base/libabsl_spinlock_waitd.a -lrt contrib/abseil-cpp/absl/base/libabsl_throw_delegated.a contrib/abseil-cpp/absl/base/libabsl_raw_logging_internald.a contrib/abseil-cpp/absl/base/libabsl_log_severityd.a contrib/abseil-cpp/absl/numeric/libabsl_int128d.a contrib/rocksdb-cmake/lib_rocksdbd.a contrib/lz4-cmake/lib_lz4d.a contrib/zstd-cmake/lib_zstdd.a contrib/zlib-ng-cmake/lib_zlibd.a contrib/snappy-cmake/lib_snappyd.a contrib/boost-cmake/lib_boost_contextd.a contrib/simdjson-cmake/lib_simdjsond.a contrib/consistent-hashing/lib_consistent_hashingd.a -Wl,--start-group base/glibc-compatibility/libglibc-compatibilityd.a base/glibc-compatibility/memcpy/libmemcpyd.a contrib/libcxx-cmake/libcxxd.a contrib/libcxxabi-cmake/libcxxabid.a contrib/libunwind-cmake/libunwindd.a -Wl,--end-group -nodefaultlibs /usr/lib/llvm-18/lib/clang/18/lib/linux/libclang_rt.builtins-x86_64.a -lc -lm -lrt -lpthread -ldl && :
[build] ld.lld-18: error: relocation R_X86_64_32S cannot be used against local symbol; recompile with -fPIC
[build] >>> defined in utils/memcpy-bench/CMakeFiles/memcpy-bench.dir/memcpy_jart.S.o
[build] >>> referenced by memcpy_jart.S:47 (/home/what-is-me/develop/proton/utils/memcpy-bench/memcpy_jart.S:47)
[build] >>> utils/memcpy-bench/CMakeFiles/memcpy-bench.dir/memcpy_jart.S.o:(MemCpy)
[build]
[build] ld.lld-18: error: relocation R_X86_64_64 cannot be used against local symbol; recompile with -fPIC
[build] >>> defined in utils/memcpy-bench/CMakeFiles/memcpy-bench.dir/memcpy_jart.S.o
[build] >>> referenced by utils/memcpy-bench/CMakeFiles/memcpy-bench.dir/memcpy_jart.S.o:(.rodata+0x0)
[build]
[build] ld.lld-18: error: relocation R_X86_64_64 cannot be used against local symbol; recompile with -fPIC
[build] >>> defined in utils/memcpy-bench/CMakeFiles/memcpy-bench.dir/memcpy_jart.S.o
[build] >>> referenced by utils/memcpy-bench/CMakeFiles/memcpy-bench.dir/memcpy_jart.S.o:(.rodata+0x8)
[build]
[build] ld.lld-18: error: relocation R_X86_64_64 cannot be used against local symbol; recompile with -fPIC
[build] >>> defined in utils/memcpy-bench/CMakeFiles/memcpy-bench.dir/memcpy_jart.S.o
[build] >>> referenced by utils/memcpy-bench/CMakeFiles/memcpy-bench.dir/memcpy_jart.S.o:(.rodata+0x10)
[build]
[build] ld.lld-18: error: relocation R_X86_64_64 cannot be used against local symbol; recompile with -fPIC
[build] >>> defined in utils/memcpy-bench/CMakeFiles/memcpy-bench.dir/memcpy_jart.S.o
[build] >>> referenced by utils/memcpy-bench/CMakeFiles/memcpy-bench.dir/memcpy_jart.S.o:(.rodata+0x18)
[build]
[build] ld.lld-18: error: relocation R_X86_64_64 cannot be used against local symbol; recompile with -fPIC
[build] >>> defined in utils/memcpy-bench/CMakeFiles/memcpy-bench.dir/memcpy_jart.S.o
[build] >>> referenced by utils/memcpy-bench/CMakeFiles/memcpy-bench.dir/memcpy_jart.S.o:(.rodata+0x20)
[build]
[build] ld.lld-18: error: relocation R_X86_64_64 cannot be used against local symbol; recompile with -fPIC
[build] >>> defined in utils/memcpy-bench/CMakeFiles/memcpy-bench.dir/memcpy_jart.S.o
[build] >>> referenced by utils/memcpy-bench/CMakeFiles/memcpy-bench.dir/memcpy_jart.S.o:(.rodata+0x28)
[build]
[build] ld.lld-18: error: relocation R_X86_64_64 cannot be used against local symbol; recompile with -fPIC
[build] >>> defined in utils/memcpy-bench/CMakeFiles/memcpy-bench.dir/memcpy_jart.S.o
[build] >>> referenced by utils/memcpy-bench/CMakeFiles/memcpy-bench.dir/memcpy_jart.S.o:(.rodata+0x30)
[build]
[build] ld.lld-18: error: relocation R_X86_64_64 cannot be used against local symbol; recompile with -fPIC
[build] >>> defined in utils/memcpy-bench/CMakeFiles/memcpy-bench.dir/memcpy_jart.S.o
[build] >>> referenced by utils/memcpy-bench/CMakeFiles/memcpy-bench.dir/memcpy_jart.S.o:(.rodata+0x38)
[build]
[build] ld.lld-18: error: relocation R_X86_64_64 cannot be used against local symbol; recompile with -fPIC
[build] >>> defined in utils/memcpy-bench/CMakeFiles/memcpy-bench.dir/memcpy_jart.S.o
[build] >>> referenced by utils/memcpy-bench/CMakeFiles/memcpy-bench.dir/memcpy_jart.S.o:(.rodata+0x40)
[build]
[build] ld.lld-18: error: relocation R_X86_64_64 cannot be used against local symbol; recompile with -fPIC
[build] >>> defined in utils/memcpy-bench/CMakeFiles/memcpy-bench.dir/memcpy_jart.S.o
[build] >>> referenced by utils/memcpy-bench/CMakeFiles/memcpy-bench.dir/memcpy_jart.S.o:(.rodata+0x48)
[build]
[build] ld.lld-18: error: relocation R_X86_64_64 cannot be used against local symbol; recompile with -fPIC
[build] >>> defined in utils/memcpy-bench/CMakeFiles/memcpy-bench.dir/memcpy_jart.S.o
[build] >>> referenced by utils/memcpy-bench/CMakeFiles/memcpy-bench.dir/memcpy_jart.S.o:(.rodata+0x50)
[build]
[build] ld.lld-18: error: relocation R_X86_64_64 cannot be used against local symbol; recompile with -fPIC
[build] >>> defined in utils/memcpy-bench/CMakeFiles/memcpy-bench.dir/memcpy_jart.S.o
[build] >>> referenced by utils/memcpy-bench/CMakeFiles/memcpy-bench.dir/memcpy_jart.S.o:(.rodata+0x58)
[build]
[build] ld.lld-18: error: relocation R_X86_64_64 cannot be used against local symbol; recompile with -fPIC
[build] >>> defined in utils/memcpy-bench/CMakeFiles/memcpy-bench.dir/memcpy_jart.S.o
[build] >>> referenced by utils/memcpy-bench/CMakeFiles/memcpy-bench.dir/memcpy_jart.S.o:(.rodata+0x60)
[build]
[build] ld.lld-18: error: relocation R_X86_64_64 cannot be used against local symbol; recompile with -fPIC
[build] >>> defined in utils/memcpy-bench/CMakeFiles/memcpy-bench.dir/memcpy_jart.S.o
[build] >>> referenced by utils/memcpy-bench/CMakeFiles/memcpy-bench.dir/memcpy_jart.S.o:(.rodata+0x68)
[build]
[build] ld.lld-18: error: relocation R_X86_64_64 cannot be used against local symbol; recompile with -fPIC
[build] >>> defined in utils/memcpy-bench/CMakeFiles/memcpy-bench.dir/memcpy_jart.S.o
[build] >>> referenced by utils/memcpy-bench/CMakeFiles/memcpy-bench.dir/memcpy_jart.S.o:(.rodata+0x70)
[build]
[build] ld.lld-18: error: relocation R_X86_64_64 cannot be used against local symbol; recompile with -fPIC
[build] >>> defined in utils/memcpy-bench/CMakeFiles/memcpy-bench.dir/memcpy_jart.S.o
[build] >>> referenced by utils/memcpy-bench/CMakeFiles/memcpy-bench.dir/memcpy_jart.S.o:(.rodata+0x78)
[build]
[build] ld.lld-18: error: relocation R_X86_64_64 cannot be used against local symbol; recompile with -fPIC
[build] >>> defined in utils/memcpy-bench/CMakeFiles/memcpy-bench.dir/memcpy_jart.S.o
[build] >>> referenced by utils/memcpy-bench/CMakeFiles/memcpy-bench.dir/memcpy_jart.S.o:(.rodata+0x80)
[build]
[build] ld.lld-18: error: relocation R_X86_64_64 cannot be used against local symbol; recompile with -fPIC
[build] >>> defined in utils/memcpy-bench/CMakeFiles/memcpy-bench.dir/memcpy_jart.S.o
[build] >>> referenced by utils/memcpy-bench/CMakeFiles/memcpy-bench.dir/memcpy_jart.S.o:(.rodata+0x88)
[build]
[build] ld.lld-18: error: relocation R_X86_64_64 cannot be used against local symbol; recompile with -fPIC
[build] >>> defined in utils/memcpy-bench/CMakeFiles/memcpy-bench.dir/memcpy_jart.S.o
[build] >>> referenced by utils/memcpy-bench/CMakeFiles/memcpy-bench.dir/memcpy_jart.S.o:(.rodata+0x90)
[build]
[build] ld.lld-18: error: too many errors emitted, stopping now (use --error-limit=0 to see all errors)
[build] clang++-18: error: linker command failed with exit code 1 (use -v to see invocation)
so we should add -fPIC
to CXX_FLAGS
?
@what-is-me
It seems this is an old issue https://github.com/timeplus-io/proton/issues/719. While I am debugging, let's simply use cmake ..
instead of address sanitizer to make progress first.
What's Wrong I have recently tried to clean build proton with clang18 in WSL (Ubuntu 22.04), but it reports
error: 'switch' missing 'default' label [-Werror,-Wswitch-default]
in base/base/StringRef.h:155:5. cmake args are copied frombuild.sh