facebook / rocksdb

A library that provides an embeddable, persistent key-value store for fast storage.
http://rocksdb.org
GNU General Public License v2.0
28.62k stars 6.32k forks source link

xcode 11 catalina build #7717

Closed InoMurko closed 3 years ago

InoMurko commented 3 years ago

Steps: Catalina + XCode 11

install_rocksdb_source(){
  git clone https://github.com/facebook/rocksdb.git
  cd rocksdb/
  git checkout tags/v6.14.5
  make clean 
  make static_lib
  make shared_lib
  make tools
  make install INSTALL_PATH=/usr/local/Cellar/rocksdb/6.14.5
}

install_darwin_deps(){
    fancy_echo "Installing dependencies via brew"
    brew bundle --file=- <<EOF
tap "ethereum/ethereum"
brew "automake"
brew "autoconf"
brew "gmp"
brew "libtool"
brew "cmake"
EOF
}

Output:

Darwin

Installing dependencies via brew
Warning: Permanently added the RSA host key for IP address '140.82.113.4' to the list of known hosts.
==> Tapping homebrew/bundle
Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-bundle'...
remote: Enumerating objects: 41, done.        
remote: Counting objects: 100% (41/41), done.        
remote: Compressing objects: 100% (29/29), done.        
remote: Total 5340 (delta 19), reused 28 (delta 12), pack-reused 5299           
Receiving objects: 100% (5340/5340), 1.20 MiB | 7.31 MiB/s, done.               
Resolving deltas: 100% (3123/3123), done.                                       
Tapped 1 command (103 files, 1.5MB).
Tapping ethereum/ethereum
Installing automake
Using autoconf
Installing gmp
Installing libtool
Installing cmake
Homebrew Bundle complete! 6 Brewfile dependencies now installed.
Cloning into 'rocksdb'...
Warning: Permanently added the RSA host key for IP address '140.82.114.4' to the list of known hosts.
remote: Enumerating objects: 1, done.        
remote: Counting objects: 100% (1/1), done.        
remote: Total 93415 (delta 0), reused 0 (delta 0), pack-reused 93414            
Receiving objects: 100% (93415/93415), 156.98 MiB | 34.37 MiB/s, done.          
Resolving deltas: 100% (70716/70716), done.                                     
Note: switching to 'tags/v6.14.5'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 35d8e36ef Bump version and update HISTORY
$DEBUG_LEVEL is 0
rm -rf bzip2* snappy* zlib* lz4* zstd*
echo shared=librocksdb.dylib librocksdb.6.dylib librocksdb.6.14.dylib librocksdb.6.14.5.dylib librocksdb_test.dylib librocksdb_tools.dylib librocksdb_stress.dylib
shared=librocksdb.dylib librocksdb.6.dylib librocksdb.6.14.dylib librocksdb.6.14.5.dylib librocksdb_test.dylib librocksdb_tools.dylib librocksdb_stress.dylib
echo static=librocksdb.a librocksdb_test.a librocksdb_tools.a librocksdb_stress.a
static=librocksdb.a librocksdb_test.a librocksdb_tools.a librocksdb_stress.a
rm -f  cache_bench  range_del_aggregator_bench  memtablerep_bench  table_reader_bench  db_bench  filter_bench  persistent_cache_bench  db_stress  blob_dump  block_cache_trace_analyzer  db_repl_stress  db_sanity_test  ldb  io_tracer_parser  sst_dump  write_stress  rocksdb_dump  rocksdb_undump  trace_analyzer  io_tracer_parser  cache_test  lru_cache_test  blob_file_addition_test  blob_file_builder_test  blob_file_garbage_test  blob_file_reader_test  db_blob_index_test  column_family_test  compact_files_test  compaction_iterator_test  compaction_job_test  compaction_job_stats_test  compaction_picker_test  comparator_db_test  corruption_test  cuckoo_table_db_test  db_basic_test  db_with_timestamp_basic_test  db_block_cache_test  db_bloom_filter_test  db_compaction_filter_test  db_compaction_test  db_dynamic_level_test  db_encryption_test  db_flush_test  import_column_family_test  db_inplace_update_test  db_io_failure_test  db_iter_test  db_iter_stress_test  db_iterator_test  db_log_iter_test  db_memtable_test  db_merge_operator_test  db_merge_operand_test  db_options_test  db_properties_test  db_range_del_test  db_secondary_test  db_sst_test  db_statistics_test  db_table_properties_test  db_tailing_iter_test  db_test  db_test2  db_logical_block_size_cache_test  db_universal_compaction_test  db_wal_test  db_with_timestamp_compaction_test  db_write_test  dbformat_test  deletefile_test  error_handler_fs_test  external_sst_file_basic_test  external_sst_file_test  fault_injection_test  file_indexer_test  file_reader_writer_test  filename_test  flush_job_test  listener_test  log_test  manual_compaction_test  memtable_list_test  merge_helper_test  merge_test  obsolete_files_test  options_file_test  perf_context_test  periodic_work_scheduler_test  plain_table_db_test  prefix_test  repair_test  range_del_aggregator_test  range_tombstone_fragmenter_test  table_properties_collector_test  version_builder_test  version_edit_test  version_set_test  wal_manager_test  write_batch_test  write_callback_test  write_controller_test  env_basic_test  env_test  io_posix_test  mock_env_test  delete_scheduler_test  prefetch_test  random_access_file_reader_test  auto_roll_logger_test  env_logger_test  event_logger_test  arena_test  memkind_kmem_allocator_test  inlineskiplist_test  skiplist_test  write_buffer_manager_test  histogram_test  iostats_context_test  statistics_test  stats_history_test  configurable_test  options_settable_test  options_test  block_based_filter_block_test  block_based_table_reader_test  block_test  data_block_hash_index_test  full_filter_block_test  partitioned_filter_block_test  cleanable_test  cuckoo_table_builder_test  cuckoo_table_reader_test  merger_test  sst_file_reader_test  table_test  block_fetcher_test  testutil_test  block_cache_trace_analyzer_test  io_tracer_parser_test  ldb_cmd_test  reduce_levels_test  sst_dump_test  trace_analyzer_test  block_cache_tracer_test  io_tracer_test  autovector_test  bloom_test  coding_test  crc32c_test  defer_test  dynamic_bloom_test  filelock_test  file_reader_writer_test  hash_test  heap_test  random_test  rate_limiter_test  repeatable_thread_test  slice_test  slice_transform_test  timer_queue_test  timer_test  thread_list_test  thread_local_test  work_queue_test  backupable_db_test  blob_db_test  cassandra_format_test  cassandra_functional_test  cassandra_row_merge_test  cassandra_serialize_test  checkpoint_test  env_timed_test  memory_test  stringappend_test  object_registry_test  option_change_migration_test  options_util_test  hash_table_test  persistent_cache_test  cache_simulator_test  sim_cache_test  compact_on_deletion_collector_test  optimistic_transaction_test  transaction_test  transaction_lock_mgr_test  write_prepared_transaction_test  write_unprepared_transaction_test  ttl_test  util_merge_operators_test  write_batch_with_index_test  c_test backupable_db_test db_bloom_filter_test db_compaction_filter_test db_compaction_test db_merge_operator_test db_sst_test db_test db_test2 db_universal_compaction_test db_wal_test column_family_test external_sst_file_test import_column_family_test fault_injection_test file_reader_writer_test inlineskiplist_test manual_compaction_test persistent_cache_test table_test transaction_test transaction_lock_mgr_test write_prepared_transaction_test write_unprepared_transaction_test  librocksdb.a librocksdb_test.a librocksdb_tools.a librocksdb_stress.a librocksdb.dylib librocksdb.6.dylib librocksdb.6.14.dylib librocksdb.6.14.5.dylib librocksdb_test.dylib librocksdb_tools.dylib librocksdb_stress.dylib
rm -rf  make_config.mk rocksdb.pc t LOG /var/folders/1b/gl7yt7ds26vcyr1pkgld6l040000gn/T//rocksdb.KFKR unity.cc ios-x86 ios-arm scan_build_report
find . -name "*.[oda]" -exec rm -f {} \;
find . -type f -regex ".*\.\(\(gcda\)\|\(gcno\)\)" -exec rm -f {} \;
rm -rf jl jls
cd java && /Applications/Xcode-11.GM.Seed.2.app/Contents/Developer/usr/bin/make clean
rm -rf ./include
rm -rf target
rm -rf benchmark/target
rm -rf samples/target
rm -rf test-libs
$DEBUG_LEVEL is 0
  GEN      util/build_version.cc
