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

fixed a compilation error on mac os x (mavericks) #33

Closed
wants to merge 1 commit into from

Conversation

juneng603
Copy link

in my local computer, there are compilation errors.

g++ -g -Wall -Werror -I. -I./include -std=gnu++11  -DROCKSDB_PLATFORM_POSIX  -DOS_MACOSX -DROCKSDB_ATOMIC_PRESENT -DSNAPPY -DGFLAGS -DZLIB -DBZIP2   -DHAVE_JEMALLOC -O2 -fno-omit-frame-pointer -momit-leaf-frame-pointer -Woverloaded-virtual -c utilities/backupable/backupable_db.cc -o utilities/backupable/backupable_db.o 
utilities/backupable/backupable_db.cc:251:25: error: format specifies type 'unsigned long' but the argument has type 'uint64_t'
      (aka 'unsigned long long') [-Werror,-Wformat]
          backup.first, backup.second.GetSequenceNumber(), sequence_number);
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
utilities/backupable/backupable_db.cc:251:60: error: format specifies type 'unsigned long' but the argument has type 'uint64_t'
      (aka 'unsigned long long') [-Werror,-Wformat]
          backup.first, backup.second.GetSequenceNumber(), sequence_number);
                                                           ^~~~~~~~~~~~~~~
utilities/backupable/backupable_db.cc:745:32: error: format specifies type 'long *' but the argument has type 'int64_t *'
      (aka 'long long *') [-Werror,-Wformat]
  sscanf(data.data(), "%ld%n", &timestamp_, &bytes_read);
                       ~~~     ^~~~~~~~~~~
                       %lld
utilities/backupable/backupable_db.cc:747:32: error: format specifies type 'unsigned long *' but the argument has type
      'uint64_t *' (aka 'unsigned long long *') [-Werror,-Wformat]
  sscanf(data.data(), "%lu%n", &sequence_number_, &bytes_read);
                       ~~~     ^~~~~~~~~~~~~~~~~
                       %llu
4 errors generated.

local environment to compile is

$ uname -a; g++ --version
Darwin junyoung.local 13.0.0 Darwin Kernel Version 13.0.0: Thu Sep 19 22:22:27 PDT 2013; root:xnu-2422.1.72~6/RELEASE_X86_64 x86_64
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin13.0.0
Thread model: posix

@igorcanadi
Copy link
Collaborator

Tnx @junyoungKim . I have pushed the portable patch 249e736

Let me know if you have any more problems :)

@igorcanadi igorcanadi closed this Dec 12, 2013
igorcanadi added a commit that referenced this pull request May 14, 2014
Summary: Cleaned up compaction logging a little bit. Now file sizes are easier to read. Also, removed the trailing space.

Test Plan:
verified that i'm happy with logging output:

        files_size[#33(seq=101,sz=98KB,0) #31(seq=81,sz=159KB,0) #26(seq=0,sz=637KB,0)]

Reviewers: sdong, haobo, dhruba

Reviewed By: haobo

CC: leveldb

Differential Revision: https://reviews.facebook.net/D18549
DorianZheng pushed a commit to DorianZheng/rocksdb that referenced this pull request Sep 5, 2018
spetrunia pushed a commit to spetrunia/rocksdb that referenced this pull request Jun 19, 2019
Refactored AWS Kinesis-based cloud WAL
acelyc111 added a commit to pegasus-kv/rocksdb that referenced this pull request Jul 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants