title: Building OpenSSL to compile portable version of Python
body: <p>I am trying to build Python from source and need to include the SSL module for my web scraper to work with it.</p>
  
  <p>I ran into the problem of SSL not being found, so I downloaded and built OpenSSL from source. The problem is, I need to install the development libraries along with OpenSSL in order for Python to run the <code>-lssl</code> parameter correctly when running <code>make</code>. I can't seem to find any documentation on how to build OpenSSL with the development libs, even though I'm sure it's got to be something simple I'm just missing.</p>
  
  <p>I must do this from source; with no package managers. I have my reasons.</p>
  
  <p><strong>EDIT:</strong>
  I have changed a few of the python configuration settings to try and fix the problem, and this is the compile error I am getting now:</p>
  
  <p><code>
  gcc -pthread  -Xlinker -export-dynamic -o python \
                  Modules/python.o \
                  libpython2.7.a -lpthread -ldl  -lutil -L/home/[username]/openssl-src -lssl -lcrypto   -lm<br />
  libpython2.7.a(posixmodule.o)(.text+0x4016): In function <code>posix_tmpnam':&lt;br /&gt;
  ./Modules/posixmodule.c:7346: warning: the use of</code>tmpnam_r' is dangerous, better use <code>mkstemp'
  libpython2.7.a(posixmodule.o)(.text+0x3f76): In function</code>posix_tempnam':
  ./Modules/posixmodule.c:7301: warning: the use of <code>tempnam' is dangerous, better use</code>mkstemp'<br />
  ./python: error while loading shared libraries: libssl.so.1.0.0: cannot open shared object file: No such file or directory<br />
  make: <em>*</em> [sharedmods] Error 127</code></p>
  
  <p>The "no such file or directory" is being thrown looking for a file that does exist in the <code>/home/[username]/openssl-src</code> directory.</p>