$DEBUG_LEVEL is 0
  GEN      util/build_version.cc
  CC       cache/cache.o
  CC       cache/clock_cache.o
  CC       cache/lru_cache.o
  CC       cache/sharded_cache.o
  CC       db/arena_wrapped_db_iter.o
  CC       db/blob/blob_file_addition.o
  CC       db/blob/blob_file_builder.o
  CC       db/blob/blob_file_garbage.o
  CC       db/blob/blob_file_meta.o
  CC       db/blob/blob_file_reader.o
  CC       db/blob/blob_log_format.o
  CC       db/blob/blob_log_sequential_reader.o
  CC       db/blob/blob_log_writer.o
  CC       db/builder.o
  CC       db/c.o
  CC       db/column_family.o
  CC       db/compacted_db_impl.o
  CC       db/compaction/compaction.o
  CC       db/compaction/compaction_iterator.o
  CC       db/compaction/compaction_job.o
  CC       db/compaction/compaction_picker.o
  CC       db/compaction/compaction_picker_fifo.o
  CC       db/compaction/compaction_picker_level.o
  CC       db/compaction/compaction_picker_universal.o
  CC       db/compaction/sst_partitioner.o
  CC       db/convenience.o
  CC       db/db_filesnapshot.o
  CC       db/db_impl/db_impl.o
  CC       db/db_impl/db_impl_compaction_flush.o
  CC       db/db_impl/db_impl_debug.o
  CC       db/db_impl/db_impl_experimental.o
  CC       db/db_impl/db_impl_files.o
  CC       db/db_impl/db_impl_open.o
  CC       db/db_impl/db_impl_readonly.o
  CC       db/db_impl/db_impl_secondary.o
  CC       db/db_impl/db_impl_write.o
  CC       db/db_info_dumper.o
  CC       db/db_iter.o
  CC       db/dbformat.o
  CC       db/error_handler.o
  CC       db/event_helpers.o
  CC       db/experimental.o
  CC       db/external_sst_file_ingestion_job.o
  CC       db/file_indexer.o
  CC       db/flush_job.o
  CC       db/flush_scheduler.o
  CC       db/forward_iterator.o
  CC       db/import_column_family_job.o
  CC       db/internal_stats.o
  CC       db/logs_with_prep_tracker.o
  CC       db/log_reader.o
  CC       db/log_writer.o
  CC       db/malloc_stats.o
  CC       db/memtable.o
  CC       db/memtable_list.o
  CC       db/merge_helper.o
  CC       db/merge_operator.o
  CC       db/output_validator.o
  CC       db/periodic_work_scheduler.o
  CC       db/range_del_aggregator.o
  CC       db/range_tombstone_fragmenter.o
  CC       db/repair.o
  CC       db/snapshot_impl.o
  CC       db/table_cache.o
  CC       db/table_properties_collector.o
  CC       db/transaction_log_impl.o
  CC       db/trim_history_scheduler.o
  CC       db/version_builder.o
  CC       db/version_edit.o
  CC       db/version_edit_handler.o
  CC       db/version_set.o
  CC       db/wal_edit.o
  CC       db/wal_manager.o
  CC       db/write_batch.o
  CC       db/write_batch_base.o
  CC       db/write_controller.o
  CC       db/write_thread.o
  CC       env/env.o
  CC       env/env_chroot.o
  CC       env/env_encryption.o
  CC       env/env_hdfs.o
  CC       env/env_posix.o
  CC       env/file_system.o
  CC       env/fs_posix.o
  CC       env/file_system_tracer.o
  CC       env/io_posix.o
  CC       env/mock_env.o
  CC       file/delete_scheduler.o
  CC       file/file_prefetch_buffer.o
  CC       file/file_util.o
  CC       file/filename.o
  CC       file/random_access_file_reader.o
  CC       file/read_write_util.o
  CC       file/readahead_raf.o
  CC       file/sequence_file_reader.o
  CC       file/sst_file_manager_impl.o
  CC       file/writable_file_writer.o
  CC       logging/auto_roll_logger.o
  CC       logging/event_logger.o
  CC       logging/log_buffer.o
  CC       memory/arena.o
  CC       memory/concurrent_arena.o
  CC       memory/jemalloc_nodump_allocator.o
  CC       memory/memkind_kmem_allocator.o
  CC       memtable/alloc_tracker.o
  CC       memtable/hash_linklist_rep.o
  CC       memtable/hash_skiplist_rep.o
  CC       memtable/skiplistrep.o
  CC       memtable/vectorrep.o
  CC       memtable/write_buffer_manager.o
  CC       monitoring/histogram.o
  CC       monitoring/histogram_windowing.o
  CC       monitoring/in_memory_stats_history.o
  CC       monitoring/instrumented_mutex.o
  CC       monitoring/iostats_context.o
  CC       monitoring/perf_context.o
  CC       monitoring/perf_level.o
  CC       monitoring/persistent_stats_history.o
  CC       monitoring/statistics.o
  CC       monitoring/thread_status_impl.o
  CC       monitoring/thread_status_updater.o
  CC       monitoring/thread_status_updater_debug.o
  CC       monitoring/thread_status_util.o
  CC       monitoring/thread_status_util_debug.o
  CC       options/cf_options.o
  CC       options/configurable.o
  CC       options/db_options.o
  CC       options/options.o
  CC       options/options_helper.o
  CC       options/options_parser.o
  CC       port/port_posix.o
  CC       port/win/env_default.o
  CC       port/win/env_win.o
  CC       port/win/io_win.o
  CC       port/win/port_win.o
  CC       port/win/win_logger.o
  CC       port/win/win_thread.o
  CC       port/stack_trace.o
  CC       table/adaptive/adaptive_table_factory.o
  CC       table/block_based/binary_search_index_reader.o
  CC       table/block_based/block.o
  CC       table/block_based/block_based_filter_block.o
  CC       table/block_based/block_based_table_builder.o
  CC       table/block_based/block_based_table_factory.o
  CC       table/block_based/block_based_table_iterator.o
  CC       table/block_based/block_based_table_reader.o
  CC       table/block_based/block_builder.o
  CC       table/block_based/block_prefetcher.o
  CC       table/block_based/block_prefix_index.o
  CC       table/block_based/data_block_hash_index.o
  CC       table/block_based/data_block_footer.o
  CC       table/block_based/filter_block_reader_common.o
  CC       table/block_based/filter_policy.o
  CC       table/block_based/flush_block_policy.o
  CC       table/block_based/full_filter_block.o
  CC       table/block_based/hash_index_reader.o
  CC       table/block_based/index_builder.o
  CC       table/block_based/index_reader_common.o
  CC       table/block_based/parsed_full_filter_block.o
  CC       table/block_based/partitioned_filter_block.o
  CC       table/block_based/partitioned_index_iterator.o
  CC       table/block_based/partitioned_index_reader.o
  CC       table/block_based/reader_common.o
  CC       table/block_based/uncompression_dict_reader.o
  CC       table/block_fetcher.o
  CC       table/cuckoo/cuckoo_table_builder.o
  CC       table/cuckoo/cuckoo_table_factory.o
  CC       table/cuckoo/cuckoo_table_reader.o
  CC       table/format.o
  CC       table/get_context.o
  CC       table/iterator.o
  CC       table/merging_iterator.o
  CC       table/meta_blocks.o
  CC       table/persistent_cache_helper.o
  CC       table/plain/plain_table_bloom.o
  CC       table/plain/plain_table_builder.o
  CC       table/plain/plain_table_factory.o
  CC       table/plain/plain_table_index.o
  CC       table/plain/plain_table_key_coding.o
  CC       table/plain/plain_table_reader.o
  CC       table/sst_file_dumper.o
  CC       table/sst_file_reader.o
  CC       table/sst_file_writer.o
  CC       table/table_factory.o
  CC       table/table_properties.o
  CC       table/two_level_iterator.o
  CC       test_util/sync_point.o
  CC       test_util/sync_point_impl.o
  CC       test_util/transaction_test_util.o
  CC       tools/dump/db_dump_tool.o
  CC       trace_replay/trace_replay.o
  CC       trace_replay/block_cache_tracer.o
  CC       trace_replay/io_tracer.o
  CC       util/build_version.o
  CC       util/coding.o
  CC       util/compaction_job_stats_impl.o
  CC       util/comparator.o
  CC       util/compression_context_cache.o
  CC       util/concurrent_task_limiter_impl.o
  CC       util/crc32c.o
  CC       util/dynamic_bloom.o
  CC       util/hash.o
  CC       util/murmurhash.o
  CC       util/random.o
  CC       util/rate_limiter.o
  CC       util/slice.o
  CC       util/file_checksum_helper.o
  CC       util/status.o
  CC       util/string_util.o
  CC       util/thread_local.o
  CC       util/threadpool_imp.o
  CC       util/xxhash.o
  CC       utilities/backupable/backupable_db.o
  CC       utilities/blob_db/blob_compaction_filter.o
  CC       utilities/blob_db/blob_db.o
  CC       utilities/blob_db/blob_db_impl.o
  CC       utilities/blob_db/blob_db_impl_filesnapshot.o
  CC       utilities/blob_db/blob_file.o
  CC       utilities/cassandra/cassandra_compaction_filter.o
  CC       utilities/cassandra/format.o
  CC       utilities/cassandra/merge_operator.o
  CC       utilities/checkpoint/checkpoint_impl.o
  CC       utilities/compaction_filters/remove_emptyvalue_compactionfilter.o
  CC       utilities/convenience/info_log_finder.o
  CC       utilities/debug.o
  CC       utilities/env_mirror.o
  CC       utilities/env_timed.o
  CC       utilities/fault_injection_env.o
  CC       utilities/fault_injection_fs.o
  CC       utilities/leveldb_options/leveldb_options.o
  CC       utilities/memory/memory_util.o
  CC       utilities/merge_operators/max.o
  CC       utilities/merge_operators/put.o
  CC       utilities/merge_operators/sortlist.o
  CC       utilities/merge_operators/string_append/stringappend.o
  CC       utilities/merge_operators/string_append/stringappend2.o
  CC       utilities/merge_operators/uint64add.o
  CC       utilities/merge_operators/bytesxor.o
  CC       utilities/object_registry.o
  CC       utilities/option_change_migration/option_change_migration.o
  CC       utilities/options/options_util.o
  CC       utilities/persistent_cache/block_cache_tier.o
  CC       utilities/persistent_cache/block_cache_tier_file.o
  CC       utilities/persistent_cache/block_cache_tier_metadata.o
  CC       utilities/persistent_cache/persistent_cache_tier.o
  CC       utilities/persistent_cache/volatile_tier_impl.o
  CC       utilities/simulator_cache/cache_simulator.o
  CC       utilities/simulator_cache/sim_cache.o
  CC       utilities/table_properties_collectors/compact_on_deletion_collector.o
  CC       utilities/trace/file_trace_reader_writer.o
  CC       utilities/transactions/lock/lock_tracker.o
  CC       utilities/transactions/lock/point_lock_tracker.o
  CC       utilities/transactions/optimistic_transaction.o
  CC       utilities/transactions/optimistic_transaction_db_impl.o
  CC       utilities/transactions/pessimistic_transaction.o
  CC       utilities/transactions/pessimistic_transaction_db.o
  CC       utilities/transactions/snapshot_checker.o
  CC       utilities/transactions/transaction_base.o
  CC       utilities/transactions/transaction_db_mutex_impl.o
  CC       utilities/transactions/transaction_lock_mgr.o
  CC       utilities/transactions/transaction_util.o
  CC       utilities/transactions/write_prepared_txn.o
  CC       utilities/transactions/write_prepared_txn_db.o
  CC       utilities/transactions/write_unprepared_txn.o
  CC       utilities/transactions/write_unprepared_txn_db.o
  CC       utilities/ttl/db_ttl_impl.o
  CC       utilities/write_batch_with_index/write_batch_with_index.o
  CC       utilities/write_batch_with_index/write_batch_with_index_internal.o
  AR       librocksdb.a
