Pip install errored out with exit status 1 - python

I tried to install a python package (rebound) using pip install but I got the error message I added below. I use fedora 31 if that is helpful.
I asked the creator of the package about this but he said that this seems to be general pip problem instead of a problem with his package. https://github.com/hannorein/rebound/issues/427
There were some other people having similar issues /usr/bin/ld: cannot find -lpython2.7
They recommended installing the python-dev-tools which didn't help me. One comment said to find where the file libpython3.7.a is (he said to find libpython2.7.a but my version is 3.7.6) and then use this command:
LDFLAGS="-L/usr/local/lib" make
which doesn't work and instead returns this message:
make: *** No targets specified and no makefile found. Stop.
He said this might work too:
LDFLAGS="-L/usr/local/lib" ./configure
But that didn't work too and returned:
bash: ./configure: No such file or directory
/usr/local/lib is where my libpython3.7.a file is btw.
I tried using pip3 install, python -m pip install, python3 -m pip install etc. None of them worked. Also all of my packages are up to date.
I hope you understand my problem. Thank you all in advance.
Tobias
Command
pip install rebound
Error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-r4o30ca2/rebound/setup.py'"'"'; __file__='"'"'/tmp/pip-install-r4o30ca2/rebound/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-record-vgescvxa/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/tobias/.local/include/python3.7m/rebound
cwd: /tmp/pip-install-r4o30ca2/rebound/
Complete output (123 lines):
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.7
creating build/lib.linux-x86_64-3.7/rebound
copying rebound/widget.py -> build/lib.linux-x86_64-3.7/rebound
copying rebound/units.py -> build/lib.linux-x86_64-3.7/rebound
copying rebound/tools.py -> build/lib.linux-x86_64-3.7/rebound
copying rebound/simulationarchive.py -> build/lib.linux-x86_64-3.7/rebound
copying rebound/simulation.py -> build/lib.linux-x86_64-3.7/rebound
copying rebound/plotting.py -> build/lib.linux-x86_64-3.7/rebound
copying rebound/particle.py -> build/lib.linux-x86_64-3.7/rebound
copying rebound/interruptible_pool.py -> build/lib.linux-x86_64-3.7/rebound
copying rebound/horizons.py -> build/lib.linux-x86_64-3.7/rebound
copying rebound/data.py -> build/lib.linux-x86_64-3.7/rebound
copying rebound/__init__.py -> build/lib.linux-x86_64-3.7/rebound
copying rebound/rebound.h -> build/lib.linux-x86_64-3.7/rebound
running build_ext
building 'librebound' extension
creating build/temp.linux-x86_64-3.7
creating build/temp.linux-x86_64-3.7/src
gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DLIBREBOUND -Isrc -I/usr/include/python3.7m -c src/rebound.c -o build/temp.linux-x86_64-3.7/src/rebound.o -fstrict-aliasing -O3 -std=c99 -Wno-unknown-pragmas -DGITHASH=d15889dce6327b47ace8111b0b376361aba81ff9 -DLIBREBOUND -D_GNU_SOURCE -fPIC
gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DLIBREBOUND -Isrc -I/usr/include/python3.7m -c src/integrator_ias15.c -o build/temp.linux-x86_64-3.7/src/integrator_ias15.o -fstrict-aliasing -O3 -std=c99 -Wno-unknown-pragmas -DGITHASH=d15889dce6327b47ace8111b0b376361aba81ff9 -DLIBREBOUND -D_GNU_SOURCE -fPIC
gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DLIBREBOUND -Isrc -I/usr/include/python3.7m -c src/integrator_whfast.c -o build/temp.linux-x86_64-3.7/src/integrator_whfast.o -fstrict-aliasing -O3 -std=c99 -Wno-unknown-pragmas -DGITHASH=d15889dce6327b47ace8111b0b376361aba81ff9 -DLIBREBOUND -D_GNU_SOURCE -fPIC
src/integrator_whfast.c: In function ‘reb_integrator_whfast_init’:
src/integrator_whfast.c:773:32: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Wsign-compare]
773 | if (ri_whfast->allocated_N != N){
| ^~
src/integrator_whfast.c: In function ‘reb_integrator_whfast_part2’:
src/integrator_whfast.c:1056:44: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Wsign-compare]
1056 | if (ri_whfast->allocated_Ntemp != N){
| ^~
src/integrator_whfast.c:1070:36: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Wsign-compare]
1070 | for (unsigned int i=1;i<N;i++){
| ^
src/integrator_whfast.c:1082:36: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Wsign-compare]
1082 | for (unsigned int i=1;i<N;i++){
| ^
gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DLIBREBOUND -Isrc -I/usr/include/python3.7m -c src/integrator_saba.c -o build/temp.linux-x86_64-3.7/src/integrator_saba.o -fstrict-aliasing -O3 -std=c99 -Wno-unknown-pragmas -DGITHASH=d15889dce6327b47ace8111b0b376361aba81ff9 -DLIBREBOUND -D_GNU_SOURCE -fPIC
src/integrator_saba.c: In function ‘reb_saba_corrector_step’:
src/integrator_saba.c:155:44: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Wsign-compare]
155 | if (ri_whfast->allocated_Ntemp != N){
| ^~
src/integrator_saba.c:171:36: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Wsign-compare]
171 | for (unsigned int i=1;i<N;i++){
| ^
src/integrator_saba.c:183:36: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Wsign-compare]
183 | for (unsigned int i=1;i<N;i++){
| ^
gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DLIBREBOUND -Isrc -I/usr/include/python3.7m -c src/integrator_mercurius.c -o build/temp.linux-x86_64-3.7/src/integrator_mercurius.o -fstrict-aliasing -O3 -std=c99 -Wno-unknown-pragmas -DGITHASH=d15889dce6327b47ace8111b0b376361aba81ff9 -DLIBREBOUND -D_GNU_SOURCE -fPIC
src/integrator_mercurius.c: In function ‘reb_mercurius_encounter_step’:
src/integrator_mercurius.c:276:29: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Wsign-compare]
276 | for (unsigned int i=0; i<r->N; i++){
| ^
src/integrator_mercurius.c:281:37: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Wsign-compare]
281 | if (r->N_active==-1 || i<r->N_active){
| ^
src/integrator_mercurius.c: In function ‘reb_integrator_mercurius_part1’:
src/integrator_mercurius.c:359:30: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Wsign-compare]
359 | if (rim->dcrit_allocatedN<N){
| ^
src/integrator_mercurius.c:369:24: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Wsign-compare]
369 | if (rim->allocatedN<N){
| ^
gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DLIBREBOUND -Isrc -I/usr/include/python3.7m -c src/integrator_eos.c -o build/temp.linux-x86_64-3.7/src/integrator_eos.o -fstrict-aliasing -O3 -std=c99 -Wno-unknown-pragmas -DGITHASH=d15889dce6327b47ace8111b0b376361aba81ff9 -DLIBREBOUND -D_GNU_SOURCE -fPIC
src/integrator_eos.c: In function ‘reb_integrator_eos_drift_shell1’:
src/integrator_eos.c:359:19: warning: comparison of integer expressions of different signedness: ‘int’ and ‘unsigned int’ [-Wsign-compare]
359 | for (int i=0;i<N;i++){
| ^
gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DLIBREBOUND -Isrc -I/usr/include/python3.7m -c src/integrator_leapfrog.c -o build/temp.linux-x86_64-3.7/src/integrator_leapfrog.o -fstrict-aliasing -O3 -std=c99 -Wno-unknown-pragmas -DGITHASH=d15889dce6327b47ace8111b0b376361aba81ff9 -DLIBREBOUND -D_GNU_SOURCE -fPIC
gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DLIBREBOUND -Isrc -I/usr/include/python3.7m -c src/integrator_janus.c -o build/temp.linux-x86_64-3.7/src/integrator_janus.o -fstrict-aliasing -O3 -std=c99 -Wno-unknown-pragmas -DGITHASH=d15889dce6327b47ace8111b0b376361aba81ff9 -DLIBREBOUND -D_GNU_SOURCE -fPIC
src/integrator_janus.c: In function ‘reb_integrator_janus_synchronize’:
src/integrator_janus.c:259:32: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Wsign-compare]
259 | if (r->ri_janus.allocated_N==r->N){
| ^~
gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DLIBREBOUND -Isrc -I/usr/include/python3.7m -c src/integrator_sei.c -o build/temp.linux-x86_64-3.7/src/integrator_sei.o -fstrict-aliasing -O3 -std=c99 -Wno-unknown-pragmas -DGITHASH=d15889dce6327b47ace8111b0b376361aba81ff9 -DLIBREBOUND -D_GNU_SOURCE -fPIC
gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DLIBREBOUND -Isrc -I/usr/include/python3.7m -c src/integrator.c -o build/temp.linux-x86_64-3.7/src/integrator.o -fstrict-aliasing -O3 -std=c99 -Wno-unknown-pragmas -DGITHASH=d15889dce6327b47ace8111b0b376361aba81ff9 -DLIBREBOUND -D_GNU_SOURCE -fPIC
src/integrator.c: In function ‘reb_update_acceleration’:
src/integrator.c:183:20: warning: comparison of integer expressions of different signedness: ‘int’ and ‘unsigned int’ [-Wsign-compare]
183 | if(r->N>r->ri_mercurius.allocatedN_additionalforces){
| ^
gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DLIBREBOUND -Isrc -I/usr/include/python3.7m -c src/gravity.c -o build/temp.linux-x86_64-3.7/src/gravity.o -fstrict-aliasing -O3 -std=c99 -Wno-unknown-pragmas -DGITHASH=d15889dce6327b47ace8111b0b376361aba81ff9 -DLIBREBOUND -D_GNU_SOURCE -fPIC
gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DLIBREBOUND -Isrc -I/usr/include/python3.7m -c src/boundary.c -o build/temp.linux-x86_64-3.7/src/boundary.o -fstrict-aliasing -O3 -std=c99 -Wno-unknown-pragmas -DGITHASH=d15889dce6327b47ace8111b0b376361aba81ff9 -DLIBREBOUND -D_GNU_SOURCE -fPIC
gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DLIBREBOUND -Isrc -I/usr/include/python3.7m -c src/display.c -o build/temp.linux-x86_64-3.7/src/display.o -fstrict-aliasing -O3 -std=c99 -Wno-unknown-pragmas -DGITHASH=d15889dce6327b47ace8111b0b376361aba81ff9 -DLIBREBOUND -D_GNU_SOURCE -fPIC
src/display.c: In function ‘reb_display_copy_data’:
src/display.c:1083:13: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Wsign-compare]
1083 | if (r->N>data->allocated_N){
| ^
gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DLIBREBOUND -Isrc -I/usr/include/python3.7m -c src/collision.c -o build/temp.linux-x86_64-3.7/src/collision.o -fstrict-aliasing -O3 -std=c99 -Wno-unknown-pragmas -DGITHASH=d15889dce6327b47ace8111b0b376361aba81ff9 -DLIBREBOUND -D_GNU_SOURCE -fPIC
src/collision.c: In function ‘reb_collision_search’:
src/collision.c:188:25: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
188 | if (rmin2_ab>rsum*rsum) continue;
| ^~
src/collision.c:191:7: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
191 | if (r->collisions_allocatedN<=collisions_N){
| ^~
gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DLIBREBOUND -Isrc -I/usr/include/python3.7m -c src/tools.c -o build/temp.linux-x86_64-3.7/src/tools.o -fstrict-aliasing -O3 -std=c99 -Wno-unknown-pragmas -DGITHASH=d15889dce6327b47ace8111b0b376361aba81ff9 -DLIBREBOUND -D_GNU_SOURCE -fPIC
gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DLIBREBOUND -Isrc -I/usr/include/python3.7m -c src/derivatives.c -o build/temp.linux-x86_64-3.7/src/derivatives.o -fstrict-aliasing -O3 -std=c99 -Wno-unknown-pragmas -DGITHASH=d15889dce6327b47ace8111b0b376361aba81ff9 -DLIBREBOUND -D_GNU_SOURCE -fPIC
gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DLIBREBOUND -Isrc -I/usr/include/python3.7m -c src/tree.c -o build/temp.linux-x86_64-3.7/src/tree.o -fstrict-aliasing -O3 -std=c99 -Wno-unknown-pragmas -DGITHASH=d15889dce6327b47ace8111b0b376361aba81ff9 -DLIBREBOUND -D_GNU_SOURCE -fPIC
gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DLIBREBOUND -Isrc -I/usr/include/python3.7m -c src/particle.c -o build/temp.linux-x86_64-3.7/src/particle.o -fstrict-aliasing -O3 -std=c99 -Wno-unknown-pragmas -DGITHASH=d15889dce6327b47ace8111b0b376361aba81ff9 -DLIBREBOUND -D_GNU_SOURCE -fPIC
src/particle.c: In function ‘reb_remove’:
src/particle.c:227:27: warning: comparison of integer expressions of different signedness: ‘int’ and ‘unsigned int’ [-Wsign-compare]
227 | for (int i=0;i<rim->encounterN;i++){
| ^
src/particle.c:235:22: warning: comparison of integer expressions of different signedness: ‘int’ and ‘unsigned int’ [-Wsign-compare]
235 | if (index<rim->encounterNactive){
| ^
gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DLIBREBOUND -Isrc -I/usr/include/python3.7m -c src/binarydiff.c -o build/temp.linux-x86_64-3.7/src/binarydiff.o -fstrict-aliasing -O3 -std=c99 -Wno-unknown-pragmas -DGITHASH=d15889dce6327b47ace8111b0b376361aba81ff9 -DLIBREBOUND -D_GNU_SOURCE -fPIC
gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DLIBREBOUND -Isrc -I/usr/include/python3.7m -c src/output.c -o build/temp.linux-x86_64-3.7/src/output.o -fstrict-aliasing -O3 -std=c99 -Wno-unknown-pragmas -DGITHASH=d15889dce6327b47ace8111b0b376361aba81ff9 -DLIBREBOUND -D_GNU_SOURCE -fPIC
gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DLIBREBOUND -Isrc -I/usr/include/python3.7m -c src/input.c -o build/temp.linux-x86_64-3.7/src/input.o -fstrict-aliasing -O3 -std=c99 -Wno-unknown-pragmas -DGITHASH=d15889dce6327b47ace8111b0b376361aba81ff9 -DLIBREBOUND -D_GNU_SOURCE -fPIC
gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DLIBREBOUND -Isrc -I/usr/include/python3.7m -c src/simulationarchive.c -o build/temp.linux-x86_64-3.7/src/simulationarchive.o -fstrict-aliasing -O3 -std=c99 -Wno-unknown-pragmas -DGITHASH=d15889dce6327b47ace8111b0b376361aba81ff9 -DLIBREBOUND -D_GNU_SOURCE -fPIC
gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DLIBREBOUND -Isrc -I/usr/include/python3.7m -c src/transformations.c -o build/temp.linux-x86_64-3.7/src/transformations.o -fstrict-aliasing -O3 -std=c99 -Wno-unknown-pragmas -DGITHASH=d15889dce6327b47ace8111b0b376361aba81ff9 -DLIBREBOUND -D_GNU_SOURCE -fPIC
src/transformations.c: In function ‘reb_transformations_whds_to_inertial_posvel’:
src/transformations.c:301:19: warning: comparison of integer expressions of different signedness: ‘int’ and ‘unsigned int’ [-Wsign-compare]
301 | for (int i=1;i<N;i++){
| ^
gcc -pthread -shared -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -g build/temp.linux-x86_64-3.7/src/rebound.o build/temp.linux-x86_64-3.7/src/integrator_ias15.o build/temp.linux-x86_64-3.7/src/integrator_whfast.o build/temp.linux-x86_64-3.7/src/integrator_saba.o build/temp.linux-x86_64-3.7/src/integrator_mercurius.o build/temp.linux-x86_64-3.7/src/integrator_eos.o build/temp.linux-x86_64-3.7/src/integrator_leapfrog.o build/temp.linux-x86_64-3.7/src/integrator_janus.o build/temp.linux-x86_64-3.7/src/integrator_sei.o build/temp.linux-x86_64-3.7/src/integrator.o build/temp.linux-x86_64-3.7/src/gravity.o build/temp.linux-x86_64-3.7/src/boundary.o build/temp.linux-x86_64-3.7/src/display.o build/temp.linux-x86_64-3.7/src/collision.o build/temp.linux-x86_64-3.7/src/tools.o build/temp.linux-x86_64-3.7/src/derivatives.o build/temp.linux-x86_64-3.7/src/tree.o build/temp.linux-x86_64-3.7/src/particle.o build/temp.linux-x86_64-3.7/src/binarydiff.o build/temp.linux-x86_64-3.7/src/output.o build/temp.linux-x86_64-3.7/src/input.o build/temp.linux-x86_64-3.7/src/simulationarchive.o build/temp.linux-x86_64-3.7/src/transformations.o -L/usr/lib64 -lpython3.7m -o build/lib.linux-x86_64-3.7/librebound.cpython-37m-x86_64-linux-gnu.so
/usr/bin/ld: cannot find -lpython3.7m
collect2: error: ld returned 1 exit status
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-r4o30ca2/rebound/setup.py'"'"'; __file__='"'"'/tmp/pip-install-r4o30ca2/rebound/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-record-vgescvxa/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/tobias/.local/include/python3.7m/rebound Check the logs for full command output.

This problem is solved now. I had to install python3-devel and gsl-devel. Credits to reddit user awegge

Related

pip3 install jupyterlab fail on WSL2.0 under windows 10 arm64

Ubuntu 20.04 on WSL 2.0 under windows 10 ARM64 (Surface Pro X with WSL2.0).
pip3 install jupyterlab // failure
Building wheels for collected packages: argon2-cffi
Building wheel for argon2-cffi (PEP 517) ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3.8 /usr/local/lib/python3.8/dist-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /tmp/tmp5k32hshp
cwd: /tmp/pip-install-jo5pljfy/argon2-cffi_f65af512bd344c9b956794545e86c839
Complete output (39 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-aarch64-3.8
creating build/lib.linux-aarch64-3.8/argon2
copying src/argon2/__main__.py -> build/lib.linux-aarch64-3.8/argon2
copying src/argon2/exceptions.py -> build/lib.linux-aarch64-3.8/argon2
copying src/argon2/_password_hasher.py -> build/lib.linux-aarch64-3.8/argon2
copying src/argon2/_ffi_build.py -> build/lib.linux-aarch64-3.8/argon2
copying src/argon2/low_level.py -> build/lib.linux-aarch64-3.8/argon2
copying src/argon2/_utils.py -> build/lib.linux-aarch64-3.8/argon2
copying src/argon2/_legacy.py -> build/lib.linux-aarch64-3.8/argon2
copying src/argon2/__init__.py -> build/lib.linux-aarch64-3.8/argon2
running build_clib
building 'argon2' library
creating build/temp.linux-aarch64-3.8
creating build/temp.linux-aarch64-3.8/extras
creating build/temp.linux-aarch64-3.8/extras/libargon2
creating build/temp.linux-aarch64-3.8/extras/libargon2/src
creating build/temp.linux-aarch64-3.8/extras/libargon2/src/blake2
aarch64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Iextras/libargon2/src/../include -Iextras/libargon2/src/blake2 -c extras/libargon2/src/argon2.c -o build/temp.linux-aarch64-3.8/extras/libargon2/src/argon2.o
aarch64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Iextras/libargon2/src/../include -Iextras/libargon2/src/blake2 -c extras/libargon2/src/blake2/blake2b.c -o build/temp.linux-aarch64-3.8/extras/libargon2/src/blake2/blake2b.o
aarch64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Iextras/libargon2/src/../include -Iextras/libargon2/src/blake2 -c extras/libargon2/src/core.c -o build/temp.linux-aarch64-3.8/extras/libargon2/src/core.o
aarch64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Iextras/libargon2/src/../include -Iextras/libargon2/src/blake2 -c extras/libargon2/src/encoding.c -o build/temp.linux-aarch64-3.8/extras/libargon2/src/encoding.o
aarch64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Iextras/libargon2/src/../include -Iextras/libargon2/src/blake2 -c extras/libargon2/src/ref.c -o build/temp.linux-aarch64-3.8/extras/libargon2/src/ref.o
aarch64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Iextras/libargon2/src/../include -Iextras/libargon2/src/blake2 -c extras/libargon2/src/thread.c -o build/temp.linux-aarch64-3.8/extras/libargon2/src/thread.o
aarch64-linux-gnu-gcc-ar rcs build/temp.linux-aarch64-3.8/libargon2.a build/temp.linux-aarch64-3.8/extras/libargon2/src/argon2.o build/temp.linux-aarch64-3.8/extras/libargon2/src/blake2/blake2b.o build/temp.linux-aarch64-3.8/extras/libargon2/src/core.o build/temp.linux-aarch64-3.8/extras/libargon2/src/encoding.o build/temp.linux-aar aarch64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Iextras/libargon2/include -I/usr/include/python3.8 -c build/temp.linux-aarch64-3.8/_ffi.c -o build/temp.linux-aarch64-3.8/build/temp.linux-aarch64-3.8/_ffi.o
build/temp.linux-aarch64-3.8/_ffi.c:50:14: fatal error: pyconfig.h: No such file or directory
50 | # include <pyconfig.h>
| ^~~~~~~~~~~~
compilation terminated.
error: command 'aarch64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for argon2-cffi
Failed to build argon2-cffi
ERROR: Could not build wheels for argon2-cffi which use PEP 517 and cannot be installed directly
How can I build argon2-cffi successfully?
I solved it following these steps:
sudo apt install -y build-essential python3.8-dev // ubuntu 20.04
pip3 install pep517 // or python3.8 -m pip install pep517
pip3 install jupyterlab // successfully

Python 2.7 DistUtils Extension gcc output compiles but setup.py fails

I am attempting to build a python extension using distutils. When I run the setup.py build, it fails. It also appears to print out the gcc command it was running when it failed. If I copy that to the command line it passes.
setup.py output:
running build
running build_ext
building 'covariance' extension
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -Dxdc_target_types__="gnu/targets/std.h" -Dxdc_target_name__=Linux86_64 -Dxdc_cfg__xheader__="\"/home/domain/user/Perforce/srcparts/src4300/src4384/matrix_benchmark/DSP/python/covara/package/cfg/covara_p86_64U.h\"" -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -I/home/domain/user/Perforce/tidsp/ti_rtsc/bios_6_52_00_12/packages -I/home/domain/user/Perforce/srcparts/src4300/src4384/matrix_benchmark/DSP/Program_Common/RTSC_Common -I/home/domain/user/Perforce/tidsp/ti_rtsc/lin/xdctools_3_50_03_33_core/packages -I/home/domain/user/Perforce/srcparts/src4300/src4384/matrix_benchmark/DSP/python/covara/.. -I/usr/include/python2.7 -c covariancea.c -o build/temp.linux-x86_64-2.7/covariancea.o
In file included from covariancea.c:10:0:
/home/domain/user/Perforce/tidsp/ti_rtsc/lin/xdctools_3_50_03_33_core/packages/xdc/std.h:81:22: fatal error: "gnu/targets/std.h": No such file or directory
#include xdc_target__
^
compilation terminated.
error: command 'gcc' failed with exit status 1
Now if I copy the gcc line from above and run it:
covariancea.c: In function ‘RunCovariance’:
covariancea.c:72:8: warning: variable ‘status’ set but not used [-Wunused-but-set-variable]
int status;
^
It seems to work, except when I go to the build/temp.linux-x86_64-2.7 directory and I don't see the .o file.
I'm sure there is something simple I am missing.
Thanks

Makefile:107: recipe for target '_shtns.so' failed

I am having a problem while trying to compile the shtns library with python support. I do:
./configure --prefix=$HOME/local --enable-python
make
and I get:
(...)
building '_shtns' extension
gcc -march=native -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-lMBuS3/python2.7-2.7.12=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/home/david/.local/lib/python2.7/site-packages/numpy/core/include -I/usr/include/python2.7 -c shtns_numpy_wrap.c -o build/temp.linux-x86_64-2.7/shtns_numpy_wrap.o -fopenmp
x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-lMBuS3/python2.7-2.7.12=. -fstack-protector-strong -Wformat -Werror=format-security -L/home/david/local/lib -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-lMBuS3/python2.7-2.7.12=. -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/shtns_numpy_wrap.o sht_init.o sht_fly.o sht_omp.o -L/home/david/local/lib -lfftw3_omp -lfftw3 -lm -o build/lib.linux-x86_64-2.7/_shtns.so -L/home/david/local/lib
/usr/bin/ld: /home/david/local/lib/libfftw3.a(assert.o): relocation R_X86_64_PC32 against symbol `stdout##GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Makefile:107: recipe for target '_shtns.so' failed
make: *** [_shtns.so] Error 1
I think those are the relevant lines. It suggests to compile using the -fpic flag, but that is already in my CFLAGS environment variable, as you can see in the first gcc line. The problem is with the 'x86_64-linux-gnu-gcc' bit. Any suggestions?

Cannot install mpi4py on CentOS 7

I have CentOS 7 and I have installed mpicc (it works and compiles for openmpi in C). I also have python 2.7.5 and just installed pip. I'm running this command and get the following errors:
sudo pip install mpi4py
Collecting mpi4py Using cached mpi4py-2.0.0.tar.gz Installing
> collected packages: mpi4py Running setup.py install for mpi4py ...
> error
> Complete output from command /usr/bin/python2 -u -c "import setuptools,
> tokenize;__file__='/tmp/pip-build-x5jD4O/mpi4py/setup.py';exec(compile(getattr(tokenize,
> 'open', open)(__file__).read().replace('\r\n', '\n'), __file__,
> 'exec'))" install --record /tmp/pip-mpMoZO-record/install-record.txt
> --single-version-externally-managed --compile:
> running install
> running build
> running build_src
> running build_py
> creating build
> creating build/lib.linux-x86_64-2.7
> creating build/lib.linux-x86_64-2.7/mpi4py
> copying src/__main__.py -> build/lib.linux-x86_64-2.7/mpi4py
> copying src/__init__.py -> build/lib.linux-x86_64-2.7/mpi4py
> creating build/lib.linux-x86_64-2.7/mpi4py/include
> creating build/lib.linux-x86_64-2.7/mpi4py/include/mpi4py
> copying src/include/mpi4py/mpi4py.MPI.h -> build/lib.linux-x86_64-2.7/mpi4py/include/mpi4py
> copying src/include/mpi4py/mpi4py.MPI_api.h -> build/lib.linux-x86_64-2.7/mpi4py/include/mpi4py
> copying src/include/mpi4py/mpi4py.h -> build/lib.linux-x86_64-2.7/mpi4py/include/mpi4py
> copying src/include/mpi4py/__init__.pxd -> build/lib.linux-x86_64-2.7/mpi4py/include/mpi4py
> copying src/include/mpi4py/libmpi.pxd -> build/lib.linux-x86_64-2.7/mpi4py/include/mpi4py
> copying src/include/mpi4py/MPI.pxd -> build/lib.linux-x86_64-2.7/mpi4py/include/mpi4py
> copying src/include/mpi4py/__init__.pyx -> build/lib.linux-x86_64-2.7/mpi4py/include/mpi4py
> copying src/include/mpi4py/mpi.pxi -> build/lib.linux-x86_64-2.7/mpi4py/include/mpi4py
> copying src/include/mpi4py/mpi4py.i -> build/lib.linux-x86_64-2.7/mpi4py/include/mpi4py
> copying src/MPI.pxd -> build/lib.linux-x86_64-2.7/mpi4py
> copying src/libmpi.pxd -> build/lib.linux-x86_64-2.7/mpi4py
> running build_clib
> MPI configuration: [mpi] from 'mpi.cfg'
> checking for library 'lmpe' ...
> gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -c _configtest.c -o _configtest.o
> gcc -pthread _configtest.o -llmpe -o _configtest
> /bin/ld: cannot find -llmpe
> collect2: error: ld returned 1 exit status
> failure.
> removing: _configtest.c _configtest.o
> building 'mpe' dylib library
> creating build/temp.linux-x86_64-2.7
> creating build/temp.linux-x86_64-2.7/src
> creating build/temp.linux-x86_64-2.7/src/lib-pmpi
> gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -c src/lib-pmpi/mpe.c -o build/temp.linux-x86_64-2.7/src/lib-pmpi/mpe.o
> creating build/lib.linux-x86_64-2.7/mpi4py/lib-pmpi
> gcc -pthread -shared -Wl,-z,relro build/temp.linux-x86_64-2.7/src/lib-pmpi/mpe.o -o
> build/lib.linux-x86_64-2.7/mpi4py/lib-pmpi/libmpe.so
> checking for library 'vt-mpi' ...
> gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -c _configtest.c -o _configtest.o
> gcc -pthread _configtest.o -lvt-mpi -o _configtest
> /bin/ld: cannot find -lvt-mpi
> collect2: error: ld returned 1 exit status
> failure.
> removing: _configtest.c _configtest.o
> checking for library 'vt.mpi' ...
> gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -c _configtest.c -o _configtest.o
> gcc -pthread _configtest.o -lvt.mpi -o _configtest
> /bin/ld: cannot find -lvt.mpi
> collect2: error: ld returned 1 exit status
> failure.
> removing: _configtest.c _configtest.o
> building 'vt' dylib library
> gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -c src/lib-pmpi/vt.c -o build/temp.linux-x86_64-2.7/src/lib-pmpi/vt.o
> gcc -pthread -shared -Wl,-z,relro build/temp.linux-x86_64-2.7/src/lib-pmpi/vt.o -o
> build/lib.linux-x86_64-2.7/mpi4py/lib-pmpi/libvt.so
> checking for library 'vt-mpi' ...
> gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -c _configtest.c -o _configtest.o
> gcc -pthread _configtest.o -lvt-mpi -o _configtest
> /bin/ld: cannot find -lvt-mpi
> collect2: error: ld returned 1 exit status
> failure.
> removing: _configtest.c _configtest.o
> checking for library 'vt.mpi' ...
> gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -c _configtest.c -o _configtest.o
> gcc -pthread _configtest.o -lvt.mpi -o _configtest
> /bin/ld: cannot find -lvt.mpi
> collect2: error: ld returned 1 exit status
> failure.
> removing: _configtest.c _configtest.o
> building 'vt-mpi' dylib library
> gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -c src/lib-pmpi/vt-mpi.c -o build/temp.linux-x86_64-2.7/src/lib-pmpi/vt-mpi.o
> gcc -pthread -shared -Wl,-z,relro build/temp.linux-x86_64-2.7/src/lib-pmpi/vt-mpi.o -o
> build/lib.linux-x86_64-2.7/mpi4py/lib-pmpi/libvt-mpi.so
> checking for library 'vt-hyb' ...
> gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -c _configtest.c -o _configtest.o
> gcc -pthread _configtest.o -lvt-hyb -o _configtest
> /bin/ld: cannot find -lvt-hyb
> collect2: error: ld returned 1 exit status
> failure.
> removing: _configtest.c _configtest.o
> checking for library 'vt.ompi' ...
> gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -c _configtest.c -o _configtest.o
> gcc -pthread _configtest.o -lvt.ompi -o _configtest
> /bin/ld: cannot find -lvt.ompi
> collect2: error: ld returned 1 exit status
> failure.
> removing: _configtest.c _configtest.o
> building 'vt-hyb' dylib library
> gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -c src/lib-pmpi/vt-hyb.c -o build/temp.linux-x86_64-2.7/src/lib-pmpi/vt-hyb.o
> gcc -pthread -shared -Wl,-z,relro build/temp.linux-x86_64-2.7/src/lib-pmpi/vt-hyb.o -o
> build/lib.linux-x86_64-2.7/mpi4py/lib-pmpi/libvt-hyb.so
> running build_ext
> MPI configuration: [mpi] from 'mpi.cfg'
> checking for MPI compile and link ...
> gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python2.7 -c _configtest.c -o _configtest.o
> _configtest.c:2:17: fatal error: mpi.h: No such file or directory
> #include <mpi.h>
> ^
> compilation terminated.
> failure.
> removing: _configtest.c _configtest.o
> error: Cannot compile MPI programs. Check your configuration!!!
I tried every solution I found so far and none seemed to work, has anyone any idea about this problem, please? Thank you
Run into the same issue and solved with:
yum install openmpi-devel
export CC=/usr/lib64/openmpi/bin/mpicc
pip install mpi4py
it seems you missed to install the development files of OpenMPI on Centos, the line that is the key here is:
_configtest.c:2:17: fatal error: mpi.h: No such file or directory
#include <mpi.h>
you should install the openmpi-devel (or equivalent) through yum and you should be good to reinstall the mpi4py module.
You could also try:
CentOS
yum install python-mpi4py
yum install python3-mpi4py
Debian
apt install python-mpi4py
apt install python3-mpi4py
For anyone else who runs into this, I'm posting this answer just in case you have a similar problem to me. The answer from #francis was the key. On my Centos7.7 system I was able to install mpi4py using the CC environment variable suggested by #iakov-nakhimovski but it was not working and I was getting runtime errors. The problem turned out to be that other software installed on the system had its own python installation in the path which was interfering with the setup of mpi4py. The solution was to remove this other installation from the path and to load the openmpi module which was shipped with the openmpi-devel package (I think).
module load mpi/openmpi-x86_64
Then install mpi4py using pip (note you do not need to explicitly define CC=mpicc since all these tools get put into the path by the environment module). When running a python script which requires mpi4py you also need to load this module.

How to install polyglot on Raspberry Pi? - problems with compatibility

I want to install this on my Raspberry Pi 2 (Raspbian):
http://polyglot.readthedocs.org/en/latest/Installation.html
Unfortunately, when I did sudo pip install polyglot I got the following error:
pi#raspberrypi:~ $ sudo pip install -U git+https://github.com/aboSamoor/polyglot.git#master
Downloading/unpacking git+https://github.com/aboSamoor/polyglot.git#master
Cloning https://github.com/aboSamoor/polyglot.git (to master) to /tmp/pip-97dbqD-build
Running setup.py (path:/tmp/pip-97dbqD-build/setup.py) egg_info for package from git+https://github.com/aboSamoor/polyglot.git#master
warning: no previously-included files matching '__pycache__' found under directory '*'
warning: no previously-included files matching '*.py[co]' found under directory '*'
Downloading/unpacking futures>=2.1.6 (from polyglot==15.10.03)
Downloading futures-3.0.5-py2-none-any.whl
Downloading/unpacking PyICU>=1.8 (from polyglot==15.10.03)
Downloading PyICU-1.9.2.tar.gz (175kB): 175kB downloaded
Running setup.py (path:/tmp/pip-build-FkLuG4/PyICU/setup.py) egg_info for package PyICU
Downloading/unpacking pycld2>=0.3 (from polyglot==15.10.03)
Downloading pycld2-0.31.tar.gz (14.3MB): 14.3MB downloaded
Running setup.py (path:/tmp/pip-build-FkLuG4/pycld2/setup.py) egg_info for package pycld2
Requirement already up-to-date: morfessor>=2.0.2a1 in /usr/local/lib/python2.7/dist-packages/Morfessor-2.0.2alpha3-py2.7.egg (from polyglot==15.10.03)
Downloading/unpacking six>=1.7.3 from https://pypi.python.org/packages/py2.py3/s/six/six-1.10.0-py2.py3-none-any.whl#md5=3ab558cf5d4f7a72611d59a81a315dc8 (from polyglot==15.10.03)
Downloading six-1.10.0-py2.py3-none-any.whl
Downloading/unpacking wheel>=0.23.0 from https://pypi.python.org/packages/py2.py3/w/wheel/wheel-0.29.0-py2.py3-none-any.whl#md5=d7db45db5c131af262b8ffccde46a88a (from polyglot==15.10.03)
Downloading wheel-0.29.0-py2.py3-none-any.whl (66kB): 66kB downloaded
Installing collected packages: futures, PyICU, pycld2, six, wheel, polyglot
Running setup.py install for PyICU
building '_icu' extension
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c dateformat.cpp -o build/temp.linux-armv7l-2.7/dateformat.o -DPYICU_VER="1.9.2"
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
In file included from dateformat.cpp:24:0:
common.h:33:20: fatal error: Python.h: No such file or directory
#include <Python.h>
^
compilation terminated.
error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1
Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-FkLuG4/PyICU/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-kNR6VT-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.linux-armv7l-2.7
copying icu.py -> build/lib.linux-armv7l-2.7
copying PyICU.py -> build/lib.linux-armv7l-2.7
copying docs.py -> build/lib.linux-armv7l-2.7
running build_ext
building '_icu' extension
creating build/temp.linux-armv7l-2.7
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c dateformat.cpp -o build/temp.linux-armv7l-2.7/dateformat.o -DPYICU_VER="1.9.2"
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
In file included from dateformat.cpp:24:0:
common.h:33:20: fatal error: Python.h: No such file or directory
#include <Python.h>
^
compilation terminated.
error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1
----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-FkLuG4/PyICU/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-kNR6VT-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip-build-FkLuG4/PyICU
Traceback (most recent call last):
File "/usr/bin/pip", line 9, in <module>
load_entry_point('pip==1.5.6', 'console_scripts', 'pip')()
File "/usr/lib/python2.7/dist-packages/pip/__init__.py", line 248, in main
return command.main(cmd_args)
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 161, in main
text = '\n'.join(complete_log)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 42: ordinal not in range(128)
I believe this is a problem with PYCLD2? It is for 64bit system?
How to solve this problem?
#edit
After executing: sudo apt-get install python-dev
I got:
pi#raspberrypi:~ $ sudo pip install polyglot
Requirement already satisfied (use --upgrade to upgrade): polyglot in /usr/local/lib/python2.7/dist-packages/polyglot-15.10.03-py2.7.egg
Requirement already satisfied (use --upgrade to upgrade): futures>=2.1.6 in /usr/local/lib/python2.7/dist-packages (from polyglot)
Downloading/unpacking PyICU>=1.8 (from polyglot)
Downloading PyICU-1.9.2.tar.gz (175kB): 175kB downloaded
Running setup.py (path:/tmp/pip-build-y6_Rht/PyICU/setup.py) egg_info for package PyICU
Downloading/unpacking pycld2>=0.3 (from polyglot)
Downloading pycld2-0.31.tar.gz (14.3MB): 14.3MB downloaded
Running setup.py (path:/tmp/pip-build-y6_Rht/pycld2/setup.py) egg_info for package pycld2
Requirement already satisfied (use --upgrade to upgrade): morfessor>=2.0.2a1 in /usr/local/lib/python2.7/dist-packages/Morfessor-2.0.2alpha3-py2.7.egg (from polyglot)
Requirement already satisfied (use --upgrade to upgrade): six>=1.7.3 in /usr/lib/python2.7/dist-packages (from polyglot)
Requirement already satisfied (use --upgrade to upgrade): wheel>=0.23.0 in /usr/lib/python2.7/dist-packages (from polyglot)
Installing collected packages: PyICU, pycld2
Running setup.py install for PyICU
building '_icu' extension
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c dateformat.cpp -o build/temp.linux-armv7l-2.7/dateformat.o -DPYICU_VER="1.9.2"
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c char.cpp -o build/temp.linux-armv7l-2.7/char.o -DPYICU_VER="1.9.2"
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c errors.cpp -o build/temp.linux-armv7l-2.7/errors.o -DPYICU_VER="1.9.2"
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c numberformat.cpp -o build/temp.linux-armv7l-2.7/numberformat.o -DPYICU_VER="1.9.2"
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c charset.cpp -o build/temp.linux-armv7l-2.7/charset.o -DPYICU_VER="1.9.2"
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c normalizer.cpp -o build/temp.linux-armv7l-2.7/normalizer.o -DPYICU_VER="1.9.2"
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c transliterator.cpp -o build/temp.linux-armv7l-2.7/transliterator.o -DPYICU_VER="1.9.2"
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c unicodeset.cpp -o build/temp.linux-armv7l-2.7/unicodeset.o -DPYICU_VER="1.9.2"
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c shape.cpp -o build/temp.linux-armv7l-2.7/shape.o -DPYICU_VER="1.9.2"
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c collator.cpp -o build/temp.linux-armv7l-2.7/collator.o -DPYICU_VER="1.9.2"
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c _icu.cpp -o build/temp.linux-armv7l-2.7/_icu.o -DPYICU_VER="1.9.2"
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c iterators.cpp -o build/temp.linux-armv7l-2.7/iterators.o -DPYICU_VER="1.9.2"
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c tzinfo.cpp -o build/temp.linux-armv7l-2.7/tzinfo.o -DPYICU_VER="1.9.2"
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c search.cpp -o build/temp.linux-armv7l-2.7/search.o -DPYICU_VER="1.9.2"
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c layoutengine.cpp -o build/temp.linux-armv7l-2.7/layoutengine.o -DPYICU_VER="1.9.2"
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c calendar.cpp -o build/temp.linux-armv7l-2.7/calendar.o -DPYICU_VER="1.9.2"
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c idna.cpp -o build/temp.linux-armv7l-2.7/idna.o -DPYICU_VER="1.9.2"
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c spoof.cpp -o build/temp.linux-armv7l-2.7/spoof.o -DPYICU_VER="1.9.2"
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c common.cpp -o build/temp.linux-armv7l-2.7/common.o -DPYICU_VER="1.9.2"
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
common.cpp: In function ‘void _stopDecode(const void*, UConverterToUnicodeArgs*, const char*, int32_t, UConverterCallbackReason, UErrorCode*)’:
common.cpp:62:32: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
const int len = length < sizeof(stop->chars) - 1 ? length : sizeof(stop->chars) - 1;
^
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c format.cpp -o build/temp.linux-armv7l-2.7/format.o -DPYICU_VER="1.9.2"
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c regex.cpp -o build/temp.linux-armv7l-2.7/regex.o -DPYICU_VER="1.9.2"
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c locale.cpp -o build/temp.linux-armv7l-2.7/locale.o -DPYICU_VER="1.9.2"
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
locale.cpp: In function ‘int t_locale_init(t_locale*, PyObject*, PyObject*)’:
locale.cpp:323:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (len < sizeof(code))
^
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c bases.cpp -o build/temp.linux-armv7l-2.7/bases.o -DPYICU_VER="1.9.2"
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c script.cpp -o build/temp.linux-armv7l-2.7/script.o -DPYICU_VER="1.9.2"
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
c++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wl,-z,relro -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-armv7l-2.7/dateformat.o build/temp.linux-armv7l-2.7/char.o build/temp.linux-armv7l-2.7/errors.o build/temp.linux-armv7l-2.7/numberformat.o build/temp.linux-armv7l-2.7/charset.o build/temp.linux-armv7l-2.7/normalizer.o build/temp.linux-armv7l-2.7/transliterator.o build/temp.linux-armv7l-2.7/unicodeset.o build/temp.linux-armv7l-2.7/shape.o build/temp.linux-armv7l-2.7/collator.o build/temp.linux-armv7l-2.7/_icu.o build/temp.linux-armv7l-2.7/iterators.o build/temp.linux-armv7l-2.7/tzinfo.o build/temp.linux-armv7l-2.7/search.o build/temp.linux-armv7l-2.7/layoutengine.o build/temp.linux-armv7l-2.7/calendar.o build/temp.linux-armv7l-2.7/idna.o build/temp.linux-armv7l-2.7/spoof.o build/temp.linux-armv7l-2.7/common.o build/temp.linux-armv7l-2.7/format.o build/temp.linux-armv7l-2.7/regex.o build/temp.linux-armv7l-2.7/locale.o build/temp.linux-armv7l-2.7/bases.o build/temp.linux-armv7l-2.7/script.o -licui18n -licuuc -licudata -licule -o build/lib.linux-armv7l-2.7/_icu.so
Running setup.py install for pycld2
building 'pycld2._pycld2' extension
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Icld2/internal -Icld2/public -I/usr/include/python2.7 -c cld2/internal/cldutil.cc -o build/temp.linux-armv7l-2.7/cld2/internal/cldutil.o -w -O2 -m64 -fPIC
arm-linux-gnueabihf-gcc: error: unrecognized command line option ‘-m64’
error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1
Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-y6_Rht/pycld2/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-pSIInS-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.linux-armv7l-2.7
creating build/lib.linux-armv7l-2.7/pycld2
copying pycld2/__init__.py -> build/lib.linux-armv7l-2.7/pycld2
running build_ext
building 'pycld2._pycld2' extension
creating build/temp.linux-armv7l-2.7
creating build/temp.linux-armv7l-2.7/cld2
creating build/temp.linux-armv7l-2.7/cld2/internal
creating build/temp.linux-armv7l-2.7/bindings
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Icld2/internal -Icld2/public -I/usr/include/python2.7 -c cld2/internal/cldutil.cc -o build/temp.linux-armv7l-2.7/cld2/internal/cldutil.o -w -O2 -m64 -fPIC
arm-linux-gnueabihf-gcc: error: unrecognized command line option ‘-m64’
error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1
----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-y6_Rht/pycld2/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-pSIInS-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip-build-y6_Rht/pycld2
Traceback (most recent call last):
File "/usr/bin/pip", line 9, in <module>
load_entry_point('pip==1.5.6', 'console_scripts', 'pip')()
File "/usr/lib/python2.7/dist-packages/pip/__init__.py", line 248, in main
return command.main(cmd_args)
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 161, in main
text = '\n'.join(complete_log)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 42: ordinal not in range(128)
I managed to solve this problem.
First you need to do is to download polyglot's source code:
git clone https://github.com/aboSamoor/polyglot
Then edit setup.py:
nano polyglot/pycld2/setup.py
Change this line:
extra_compile_args=['-w', '-O2', '-m64', '-fPIC'],
to:
extra_compile_args=['-w', '-O2', '-fPIC'],
Install PYCLD2:
sudo ./setup.py install
Install polyglot:
cd ..
sudo ./setup.py install

Categories