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

compile error #264

Closed
fredchenbj opened this issue Jan 18, 2019 · 1 comment
Closed

compile error #264

fredchenbj opened this issue Jan 18, 2019 · 1 comment

Comments

@fredchenbj
Copy link
Member

when compile tikv branch master(6d60e7c),compile error occurs:

--- stderr
/home/worker/.cargo/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/1317e2e/librocksdb_sys/rocksdb/utilities/titandb/options.cc: In member function ‘std::string rocksdb::titandb::TitanCFOptions::ToString() const’:
/home/worker/.cargo/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/1317e2e/librocksdb_sys/rocksdb/utilities/titandb/options.cc:14:50: error: expected ‘)’ before ‘PRIu64’
snprintf(buf, sizeof(buf), "min_blob_size = %" PRIu64 "\n", min_blob_size);
...
/home/worker/.cargo/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/1317e2e/librocksdb_sys/rocksdb/utilities/titandb/version_builder.cc: In member function ‘void rocksdb::titandb::VersionBuilder::Builder::AddFile(const std::shared_ptrrocksdb::titandb::BlobFileMeta&)’:
/home/worker/.cargo/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/1317e2e/librocksdb_sys/rocksdb/utilities/titandb/version_builder.cc:14:35: error: expected ‘)’ before ‘PRIu64’
fprintf(stderr, "blob file %" PRIu64 " has been added before\n", number);

Then, I modify two files: librocksdb_sys/rocksdb/utilities/titandb/options.cc and librocksdb_sys/rocksdb/utilities/titandb/version_builder.cc, add Macro #define __STDC_FORMAT_MACROS before #include <inttypes.h>, it works.

Compile environment is below:

  • kernel: 3.10.0-693.1.1.el7.x86_64
  • linux: CentOS Linux release 7.2.1511 (Core)
  • gcc: gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-11)
@DorianZheng
Copy link

@fredchenbj Thanks for the issue. I've filed a PR to fix it.
#265

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

No branches or pull requests

2 participants