Note that there are some explanatory texts on larger screens.

plurals
  1. POBuilding a Python extension with bjam (Boost.Build) on Mac OS X
    text
    copied!<p>So far as I can tell what happens is this:</p> <ul> <li>In <code>python.jam</code>, it works out which version of Python I am using and which library directories to look in;</li> <li>It adds <code>-Wl-R</code> arguments to the <code>g++</code> command line to include those directories;</li> <li>The <code>ld</code> command complains that it does not have a <code>-R</code> option.</li> </ul> <p>So either (a) I have a defective version of <code>ld</code>, or (b) I need to tell bjam that it needs to use a different option (<code>-rpath</code> perhaps?) or that this option is not required.</p> <p>I must be missing something—I am surely not the first person in history to try to build a Python extension with Boost on Mac OS X—but I can’t figure out where to look next. Any hints?</p> <p>Update:</p> <p>The command I am using is</p> <pre><code>bjam </code></pre> <p>If I do <code>bjam --version</code>, I get </p> <pre><code>Boost.Build V2 (Milestone 12) Boost.Jam 03.1.18 </code></pre> <p>The toolset used is whatever the default toolset is on Mac OS X.</p> <p>The compiler is the default compiler on Mac OS X (with the developer tools installed), which is GCC version ‘i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5664)’.</p> <p>The linker is the default linker on Mac OS X, which is called <code>ld</code> or <code>ld64</code>, but which does not have the <code>-R</code> option that GNU <code>ld</code> has, so I assume it is a special version designed to allow for Mac OS X’s concept of frameworks or whatever. It does not have a <code>--version</code> option.</p> <p>There is a <code>Jamfile</code>, which goes like this:</p> <pre><code>import python ; python-extension _optimor : bill_python.cpp bill_record_python.cpp .. etc ... : &lt;cxxflags&gt;-fPIC ... etc ... &lt;variant&gt;debug:&lt;define&gt;DEBUG &lt;include&gt;/usr/include/python2.6 &lt;include&gt;../ ; </code></pre> <p>It builds OK on Ububtu GNU/Linux.</p> <p>I am not interested in Boost or <code>bjam</code> per se; my only requirement to compile this extension so I can get on with developing the system of which this extension is a small but important part. </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload