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

Install Errors #288

Closed
nschiraldi opened this issue Sep 24, 2018 · 5 comments · Fixed by #304
Closed

Install Errors #288

nschiraldi opened this issue Sep 24, 2018 · 5 comments · Fixed by #304
Assignees

Comments

@nschiraldi
Copy link

nschiraldi commented Sep 24, 2018

I'm struggling to install tick on Oracle Linux Server 7.5, with Python 3.6.5. I've looked at #273 and and #262 but haven't been able to troubleshoot off of the information from either. I have tried to build source and install via pip.

Any help is greatly appreciated.

pip causes this module import error:

ModuleNotFoundError                       Traceback (most recent call last)
~/anaconda3/lib/python3.6/site-packages/tick/tick/array/build/array.py in swig_import_helper()
     14     try:
---> 15         return importlib.import_module(mname)
     16     except ImportError:

~/anaconda3/lib/python3.6/importlib/__init__.py in import_module(name, package)
    125             level += 1
--> 126     return _bootstrap._gcd_import(name[level:], package, level)
    127

~/anaconda3/lib/python3.6/importlib/_bootstrap.py in _gcd_import(name, package, level)

~/anaconda3/lib/python3.6/importlib/_bootstrap.py in _find_and_load(name, import_)

~/anaconda3/lib/python3.6/importlib/_bootstrap.py in _find_and_load_unlocked(name, import_)

ModuleNotFoundError: No module named 'tick.array.build._array'

During handling of the above exception, another exception occurred:

ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-1-41e470d8e362> in <module>()
----> 1 import tick

~/anaconda3/lib/python3.6/site-packages/tick/tick/__init__.py in <module>()
      4 # License: BSD 3 clause
      5
----> 6 import tick.base

~/anaconda3/lib/python3.6/site-packages/tick/tick/base/__init__.py in <module>()
     21 _set_mpl_backend()
     22
---> 23 from tick.array import *
     24 from ..random import *
     25 from .timefunc import TimeFunction

~/anaconda3/lib/python3.6/site-packages/tick/tick/array/__init__.py in <module>()
      1 # License: BSD 3 clause
      2
----> 3 from .build import array

~/anaconda3/lib/python3.6/site-packages/tick/tick/array/build/array.py in <module>()
     16     except ImportError:
     17         return importlib.import_module('_array')
---> 18 _array = swig_import_helper()
     19 del swig_import_helper
     20 del _swig_python_version_info

~/anaconda3/lib/python3.6/site-packages/tick/tick/array/build/array.py in swig_import_helper()
     15         return importlib.import_module(mname)
     16     except ImportError:
---> 17         return importlib.import_module('_array')
     18 _array = swig_import_helper()
     19 del swig_import_helper

~/anaconda3/lib/python3.6/importlib/__init__.py in import_module(name, package)
    124                 break
    125             level += 1
--> 126     return _bootstrap._gcd_import(name[level:], package, level)
    127
    128

ModuleNotFoundError: No module named '_array'

And here is the source build:

git clone https://github.com/X-DataInitiative/tick.git
git submodule update --init
python3 setup.py build_ext --inplace bdist_wheel
creating build/temp.linux-x86_64-3.6/lib/cpp/solver
compile options: '-Iinclude -Ilib/third_party/cereal/include -I/network/rit/home/ab669414/anaconda3/lib/python3.6/site-packages/numpy/core/include -I/network/rit/home/ab669414/anaconda3/include/python3.6m -c'
extra options: '-D_FILE_OFFSET_BITS=64 -DPYTHON_LINK -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -Ilib/include -DTICK_SPARSE_INDICES_INT32 -std=c++11 -O2 -DNDEBUG -ffast-math -Wall -Werror -Wno-uninitialized -Isrc/swig/solver -Ilib/swig/array -Ilib/swig/base -Ilib/swig/random -Ilib/swig/base_model -Ilib/swig/linear_model -Ilib/swig/prox -Ilib/swig/robust -DDEBUG_COSTLY_THROW'
gcc: lib/swig/solver/solver_module_wrap.cpp
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]
gcc: lib/cpp/solver/sgd.cpp
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]
gcc: lib/cpp/solver/adagrad.cpp
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]
gcc: lib/cpp/solver/svrg.cpp
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]
gcc: lib/cpp/solver/asaga.cpp
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]
In file included from lib/include/tick/solver/saga.h:6:0,
                 from lib/include/tick/solver/asaga.h:8,
                 from lib/cpp/solver/asaga.cpp:3:
lib/cpp/solver/asaga.cpp: In instantiation of ‘AtomicSAGA<T>::solve(int) [with T = double]::__lambda54’:
lib/cpp/solver/asaga.cpp:103:57:   required from ‘struct AtomicSAGA<T>::solve(int) [with T = double]::__lambda54’
lib/cpp/solver/asaga.cpp:129:3:   required from ‘void AtomicSAGA<T>::solve(int) [with T = double]’
lib/cpp/solver/asaga.cpp:140:27:   required from here
lib/include/tick/solver/sto_solver.h:48:13: error: ‘ulong TStoSolver<double, double>::t’ is protected
   ulong t = 1;
             ^
lib/cpp/solver/asaga.cpp:111:29: error: within this context
         TStoSolver<T, T>::t += epoch_size;
                             ^
In file included from lib/include/tick/solver/saga.h:6:0,
                 from lib/include/tick/solver/asaga.h:8,
                 from lib/cpp/solver/asaga.cpp:3:
lib/cpp/solver/asaga.cpp: In instantiation of ‘AtomicSAGA<T>::solve(int) [with T = float]::__lambda54’:
lib/cpp/solver/asaga.cpp:103:57:   required from ‘struct AtomicSAGA<T>::solve(int) [with T = float]::__lambda54’
lib/cpp/solver/asaga.cpp:129:3:   required from ‘void AtomicSAGA<T>::solve(int) [with T = float]’
lib/cpp/solver/asaga.cpp:141:27:   required from here
lib/include/tick/solver/sto_solver.h:48:13: error: ‘ulong TStoSolver<float, float>::t’ is protected
   ulong t = 1;
             ^
lib/cpp/solver/asaga.cpp:111:29: error: within this context
         TStoSolver<T, T>::t += epoch_size;
                             ^
In file included from /usr/include/c++/4.8.2/vector:69:0,
                 from lib/include/tick/array/array.h:14,
                 from lib/include/tick/base/math/normal_distribution.h:10,
                 from lib/include/tick/base/base.h:19,
                 from lib/include/tick/solver/sto_solver.h:10,
                 from lib/include/tick/solver/saga.h:6,
                 from lib/include/tick/solver/asaga.h:8,
                 from lib/cpp/solver/asaga.cpp:3:
/usr/include/c++/4.8.2/bits/vector.tcc:91:7: error: ‘void std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {AtomicSAGA<T>::solve(int) [with T = double]::__lambda54&, long unsigned int&}; _Tp = std::thread; _Alloc = std::allocator<std::thread>]’, declared using local type ‘AtomicSAGA<T>::solve(int) [with T = double]::__lambda54’, is used but never defined [-fpermissive]
       vector<_Tp, _Alloc>::
       ^
/usr/include/c++/4.8.2/bits/vector.tcc:91:7: error: ‘void std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {AtomicSAGA<T>::solve(int) [with T = float]::__lambda54&, long unsigned int&}; _Tp = std::thread; _Alloc = std::allocator<std::thread>]’, declared using local type ‘AtomicSAGA<T>::solve(int) [with T = float]::__lambda54’, is used but never defined [-fpermissive]
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]
In file included from lib/include/tick/solver/saga.h:6:0,
                 from lib/include/tick/solver/asaga.h:8,
                 from lib/cpp/solver/asaga.cpp:3:
lib/cpp/solver/asaga.cpp: In instantiation of ‘AtomicSAGA<T>::solve(int) [with T = double]::__lambda54’:
lib/cpp/solver/asaga.cpp:103:57:   required from ‘struct AtomicSAGA<T>::solve(int) [with T = double]::__lambda54’
lib/cpp/solver/asaga.cpp:129:3:   required from ‘void AtomicSAGA<T>::solve(int) [with T = double]’
lib/cpp/solver/asaga.cpp:140:27:   required from here
lib/include/tick/solver/sto_solver.h:48:13: error: ‘ulong TStoSolver<double, double>::t’ is protected
   ulong t = 1;
             ^
lib/cpp/solver/asaga.cpp:111:29: error: within this context
         TStoSolver<T, T>::t += epoch_size;
                             ^
In file included from lib/include/tick/solver/saga.h:6:0,
                 from lib/include/tick/solver/asaga.h:8,
                 from lib/cpp/solver/asaga.cpp:3:
lib/cpp/solver/asaga.cpp: In instantiation of ‘AtomicSAGA<T>::solve(int) [with T = float]::__lambda54’:
lib/cpp/solver/asaga.cpp:103:57:   required from ‘struct AtomicSAGA<T>::solve(int) [with T = float]::__lambda54’
lib/cpp/solver/asaga.cpp:129:3:   required from ‘void AtomicSAGA<T>::solve(int) [with T = float]’
lib/cpp/solver/asaga.cpp:141:27:   required from here
lib/include/tick/solver/sto_solver.h:48:13: error: ‘ulong TStoSolver<float, float>::t’ is protected
   ulong t = 1;
             ^
lib/cpp/solver/asaga.cpp:111:29: error: within this context
         TStoSolver<T, T>::t += epoch_size;
                             ^
In file included from /usr/include/c++/4.8.2/vector:69:0,
                 from lib/include/tick/array/array.h:14,
                 from lib/include/tick/base/math/normal_distribution.h:10,
                 from lib/include/tick/base/base.h:19,
                 from lib/include/tick/solver/sto_solver.h:10,
                 from lib/include/tick/solver/saga.h:6,
                 from lib/include/tick/solver/asaga.h:8,
                 from lib/cpp/solver/asaga.cpp:3:
/usr/include/c++/4.8.2/bits/vector.tcc:91:7: error: ‘void std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {AtomicSAGA<T>::solve(int) [with T = double]::__lambda54&, long unsigned int&}; _Tp = std::thread; _Alloc = std::allocator<std::thread>]’, declared using local type ‘AtomicSAGA<T>::solve(int) [with T = double]::__lambda54’, is used but never defined [-fpermissive]
       vector<_Tp, _Alloc>::
       ^
/usr/include/c++/4.8.2/bits/vector.tcc:91:7: error: ‘void std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {AtomicSAGA<T>::solve(int) [with T = float]::__lambda54&, long unsigned int&}; _Tp = std::thread; _Alloc = std::allocator<std::thread>]’, declared using local type ‘AtomicSAGA<T>::solve(int) [with T = float]::__lambda54’, is used but never defined [-fpermissive]
error: Command "gcc -pthread -B /network/rit/home/ab669414/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -Iinclude -Ilib/third_party/cereal/include -I/network/rit/home/ab669414/anaconda3/lib/python3.6/site-packages/numpy/core/include -I/network/rit/home/ab669414/anaconda3/include/python3.6m -c lib/cpp/solver/asaga.cpp -o build/temp.linux-x86_64-3.6/lib/cpp/solver/asaga.o -D_FILE_OFFSET_BITS=64 -DPYTHON_LINK -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -Ilib/include -DTICK_SPARSE_INDICES_INT32 -std=c++11 -O2 -DNDEBUG -ffast-math -Wall -Werror -Wno-uninitialized -Isrc/swig/solver -Ilib/swig/array -Ilib/swig/base -Ilib/swig/random -Ilib/swig/base_model -Ilib/swig/linear_model -Ilib/swig/prox -Ilib/swig/robust -DDEBUG_COSTLY_THROW" failed with exit status 1
@PhilipDeegan PhilipDeegan self-assigned this Sep 24, 2018
@PhilipDeegan
Copy link
Member

Hi there,

could you show me what compiler/version you are using please?
I have a feeling I know what this is, but it's strange that it's not happening for us

Thanks

@nschiraldi
Copy link
Author

nschiraldi commented Sep 24, 2018

gcc compiler is:

using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.8.5 20150623 (Red Hat 4.8.5-28.0.1) (GCC)

@PhilipDeegan
Copy link
Member

Would it be possible for you to upgrade to GCC 5?

It seems you may be having trouble with some lambdas - GCC 4.8 is not completely C++11 compatible.

Thanks

@PhilipDeegan
Copy link
Member

I have some scripts to build newer compilers if you would like them

@nschiraldi
Copy link
Author

let me check with my sys admins, I had a feeling it was do to out of date compilers. I will report back and close the issue if this is the problem. Thanks for the quick response!

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

Successfully merging a pull request may close this issue.

2 participants