Closed Haltz closed 3 years ago
Please run make install before compiling utilities.
DEBUG_LEVEL=0 ROCKSDB_PLUGINS=zenfs make -j48 db_bench install
What you mean is as above? if it is that, i have already done it.
There is one more question i want to ask: does pushd
make any sense?
On my opinion, it is useless.
I appreciate it if some of you can reply.
Would you please be more specific, which pushd?
pushd
in README.md
It is used along with popd to quickly go back to RocksDB root directory. It is not necessary indeed, but is useful.
Please tell me if you need more info.
- Ubuntu 20.04 LTS server
- Kernel 5.13.0-051300-generic
- Rocksdb 6.22.1
Please tell me if you need more info.
The information you provided might not be related to this issue.
I suggest you going over the make install
procedure, and see if headers are installed to the required location /usr/local/include
.
No, and if i specify include dir, make report errors, i think it means ROCKDB_PLUGIN=zenfs
did nothing.
thanks very much if you can tell me how to compile plugin manually or how can i run zenfs utilties.
The instruction in README works perfectly for us. Would you please provide:
zns@zns-server:~/rocksdb/plugin/zenfs/util$ sudo make install
$DEBUG_LEVEL is 0
echo 'prefix=/usr/local' > rocksdb.pc
echo 'exec_prefix=${prefix}' >> rocksdb.pc
echo 'includedir=${prefix}/include' >> rocksdb.pc
echo 'libdir=/usr/local/lib' >> rocksdb.pc
echo '' >> rocksdb.pc
echo 'Name: rocksdb' >> rocksdb.pc
echo 'Description: An embeddable persistent key-value store for fast storage' >> rocksdb.pc
echo Version: 6.24.0 >> rocksdb.pc
echo 'Libs: -L${libdir} -ldl -lrocksdb' >> rocksdb.pc
echo 'Libs.private: -lpthread -lrt -ldl -lsnappy -lgflags -lz -lbz2 -llz4 -lzstd ' >> rocksdb.pc
echo 'Cflags: -I${includedir} -std=c++11 -faligned-new -DHAVE_ALIGNED_NEW -DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=1 -DZLIB -DBZIP2 -DLZ4 -DZSTD -DROCKSDB_MALLOC_USABLE_SIZE -DROCKSDB_PTHREAD_ADAPTIVE_MUTEX -DROCKSDB_BACKTRACE -DROCKSDB_RANGESYNC_PRESENT -DROCKSDB_SCHED_GETCPU_PRESENT -DROCKSDB_AUXV_GETAUXVAL_PRESENT -march=native -DHAVE_SSE42 -DHAVE_PCLMUL -DHAVE_AVX2 -DHAVE_BMI -DHAVE_LZCNT -DHAVE_UINT128_EXTENSION -DROCKSDB_SUPPORT_THREAD_LOCAL -isystem third-party/gtest-1.8.1/fused-src' >> rocksdb.pc
install -d /usr/local/lib
install -d /usr/local/lib/pkgconfig
for header_dir in `find "include/rocksdb" -type d`; do \
install -d //usr/local/$header_dir; \
done
for header in `find "include/rocksdb" -type f -name *.h`; do \
install -C -m 644 $header //usr/local/$header; \
done
for header in ; do \
install -d //usr/local/include/rocksdb/`dirname $header`; \
install -C -m 644 $header //usr/local/include/rocksdb/$header; \
done
install -C -m 644 rocksdb.pc /usr/local/lib/pkgconfig/rocksdb.pc
install -d /usr/local/lib
install -C -m 755 librocksdb.a /usr/local/lib
[ -e librocksdb.so.6.24.0 ] && make install-shared || :
zns@zns-server:~/rocksdb/plugin/zenfs/util$ make
g++ -std=c++11 -faligned-new -DHAVE_ALIGNED_NEW -DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=1 -DZLIB -DBZIP2 -DLZ4 -DZSTD -DROCKSDB_MALLOC_USABLE_SIZE -DROCKSDB_PTHREAD_ADAPTIVE_MUTEX -DROCKSDB_BACKTRACE -DROCKSDB_RANGESYNC_PRESENT -DROCKSDB_SCHED_GETCPU_PRESENT -DROCKSDB_AUXV_GETAUXVAL_PRESENT -march=native -DHAVE_SSE42 -DHAVE_PCLMUL -DHAVE_AVX2 -DHAVE_BMI -DHAVE_LZCNT -DHAVE_UINT128_EXTENSION -DROCKSDB_SUPPORT_THREAD_LOCAL -isystem third-party/gtest-1.8.1/fused-src -I/usr/local/include -o zenfs zenfs.cc -L/usr/local/lib -ldl -lrocksdb -lpthread -lrt -ldl -lsnappy -lgflags -lz -lbz2 -llz4 -lzstd
zenfs.cc:17:10: fatal error: rocksdb/plugin/zenfs/fs/fs_zenfs.h: No such file or directory
17 | #include <rocksdb/plugin/zenfs/fs/fs_zenfs.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:14: zenfs] Error 1
zns@zns-server:~/rocksdb/plugin/zenfs/util$ ls /usr/local/include/rocksdb/
advanced_options.h env_encryption.h perf_context.h table.h
cache_bench_tool.h env.h perf_level.h table_properties.h
cache.h experimental.h persistent_cache.h threadpool.h
c.h file_checksum.h rate_limiter.h thread_status.h
cleanable.h file_system.h rocksdb_namespace.h trace_reader_writer.h
compaction_filter.h filter_policy.h secondary_cache.h trace_record.h
compaction_job_stats.h flush_block_policy.h slice.h trace_record_result.h
comparator.h functor_wrapper.h slice_transform.h transaction_log.h
compression_type.h iostats_context.h snapshot.h types.h
concurrent_task_limiter.h io_status.h sst_dump_tool.h universal_compaction.h
configurable.h iterator.h sst_file_manager.h utilities
convenience.h ldb_tool.h sst_file_reader.h version.h
customizable.h listener.h sst_file_writer.h wal_filter.h
data_structure.h memory_allocator.h sst_partitioner.h write_batch_base.h
db_bench_tool.h memtablerep.h statistics.h write_batch.h
db_dump_tool.h merge_operator.h stats_history.h write_buffer_manager.h
db.h metadata.h status.h
db_stress_tool.h options.h system_clock.h
zns@zns-server:~/rocksdb$ ROCKSDB_PLUGINS=zenfs sudo make install
$DEBUG_LEVEL is 0
echo 'prefix=/usr/local' > rocksdb.pc
echo 'exec_prefix=${prefix}' >> rocksdb.pc
echo 'includedir=${prefix}/include' >> rocksdb.pc
echo 'libdir=/usr/local/lib' >> rocksdb.pc
echo '' >> rocksdb.pc
echo 'Name: rocksdb' >> rocksdb.pc
echo 'Description: An embeddable persistent key-value store for fast storage' >> rocksdb.pc
echo Version: 6.24.0 >> rocksdb.pc
echo 'Libs: -L${libdir} -ldl -lrocksdb' >> rocksdb.pc
echo 'Libs.private: -lpthread -lrt -ldl -lsnappy -lgflags -lz -lbz2 -llz4 -lzstd ' >> rocksdb.pc
echo 'Cflags: -I${includedir} -std=c++11 -faligned-new -DHAVE_ALIGNED_NEW -DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=1 -DZLIB -DBZIP2 -DLZ4 -DZSTD -DROCKSDB_MALLOC_USABLE_SIZE -DROCKSDB_PTHREAD_ADAPTIVE_MUTEX -DROCKSDB_BACKTRACE -DROCKSDB_RANGESYNC_PRESENT -DROCKSDB_SCHED_GETCPU_PRESENT -DROCKSDB_AUXV_GETAUXVAL_PRESENT -march=native -DHAVE_SSE42 -DHAVE_PCLMUL -DHAVE_AVX2 -DHAVE_BMI -DHAVE_LZCNT -DHAVE_UINT128_EXTENSION -DROCKSDB_SUPPORT_THREAD_LOCAL -isystem third-party/gtest-1.8.1/fused-src' >> rocksdb.pc
install -d /usr/local/lib
install -d /usr/local/lib/pkgconfig
for header_dir in `find "include/rocksdb" -type d`; do \
install -d //usr/local/$header_dir; \
done
for header in `find "include/rocksdb" -type f -name *.h`; do \
install -C -m 644 $header //usr/local/$header; \
done
for header in ; do \
install -d //usr/local/include/rocksdb/`dirname $header`; \
install -C -m 644 $header //usr/local/include/rocksdb/$header; \
done
install -C -m 644 rocksdb.pc /usr/local/lib/pkgconfig/rocksdb.pc
install -d /usr/local/lib
install -C -m 755 librocksdb.a /usr/local/lib
[ -e librocksdb.so.6.24.0 ] && make install-shared || :
Same output of other commands as before.
use sudo -E, otherwise the environment variable will not take effect.
Looks like it fixed the problem. Thanks for patience!
Zenfs was not compiled along with rocksdb, and fs_zenfs.h is not in header files dir. Thanks a lot!