title: Compiling Boost 1.54 XCode5 for device - fatal error: error in backend: symbol '___umodsi3' can not be undefined in a subtraction expression
body: <p>I have been able to successfully compile boost 1.54 for the iOS 7.0 simulator using XCode 5, but when trying to compile for device getting this strange clang failure:</p>
  
  <p>darwin.compile.c++ bin.v2/libs/atomic/build/darwin-7.0~iphone/release/architecture-arm/link-static/macosx-version-iphone-7.0/target-os-iphone/threading-multi/lockpool.o
  <strong>fatal error: error in backend: symbol '___umodsi3' can not be undefined in a subtraction expression</strong>
  clang: error: clang frontend command failed with exit code 70 (use -v to see invocation)
  Apple LLVM version 5.0 (clang-500.2.76) (based on LLVM 3.3svn)
  Target: arm-apple-darwin12.5.0
  Thread model: posix</p>
  
  <p>Here are my user-config.jam settings:</p>
  
  <pre><code>using clang : : : &lt;cxxflags&gt;"-std=c++11 -stdlib=libc++" &lt;linkflags&gt;"-stdlib=libc++" ;
  
  using darwin : 7.0~iphone
     : /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++
     : &lt;striper&gt; &lt;root&gt;/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer
       &lt;compileflags&gt;"-arch armv7"
       &lt;compileflags&gt;"-arch armv7s"
       &lt;compileflags&gt;-mthumb
       &lt;compileflags&gt;-fvisibility=hidden
       &lt;compileflags&gt;-fvisibility-inlines-hidden
       &lt;compileflags&gt;-std=c++11
       &lt;compileflags&gt;-stdlib=libc++
       &lt;compileflags&gt;-miphoneos-version-min=5.1
       &lt;compileflags&gt;-D_LITTLE_ENDIAN
       &lt;compileflags&gt;"-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk"
     : &lt;architecture&gt;arm &lt;target-os&gt;iphone
     ;
  
  using darwin : 7.0~iphonesim
     : /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++
     : &lt;striper&gt; &lt;root&gt;/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer
       &lt;compileflags&gt;"-arch i386"
       &lt;compileflags&gt;-fvisibility=hidden
       &lt;compileflags&gt;-fvisibility-inlines-hidden
       &lt;compileflags&gt;-std=c++11
       &lt;compileflags&gt;-stdlib=libc++
       &lt;compileflags&gt;-miphoneos-version-min=5.1
       &lt;compileflags&gt;-D_LITTLE_ENDIAN
       &lt;compileflags&gt;"-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk"
     : &lt;architecture&gt;x86 &lt;target-os&gt;iphone
     ;
  </code></pre>
  
  <p>Detailed steps to reproduce:</p>
  
  <pre><code>1. Download and extract the latest sources for boost 1.54
  2. Create a user-config.jam in user's home directory (w text above).
  3. Run ./bootstrap.sh in the boost directory
  4. Run
  </code></pre>
  
  <pre>
  ./b2  toolset=darwin-7.0~iphone architecture=arm target-os=iphone macosx-version=iphone-7.0 threading=multi linkflags=-stdlib=libc++ define=_LITTLE_ENDIAN link=static install
  </pre>
  
  <p>This will result in the error above.</p>
  
  <p>For comparison, when compiling for the simulator with the following line:</p>
  
  <pre>
  ./b2 toolset=darwin-7.0~iphonesim architecture=x86 target-os=iphone macosx-version=iphone-7.0 threading=multi linkflags=-stdlib=libc++ link=static install
  </pre>
  
  <p>This works fine and correctly generates the boost libraries for use with the simulator.</p>
  
  <p>Would anyone have a suggestion as to what could be causing this? Is it a clang compiler problem or am I using the device compile incorrectly? I have been able to compile for device with XCode 4.x with no problem previously...</p>
  
  <p>Thanks!
  Daniel</p>