Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8852713
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T13:28:13+00:00 2026-06-14T13:28:13+00:00

I cannot compile boost with clang 3.1 on Mac os x 10.8.2. This is

  • 0

I cannot compile boost with clang 3.1 on Mac os x 10.8.2.

This is what I did:

./bootstrap.sh --with-toolset=clang
./b2 toolset=clang cxxflags="-std=c++11 -stdlib=libc++" linkflags="-stdlib=libc++"

I also tried without chrono, test, wave and signals.
I tried a user-config.jam with

using clang-darwin

This is the error I have for almost every file:

/boost/config/select_stdlib_config.hpp:18:12: fatal error: 'cstddef' file not found

It is kind of similar to How to compile/link Boost with clang++/libc++?

Thank you 🙂

Update:
I do have the latest Xcode 4.5.2 with the command line tools installed.

Here is part of the console output:

Kikohs:trunk kikohs$ ./b2 toolset=clang cxxflags="-std=c++11 -stdlib=libc++" linkflags="-stdlib=libc++"
Performing configuration checks

- 32-bit                   : no
- 64-bit                   : yes
- x86                      : yes
- has_icu builds           : no
warning: Graph library does not contain MPI-based parallel components.
note: to enable them, add "using mpi ;" to your user-config.jam
    - gcc visibility           : yes
    - long double support      : no
warning: skipping optional Message Passing Interface (MPI) library.
note: to enable MPI support, add "using mpi ;" to user-config.jam.
note: to suppress this message, pass "--without-mpi" to bjam.
note: otherwise, you can safely ignore this message.

Building the Boost C++ Libraries.

- iconv (libc)             : no
- iconv (separate)         : yes
- icu                      : no
- icu (lib64)              : no

Component configuration:

- atomic                   : building
- chrono                   : building
- context                  : building
- date_time                : building
- exception                : building
- filesystem               : building
- graph                    : building
- graph_parallel           : building
- iostreams                : building
- locale                   : building
- math                     : building
- mpi                      : building
- program_options          : building
- python                   : building
- random                   : building
- regex                    : building
- serialization            : building
- signals                  : building
- system                   : building
- test                     : building
- thread                   : building
- timer                    : building
- wave                     : building

...patience...
...patience...
...patience...
...patience...
...found 8672 targets...
...updating 1127 targets...
common.mkdir bin.v2/libs/atomic
common.mkdir bin.v2/libs/atomic/build
common.mkdir bin.v2/libs/atomic/build/clang-darwin-4.2.1
common.mkdir bin.v2/libs/atomic/build/clang-darwin-4.2.1/debug
clang-darwin.compile.c++ bin.v2/libs/atomic/build/clang-darwin-4.2.1/debug/lockpool.o
In file included from libs/atomic/src/lockpool.cpp:1:
./boost/atomic.hpp:10:10: fatal error: 'cstddef' file not found
#include <cstddef>
     ^
1 error generated.

"clang++" -x c++ -O0 -g -std=c++11 -stdlib=libc++ -O0 -fno-inline -Wall -g -DBOOST_ALL_NO_LIB=1 -DBOOST_ATOMIC_DYN_LINK=1 -DBOOST_ATOMIC_SOURCE -I"." -c -o "bin.v2/libs/atomic/build/clang-darwin-4.2.1/debug/lockpool.o" "libs/atomic/src/lockpool.cpp"
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T13:28:15+00:00Added an answer on June 14, 2026 at 1:28 pm

    I finally fixed my problem after many hours.

    Homebrew was messing with my path and for some reason my clang could not find the libc++ headers.

    There is a bug is boost 1.52.

    See Boost numeric limits bug

    I had to edit the file :

    boost/config/stdlib/libcpp.hpp
    

    and patch it:

    #if _LIBCPP_VERSION < 1002 
    #   define BOOST_NO_CXX11_NUMERIC_LIMITS 
    #endif 
    

    Now boost is building properly …

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on a platform with a gcc compiler however boost cannot compile
So this is official Boost PropertyTree example , I try to compile it on
This wont compile for me: int i = 1; std::function<void(std::vector<int>&)> execute = std::bind(append<int>, _1,
I have this problem with boost::thread that i cannot solve. I have a classX.h
I cannot compile python in pydev in eclipse. I get the following error: unable
Today, after Slackware 13.37 installation, i've got the problem: default GCC 4.5.2 cannot compile
The following code throws an compile-time error like Cannot convert type 'string' to 'int'
The following does not compile, and I cannot for the life of me see
The following code does not compile, saying error C2248: 'A::getMe' : cannot access private
In Java, constructors cannot be recursive. Compile time error: recursive constructor invocation. Let's assume

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.