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 using glibc 2.25 #2152

Closed
choleraehyq opened this issue Apr 13, 2017 · 0 comments
Closed

Compile error using glibc 2.25 #2152

choleraehyq opened this issue Apr 13, 2017 · 0 comments
Assignees

Comments

@choleraehyq
Copy link

$ make check
Makefile:104: Warning: Compiling in debug mode. Don't use the resulting binary in production
  GEN      util/build_version.cc
Makefile:104: Warning: Compiling in debug mode. Don't use the resulting binary in production
  GEN      util/build_version.cc
  CC       cache/clock_cache.o
  CC       cache/lru_cache.o
  CC       cache/sharded_cache.o
  CC       db/builder.o
  CC       db/c.o
  CC       db/column_family.o
  CC       db/compacted_db_impl.o
  CC       db/compaction.o
  CC       db/compaction_iterator.o
  CC       db/compaction_job.o
  CC       db/compaction_picker.o
  CC       db/compaction_picker_universal.o
  CC       db/convenience.o
  CC       db/db_filesnapshot.o
  CC       db/db_impl.o
  CC       db/db_impl_write.o
  CC       db/db_impl_compaction_flush.o
  CC       db/db_impl_files.o
  CC       db/db_impl_open.o
  CC       db/db_impl_debug.o
  CC       db/db_impl_experimental.o
  CC       db/db_impl_readonly.o
  CC       db/db_info_dumper.o
  CC       db/db_iter.o
  CC       db/dbformat.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/internal_stats.o
  CC       db/log_reader.o
  CC       db/log_writer.o
  CC       db/managed_iterator.o
  CC       db/memtable.o
  CC       db/memtable_list.o
  CC       db/merge_helper.o
  CC       db/merge_operator.o
  CC       db/range_del_aggregator.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/version_builder.o
  CC       db/version_edit.o
  CC       db/version_set.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_hdfs.o
  CC       env/env_posix.o
  CC       env/io_posix.o
env/io_posix.cc:57:13: error: In the GNU C Library, "major" is defined
 by <sys/sysmacros.h>. For historical compatibility, it is
 currently defined by <sys/types.h> as well, but we plan to
 remove this soon. To use "major", include <sys/sysmacros.h>
 directly. If you did not intend to use a system-defined macro
 "major", you should undefine it after including <sys/types.h>. [-Werror]
   if (major(buf.st_dev) == 0) {
             ^~~~~~~~~~~~~~~~~~~                                                                                                                                                                                                                                                                                                                                                     
env/io_posix.cc:67:13: error: In the GNU C Library, "major" is defined
 by <sys/sysmacros.h>. For historical compatibility, it is
 currently defined by <sys/types.h> as well, but we plan to
 remove this soon. To use "major", include <sys/sysmacros.h>
 directly. If you did not intend to use a system-defined macro
 "major", you should undefine it after including <sys/types.h>. [-Werror]
   snprintf(path, kBufferSize, "/sys/dev/block/%u:%u", major(buf.st_dev),
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                                                                                                                                                                                                                                                                                            
env/io_posix.cc:68:13: error: In the GNU C Library, "minor" is defined
 by <sys/sysmacros.h>. For historical compatibility, it is
 currently defined by <sys/types.h> as well, but we plan to
 remove this soon. To use "minor", include <sys/sysmacros.h>
 directly. If you did not intend to use a system-defined macro
 "minor", you should undefine it after including <sys/types.h>. [-Werror]
            minor(buf.st_dev));
             ^~~~~~~~~~~~~~~~~~                                                                                                                                                                                                                                                                                                                                                      
cc1plus: all warnings being treated as errors
make: *** [Makefile:1589: env/io_posix.o] Error 1

gcc 6.3.1, glibc 2.25, arch linux, kernel 4.10.9

facebook-github-bot pushed a commit that referenced this issue Apr 26, 2017
Summary:
#2152
Closes #2208

Differential Revision: D4945577

Pulled By: lightmark

fbshipit-source-id: 4e679150f2c9443d3be0b6008b26b65fabbda75a
pdillinger pushed a commit that referenced this issue Feb 7, 2022
Summary:
#2152
Closes #2208

Differential Revision: D4945577

Pulled By: lightmark

fbshipit-source-id: 4e679150f2c9443d3be0b6008b26b65fabbda75a
pdillinger pushed a commit that referenced this issue Feb 7, 2022
Summary:
#2152
Closes #2208

Differential Revision: D4945577

Pulled By: lightmark

fbshipit-source-id: 4e679150f2c9443d3be0b6008b26b65fabbda75a
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