Date: Sun, 8 Sep 2024 19:24:28 GMT From: Po-Chuan Hsieh <sunpoet@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org Subject: git: ca4e9a97dad3 - 2024Q3 - databases/rocksdb: Fix build on i386 with Clang 17+ Message-ID: <202409081924.488JOSJn034916@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch 2024Q3 has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=ca4e9a97dad3bea3100edff396e11ae405906067 commit ca4e9a97dad3bea3100edff396e11ae405906067 Author: Po-Chuan Hsieh <sunpoet@FreeBSD.org> AuthorDate: 2024-09-05 05:24:43 +0000 Commit: Po-Chuan Hsieh <sunpoet@FreeBSD.org> CommitDate: 2024-09-08 19:24:17 +0000 databases/rocksdb: Fix build on i386 with Clang 17+ mkdir -p utilities/transactions/lock/range/range_tree/lib/locktree && clang++ -O2 -pipe -DOS_FREEBSD -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -Wno-inconsistent-missing-override -Wno-unused-parameter -Wno-unused-variable -Wno-unused-private-field -isystem /usr/local/include -std=c++17 -fPIC -DROCKSDB_DLL -DROCKSDB_USE_RTTI -g -W -Wextra -Wall -Wsign-compare -Wshadow -Wunused-parameter -Werror -I. -I./include -std=c++17 -O2 -pipe -DOS_FREEBSD -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -Wno-inconsistent-missing-override -Wno-unused-parameter -Wno-unused-variable -Wno-unused-private-field -isystem /usr/local/include -std=c++17 -faligned-new -DHAVE_ALIGNED_NEW -DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -O2 -pipe -DOS_FREEBSD -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -D_REENTRANT -DOS_FREEBSD -DSNAPPY -DGFLAGS=1 -DZLIB -DBZIP2 -DLZ4 -DZSTD -DROCKSDB_MALLOC_USABLE_SIZE -DROC KSDB_PTHREAD_ADAPTIVE_MUTEX -DROCKSDB_BACKTRACE -DROCKSDB_SCHED_GETCPU_PRESENT -isystem third-party/gtest-1.8.1/fused-src -O2 -fno-omit-frame-pointer -momit-leaf-frame-pointer -DNDEBUG -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers -Wno-invalid-offsetof -c utilities/transactions/lock/range/range_tree/lib/locktree/manager.cc -o utilities/transactions/lock/range/range_tree/lib/locktree/manager.o In file included from utilities/transactions/lock/range/range_tree/lib/locktree/manager.cc:58: In file included from utilities/transactions/lock/range/range_tree/lib/locktree/../portability/toku_pthread.h:60: In file included from utilities/transactions/lock/range/range_tree/lib/locktree/../portability/toku_portability.h:71: utilities/transactions/lock/range/range_tree/lib/locktree/../portability/toku_atomic.h:80:10: error: __sync builtin operation MUST have natural alignment (consider using __atomic). [-Werror,-Wsync-alignment] 80 | return __sync_fetch_and_add(addr, diff); | ^ utilities/transactions/lock/range/range_tree/lib/locktree/../portability/toku_atomic.h:92:10: error: __sync builtin operation MUST have natural alignment (consider using __atomic). [-Werror,-Wsync-alignment] 92 | return __sync_fetch_and_sub(addr, diff); | ^ 2 errors generated. gmake: *** [Makefile:2566: utilities/transactions/lock/range/range_tree/lib/locktree/manager.o] Error 1 Tested on: 13.3-RELEASE-p5 (17.0.6), 15.0-CURRENT (18.1.6) Reference: https://pkg-status.freebsd.org/beefy17/data/main-i386-default/p1963f6d23107_s10d5b43424d/logs/rocksdb-9.4.0.log https://github.com/llvm/llvm-project/issues/69146 (cherry picked from commit ebdfcf26c93e631c979ce0068ff7fb1ba4ba6d0f) --- databases/rocksdb/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/databases/rocksdb/Makefile b/databases/rocksdb/Makefile index 3ddeef8acdb7..e5fbf6d58669 100644 --- a/databases/rocksdb/Makefile +++ b/databases/rocksdb/Makefile @@ -60,6 +60,9 @@ ZSTD_MAKE_ENV_OFF= ROCKSDB_DISABLE_ZSTD=yes .if ${CHOSEN_COMPILER_TYPE} == clang CXXFLAGS+= -Wno-inconsistent-missing-override -Wno-unused-parameter -Wno-unused-variable -Wno-unused-private-field +.if ${COMPILER_VERSION} >= 170 +CXXFLAGS+= -Wno-sync-alignment +.endif .endif post-patch:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202409081924.488JOSJn034916>