This file is indexed.

/usr/share/doc/rdkit/html/Install.html is in rdkit-doc 201503-3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>Installation &mdash; The RDKit 2015.03.1 documentation</title>
    
    <link rel="stylesheet" href="_static/sphinxdoc.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    './',
        VERSION:     '2015.03.1',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/underscore.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <link rel="top" title="The RDKit 2015.03.1 documentation" href="index.html" />
    <link rel="next" title="Getting Started with the RDKit in Python" href="GettingStartedInPython.html" />
    <link rel="prev" title="An overview of the RDKit" href="Overview.html" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="GettingStartedInPython.html" title="Getting Started with the RDKit in Python"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="Overview.html" title="An overview of the RDKit"
             accesskey="P">previous</a> |</li>
        <li><a href="index.html">The RDKit 2015.03.1 documentation</a> &raquo;</li> 
      </ul>
    </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
            <p class="logo"><a href="index.html">
              <img class="logo" src="_static/logo.png" alt="Logo"/>
            </a></p>
<h3><a href="index.html">Table Of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="Overview.html">An overview of the RDKit</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="">Installation</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#linux-and-the-mac">Linux and the Mac</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#installation-from-repositories">Installation from repositories</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#ubuntu-12-04-and-later">Ubuntu 12.04 and later</a></li>
<li class="toctree-l4"><a class="reference internal" href="#fedora-centos-and-rhel">Fedora, CentOS, and RHEL</a></li>
<li class="toctree-l4"><a class="reference internal" href="#macos">MacOS</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="#building-from-source">Building from Source</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#prerequisites">Prerequisites</a></li>
<li class="toctree-l4"><a class="reference internal" href="#building-the-rdkit">Building the RDKit</a></li>
<li class="toctree-l4"><a class="reference internal" href="#testing-the-build-optional-but-recommended">Testing the build (optional, but recommended)</a></li>
<li class="toctree-l4"><a class="reference internal" href="#advanced">Advanced</a></li>
<li class="toctree-l4"><a class="reference internal" href="#frequently-encountered-problems">Frequently Encountered Problems</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#windows">Windows</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#id1">Prerequisites</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#recommended-extras">Recommended extras</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="#installation-of-rdkit-binaries">Installation of RDKit binaries</a></li>
<li class="toctree-l3"><a class="reference internal" href="#installation-from-source">Installation from source</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#extra-software-to-install">Extra software to install</a></li>
<li class="toctree-l4"><a class="reference internal" href="#setup-and-preparation">Setup and Preparation</a></li>
<li class="toctree-l4"><a class="reference internal" href="#building-from-the-command-line-recommended">Building from the command line (recommended)</a></li>
<li class="toctree-l4"><a class="reference internal" href="#building-the-code-using-guis-not-recommended">Building the Code Using GUIs (not recommended)</a></li>
<li class="toctree-l4"><a class="reference internal" href="#id2">Testing the Build (optional, but recommended)</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="GettingStartedInPython.html">Getting Started with the RDKit in Python</a></li>
<li class="toctree-l1"><a class="reference internal" href="RDKit_Book.html">The RDKit Book</a></li>
<li class="toctree-l1"><a class="reference internal" href="Cookbook.html">RDKit Cookbook</a></li>
<li class="toctree-l1"><a class="reference internal" href="Cartridge.html">The RDKit database cartridge</a></li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="Overview.html"
                        title="previous chapter">An overview of the RDKit</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="GettingStartedInPython.html"
                        title="next chapter">Getting Started with the RDKit in Python</a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="_sources/Install.txt"
           rel="nofollow">Show Source</a></li>
  </ul>
        </div>
      </div>

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="installation">
<h1>Installation<a class="headerlink" href="#installation" title="Permalink to this headline"></a></h1>
<p>Below a number of installation recipies is presented, with varying degree of
complexity.</p>
<div class="section" id="linux-and-the-mac">
<h2>Linux and the Mac<a class="headerlink" href="#linux-and-the-mac" title="Permalink to this headline"></a></h2>
<div class="section" id="installation-from-repositories">
<h3>Installation from repositories<a class="headerlink" href="#installation-from-repositories" title="Permalink to this headline"></a></h3>
<div class="section" id="ubuntu-12-04-and-later">
<h4>Ubuntu 12.04 and later<a class="headerlink" href="#ubuntu-12-04-and-later" title="Permalink to this headline"></a></h4>
<p>Thanks to the efforts of the Debichem team, RDKit is available via the Ubuntu repositories.
To install:</p>
<div class="highlight-python"><div class="highlight"><pre>sudo apt-get install python-rdkit librdkit1 rdkit-data
</pre></div>
</div>
</div>
<div class="section" id="fedora-centos-and-rhel">
<h4>Fedora, CentOS, and RHEL<a class="headerlink" href="#fedora-centos-and-rhel" title="Permalink to this headline"></a></h4>
<p>Gianluca Sforna creates binary RPMs that can be found here: &lt;<a class="reference external" href="http://giallu.fedorapeople.org/rdkit-20XX.XX/">http://giallu.fedorapeople.org/rdkit-20XX.XX/</a>&gt;_</p>
</div>
<div class="section" id="macos">
<h4>MacOS<a class="headerlink" href="#macos" title="Permalink to this headline"></a></h4>
<p>Eddie Cao has produced a homebrew formula that can be used to easily build the RDKit &lt;<a class="reference external" href="https://github.com/rdkit/homebrew-rdkit">https://github.com/rdkit/homebrew-rdkit</a>&gt;_</p>
</div>
</div>
<div class="section" id="building-from-source">
<h3>Building from Source<a class="headerlink" href="#building-from-source" title="Permalink to this headline"></a></h3>
<div class="section" id="prerequisites">
<h4>Prerequisites<a class="headerlink" href="#prerequisites" title="Permalink to this headline"></a></h4>
<div class="section" id="installing-prerequisites-as-packages">
<h5>Installing prerequisites as packages<a class="headerlink" href="#installing-prerequisites-as-packages" title="Permalink to this headline"></a></h5>
<div class="section" id="ubuntu-and-other-debian-derived-systems">
<h6>Ubuntu and other debian-derived systems<a class="headerlink" href="#ubuntu-and-other-debian-derived-systems" title="Permalink to this headline"></a></h6>
<p>Install the following packages using apt-get:</p>
<div class="highlight-python"><div class="highlight"><pre>flex bison build-essential python-numpy cmake python-dev sqlite3 libsqlite3-dev
libboost-dev libboost-python-dev libboost-regex-dev
</pre></div>
</div>
</div>
<div class="section" id="fedora-centos-5-7-and-rhel">
<h6>Fedora, CentOS (5.7+), and RHEL<a class="headerlink" href="#fedora-centos-5-7-and-rhel" title="Permalink to this headline"></a></h6>
<p>Install the following packages using yum:</p>
<div class="highlight-python"><div class="highlight"><pre>cmake tk-devel readline-devel zlib-devel bzip2-devel sqlite-devel @development-tools
</pre></div>
</div>
<p>Packages to install from source (not required on RHEL/CentOS 6.x):</p>
<blockquote>
<div><ul class="simple">
<li>python 2.7 : use ./configure CFLAGS=-fPIC &#8211;enable-unicode=ucs4 &#8211;enable-shared</li>
<li>numpy : do export LD_LIBRARY_PATH=&#8221;/usr/local/lib&#8221; before python setup.py install</li>
<li>boost 1.48.0 or later: do ./bootstrap.sh &#8211;with-libraries=python,regex; ./b2; ./b2 install</li>
</ul>
</div></blockquote>
</div>
<div class="section" id="older-versions-of-centos">
<h6>Older versions of CentOS<a class="headerlink" href="#older-versions-of-centos" title="Permalink to this headline"></a></h6>
<p>Here things are more difficult. Check this wiki page for
information: <a class="reference external" href="https://code.google.com/p/rdkit/wiki/BuildingOnCentOS">https://code.google.com/p/rdkit/wiki/BuildingOnCentOS</a></p>
</div>
</div>
<div class="section" id="installing-prerequisites-from-source">
<h5>Installing prerequisites from source<a class="headerlink" href="#installing-prerequisites-from-source" title="Permalink to this headline"></a></h5>
<blockquote>
<div><ul>
<li><p class="first">Required packages:</p>
<ul>
<li><p class="first">cmake. You need version 2.6 (or more recent). <a class="reference external" href="http://www.cmake.org">http://www.cmake.org</a> if your linux distribution doesn&#8217;t have an appropriate package.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">It seems that v2.8 is a better bet than v2.6. It might be worth compiling your own copy of v2.8 even if v2.6 is already installed.</p>
</div>
</li>
<li><p class="first">The following are required if you are planning on using the Python wrappers</p>
<blockquote>
<div><ul>
<li><p class="first">The python headers. This probably means that you need to install the python-dev package (or whatever it&#8217;s called) for your linux distribution.</p>
</li>
<li><p class="first">sqlite3. You also need the shared libraries. This may require that you install a sqlite3-dev package.</p>
</li>
<li><p class="first">You need to have numpy (<a class="reference external" href="http://www.scipy.org/NumPy">http://www.scipy.org/NumPy</a>) installed.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">for building with XCode4 on the MacOS – there seems to be a problem with the version of numpy that comes with XCode4. Please see below in the (see <a class="reference internal" href="#faq"><em>Frequently Encountered Problems</em></a>) section for a workaround.</p>
</div>
</li>
</ul>
</div></blockquote>
</li>
</ul>
</li>
<li><p class="first">Optional packages</p>
<ul class="simple">
<li>If you would like to install the RDKit InChI support (first available in the Q2 2011 release), follow the instructions in $RDBASE/External/INCHI-API to get a copy of the InChI source and put it in the appropriate place.</li>
</ul>
</li>
</ul>
</div></blockquote>
<div class="section" id="installing-boost">
<h6>Installing Boost<a class="headerlink" href="#installing-boost" title="Permalink to this headline"></a></h6>
<p>If your linux distribution has a boost-devel package including the python and regex libraries, you can use that and save yourself the steps below.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p>if you <em>do</em> have a version of the boost libraries pre-installed and you want to use your own version, be careful when you build the code. We&#8217;ve seen at least one example on a Fedora system where cmake compiled using a user-installed version of boost and then linked against the system version. This led to segmentation faults. There is a workaround for this below in the (see <a class="reference internal" href="#faq"><em>Frequently Encountered Problems</em></a>) section.</p>
<ul class="last">
<li><p class="first">download the boost source distribution from <a class="reference external" href="http://www.boost.org">the boost web site</a></p>
</li>
<li><p class="first">extract the source somewhere on your machine (e.g. <tt class="docutils literal"><span class="pre">/usr/local/src/boost_1_45_0</span></tt>)</p>
</li>
<li><p class="first">build the required boost libraries:</p>
<ul class="simple">
<li><tt class="docutils literal"><span class="pre">cd</span> <span class="pre">$BOOST</span></tt></li>
<li>If you want to use the python wrappers: <tt class="docutils literal"><span class="pre">./bootstrap.sh</span> <span class="pre">--with-libraries=python,regex</span></tt></li>
<li>If not using the python wrappers: <tt class="docutils literal"><span class="pre">./bootstrap.sh</span> <span class="pre">--with-libraries=regex</span></tt></li>
<li>Building on 32 bit systems: <tt class="docutils literal"><span class="pre">./b2</span> <span class="pre">install</span></tt></li>
<li>Building on 64 bit systems: <tt class="docutils literal"><span class="pre">./b2</span> <span class="pre">address-model=64</span> <span class="pre">cflags=-fPIC</span> <span class="pre">cxxflags=-fPIC</span> <span class="pre">install</span></tt></li>
</ul>
<p>If you have any problems with this step, check the boost <a class="reference external" href="http://www.boost.org/more/getting_started/unix-variants.html">installation instructions</a>.</p>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="section" id="building-the-rdkit">
<h4>Building the RDKit<a class="headerlink" href="#building-the-rdkit" title="Permalink to this headline"></a></h4>
<p>Fetch the source, here as tar.gz but you could use git as well:</p>
<div class="highlight-python"><div class="highlight"><pre>  wget http://downloads.sourceforge.net/project/rdkit/rdkit/QX_20XX/RDKit_20XX_XX_X.tgz

* Ensure that the prerequisites are installed
* environment variables:

  * RDBASE: the root directory of the RDKit distribution (e.g. ~/RDKit)
  * *Linux:* LD_LIBRARY_PATH: make sure it includes $RDBASE/lib and wherever the boost shared libraries were installed
  * *Mac:* DYLD_LIBRARY_PATH: make sure it includes $RDBASE/lib and wherever the boost shared libraries were installed
  * The following are required if you are planning on using the Python wrappers:
    * PYTHONPATH: make sure it includes $RDBASE
* Building:

  * cd to $RDBASE
  * ``mkdir build``
  * ``cd build``
  * ``cmake ..`` : See the section below on configuring the build if you need to specify a non-default version of python or if you have boost in a non-standard location
  * ``make`` : this builds all libraries, regression tests, and wrappers (by default).
  * ``make install``
</pre></div>
</div>
<p>See below for a list of <a class="reference internal" href="#faq"><em>Frequently Encountered Problems</em></a> and solutions.</p>
</div>
<div class="section" id="testing-the-build-optional-but-recommended">
<h4>Testing the build (optional, but recommended)<a class="headerlink" href="#testing-the-build-optional-but-recommended" title="Permalink to this headline"></a></h4>
<blockquote>
<div><ul class="simple">
<li>cd to $RDBASE/build and do <tt class="docutils literal"><span class="pre">ctest</span></tt></li>
<li>you&#8217;re done!</li>
</ul>
</div></blockquote>
</div>
<div class="section" id="advanced">
<h4>Advanced<a class="headerlink" href="#advanced" title="Permalink to this headline"></a></h4>
<div class="section" id="specifying-an-alternate-boost-installation">
<h5>Specifying an alternate Boost installation<a class="headerlink" href="#specifying-an-alternate-boost-installation" title="Permalink to this headline"></a></h5>
<p>You need to tell cmake where to find the boost libraries and header files:</p>
<p>If you have put boost in /opt/local, the cmake invocation would look like:</p>
<div class="highlight-python"><div class="highlight"><pre>cmake -DBOOST_ROOT=/opt/local ..
</pre></div>
</div>
</div>
<div class="section" id="specifying-an-alternate-python-installation">
<h5>Specifying an alternate Python installation<a class="headerlink" href="#specifying-an-alternate-python-installation" title="Permalink to this headline"></a></h5>
<p>You need to tell cmake where to find the python library it should link against and the python header files.</p>
<p>Here&#8217;s a sample command line:</p>
<div class="highlight-python"><div class="highlight"><pre>cmake -D PYTHON_LIBRARY=/usr/lib/python2.5/config/libpython2.5.a -D PYTHON_INCLUDE_DIR=/usr/include/python2.5/ -D PYTHON_EXECUTABLE=/usr/bin/python ..
</pre></div>
</div>
<p>The <tt class="docutils literal"><span class="pre">PYTHON_EXECUTABLE</span></tt> part is optional if the correct python is the first version in your PATH.</p>
</div>
<div class="section" id="disabling-the-python-wrappers">
<h5>Disabling the Python wrappers<a class="headerlink" href="#disabling-the-python-wrappers" title="Permalink to this headline"></a></h5>
<p>You can completely disable building of the python wrappers by setting the configuration variable RDK_BUILD_PYTHON_WRAPPERS to nil:</p>
<div class="highlight-python"><div class="highlight"><pre>cmake -D RDK_BUILD_PYTHON_WRAPPERS= ..
</pre></div>
</div>
</div>
<div class="section" id="building-the-java-wrappers">
<h5>Building the Java wrappers<a class="headerlink" href="#building-the-java-wrappers" title="Permalink to this headline"></a></h5>
<p><em>Additional Requirements</em></p>
<ul class="simple">
<li>SWIG v2.0.x: <a class="reference external" href="http://www.swig.org">http://www.swig.org</a></li>
<li>Junit: get a copy of the junit .jar file from <a class="reference external" href="https://github.com/KentBeck/junit/downloads">https://github.com/KentBeck/junit/downloads</a> and put it in the directory <tt class="docutils literal"><span class="pre">$RDBASE/External/java_lib</span></tt> (you will need to create the directory) and rename it to junit.jar.</li>
</ul>
<p><em>Building</em></p>
<blockquote>
<div><ul class="simple">
<li>When you invoke cmake add <tt class="docutils literal"><span class="pre">-D</span> <span class="pre">RDK_BUILD_SWIG_WRAPPERS=ON</span></tt> to the arguments. For example: <tt class="docutils literal"><span class="pre">cmake</span> <span class="pre">-D</span> <span class="pre">RDK_BUILD_SWIG_WRAPPERS=ON</span> <span class="pre">..</span></tt></li>
<li>Build and install normally using <cite>make</cite>. The directory <tt class="docutils literal"><span class="pre">$RDBASE/Code/JavaWrappers/gmwrapper</span></tt> will contain the three required files: libGraphMolWrap.so (libGraphMolWrap.jnilib on the Mac), org.RDKit.jar, and org.RDKitDoc.jar.</li>
</ul>
</div></blockquote>
<p><em>Using the wrappers</em></p>
<p>To use the wrappers, the three files need to be in the same directory, and that should be on your CLASSPATH and in the java.library.path. An example using jython:</p>
<div class="highlight-python"><div class="highlight"><pre>% CLASSPATH=$CLASSPATH:$RDBASE/Code/JavaWrappers/gmwrapper/org.RDKit.jar; jython -Djava.library.path=$RDBASE/Code/JavaWrappers/gmwrapper
Jython 2.2.1 on java1.6.0_20
Type &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information.
&gt;&gt;&gt; from org.RDKit import *
&gt;&gt;&gt; from java import lang
&gt;&gt;&gt; lang.System.loadLibrary(&#39;GraphMolWrap&#39;)
&gt;&gt;&gt; m = RWMol.MolFromSmiles(&#39;c1ccccc1&#39;)
&gt;&gt;&gt; m.getNumAtoms()
6L
</pre></div>
</div>
</div>
</div>
<div class="section" id="frequently-encountered-problems">
<span id="faq"></span><h4>Frequently Encountered Problems<a class="headerlink" href="#frequently-encountered-problems" title="Permalink to this headline"></a></h4>
<p>In each case I&#8217;ve replaced specific pieces of the path with <tt class="docutils literal"><span class="pre">...</span></tt>.</p>
<p><em>Problem:</em></p>
<div class="highlight-python"><div class="highlight"><pre>Linking CXX shared library libSLNParse.so
/usr/bin/ld: .../libboost_regex.a(cpp_regex_traits.o): relocation R_X86_64_32S against `std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;::_Rep::_S_empty_rep_storage&#39; can not be used when making a shared object; recompile with -fPIC
.../libboost_regex.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[2]: *** [Code/GraphMol/SLNParse/libSLNParse.so] Error 1
make[1]: *** [Code/GraphMol/SLNParse/CMakeFiles/SLNParse.dir/all] Error 2
make: *** [all] Error 2
</pre></div>
</div>
<p><em>Solution:</em></p>
<p>Add this to the arguments when you call cmake: <tt class="docutils literal"><span class="pre">-DBoost_USE_STATIC_LIBS=OFF</span></tt></p>
<p>More information here: <a class="reference external" href="http://www.mail-archive.com/rdkit-discuss&#64;lists.sourceforge.net/msg01119.html">http://www.mail-archive.com/rdkit-discuss&#64;lists.sourceforge.net/msg01119.html</a></p>
<hr class="docutils" />
<p><em>Problem:</em></p>
<div class="highlight-python"><div class="highlight"><pre> .../Code/GraphMol/Wrap/EditableMol.cpp:114:   instantiated from here
 .../boost/type_traits/detail/cv_traits_impl.hpp:37: internal compiler error: in make_rtl_for_nonlocal_decl, at cp/decl.c:5067
Please submit a full bug report,
with preprocessed source if appropriate.
See &lt;URL:http://bugzilla.redhat.com/bugzilla&gt; for instructions.
Preprocessed source stored into /tmp/ccgSaXge.out file, please attach this to your bugreport.
make[2]: *** [Code/GraphMol/Wrap/CMakeFiles/rdchem.dir/EditableMol.cpp.o] Error 1
make[1]: *** [Code/GraphMol/Wrap/CMakeFiles/rdchem.dir/all] Error 2
make: *** [all] Error 2
</pre></div>
</div>
<p><em>Solution:</em></p>
<p>Add <tt class="docutils literal"><span class="pre">#define</span> <span class="pre">BOOST_PYTHON_NO_PY_SIGNATURES</span></tt> at the top of <tt class="docutils literal"><span class="pre">Code/GraphMol/Wrap/EditableMol.cpp</span></tt></p>
<p>More information here: <a class="reference external" href="http://www.mail-archive.com/rdkit-discuss&#64;lists.sourceforge.net/msg01178.html">http://www.mail-archive.com/rdkit-discuss&#64;lists.sourceforge.net/msg01178.html</a></p>
<hr class="docutils" />
<p><em>Problem:</em></p>
<p>Your system has a version of boost installed in /usr/lib, but you would like to force the RDKit to use a more recent one.</p>
<p><em>Solution:</em></p>
<p>This can be solved by using cmake version 2.8.3 (or more recent) and providing the <tt class="docutils literal"><span class="pre">-D</span> <span class="pre">Boost_NO_SYSTEM_PATHS=ON</span></tt> argument:</p>
<div class="highlight-python"><div class="highlight"><pre>cmake -D BOOST_ROOT=/usr/local -D Boost_NO_SYSTEM_PATHS=ON ..
</pre></div>
</div>
<hr class="docutils" />
<p><em>Problem:</em></p>
<p>Building on the Mac with XCode 4</p>
<p>The problem seems to be caused by the version of numpy that is distributed with XCode 4, so you need to build a fresh copy.</p>
<p><em>Solution:</em>
Get a copy of numpy and build it like this as root:
as root:</p>
<div class="highlight-python"><div class="highlight"><pre>export MACOSX_DEPLOYMENT_TARGET=10.6
export LDFLAGS=&quot;-Wall -undefined dynamic_lookup -bundle -arch x86_64&quot;
export CFLAGS=&quot;-arch x86_64&quot;
ln -s /usr/bin/gcc /usr/bin/gcc-4.2
ln -s /usr/bin/g++ /usr/bin/g++-4.2
python setup.py build
python setup.py install
</pre></div>
</div>
<p>Be sure that the new numpy is used in the build:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">PYTHON_NUMPY_INCLUDE_PATH</span>        <span class="o">/</span><span class="n">Library</span><span class="o">/</span><span class="n">Python</span><span class="o">/</span><span class="mf">2.6</span><span class="o">/</span><span class="n">site</span><span class="o">-</span><span class="n">packages</span><span class="o">/</span><span class="n">numpy</span><span class="o">/</span><span class="n">core</span><span class="o">/</span><span class="n">include</span>
</pre></div>
</div>
<p>and is at the beginning of the PYTHONPATH:</p>
<div class="highlight-python"><div class="highlight"><pre>export PYTHONPATH=&quot;/Library/Python/2.6/site-packages:$PYTHONPATH&quot;
</pre></div>
</div>
<p>Now it&#8217;s safe to build boost and the RDKit.</p>
</div>
</div>
</div>
<div class="section" id="windows">
<h2>Windows<a class="headerlink" href="#windows" title="Permalink to this headline"></a></h2>
<div class="section" id="id1">
<h3>Prerequisites<a class="headerlink" href="#id1" title="Permalink to this headline"></a></h3>
<blockquote>
<div><ul class="simple">
<li>Python 2.7 (from <a class="reference external" href="http://www.python.org/">http://www.python.org/</a>)</li>
<li>numpy (from <a class="reference external" href="http://numpy.scipy.org/">http://numpy.scipy.org/</a> or use <tt class="docutils literal"><span class="pre">pip</span> <span class="pre">install</span> <span class="pre">numpy</span></tt>). Binaries for win64 are available here: <a class="reference external" href="http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy">http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy</a></li>
<li>PIL: (from <a class="reference external" href="http://www.pythonware.com/products/pil/index.htm">http://www.pythonware.com/products/pil/index.htm</a> or use <tt class="docutils literal"><span class="pre">pip</span> <span class="pre">install</span> <span class="pre">PIL</span></tt>)</li>
</ul>
</div></blockquote>
<div class="section" id="recommended-extras">
<h4>Recommended extras<a class="headerlink" href="#recommended-extras" title="Permalink to this headline"></a></h4>
<blockquote>
<div><ul class="simple">
<li>aggdraw: a library for high-quality drawing in Python. Instructions for downloading are here: <a class="reference external" href="http://effbot.org/zone/aggdraw-index.htm">http://effbot.org/zone/aggdraw-index.htm</a> The new (as of May 2008) drawing code has been tested with v1.2a3 of aggdraw. Despite the alpha label, the code is stable and functional.</li>
<li>matplotlib: a library for scientific plotting from Python. <a class="reference external" href="http://matplotlib.sourceforge.net/">http://matplotlib.sourceforge.net/</a></li>
<li>ipython : a very useful interactive shell (and much more) for Python. <a class="reference external" href="http://ipython.scipy.org/dist/">http://ipython.scipy.org/dist/</a></li>
<li>win32all: Windows extensions for Python. <a class="reference external" href="http://sourceforge.net/projects/pywin32/">http://sourceforge.net/projects/pywin32/</a></li>
</ul>
</div></blockquote>
</div>
</div>
<div class="section" id="installation-of-rdkit-binaries">
<h3>Installation of RDKit binaries<a class="headerlink" href="#installation-of-rdkit-binaries" title="Permalink to this headline"></a></h3>
<blockquote>
<div><ul class="simple">
<li>Get the appropriate windows binary build from: &lt;<a class="reference external" href="https://sourceforge.net/projects/rdkit/files/rdkit/">https://sourceforge.net/projects/rdkit/files/rdkit/</a>&gt;_</li>
<li>Extract the zip file somewhere without a space in the name, i.e. <tt class="docutils literal"><span class="pre">c:/</span></tt></li>
<li>The rest of this will assume that the installation is in <tt class="docutils literal"><span class="pre">c:/RDKit_2012_12_1</span></tt></li>
<li>Set the following environment variables:
* RDBASE: <tt class="docutils literal"><span class="pre">c:/RDKit_2012_12_1</span></tt>
* PYTHONPATH: <tt class="docutils literal"><span class="pre">%RDBASE%</span></tt> if there is already a PYTHONPATH, put <tt class="docutils literal"><span class="pre">;%RDBASE%</span></tt> at the end.
* PATH: add <tt class="docutils literal"><span class="pre">;%RDBASE%/lib</span></tt> to the end</li>
</ul>
</div></blockquote>
<p>In Win7 systems, you may run into trouble due to missing DLLs, see one thread from the mailing list:
<a class="reference external" href="http://www.mail-archive.com/rdkit-discuss&#64;lists.sourceforge.net/msg01632.html">http://www.mail-archive.com/rdkit-discuss&#64;lists.sourceforge.net/msg01632.html</a>
You can download the missing DLLs from here: <a class="reference external" href="http://www.microsoft.com/en-us/download/details.aspx?id=5555">http://www.microsoft.com/en-us/download/details.aspx?id=5555</a></p>
</div>
<div class="section" id="installation-from-source">
<h3>Installation from source<a class="headerlink" href="#installation-from-source" title="Permalink to this headline"></a></h3>
<div class="section" id="extra-software-to-install">
<h4>Extra software to install<a class="headerlink" href="#extra-software-to-install" title="Permalink to this headline"></a></h4>
<blockquote>
<div><ul class="simple">
<li>Microsoft Visual C++ : The Express version has everything
necessary and can be downloaded for free
(<a class="reference external" href="http://www.microsoft.com/express/download/">http://www.microsoft.com/express/download/</a>). This
is a big installation and will take a while. The RDKit has been
successfully built with all version of visual c++ since 6.0, so
the current version of VC++ (2010 as of this writing) should be
fine.</li>
<li>cmake : (<a class="reference external" href="http://www.cmake.org/cmake/resources/software.html">http://www.cmake.org/cmake/resources/software.html</a>) should be installed.</li>
<li>boost : It is strongly recommended to download and use a
precompiled version of the boost libraries from
<a class="reference external" href="http://sourceforge.net/projects/boost/files/boost-binaries/">http://sourceforge.net/projects/boost/files/boost-binaries/</a> . When you run the installer,
the only binary libraries you need are python, regex, and system.
If you want to install boost from source, download a copy from
<a class="reference external" href="http://www.boost.org">http://www.boost.org</a> and follow the instructions
in the &#8220;Getting Started&#8221; section of the documentation. Make sure
the libraries and headers are installed to c:boost</li>
<li>a git client : <em>This is only necessary if you are planning
on building development versions of the RDKit.</em> This can be downloaded from
<a class="reference external" href="http://git-scm.com/downloads">http://git-scm.com/downloads</a> .</li>
<li>Optional packages<ul>
<li>If you would like to install the RDKit InChI support, follow the
instructions in $RDBASE/External/INCHI-API/README to get a copy
of the InChI source and put it in the appropriate place.</li>
<li>If you would like to install the RDKit Avalon toolkit support,
follow the instructions in $RDBASE/External/AvalonTool/README to
get a copy of the Avalon toolkit source and put it in the
appropriate place.</li>
</ul>
</li>
</ul>
</div></blockquote>
</div>
<div class="section" id="setup-and-preparation">
<h4>Setup and Preparation<a class="headerlink" href="#setup-and-preparation" title="Permalink to this headline"></a></h4>
<p>This section assumes that python is installed in <tt class="docutils literal"><span class="pre">c:\Python27</span></tt>, that the
boost libraries have been installed to <tt class="docutils literal"><span class="pre">c:\boost</span></tt>, and that
you will build the RDKit from a directory named <tt class="docutils literal"><span class="pre">c:\RDKit</span></tt>. If any of
these conditions is not true, just change the corresponding paths.</p>
<blockquote>
<div><ul class="simple">
<li>If you install things in paths that have spaces in their names,
be sure to use quotes properly in your environment variable
definitions.</li>
<li>If you are planning on using a development version of the RDKit:
get a copy of the current RDKit source using git. If you&#8217;re
using the command-line client the command is: <tt class="docutils literal"><span class="pre">git</span> <span class="pre">clone</span>
<span class="pre">https://github.com/rdkit/rdkit.git</span> <span class="pre">c:\RDKit</span></tt></li>
<li>If you are planning on using a released version of the RDKit : get
a copy of the most recent release and extract it into the directory <tt class="docutils literal"><span class="pre">c:\RDKit</span></tt></li>
<li>Set the required environment variables (you can set this in cygwin
or in windows. If you set them in windows, be sure to restart your
cygwin window)<ul>
<li><tt class="docutils literal"><span class="pre">RDBASE</span> <span class="pre">=</span> <span class="pre">c:\RDKit</span></tt></li>
<li>Make sure <tt class="docutils literal"><span class="pre">c:\Python27</span></tt> is in your PATH</li>
<li>Make sure <tt class="docutils literal"><span class="pre">c:\RDKit\lib</span></tt> is in your PATH</li>
<li>Make sure <tt class="docutils literal"><span class="pre">c:\boost\lib</span></tt> is in your PATH.</li>
<li>Make sure <tt class="docutils literal"><span class="pre">c:\RDKit</span> <span class="pre">is</span></tt> in your PYTHONPATH</li>
</ul>
</li>
</ul>
</div></blockquote>
</div>
<div class="section" id="building-from-the-command-line-recommended">
<h4>Building from the command line (recommended)<a class="headerlink" href="#building-from-the-command-line-recommended" title="Permalink to this headline"></a></h4>
<blockquote>
<div><ul class="simple">
<li>Create a directory <tt class="docutils literal"><span class="pre">c:\RDKit\build</span></tt> and cd into it</li>
<li>Run cmake. Here&#8217;s an example basic command line for 64bit windows that assumes the InChI and
Avalon toolkit sources are available (see above):
<tt class="docutils literal"><span class="pre">cmake</span> <span class="pre">-DRDK_BUILD_PYTHON_WRAPPERS=0N</span> <span class="pre">-DAVALONTOOLS_DIR=c:/avalontoolkit_beta/sourcedistribution</span> <span class="pre">-DBOOST_ROOT=c:/boost</span> <span class="pre">-DRDK_BUILD_INCHI_SUPPORT=ON</span> <span class="pre">-DRDK_BUILD_AVALON_SUPPORT=ON</span> <span class="pre">-G&quot;Visual</span> <span class="pre">Studio</span> <span class="pre">10</span> <span class="pre">Win64&quot;</span> <span class="pre">..</span></tt></li>
<li>Build the code. Here&#8217;s an example command line:
<tt class="docutils literal"><span class="pre">c:/Windows/Microsoft.NET/Framework64/v4.0.30319/MSBuild.exe</span> <span class="pre">/m:4</span> <span class="pre">/p:Configuration=Release</span> <span class="pre">INSTALL.vcxproj</span></tt></li>
</ul>
</div></blockquote>
</div>
<div class="section" id="building-the-code-using-guis-not-recommended">
<h4>Building the Code Using GUIs (not recommended)<a class="headerlink" href="#building-the-code-using-guis-not-recommended" title="Permalink to this headline"></a></h4>
<blockquote>
<div><ul class="simple">
<li>Environment variables: if cmake complains about not being able to find it, define the environment variable BOOST_ROOT to point to the directory containing the boost source.</li>
<li>Configure the build:<ul>
<li>Start the cmake gui</li>
<li>tell it where the source code is (e.g. c:/RDKit) and where to build the binaries (recommended: c:/RDKit/build)</li>
<li>click &#8220;Configure&#8221;, select your compiler, and wait until the
basic configuration is complete, you&#8217;ll see a bunch of red entries in the main windows.</li>
<li>click &#8220;Configure&#8221; again</li>
<li>click &#8220;Generate&#8221;</li>
</ul>
</li>
<li>Build:<ul>
<li>open the solution file that cmake created (c:/RDKit/build/RDKit.sln) with Visual Studio.</li>
<li>check to be sure that you&#8217;re building a Release build (for some reason CMake produces solution files that default to doing a Debug build)</li>
<li>build the &#8220;ALL_BUILD&#8221; target; this will take a while and generate warnings, but there should be no errors. Note: if you are building the SWIG wrappers you may get an error the first time you try to build them. If you see this error, try building ALL_BUILD again; it should work the second time.</li>
<li>build the &#8220;INSTALL&#8221; target</li>
</ul>
</li>
</ul>
</div></blockquote>
</div>
<div class="section" id="id2">
<h4>Testing the Build (optional, but recommended)<a class="headerlink" href="#id2" title="Permalink to this headline"></a></h4>
<blockquote>
<div><ul class="simple">
<li>cd to <tt class="docutils literal"><span class="pre">c:\RDKit\build</span></tt> and run ctest.</li>
<li>you&#8217;re done!</li>
</ul>
</div></blockquote>
</div>
</div>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="GettingStartedInPython.html" title="Getting Started with the RDKit in Python"
             >next</a> |</li>
        <li class="right" >
          <a href="Overview.html" title="An overview of the RDKit"
             >previous</a> |</li>
        <li><a href="index.html">The RDKit 2015.03.1 documentation</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2014, Greg Landrum.
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
    </div>
  </body>
</html>