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

Builds fail on musl systems #2339

Open
sin-ack opened this issue Nov 14, 2024 · 0 comments
Open

Builds fail on musl systems #2339

sin-ack opened this issue Nov 14, 2024 · 0 comments

Comments

@sin-ack
Copy link

sin-ack commented Nov 14, 2024

Commit 1e145f2 accidentally closed #2167, but the issue is not fixed. I still get the following error when building Folly on a Musl system (Gentoo Musl in my case):

FAILED: CMakeFiles/folly_base.dir/folly/io/RecordIO.cpp.o 
/usr/bin/x86_64-pc-linux-musl-g++ -DBOOST_ATOMIC_DYN_LINK -DBOOST_ATOMIC_NO_LIB -DBOOST_CONTEXT_DYN_LINK -DBOOST_CONTEXT_NO_LIB -DBOOST_FILESYSTEM_DYN_LINK -DBOOST_FILESYSTEM_NO_LIB -DBOOST_PROGRAM_OPTIONS_DYN_LINK -DBOOST_PROGRAM_OPTIONS_NO_LIB -DBOOST_REGEX_DYN_LINK -DBOOST_REGEX_NO_LIB -DBOOST_SYSTEM_DYN_LINK -DBOOST_SYSTEM_NO_LIB -DBOOST_THREAD_DYN_LINK -DBOOST_THREAD_NO_LIB -DFMT_SHARED -DFOLLY_XLOG_STRIP_PREFIXES=\"/var/tmp/portage/dev-cpp/folly-2024.11.04.00/work/folly-2024.11.04.00:/var/tmp/portage/dev-cpp/folly-2024.11.04.00/work/folly-2024.11.04.00_build\" -DGFLAGS_IS_A_DLL=0 -D_GNU_SOURCE -D_REENTRANT -I/var/tmp/portage/dev-cpp/folly-2024.11.04.00/work/folly-2024.11.04.00 -I/var/tmp/portage/dev-cpp/folly-2024.11.04.00/work/folly-2024.11.04.00_build -I/usr/include/libiberty  -O2 -pipe -std=gnu++17 -fPIC -fcoroutines -g -finput-charset=UTF-8 -fsigned-char -Wall -Wno-deprecated -Wno-deprecated-declarations -Wno-sign-compare -Wno-unused -Wuninitialized -Wunused-label -Wunused-result -Wshadow-compatible-local -Wno-noexcept-type -faligned-new -fopenmp -MD -MT CMakeFiles/folly_base.dir/folly/io/RecordIO.cpp.o -MF CMakeFiles/folly_base.dir/folly/io/RecordIO.cpp.o.d -o CMakeFiles/folly_base.dir/folly/io/RecordIO.cpp.o -c /var/tmp/portage/dev-cpp/folly-2024.11.04.00/work/folly-2024.11.04.00/folly/io/RecordIO.cpp
In file included from /var/tmp/portage/dev-cpp/folly-2024.11.04.00/work/folly-2024.11.04.00/folly/io/RecordIO.h:36,
                 from /var/tmp/portage/dev-cpp/folly-2024.11.04.00/work/folly-2024.11.04.00/folly/io/RecordIO.cpp:17:
/var/tmp/portage/dev-cpp/folly-2024.11.04.00/work/folly-2024.11.04.00/folly/system/MemoryMapping.h:100:5: error: 'off64_t' does not name a type; did you mean 'off_t'?
  100 |     off64_t pageSize = 0;
      |     ^~~~~~~
      |     off_t
/var/tmp/portage/dev-cpp/folly-2024.11.04.00/work/folly-2024.11.04.00/folly/system/MemoryMapping.h:144:32: error: 'off64_t' has not been declared
  144 |   MemoryMapping(AnonymousType, off64_t length, Options options = Options());
      |                                ^~~~~~~
/var/tmp/portage/dev-cpp/folly-2024.11.04.00/work/folly-2024.11.04.00/folly/system/MemoryMapping.h:148:7: error: 'off64_t' has not been declared
  148 |       off64_t offset = 0,
      |       ^~~~~~~
/var/tmp/portage/dev-cpp/folly-2024.11.04.00/work/folly-2024.11.04.00/folly/system/MemoryMapping.h:149:7: error: 'off64_t' has not been declared
  149 |       off64_t length = -1,
      |       ^~~~~~~
/var/tmp/portage/dev-cpp/folly-2024.11.04.00/work/folly-2024.11.04.00/folly/system/MemoryMapping.h:154:7: error: 'off64_t' has not been declared
  154 |       off64_t offset = 0,
      |       ^~~~~~~
/var/tmp/portage/dev-cpp/folly-2024.11.04.00/work/folly-2024.11.04.00/folly/system/MemoryMapping.h:155:7: error: 'off64_t' has not been declared
  155 |       off64_t length = -1,
      |       ^~~~~~~
/var/tmp/portage/dev-cpp/folly-2024.11.04.00/work/folly-2024.11.04.00/folly/system/MemoryMapping.h:160:7: error: 'off64_t' has not been declared
  160 |       off64_t offset = 0,
      |       ^~~~~~~
/var/tmp/portage/dev-cpp/folly-2024.11.04.00/work/folly-2024.11.04.00/folly/system/MemoryMapping.h:161:7: error: 'off64_t' has not been declared
  161 |       off64_t length = -1,
      |       ^~~~~~~
/var/tmp/portage/dev-cpp/folly-2024.11.04.00/work/folly-2024.11.04.00/folly/system/MemoryMapping.h:250:13: error: 'off64_t' has not been declared
  250 |   void init(off64_t offset, off64_t length);
      |             ^~~~~~~
/var/tmp/portage/dev-cpp/folly-2024.11.04.00/work/folly-2024.11.04.00/folly/system/MemoryMapping.h:250:29: error: 'off64_t' has not been declared
  250 |   void init(off64_t offset, off64_t length);
      |                             ^~~~~~~
/var/tmp/portage/dev-cpp/folly-2024.11.04.00/work/folly-2024.11.04.00/folly/system/MemoryMapping.h:254:3: error: 'off64_t' does not name a type; did you mean 'off_t'?
  254 |   off64_t mapLength_ = 0;
      |   ^~~~~~~
      |   off_t
/var/tmp/portage/dev-cpp/folly-2024.11.04.00/work/folly-2024.11.04.00/folly/system/MemoryMapping.h: In member function 'folly::MemoryMapping::Options& folly::MemoryMapping::Options::setPageSize(off_t)':
/var/tmp/portage/dev-cpp/folly-2024.11.04.00/work/folly-2024.11.04.00/folly/system/MemoryMapping.h:73:7: error: 'pageSize' was not declared in this scope; did you mean 'setPageSize'?
   73 |       pageSize = v;
      |       ^~~~~~~~
      |       setPageSize

Relevant commit from Abseil suggesting off_t should be used instead: abseil/abseil-cpp@4500c2f

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

1 participant