ar: creating archive librocksdb.a
/Applications/Xcode-11.GM.Seed.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: librocksdb.a(db_impl_debug.o) has no symbols
/Applications/Xcode-11.GM.Seed.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: librocksdb.a(memkind_kmem_allocator.o) has no symbols
/Applications/Xcode-11.GM.Seed.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: librocksdb.a(env_default.o) has no symbols
/Applications/Xcode-11.GM.Seed.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: librocksdb.a(env_win.o) has no symbols
/Applications/Xcode-11.GM.Seed.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: librocksdb.a(io_win.o) has no symbols
/Applications/Xcode-11.GM.Seed.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: librocksdb.a(port_win.o) has no symbols
/Applications/Xcode-11.GM.Seed.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: librocksdb.a(win_logger.o) has no symbols
/Applications/Xcode-11.GM.Seed.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: librocksdb.a(win_thread.o) has no symbols
/Applications/Xcode-11.GM.Seed.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: librocksdb.a(sync_point_impl.o) has no symbols
$DEBUG_LEVEL is 0
  GEN      util/build_version.cc
  CCLD     librocksdb.6.14.5.dylib
ln -fs librocksdb.6.14.5.dylib librocksdb.6.14.dylib
ln -fs librocksdb.6.14.5.dylib librocksdb.6.dylib
ln -fs librocksdb.6.14.5.dylib librocksdb.dylib
$DEBUG_LEVEL is 1
Makefile:198: Warning: Compiling in debug mode. Don't use the resulting binary in production
  GEN      util/build_version.cc
  CC       db_stress_tool/db_stress.o
  CC       tools/block_cache_analyzer/block_cache_trace_analyzer.o
  CC       tools/trace_analyzer_tool.o
  CC       db_stress_tool/batched_ops_stress.o
  CC       db_stress_tool/cf_consistency_stress.o
  CC       db_stress_tool/db_stress_common.o
  CC       db_stress_tool/db_stress_driver.o
  CC       db_stress_tool/db_stress_test_base.o
  CC       db_stress_tool/db_stress_gflags.o
  CC       db_stress_tool/db_stress_shared_state.o
  CC       db_stress_tool/db_stress_tool.o
  CC       db_stress_tool/no_batched_ops_stress.o
  AR       librocksdb_stress_debug.a
