Skip to content

GCC error when trying to install horton #288

@BoringBoron

Description

@BoringBoron

Hello,
I'm trying to install horton-2.1.1 on Ubuntu 18.04 running inside the wsl. I've followed the tutorial to the point where I'm trying to run setup.py. The script ends with the following error message:

horton/meanfield/cext.cpp: In function ‘PyObject* __pyx_pf_6horton_9meanfield_4cext_12LibXCWrapper_4refs___get__(__pyx_obj_6horton_9meanfield_4cext_LibXCWrapper*)’:
horton/meanfield/cext.cpp:2209:74: error: cannot convert ‘func_reference_type* const*’ to ‘const char*’ for argument ‘1’ to ‘PyObject* PyString_FromString(const char*)’
   __pyx_t_1 = __Pyx_PyBytes_FromString((__pyx_v_self->_func.info[0]).refs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 117, __pyx_L1_error)
                                                                          ^
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

I've tried updating all the dependencies but still get the same error message.

The whole output from running 'python setup.py install --user':

PLATFORM=Linux-4.4.0-17134-Microsoft-x86_64-with-Ubuntu-18.04-bionic
LIBXC Configuration
   File setup.cfg not found. Skipping.
   From environment variables
      -
   Static lib not found in ${QAWORKDIR}
      extra_objects: ['qaworkdir/cached/libxc-2.2.2/lib/libxc.a']
      include_dirs: ['qaworkdir/cached/libxc-2.2.2/include']
   pkg-config failed.
   Last resort fallback plan
      libraries: ['xc']
   Final
      libraries: ['xc']
LIBINT2 Configuration
   File setup.cfg not found. Skipping.
   From environment variables
      -
   Static lib config in ${QAWORKDIR}
      extra_objects: ['qaworkdir/cached/libint-2.0.3/lib/libint2.a']
      include_dirs: ['qaworkdir/cached/libint-2.0.3/include/libint2']
   Final
      extra_objects: ['qaworkdir/cached/libint-2.0.3/lib/libint2.a']
      include_dirs: ['qaworkdir/cached/libint-2.0.3/include/libint2']
Version of dependencies:
             breathe: -- not found --
            coverage: /bin/sh: 1: coverage: not found
            cppcheck: -- not found --
                curl: curl 7.58.0 (x86_64-pc-linux-gnu) libcurl/7.58.0 OpenSSL/1.1.1 zlib/1.2.11 libidn2/2.0.4 libpsl/0.19.1 (+libidn2/2.0.4) nghttp2/1.30.0 librtmp/2.3
              cython: Cython version 0.26.1
            docutils: -- not found --
             doxygen: -- not found --
                 gcc: gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0
                 git: git version 2.17.1
           gitpython: -- not found --
                h5py: 2.7.1
          matplotlib: 2.1.1
                nose: nosetests version 1.3.7
               numpy: 1.13.3
                 pip: pip 9.0.1 from /usr/lib/python2.7/dist-packages (python 2.7)
         pycodestyle: -- not found --
          pydocstyle: -- not found --
              pylint:
              python: Python 2.7.15+
               scipy: 0.19.1
              sphinx: -- not found --
    sphinx_rtd_theme: -- not found --
               sympy: 1.1.1
running install
running build
running build_py
running build_ext
skipping 'horton/cext.cpp' Cython extension (up-to-date)
skipping 'horton/matrix/cext.cpp' Cython extension (up-to-date)
skipping 'horton/gbasis/cext.cpp' Cython extension (up-to-date)
skipping 'horton/grid/cext.cpp' Cython extension (up-to-date)
skipping 'horton/meanfield/cext.cpp' Cython extension (up-to-date)
building 'horton.meanfield.cext' extension
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-_wncS2/python2.7-2.7.15=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/lib/python2.7/dist-packages/numpy/core/include -I. -I/usr/include/python2.7 -c horton/meanfield/cext.cpp -o build/temp.linux-x86_64-2.7/horton/meanfield/cext.o -std=c++11
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
In file included from /usr/lib/python2.7/dist-packages/numpy/core/include/numpy/ndarraytypes.h:1809:0,
                 from /usr/lib/python2.7/dist-packages/numpy/core/include/numpy/ndarrayobject.h:18,
                 from /usr/lib/python2.7/dist-packages/numpy/core/include/numpy/arrayobject.h:4,
                 from horton/meanfield/cext.cpp:499:
/usr/lib/python2.7/dist-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
 #warning "Using deprecated NumPy API, disable it by " \
  ^~~~~~~
horton/meanfield/cext.cpp: In function ‘PyObject* __pyx_pf_6horton_9meanfield_4cext_12LibXCWrapper_4refs___get__(__pyx_obj_6horton_9meanfield_4cext_LibXCWrapper*)’:
horton/meanfield/cext.cpp:2209:74: error: cannot convert ‘func_reference_type* const*’ to ‘const char*’ for argument ‘1’ to ‘PyObject* PyString_FromString(const char*)’
   __pyx_t_1 = __Pyx_PyBytes_FromString((__pyx_v_self->_func.info[0]).refs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 117, __pyx_L1_error)
                                                                          ^
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

Any help is appreciated.

Thanks,
BoringBoron

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions