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

error when I install libact #133

Open
maxbest opened this issue Nov 7, 2017 · 10 comments
Open

error when I install libact #133

maxbest opened this issue Nov 7, 2017 · 10 comments

Comments

@maxbest
Copy link

maxbest commented Nov 7, 2017

there is something error when I install libact on mint Linux 18. What should I do?

(libact) guan@guan-virtual-machine ~/libact-master $ python setup.py build
Platform Detection: Linux. Link to liblapacke...
running build
running build_py
running build_ext
building 'libact.query_strategies._variance_reduction' extension
C compiler: gcc -pthread -B /home/guan/anaconda3/envs/libact/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC

compile options: '-I/home/guan/anaconda3/envs/libact/lib/python3.6/site-packages/numpy/core/include -I/usr/include/lapacke -I/home/guan/anaconda3/envs/libact/include/python3.6m -c'
extra options: '-std=c11'
gcc: libact/query_strategies/src/variance_reduction/variance_reduction.c
In file included from /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/syslimits.h:7:0,
from /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/limits.h:34,
from /home/guan/anaconda3/envs/libact/include/python3.6m/Python.h:11,
from libact/query_strategies/src/variance_reduction/variance_reduction.c:3:
/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/limits.h:168:61: fatal error: limits.h: No such file or directory
compilation terminated.
In file included from /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/syslimits.h:7:0,
from /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/limits.h:34,
from /home/guan/anaconda3/envs/libact/include/python3.6m/Python.h:11,
from libact/query_strategies/src/variance_reduction/variance_reduction.c:3:
/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/limits.h:168:61: fatal error: limits.h: No such file or directory
compilation terminated.
error: Command "gcc -pthread -B /home/guan/anaconda3/envs/libact/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/guan/anaconda3/envs/libact/lib/python3.6/site-packages/numpy/core/include -I/usr/include/lapacke -I/home/guan/anaconda3/envs/libact/include/python3.6m -c libact/query_strategies/src/variance_reduction/variance_reduction.c -o build/temp.linux-x86_64-3.6/libact/query_strategies/src/variance_reduction/variance_reduction.o -std=c11" failed with exit status 1

@yangarbiter
Copy link
Collaborator

yangarbiter commented Nov 7, 2017

@mlazarew
Copy link

mlazarew commented Nov 8, 2017

Anybody was able to install it on RHEL5? I am getting the same errors as @maxbest

@yangarbiter
Copy link
Collaborator

@mlazarew can you find the limits.h header on your computer?

@mlazarew
Copy link

mlazarew commented Nov 8, 2017

Yes, it is at /usr/include/linux/limits.h

@yangarbiter
Copy link
Collaborator

Can you try to add /usr/include/linux/ to your PATH

If this did not work, try cloning the repository, add the path to
include_dirs on line 29 https://github.com/ntucllab/libact/blob/master/setup.py#L29.
Run python setup.py install and see if it works.

@mlazarew
Copy link

mlazarew commented Nov 8, 2017

Have tried both and still got

cc1: error: unrecognized command line option "-std=c11"

@mlazarew
Copy link

mlazarew commented Nov 8, 2017

It seems that for my gcc 4.4.6 compiler the value c11 is not a valid one for "std" parameter.

@yangarbiter
Copy link
Collaborator

Can you print out the error?

Though I think the fastest way is to upgrade your compiler to 4.8+

@mlazarew
Copy link

mlazarew commented Nov 13, 2017

creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/libact
creating build/temp.linux-x86_64-3.6/libact/query_strategies
creating build/temp.linux-x86_64-3.6/libact/query_strategies/src
creating build/temp.linux-x86_64-3.6/libact/query_strategies/src/variance_reduction
compile options: '-I/home/ec2-user/anaconda3/lib/python3.6/site-packages/numpy/core/include -I/usr/include/lapacke -I/home/ec2-user/anaconda3/include/python3.6m -c'
extra options: '-std=c11'
gcc: libact/query_strategies/src/variance_reduction/variance_reduction.c
libact/query_strategies/src/variance_reduction/variance_reduction.c:5:21: fatal error: lapacke.h: No such file or directory
 #include <lapacke.h>
                     ^
compilation terminated.
libact/query_strategies/src/variance_reduction/variance_reduction.c:5:21: fatal error: lapacke.h: No such file or directory
 #include <lapacke.h>
                     ^
compilation terminated.
error: Command "gcc -pthread -B /home/ec2-user/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/ec2-user/anaconda3/lib/python3.6/site-packages/numpy/core/include -I/usr/include/lapacke -I/home/ec2-user/anaconda3/include/python3.6m -c libact/query_strategies/src/variance_reduction/variance_reduction.c -o build/temp.linux-x86_64-3.6/libact/query_strategies/src/variance_reduction/variance_reduction.o -std=c11" failed with exit status 1

----------------------------------------

Command "/home/ec2-user/anaconda3/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-build-lh5sw7ey/libact/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-ufp_l303-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-lh5sw7ey/libact/

$ gcc --version
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-11)

@yangarbiter
Copy link
Collaborator

you may have to install lapacke package

I think you can try searching openblas or lapacke in your package list and see if it works.

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