ar: creating archive librocksdb_stress_debug.a
/Applications/Xcode-11.GM.Seed.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: librocksdb_stress_debug.a(block_cache_trace_analyzer.o) has no symbols
/Applications/Xcode-11.GM.Seed.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: librocksdb_stress_debug.a(trace_analyzer_tool.o) has no symbols
/Applications/Xcode-11.GM.Seed.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: librocksdb_stress_debug.a(batched_ops_stress.o) has no symbols
/Applications/Xcode-11.GM.Seed.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: librocksdb_stress_debug.a(cf_consistency_stress.o) has no symbols
/Applications/Xcode-11.GM.Seed.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: librocksdb_stress_debug.a(db_stress_common.o) has no symbols
/Applications/Xcode-11.GM.Seed.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: librocksdb_stress_debug.a(db_stress_driver.o) has no symbols
/Applications/Xcode-11.GM.Seed.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: librocksdb_stress_debug.a(db_stress_test_base.o) has no symbols
/Applications/Xcode-11.GM.Seed.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: librocksdb_stress_debug.a(db_stress_gflags.o) has no symbols
/Applications/Xcode-11.GM.Seed.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: librocksdb_stress_debug.a(db_stress_shared_state.o) has no symbols
/Applications/Xcode-11.GM.Seed.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: librocksdb_stress_debug.a(db_stress_tool.o) has no symbols
/Applications/Xcode-11.GM.Seed.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: librocksdb_stress_debug.a(no_batched_ops_stress.o) has no symbols
warning: /Applications/Xcode-11.GM.Seed.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: warning for library: librocksdb_stress_debug.a the table of contents is empty (no object file members in the library define global symbols)
  CC       tools/db_bench_tool.o
  CC       tools/io_tracer_parser_tool.o
  CC       tools/ldb_cmd.o
  CC       tools/ldb_tool.o
  CC       tools/sst_dump_tool.o
  CC       utilities/blob_db/blob_dump_tool.o
  AR       librocksdb_tools_debug.a
