Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is Python 3.6.7 built with --enable-shared? #232

Closed
sodre opened this issue Jan 4, 2019 · 1 comment
Closed

Is Python 3.6.7 built with --enable-shared? #232

sodre opened this issue Jan 4, 2019 · 1 comment

Comments

@sodre
Copy link
Member

sodre commented Jan 4, 2019

Issue:
I am trying to build the PL/Python library for PostgreSQL with the conda-forge's version of python but
the PostgreSQL's configure script errors out with

checking how to link an embedded Python application... -L/opt/conda/conda-bld/postgresql-split_1546631982179/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/lib/python3.6/config-3.6m-x86_64-linux-gnu -lpython3.6m -lpthread -ldl  -lutil -lrt -lm       
configure: error: cannot build PL/Python because libpython is not a shared library
You might have to rebuild your Python installation.  Refer to the                                     
documentation for details.  Use --without-python to disable building                                  
PL/Python.

I dug further into the configure script and it is deciding whether Python was built with a shared library based on the value of ${PYTHON} -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_vars().get('Py_ENABLE_SHARED',0))"


Environment (conda list):

$ conda list
# packages in environment at /opt/conda/conda-bld/postgresql-split_1546631982179/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh:
#
# Name                    Version                   Build  Channel
ca-certificates           2018.10.15           ha4d7672_0    conda-forge/label/gcc7
certifi                   2018.8.24             py36_1001    conda-forge/label/gcc7
icu                       58.2              hf484d3e_1000    conda-forge/label/gcc7
krb5                      1.16.2            hc83ff2d_1000    conda-forge/label/gcc7
libedit                   3.1.20170329      hf8c457e_1001    conda-forge/label/gcc7
libffi                    3.2.1             hf484d3e_1005    conda-forge/label/gcc7
libgcc-ng                 7.3.0                hdf63c60_0    conda-forge/label/gcc7
libiconv                  1.15              h14c3975_1003    conda-forge/label/gcc7
libpq                     9.6.11            h13b8bad_1000    local
libstdcxx-ng              7.3.0                hdf63c60_0    conda-forge/label/gcc7
libuuid                   2.32.1            h14c3975_1000    conda-forge/label/gcc7
libxml2                   2.9.8             h143f9aa_1005    conda-forge/label/gcc7
libxslt                   1.1.32            h4785a14_1002    conda-forge/label/gcc7
ncurses                   6.1               hf484d3e_1002    conda-forge/label/gcc7
openssl                   1.0.2p            h14c3975_1002    conda-forge/label/gcc7
pip                       18.0                  py36_1001    conda-forge/label/gcc7
postgresql                9.6.11            h66cca7a_1000    local
python                    3.6.7             hd21baee_1001    conda-forge/label/gcc7
readline                  7.0               hf8c457e_1001    conda-forge/label/gcc7
setuptools                40.4.0                py36_1000    conda-forge/label/gcc7
sqlite                    3.26.0            h67949de_1000    conda-forge/label/gcc7
tk                        8.6.9             h84994c4_1000    conda-forge/label/gcc7
tzcode                    2018g             h14c3975_1001    conda-forge/label/gcc7
wheel                     0.31.1                py36_1001    conda-forge/label/gcc7
xz                        5.2.4             h14c3975_1001    conda-forge/label/gcc7
zlib                      1.2.11            h14c3975_1003    conda-forge/label/gcc7

Details about conda and system ( conda info ):
$ conda info
$ conda info

     active environment : /opt/conda/conda-bld/postgresql-split_1546631982179/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh
    active env location : /opt/conda/conda-bld/postgresql-split_1546631982179/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh
            shell level : 3
       user config file : /home/conda/.condarc
 populated config files : /home/conda/.condarc
          conda version : 4.5.12
    conda-build version : 3.17.5
         python version : 3.6.7.final.0
       base environment : /opt/conda  (writable)
           channel URLs : https://conda.anaconda.org/conda-forge/linux-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://repo.anaconda.com/pkgs/main/linux-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/free/linux-64
                          https://repo.anaconda.com/pkgs/free/noarch
                          https://repo.anaconda.com/pkgs/r/linux-64
                          https://repo.anaconda.com/pkgs/r/noarch
                          https://repo.anaconda.com/pkgs/pro/linux-64
                          https://repo.anaconda.com/pkgs/pro/noarch
          package cache : /opt/conda/pkgs
                          /home/conda/.conda/pkgs
       envs directories : /opt/conda/envs
                          /home/conda/.conda/envs
               platform : linux-64
             user-agent : conda/4.5.12 requests/2.20.1 CPython/3.6.7 Linux/2.6.32-696.20.1.el6.x86_64 centos/6.10 glibc/2.12
                UID:GID : 500:500
             netrc file : /home/conda/.netrc
           offline mode : False
@jjhelmus
Copy link
Contributor

jjhelmus commented Jan 7, 2019

Python 3.6.7 is statically linked to libpython but the libpython.so libraries is also provided. It may be necessary to patch PL/Python's build system to ignore the value of Py_ENABLED_SHARED. For more discussion see #222.

@jjhelmus jjhelmus closed this as completed Jan 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants