Skip to content

Commit

Permalink
fix eden fs build with GCC 13.2.1
Browse files Browse the repository at this point in the history
Fixing two problems that broke builds on Fedora 38, which comes with GCC 13.2.1

   * GCC 13.2.1 can't build the old rocksdb, so update the version
   * there was a missing include in BackingStoreType.h

Test plan:

build locally with:
```
./build/fbcode_builder/getdeps.py --allow-system-packages build --src-dir=. --project-install-prefix eden:/usr/local eden
```

Before, eden fs build breaks at rocksdb on uint8_t
```
FAILED: CMakeFiles/rocksdb.dir/table/block_based/data_block_hash_index.cc.o
/usr/bin/c++ -DLZ4 -DOS_LINUX -DROCKSDB_FALLOCATE_PRESENT -DROCKSDB_LIB_IO_POSIX -DROCKSDB_MALLOC_USABLE_SIZE -DROCKSDB_NO_DYNAMIC_EXTENSION -DROCKSDB_PLATFORM_POSIX -DROCKSDB_PTHREAD_ADAPTIVE_MUTEX -DROCKSDB_RANGESYNC_PRESENT -DROCKSDB_SCHED_GETCPU_PRESENT -DSNAPPY -I/home/alex/local/tmp/fridge/fbcode_builder_getdeps-ZhomeZalexZlocalZsaplingZbuildZfbcode_builder/extracted/rocksdb-v7.7.3.tar.gz/rocksdb-7.7.3 -I/home/alex/local/tmp/fridge/fbcode_builder_getdeps-ZhomeZalexZlocalZsaplingZbuildZfbcode_builder/extracted/rocksdb-v7.7.3.tar.gz/rocksdb-7.7.3/include -isystem /home/alex/local/tmp/fridge/fbcode_builder_getdeps-ZhomeZalexZlocalZsaplingZbuildZfbcode_builder/extracted/rocksdb-v7.7.3.tar.gz/rocksdb-7.7.3/third-party/gtest-1.8.1/fused-src -W -Wextra -Wall -pthread -Wsign-compare -Wshadow -Wno-unused-parameter -Wno-unused-variable -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers -Wno-strict-aliasing -Wno-invalid-offsetof -fno-omit-frame-pointer -momit-leaf-frame-pointer -fno-builtin-memcmp -O2 -g -DNDEBUG -std=gnu++17 -MD -MT CMakeFiles/rocksdb.dir/table/block_based/data_block_hash_index.cc.o -MF CMakeFiles/rocksdb.dir/table/block_based/data_block_hash_index.cc.o.d -o CMakeFiles/rocksdb.dir/table/block_based/data_block_hash_index.cc.o -c /home/alex/local/tmp/fridge/fbcode_builder_getdeps-ZhomeZalexZlocalZsaplingZbuildZfbcode_builder/extracted/rocksdb-v7.7.3.tar.gz/rocksdb-7.7.3/table/block_based/data_block_hash_index.cc
In file included from /home/alex/local/tmp/fridge/fbcode_builder_getdeps-ZhomeZalexZlocalZsaplingZbuildZfbcode_builder/extracted/rocksdb-v7.7.3.tar.gz/rocksdb-7.7.3/table/block_based/data_block_hash_index.cc:9:
/home/alex/local/tmp/fridge/fbcode_builder_getdeps-ZhomeZalexZlocalZsaplingZbuildZfbcode_builder/extracted/rocksdb-v7.7.3.tar.gz/rocksdb-7.7.3/table/block_based/data_block_hash_index.h:65:7: error: ‘uint8_t’ does not name a type
   65 | const uint8_t kNoEntry = 255;
      |       ^~~~~~~
/home/alex/local/tmp/fridge/fbc
```

After, works
  • Loading branch information
ahornby committed Nov 5, 2023
1 parent 304f35e commit f9ab1d4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
10 changes: 3 additions & 7 deletions build/fbcode_builder/manifests/rocksdb
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
name = rocksdb

[download]
url = https://github.com/facebook/rocksdb/archive/refs/tags/v7.7.3.tar.gz
sha256 = b8ac9784a342b2e314c821f6d701148912215666ac5e9bdbccd93cf3767cb611
url = https://github.com/facebook/rocksdb/archive/refs/tags/v8.6.7.zip
sha256 = 606fb2c92cf3773615c28f2587a41d920bd42fe2893e7262dab5e37a1f0210fe

[dependencies]
lz4
snappy

[build]
builder = cmake
subdir = rocksdb-7.7.3
subdir = rocksdb-8.6.7

[cmake.defines]
WITH_SNAPPY=ON
Expand All @@ -22,10 +22,6 @@ WITH_BENCHMARK_TOOLS=OFF
# and there's no clear way to make it pick the shared gflags
# so just turn it off.
WITH_GFLAGS=OFF
# mac pro machines don't have some of the newer features that
# rocksdb enables by default; ask it to disable their use even
# when building on new hardware
PORTABLE = ON
# Disable the use of -Werror
FAIL_ON_WARNINGS = OFF

Expand Down
1 change: 1 addition & 0 deletions eden/fs/store/BackingStoreType.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

#pragma once

#include <cstdint>
#include <exception>
#include <string>

Expand Down

0 comments on commit f9ab1d4

Please sign in to comment.