I found an open bug which appears to have been causing this problem.  See that ticket for the proposed solution:
https://svn.boost.org/trac/boost/ticket/4594#comment:11

From: Mark Schisler <mark.schisler@cph.org>
Date: Thu, 7 Jul 2011 19:19:15 -0400
To: "boost-users@lists.boost.org" <boost-users@lists.boost.org>
Subject: Boost in X-Code 4

When compiling for the iPhone simulator with the following command:


./bjam --prefix=/Downloads/boost_install/ toolset=darwin architecture=x86 target-os=iphone macosx-version=iphone-${SDK_VERSION} --with-date_time --with-regex --with-thread link=static install


And the following user-config.jam:


  using darwin : 4.2.1~iphone

     : /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-g++-4.2

     : <striper>

       <compileflags>"-arch armv7"

       <compileflags>-mthumb

       <compileflags>-D_LITTLE_ENDIAN

     : <architecture>arm <target-os>iphone

     ;

  

  using darwin : 4.2.1~iphonesim

     : /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-g++-4.2

     : <striper>

       <compileflags>"-arch i386"

       <compileflags>-D_LITTLE_ENDIAN

     : <architecture>x86 <target-os>iphone

     ;

  

  using darwin : 4.2.1~darwin

     : /Developer/usr/bin/gcc

     : <striper>

       <compileflags>"-arch i386"

       <compileflags>"-arch x86_64"

     : <architecture>x86 <target-os>darwin


I receive the following linker error when I attempt to link against the reg ex library:


ld: bad codegen, pointer diff in boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::runtime_error> >::rethrow() constto global weak symbol vtable for boost::exceptionfor architecture i386

collect2: ld returned 1 exit status

Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/g++-4.2 failed with exit code 1


I've noticed that many people have managed to get around this error by hiding boost's symbols, however, that doesn't seem to be the preferred approach as it requires hiding all of my projects symbols, which will prevent me from being able to handle exceptions according to Apple docs:


>  If your symbol uses runtime type identification (RTTI) information,

>  exceptions, or dynamic casts for an object that is defined in another

>  library, your symbol must be visible if it expects to handle requests 

>  initiated by the other library. For example, if you define a catch 

>  handler for a type in the C++ standard library, and you want to catch 

>  exceptions of that type thrown by the C++ standard library, you must

>  make sure that your typeinfo object is visible. 


Is there another approach to fixing this linker error?  


Thanks,

Mark