ar: creating archive librocksdb_tools_debug.a
/Applications/Xcode-11.GM.Seed.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: librocksdb_tools_debug.a(db_bench_tool.o) has no symbols
/Applications/Xcode-11.GM.Seed.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: librocksdb_tools_debug.a(io_tracer_parser_tool.o) has no symbols
  AR       librocksdb_debug.a
ar: creating archive librocksdb_debug.a
/Applications/Xcode-11.GM.Seed.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: librocksdb_debug.a(db_impl_debug.o) has no symbols
/Applications/Xcode-11.GM.Seed.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: librocksdb_debug.a(memkind_kmem_allocator.o) has no symbols
/Applications/Xcode-11.GM.Seed.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: librocksdb_debug.a(env_default.o) has no symbols
/Applications/Xcode-11.GM.Seed.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: librocksdb_debug.a(env_win.o) has no symbols
/Applications/Xcode-11.GM.Seed.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: librocksdb_debug.a(io_win.o) has no symbols
/Applications/Xcode-11.GM.Seed.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: librocksdb_debug.a(port_win.o) has no symbols
/Applications/Xcode-11.GM.Seed.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: librocksdb_debug.a(win_logger.o) has no symbols
/Applications/Xcode-11.GM.Seed.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: librocksdb_debug.a(win_thread.o) has no symbols
/Applications/Xcode-11.GM.Seed.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: librocksdb_debug.a(sync_point_impl.o) has no symbols
  CCLD     db_stress
  CC       tools/blob_dump.o
  CCLD     blob_dump
  CC       tools/block_cache_analyzer/block_cache_trace_analyzer_tool.o
  CCLD     block_cache_trace_analyzer
  CC       tools/db_repl_stress.o
  CCLD     db_repl_stress
  CC       tools/db_sanity_test.o
  CCLD     db_sanity_test
  CC       tools/ldb.o
  CCLD     ldb
