Skip to content

Compliation error on OS X: linux/futex.h: No such file or directory #50

Closed

Description

@cypres

After 79c25e6 folly can no longer compile on OS X.

Fails with detail/Futex.h:24:25: fatal error: linux/futex.h: No such file or directory.

Prior to 79c25e6 it would compile.

Reproduce (tested on 10.9.2 but should fail on others too).

Dependencies (if you don't have them)

brew install boost glog gflags jemalloc scons cmake autoconf automake libtool gcc49 
git clone https://code.google.com/p/double-conversion/
cd double-conversion/
cmake .
make
make install

Folly:

git clone https://github.com/facebook/folly.git folly
cd folly/folly/test
wget http://googletest.googlecode.com/files/gtest-1.6.0.zip
unzip gtest-1.6.0.zip
cd ../
autoreconf --install
CXX="/usr/local/bin/g++-4.9" CC="/usr/local/bin/gcc-4.9" ./configure
make

Error:

libtool: compile:  /usr/local/bin/g++-4.9 -DHAVE_CONFIG_H -I../. -I./io -I./test -pthread -I/usr/local/include -std=gnu++0x -g -O2 -MT json.lo -MD -MP -MF .deps/json.Tpo -c json.cpp -o json.o >/dev/null 2>&1
mv -f .deps/json.Tpo .deps/json.Plo
/bin/sh ./libtool  --tag=CXX   --mode=compile /usr/local/bin/g++-4.9 -DHAVE_CONFIG_H   -I../. -I./io -I./test -pthread -I/usr/local/include   -std=gnu++0x -g -O2 -MT MemoryIdler.lo -MD -MP -MF .deps/MemoryIdler.Tpo -c -o MemoryIdler.lo `test -f 'detail/MemoryIdler.cpp' || echo './'`detail/MemoryIdler.cpp
libtool: compile:  /usr/local/bin/g++-4.9 -DHAVE_CONFIG_H -I../. -I./io -I./test -pthread -I/usr/local/include -std=gnu++0x -g -O2 -MT MemoryIdler.lo -MD -MP -MF .deps/MemoryIdler.Tpo -c detail/MemoryIdler.cpp  -fno-common -DPIC -o .libs/MemoryIdler.o
In file included from detail/MemoryIdler.h:25:0,
                 from detail/MemoryIdler.cpp:17:
detail/Futex.h:24:25: fatal error: linux/futex.h: No such file or directory
 #include <linux/futex.h>
                         ^
compilation terminated.
make[2]: *** [MemoryIdler.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Checking out 6d89f3d resolves the above compile issue, and with a few additional fixes (https://gist.github.com/duedal/7887803) the entire lib can compile.

Activity

  1. zach-yu commented on Sep 12, 2014

    @zach-yu

    I encountered the same issue. if I checkout 6d89f3d and compile, there seems to be a configure issue, which said that it can not find the double_conversion header file.

  2. ghost closed this as completedon May 7, 2015
  3. added a commit that references this issue on Mar 4, 2019
  4. added a commit that references this issue on Jun 3, 2020
  5. added a commit that references this issue on Mar 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions