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

getting errors on install #273

Closed
andrewcz opened this issue Aug 29, 2018 · 17 comments
Closed

getting errors on install #273

andrewcz opened this issue Aug 29, 2018 · 17 comments

Comments

@andrewcz
Copy link

(venv) [andrewcz@andrewcz-pc tick]$ python3 setup.py build_ext --inplace bdist_wheel
setup.py:199: DeprecationWarning: SO is deprecated, use EXT_SUFFIX
sysconfig.get_config_var('SO'))
running build_ext
building 'tick.array.build._array' extension
swigging lib/swig/array/array_module.i to lib/swig/array/array_module_wrap.cpp
swig -python -py3 -c++ -modern -new_repr -Ilib/swig/base -Ilib/include -outdir tick/array/build -Isrc/swig/array -DDEBUG_COSTLY_THROW -o lib/swig/array/array_module_wrap.cpp lib/swig/array/array_module.i
C compiler: gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -fPIC

compile options: '-Iinclude -Ilib/third_party/cereal/include -I/home/andrewcz/venv/lib/python3.7/site-packages/numpy/core/include -I/usr/include/python3.7m -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 -ffast-math -Wall -Werror -Wno-uninitialized -Isrc/swig/array -DDEBUG_COSTLY_THROW'
gcc: lib/swig/array/array_module_wrap.cpp
gcc: lib/cpp/array/alloc.cpp
lib/swig/array/array_module_wrap.cpp: In function ‘void SWIG_Python_FixMethods(PyMethodDef*, swig_const_info*, swig_type_info**, swig_type_info**)’:
lib/swig/array/array_module_wrap.cpp:15019:22: error: ‘char* strncpy(char*, const char*, size_t)’ output truncated before terminating nul copying 10 bytes from a string of the same length [-Werror=stringop-truncation]
strncpy(buff, "swig_ptr: ", 10);
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
lib/swig/array/array_module_wrap.cpp: In function ‘void SWIG_Python_FixMethods(PyMethodDef*, swig_const_info*, swig_type_info**, swig_type_info**)’:
lib/swig/array/array_module_wrap.cpp:15019:22: error: ‘char* strncpy(char*, const char*, size_t)’ output truncated before terminating nul copying 10 bytes from a string of the same length [-Werror=stringop-truncation]
strncpy(buff, "swig_ptr: ", 10);
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
error: Command "gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -fPIC -Iinclude -Ilib/third_party/cereal/include -I/home/andrewcz/venv/lib/python3.7/site-packages/numpy/core/include -I/usr/include/python3.7m -c lib/swig/array/array_module_wrap.cpp -o build/temp.linux-x86_64-3.7/lib/swig/array/array_module_wrap.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 -ffast-math -Wall -Werror -Wno-uninitialized -Isrc/swig/array -DDEBUG_COSTLY_THROW" failed with exit status 1
(venv) [andrewcz@andrewcz-pc tick]$ python3 setup.py build_ext --inplace bdist_wheel

apologies i am getting errors on the build

@andrewcz
Copy link
Author

so i upgraded swig and i am getting the following

(venv) [andrewcz@andrewcz-pc tick]$ python setup.py build install
/home/andrewcz/venv/lib/python3.7/site-packages/numpy/distutils/system_info.py:625: UserWarning:
Atlas (http://math-atlas.sourceforge.net/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [atlas]) or by setting
the ATLAS environment variable.
self.calc_info()
/tmp/tmpf0qrs9zx/source.c:1:10: fatal error: cblas.h: No such file or directory
#include <cblas.h>
^~~~~~~~~
compilation terminated.
/tmp/tmpf0qrs9zx/source.c:1:10: fatal error: cblas.h: No such file or directory
#include <cblas.h>
^~~~~~~~~
compilation terminated.
setup.py:199: DeprecationWarning: SO is deprecated, use EXT_SUFFIX
sysconfig.get_config_var('SO'))
running build
running build_ext
building 'tick.base.build._base' extension
swigging lib/swig/base/base_module.i to lib/swig/base/base_module_wrap.cpp
swig -python -py3 -c++ -modern -new_repr -Ilib/swig/base -Ilib/include -outdir tick/base/build -Isrc/swig/base -Ilib/swig/array -DDEBUG_COSTLY_THROW -o lib/swig/base/base_module_wrap.cpp lib/swig/base/base_module.i
C compiler: gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -fPIC

compile options: '-DNO_ATLAS_INFO=1 -Iinclude -Ilib/third_party/cereal/include -I/home/andrewcz/venv/lib/python3.7/site-packages/numpy/core/include -I/usr/include/python3.7m -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 -ffast-math -Wall -Werror -Wno-uninitialized -Isrc/swig/base -Ilib/swig/array -DDEBUG_COSTLY_THROW'
gcc: lib/cpp/base/exceptions_test.cpp
gcc: lib/cpp/base/interruption.cpp
gcc: lib/swig/base/base_module_wrap.cpp
gcc: lib/cpp/base/time_func.cpp
gcc: lib/cpp/base/math/t2exp.cpp
gcc: lib/cpp/base/math/normal_distribution.cpp
lib/swig/base/base_module_wrap.cpp: In function ‘SWIG_Python_addvarlink’:
lib/swig/base/base_module_wrap.cpp:5480:16: error: ‘strncpy’ specified bound depends on the length of the source argument [-Werror=stringop-overflow=]
strncpy(gv->name,name,size);
~~~~~~~^~~~~~~~~~~~~~~~~~~~
lib/swig/base/base_module_wrap.cpp:5477:27: note: length computed here
size_t size = strlen(name)+1;
~~~~~~^~~~~~
cc1plus: all warnings being treated as errors
lib/swig/base/base_module_wrap.cpp: In function ‘SWIG_Python_addvarlink’:
lib/swig/base/base_module_wrap.cpp:5480:16: error: ‘strncpy’ specified bound depends on the length of the source argument [-Werror=stringop-overflow=]
strncpy(gv->name,name,size);
~~~~~~~^~~~~~~~~~~~~~~~~~~~
lib/swig/base/base_module_wrap.cpp:5477:27: note: length computed here
size_t size = strlen(name)+1;
~~~~~~^~~~~~
cc1plus: all warnings being treated as errors
error: Command "gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -fPIC -DNO_ATLAS_INFO=1 -Iinclude -Ilib/third_party/cereal/include -I/home/andrewcz/venv/lib/python3.7/site-packages/numpy/core/include -I/usr/include/python3.7m -c lib/swig/base/base_module_wrap.cpp -o build/temp.linux-x86_64-3.7/lib/swig/base/base_module_wrap.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 -ffast-math -Wall -Werror -Wno-uninitialized -Isrc/swig/base -Ilib/swig/array -DDEBUG_COSTLY_THROW" failed with exit status 1
(venv) [andrewcz@andrewcz-pc tick]$

getting closer.
Many thanks for your help
Best,
Andrew

@andrewcz
Copy link
Author

screenshot_2018-08-29_13-14-03

@PhilipDeegan
Copy link
Member

Hi there,

I have tested python 3.7 and it has worked for me

Can you tell me what your version of gcc is please?

gcc -v

@andrewcz
Copy link
Author

hey thankyou for the quick response :)

@andrewcz
Copy link
Author

andrewcz commented Aug 29, 2018

screenshot_2018-08-29_15-02-36

@PhilipDeegan
Copy link
Member

It looks like gcc 8.2 has made something a warning, which is now an error in compilation

if you want to compile you can remove the line extra_compile_args.append("-Werror")
from setup.py

@andrewcz
Copy link
Author

il give it a try :)

@andrewcz
Copy link
Author

thankyou

@andrewcz
Copy link
Author

give me a couple of minutes :)

@andrewcz
Copy link
Author

Also i was going to ask, the experiments from the below paper.

https://arxiv.org/pdf/1712.02640.pdf

Are they located in a repository? I was curious to go through them.
Many thanks for your help :).
Best,
Andrew

@PhilipDeegan
Copy link
Member

@stephanegaiffas might be able to help you there

@andrewcz
Copy link
Author

Ah Awesome!!.
Thank you. I was wanting to include further study of the algorithm in a masters project.
Should I reach out to him via email?
Looks like the package is compiling :).
Many thanks, champion!
Have an amazing day.
Best,
Andrew

@stephanegaiffas
Copy link
Collaborator

Hey Andrew, I think that you might be interested in the following example : https://x-datainitiative.github.io/tick/auto_examples/plot_robust_linear_regression.html

Cheers

@PhilipDeegan
Copy link
Member

Regarding the compile error in cereal, it's a known issue

USCiLab/cereal#434

@andrewcz
Copy link
Author

ah, amazing!
thank you all for your help!
This is so cool!
@stephanegaiffas is this the algorithm from the paper in its current form or do I have to make
some adjustments?
Also, how can I get the coefficients of the regression line?

Many thanks :)
Best,
Andrew

@stephanegaiffas
Copy link
Collaborator

Yes it it the algorithm of the paper
Look at https://x-datainitiative.github.io/tick/modules/generated/tick.robust.RobustLinearRegression.html?highlight=robustlinearregression
you have weights and sample_intercepts attributes for regression coefficients and individual intercepts.

@andrewcz
Copy link
Author

Amazing!
Thank you so much!!
Will experiment with this class tonight.
I believe this issue can now be closed.
Many thanks to you all and will reference the paper and software in the dissertation.

Best,
Andrew

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

3 participants