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

fix compiler errors for main and tests #351

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
2 changes: 2 additions & 0 deletions .github/workflows/build-cachelib-centos-9.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ jobs:
run: ./contrib/build-package.sh -j -v -i sparsemap
- name: "Install dependency: fmt"
run: ./contrib/build-package.sh -j -v -i fmt
- name: "Install dependency: fastfloat"
run: ./contrib/build-package.sh -j -v -i fastfloat
- name: "Install dependency: folly"
run: ./contrib/build-package.sh -j -v -i folly
- name: "Install dependency: fizz"
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/build-cachelib-rockylinux-9.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ jobs:
run: ./contrib/build-package.sh -j -v -i sparsemap
- name: "Install dependency: fmt"
run: ./contrib/build-package.sh -j -v -i fmt
- name: "Install dependency: fastfloat"
run: ./contrib/build-package.sh -j -v -i fastfloat
- name: "Install dependency: folly"
run: |
# see: https://aur.archlinux.org/packages/folly#comment-862543
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/build-cachelib-ubuntu-22.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ jobs:
run: ./contrib/build-package.sh -j -v -i sparsemap
- name: "Install dependency: fmt"
run: ./contrib/build-package.sh -j -v -i fmt
- name: "Install dependency: fastfloat"
run: ./contrib/build-package.sh -j -v -i fastfloat
- name: "Install dependency: folly"
run: ./contrib/build-package.sh -j -v -i folly
- name: "Install dependency: fizz"
Expand Down
11 changes: 10 additions & 1 deletion cachelib/allocator/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,16 @@ add_library (cachelib_allocator
${SERIALIZE_THRIFT_FILES}
${DATASTRUCT_SERIALIZE_THRIFT_FILES}
${MEMORY_SERIALIZE_THRIFT_FILES}
CacheAllocator.cpp
CacheAllocatorLru2QCache.cpp
CacheAllocatorLru5B2QCache.cpp
CacheAllocatorLru5BCache.cpp
CacheAllocatorLru5BCacheWithSpinBuckets.cpp
CacheAllocatorLruCache.cpp
CacheAllocatorLruCacheWithSpinBuckets.cpp
CacheAllocatorTinyLFU5BCache.cpp
CacheAllocatorTinyLFUCache.cpp
CacheAllocatorWTinyLFU5BCache.cpp
CacheAllocatorWTinyLFUCache.cpp
Cache.cpp
CacheDetails.cpp
CacheStats.cpp
Expand Down
2 changes: 1 addition & 1 deletion cachelib/allocator/memory/CompressedPtr.h
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ class CACHELIB_PACKED_ATTR CompressedPtr5B {
: ptr_(compress(slabIdx, allocIdx, isMultiTiered, tid)),
regionIdx_(getRegionIdx(slabIdx, isMultiTiered, tid)) {}

constexpr explicit CompressedPtr5B(PtrType ptr) noexcept
CompressedPtr5B(PtrType ptr) noexcept
: ptr_(deserializePtr(ptr)), regionIdx_(deserializeRegion(ptr)) {}

// number of bits for the Allocation offset in a slab. With slab size of 22
Expand Down
2 changes: 1 addition & 1 deletion cachelib/allocator/memory/tests/TestBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class AllocTestBase : public testing::Test {
}

template <typename CompressedPtrType>
CompressedPtrType::PtrType compress(CompressedPtrType ptr,
typename CompressedPtrType::PtrType compress(CompressedPtrType ptr,
uint32_t slabIdx,
uint32_t allocIdx,
bool isMultiTiered) {
Expand Down
10 changes: 9 additions & 1 deletion contrib/build-package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ options:
NAME: the dependency to build supported values are:
zstd
googlelog, googleflags, googletest,
fmt, sparsemap,
fmt, sparsemap, fastfloat,
folly, fizz, wangle, mvfst, fbthrift,
cachelib

Expand Down Expand Up @@ -195,6 +195,14 @@ case "$1" in
external_git_clone=yes
;;

fastfloat)
NAME=fastfloat
REPO=https://github.com/fastfloat/fast_float.git
REPODIR=cachelib/external/$NAME
SRCDIR=$REPODIR
external_git_clone=yes
;;

folly)
NAME=folly
SRCDIR=cachelib/external/$NAME
Expand Down
2 changes: 1 addition & 1 deletion contrib/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ build_arch()

build_dependencies()
{
for pkg in zstd googleflags googlelog googletest sparsemap fmt folly fizz wangle mvfst fbthrift ;
for pkg in zstd googleflags googlelog googletest sparsemap fmt fastfloat folly fizz wangle mvfst fbthrift ;
do
# shellcheck disable=SC2086
./contrib/build-package.sh $pass_params "$pkg" \
Expand Down
1 change: 1 addition & 0 deletions contrib/prerequisites-centos9.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ sudo dnf install -y \
gtest-devel \
libsodium-static \
libdwarf-static \
xxhash-devel \
numactl-devel


Expand Down
1 change: 1 addition & 0 deletions contrib/prerequisites-rocky9.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ sudo dnf install -y \
libsodium-devel \
libaio-devel \
binutils-devel \
xxhash-devel \
numactl-devel


Expand Down
1 change: 1 addition & 0 deletions contrib/prerequisites-ubuntu18.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ sudo apt-get install -y \
libdwarf-dev \
libsodium-dev \
libaio-dev \
libxxhash-dev \
libnuma-dev

# NOTE:
Expand Down
Loading