Undefined symbols for architecture x86_64:
  "rocksdb::SyncPoint::GetInstance()", referenced from:
      rocksdb::ListFileRangeDeletesCommand::DoCommand() in librocksdb_tools_debug.a(ldb_cmd.o)
  "rocksdb::SyncPoint::Process(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, void*)", referenced from:
      rocksdb::ListFileRangeDeletesCommand::DoCommand() in librocksdb_tools_debug.a(ldb_cmd.o)
  "typeinfo for rocksdb::WriteBatch::Handler", referenced from:
      typeinfo for rocksdb::(anonymous namespace)::InMemoryHandler in librocksdb_tools_debug.a(ldb_cmd.o)
  "typeinfo for rocksdb::DB", referenced from:
      rocksdb::ListFileRangeDeletesCommand::DoCommand() in librocksdb_tools_debug.a(ldb_cmd.o)
  "typeinfo for rocksdb::log::Reader::Reporter", referenced from:
      typeinfo for rocksdb::(anonymous namespace)::StdErrReporter in librocksdb_tools_debug.a(ldb_cmd.o)
  "typeinfo for rocksdb::DBImpl", referenced from:
      rocksdb::ListFileRangeDeletesCommand::DoCommand() in librocksdb_tools_debug.a(ldb_cmd.o)
  "typeinfo for rocksdb::Logger", referenced from:
      typeinfo for rocksdb::StderrLogger in librocksdb_tools_debug.a(ldb_cmd.o)
  "typeinfo for rocksdb::Iterator", referenced from:
      rocksdb::DBDumperCommand::DoDumpCommand() in librocksdb_tools_debug.a(ldb_cmd.o)
      rocksdb::ScanCommand::DoCommand() in librocksdb_tools_debug.a(ldb_cmd.o)
      typeinfo for rocksdb::TtlIterator in librocksdb_tools_debug.a(ldb_cmd.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [ldb] Error 1

Exited with code exit status 2
CircleCI received exit code 2

Is this a known error or a missing dependency?

adamretter commented 3 years ago

@InoMurko I just checked and I see a very similar problem on HEAD. It looks like the culprit is the tools target... I will take a look...

mrambacher commented 3 years ago

The problem is that "make tools" is compiling with DEBUG_LEVEL=1 whereas the base library is compiled with DEBUG_LEVEL=0. The tools code ends up including the SyncPoint code, which is compiled out in non-debug releases. If the "make tools" was changed to "DEBUG_LEVEL=0 make tools", I believe it would compile successfully.

alanpaxton commented 3 years ago

Easy enough to repro on HEAD $ (make clean; make static_lib; make shared_lib; make tools) fails $ (make clean; make static_lib; make shared_lib; DEBUG_LEVEL=0 make tools) succeeds $ (make clean; make tools) succeeds and I think makes everything at level 1

It doesn't look like there is a good easy way to fix all the possible ways this could break, because the Makefile is best-guessing the DEBUG_LEVEL for lots of different cases.

alanpaxton commented 3 years ago

Can we close this @adamretter @mrambacher ? Advice is to set the explicit debug level if you need to make the tools this way.

adamretter commented 3 years ago

@alanpaxton Yes, I will close this.