I encountered some configuration problems when installing spams package in python
The version of my Visual Studio is 14.0. I made the VERSION of the code in the msvc9compiler.py file equal to 14.0 and solved the problem of not finding the version; and added the distutils.cfg file: [build] compiler=mingw32 solved some bugs. Now I have encountered a missing spams-tst.h file and gcc status 1 problem, cry...
D:\software\anaconda3\anzhuang_k\spams-2.6.1>python setup.py install
running install
running build
running build_py
running build_ext
building '_spams_wrap' extension
C compiler: gcc -g -DDEBUG -DMS_WIN64 -O0 -Wall -Wstrict-prototypes
compile options: '-DNPY_MINGW_USE_CUSTOM_MSVCR -D__MSVCRT_VERSION__=0x1900 -I. -Ispams\linalg -Ispams\prox -Ispams\decomp -Ispams\dictLearn -ID:\software\anaconda3\lib\site-packages\numpy\core\include -ID:\software\anaconda3\include -ID:\software\anaconda3\include -ID:\software\anaconda3\include -ID:\software\anaconda3\include -c'
extra options: '-DNDEBUG -DUSE_BLAS_LIB -fPIC -fopenmp -Wunused-variable -m64'
gcc -g -DDEBUG -DMS_WIN64 -O0 -Wall -Wstrict-prototypes -DNPY_MINGW_USE_CUSTOM_MSVCR -D__MSVCRT_VERSION__=0x1900 -I. -Ispams\linalg -Ispams\prox -Ispams\decomp -Ispams\dictLearn -ID:\software\anaconda3\lib\site-packages\numpy\core\include -ID:\software\anaconda3\include -ID:\software\anaconda3\include -ID:\software\anaconda3\include -ID:\software\anaconda3\include -c spams_wrap.cpp -o build\temp.win-amd64-3.6\Release\spams_wrap.o -DNDEBUG -DUSE_BLAS_LIB -fPIC -fopenmp -Wunused-variable -m64
cc1plus.exe: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++
spams_wrap.cpp:1:0: warning: -fPIC ignored for target (all code is position independent)
/* ----------------------------------------------------------------------------
^
spams_wrap.cpp:3134:23: fatal error: spams-tst.h: No such file or directory
compilation terminated.
error: Command "gcc -g -DDEBUG -DMS_WIN64 -O0 -Wall -Wstrict-prototypes -DNPY_MINGW_USE_CUSTOM_MSVCR -D__MSVCRT_VERSION__=0x1900 -I. -Ispams\linalg -Ispams\prox -Ispams\decomp -Ispams\dictLearn -ID:\software\anaconda3\lib\site-packages\numpy\core\include -ID:\software\anaconda3\include -ID:\software\anaconda3\include -ID:\software\anaconda3\include -ID:\software\anaconda3\include -c spams_wrap.cpp -o build\temp.win-amd64-3.6\Release\spams_wrap.o -DNDEBUG -DUSE_BLAS_LIB -fPIC -fopenmp -Wunused-variable -m64" failed with exit status 1
D:\software\anaconda3\anzhuang_k\spams-2.6.1>
Installation failed
Related
I have been trying to compile python3-protobuf package from Yocto dunfell release, but I am getting compiler error.
I am below recipe from Yocto without any change:
python3-protobuf_3.11.3.bb
inherit setuptools3
require python-protobuf.inc
BBCLASSEXTEND = "native nativesdk"
DEPENDS += "protobuf"
DISTUTILS_BUILD_ARGS += "--cpp_implementation"
DISTUTILS_INSTALL_ARGS += "--cpp_implementation"
do_compile_prepend_class-native () {
export KOKORO_BUILD_NUMBER="1"
}
I am getting below error
aarch64-oe-linux-gcc -march=armv8-a+crc -fstack-protector-strong -pie -fPIE -D_FORTIFY_SOURCE=2 -Wa,--noexecstack -Wformat -Wformat-security -Werror=format-security --sysroot=/home/admin/build/distro-debug/tmp-glibc/work/aarch64-oe-linux/python3-protobuf/3.11.3-r0/recipe-sysroot -Wno-unused-result -Wsign-compare -DNDEBUG -g -O3 -Wall -O2 -g -Wa,--noexecstack -fexpensive-optimizations -frename-registers -ftree-vectorize -finline-functions -finline-limit=64 -Wno-error=maybe-uninitialized -Wno-error=unused-result -O2 -g -Wa,--noexecstack -fexpensive-optimizations -frename-registers -ftree-vectorize -finline-functions -finline-limit=64 -Wno-error=maybe-uninitialized -Wno-error=unused-result -O2 -g -Wa,--noexecstack -fexpensive-optimizations -frename-registers -ftree-vectorize -finline-functions -finline-limit=64 -Wno-error=maybe-uninitialized -Wno-error=unused-result -fPIC -I. -I../src -I/home/admin/build/distro-debug/tmp-glibc/work/aarch64-oe-linux/python3-protobuf/3.11.3-r0/recipe-sysroot/usr/include/python3.8 -c google/protobuf/pyext/message.cc -o /home/admin/build/distro-debug/tmp-glibc/work/aarch64-oe-linux/python3-protobuf/3.11.3-r0/build/temp.linux-x86_64-3.8/google/protobuf/pyext/message.o -Wno-write-strings -Wno-invalid-offsetof -Wno-sign-compare -Wno-unused-variable -std=c++11
google/protobuf/pyext/message.cc:70:10: fatal error: google/protobuf/stubs/map_util.h: No such file or directory
70 | #include <google/protobuf/stubs/map_util.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
error: command 'aarch64-oe-linux-gcc' failed with exit status 1
ERROR: 'python3 setup.py build --cpp_implementation' execution failed.
WARNING: /home/admin/build/distro-debug/tmp-glibc/work/aarch64-oe-linux/python3-protobuf/3.11.3-r0/temp/run.do_compile.15287:1 exit 1 from 'exit 1'
If I remove below from recipe
DISTUTILS_BUILD_ARGS += "--cpp_implementation"
DISTUTILS_INSTALL_ARGS += "--cpp_implementation"
from the recipe, then I do not get any error.
Thanks
I am trying to install the optimization library pyOpt on Windows 7 (64-bit - Python 3.6) following the instructions on PyOpt\Installing.
I have installed the required dependencies but I get the following error:
compiling C sources
C compiler: gcc -g -DDEBUG -DMS_WIN64 -O0 -Wall -Wstrict-prototypes
compile options: '-DNPY_MINGW_USE_CUSTOM_MSVCR -D__MSVCRT_VERSION__=0x1900 -Ibuild\src.win-amd64-3.6\build\src.win-amd64-3.6\pyALGENCAN\source\f2py -IC:\Users\gporzio\AppData\Local\Programs\Python\Python36\Lib\site-packages\numpy\core\include -IC:\Users\gporzio\AppData\Local\Programs\Python\Python36\include -IC:\Users\gporzio\AppData\Local\Programs\Python\Python36\include -c'
gcc -g -DDEBUG -DMS_WIN64 -O0 -Wall -Wstrict-prototypes -DNPY_MINGW_USE_CUSTOM_MSVCR -D__MSVCRT_VERSION__=0x1900 -Ibuild\src.win-amd64-3.6\build\src.win-amd64-3.6\pyALGENCAN\source\f2py -IC:\Users\gporzio\AppData\Local\Programs\Python\Python36\Lib\site-packages\numpy\core\include -IC:\Users\gporzio\AppData\Local\Programs\Python\Python36\include -IC:\Users\gporzio\AppData\Local\Programs\Python\Python36\include -c build\src.win-amd64-3.6\pyALGENCAN\source\f2py\algencanmodule.c -o build\temp.win-amd64-3.6\Release\build\src.win-amd64-3.6\pyalgencan\source\f2py\algencanmodule.o
gcc -g -DDEBUG -DMS_WIN64 -O0 -Wall -Wstrict-prototypes -DNPY_MINGW_USE_CUSTOM_MSVCR -D__MSVCRT_VERSION__=0x1900 -Ibuild\src.win-amd64-3.6\build\src.win-amd64-3.6\pyALGENCAN\source\f2py -IC:\Users\gporzio\AppData\Local\Programs\Python\Python36\Lib\site-packages\numpy\core\include -IC:\Users\gporzio\AppData\Local\Programs\Python\Python36\include -IC:\Users\gporzio\AppData\Local\Programs\Python\Python36\include -c build\src.win-amd64-3.6\build\src.win-amd64-3.6\pyALGENCAN\source\f2py\fortranobject.c -o build\temp.win-amd64-3.6\Release\build\src.win-amd64-3.6\build\src.win-amd64-3.6\pyalgencan\source\f2py\fortranobject.o
compiling Fortran sources
Fortran f77 compiler: C:\Program Files\mingw-w64\x86_64-7.3.0-win32-seh-rt_v5-rev0\mingw64\bin\gfortran.exe -Wall -g -ffixed-form -fno-second-underscore -O3 -funroll-loops
Fortran f90 compiler: C:\Program Files\mingw-w64\x86_64-7.3.0-win32-seh-rt_v5-rev0\mingw64\bin\gfortran.exe -Wall -g -fno-second-underscore -O3 -funroll-loops
Fortran fix compiler: C:\Program Files\mingw-w64\x86_64-7.3.0-win32-seh-rt_v5-rev0\mingw64\bin\gfortran.exe -Wall -g -ffixed-form -fno-second-underscore -Wall -g -fno-second-underscore -O3 -funroll-loops
compile options: '-Ibuild\src.win-amd64-3.6\build\src.win-amd64-3.6\pyALGENCAN\source\f2py -IC:\Users\gporzio\AppData\Local\Programs\Python\Python36\Lib\site-packages\numpy\core\include -IC:\Users\gporzio\AppData\Local\Programs\Python\Python36\include -IC:\Users\gporzio\AppData\Local\Programs\Python\Python36\include -c'
gfortran.exe:f77: build\src.win-amd64-3.6\pyALGENCAN\source\f2py\algencan-f2pywrappers.f
C:\Program Files\mingw-w64\x86_64-7.3.0-win32-seh-rt_v5-rev0\mingw64\bin\gfortran.exe -Wall -g -Wall -g -shared build\temp.win-amd64-3.6\Release\build\src.win-amd64-3.6\pyalgencan\source\f2py\algencanmodule.o build\temp.win-amd64-3.6\Release\build\src.win-amd64-3.6\build\src.win-amd64-3.6\pyalgencan\source\f2py\fortranobject.o build\temp.win-amd64-3.6\Release\build\src.win-amd64-3.6\pyALGENCAN\source\f2py\algencan-f2pywrappers.o -L"C:\Program Files\mingw-w64\x86_64-7.3.0-win32-seh-rt_v5-rev0\mingw64\lib\gcc\x86_64-w64-mingw32\7.3.0" -LC:\Users\gporzio\AppData\Local\Programs\Python\Python36\libs -LC:\Users\gporzio\AppData\Local\Programs\Python\Python36\PCbuild\amd64 -Lbuild\temp.win-amd64-3.6 -lalgencan -lpython36 -lgfortran -o build\lib.win-amd64-3.6\pyOpt\pyALGENCAN\algencan.cp36-win_amd6
4.pyd
build\temp.win-amd64-3.6\Release\build\src.win-amd64-3.6\pyalgencan\source\f2py\algencanmodule.o: In function `f2py_rout_algencan_algencan':
C:\Users\gporzio\Desktop\pyOpt-1.2.0\pyOpt/build/src.win-amd64-3.6/pyALGENCAN/source/f2py/algencanmodule.c:3397: undefined reference to `__intrinsic_setjmpex'
C:\Users\gporzio\Desktop\pyOpt-1.2.0\pyOpt/build/src.win-amd64-3.6/pyALGENCAN/source/f2py/algencanmodule.c:3397: undefined reference to `__intrinsic_setjmpex'
C:\Users\gporzio\Desktop\pyOpt-1.2.0\pyOpt/build/src.win-amd64-3.6/pyALGENCAN/source/f2py/algencanmodule.c:3397: undefined reference to `__intrinsic_setjmpex'
C:\Users\gporzio\Desktop\pyOpt-1.2.0\pyOpt/build/src.win-amd64-3.6/pyALGENCAN/source/f2py/algencanmodule.c:3397: undefined reference to `__intrinsic_setjmpex'
C:\Users\gporzio\Desktop\pyOpt-1.2.0\pyOpt/build/src.win-amd64-3.6/pyALGENCAN/source/f2py/algencanmodule.c:3397: undefined reference to `__intrinsic_setjmpex'
build\temp.win-amd64-3.6\Release\build\src.win-amd64-3.6\pyalgencan\source\f2py\algencanmodule.o:C:\Users\gporzio\Desktop\pyOpt-1.2.0\pyOpt/build/src.win-amd64-3.6/pyALGENCAN/source/f2py/algencanmodule.c:3397: more undefined references to `__intrinsic_setjmpex' follow
collect2.exe: error: ld returned 1 exit status
error: Command "C:\Program Files\mingw-w64\x86_64-7.3.0-win32-seh-rt_v5-rev0\mingw64\bin\gfortran.exe -Wall -g -Wall -g -shared build\temp.win-amd64-3.6\Release\build\src.win-amd64-3.6\pyalgencan\source\f2py\algencanmodule.o build\temp.win-amd64-3.6\Release\build\src.win-amd64-3.6\build\src.win-amd64-3.6\pyalgencan\source\f2py\fortranobject.o build\temp.win-amd64-3.6\Release\build\src.win-amd64-3.6\pyALGENCAN\source\f2py\algencan-f2pywrappers.o -L"C:\Program Files\mingw-w64\x86_64-7.3.0-win32-seh-rt_v5-rev0\mingw64\lib\gcc\x86_64-w64-mingw32\7.3.0" -LC:\Users\gporzio\AppData\Local\Programs\Python\Python36\libs -LC:\Users\gporzio\AppData\Local\Programs\Python\Python36\PCbuild\amd64 -Lbuild\temp.win-amd64-3.6 -lalgencan -lpython36 -lgfortran -o build\lib.win-amd64-3.6\pyOpt\pyALGENCAN\algenc
an.cp36-win_amd64.pyd" failed with exit status 1
I've tried both with python setup.py install and with python setup.py build --compiler=mingw32 but I always get the same error.
Could someone give me some suggestion?
I'm trying to install PyLucene, and when I do "pushd jcc" and "python setup.py build", I get this error:
ld: internal error: atom not found in symbolIndex(__ZN7JNIEnv_13CallIntMethodEP8_jobjectP10_jmethodIDz) for architecture x86_64
What could be the problem? I have the Java 1.7 SDK installed. I installed Python using "brew install Python" and I added /usr/local/bin before /urs/bin in my PATH so that this version of Python 2.7.8 is used and not the one shipped by Apple (2.7).
Here are some lines that get outputted on the "python setup.py build" command:
found JAVAHOME = /Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home
found JAVAFRAMEWORKS = /System/Library/Frameworks/JavaVM.framework
and
writing /Users/administrator/Downloads/pylucene-4.9.0-0/jcc/jcc/config.py
copying jcc/config.py -> build/lib.macosx-10.9-x86_64-2.7/jcc
copying jcc/classes/org/apache/jcc/PythonVM.class -> build/lib.macosx-10.9-x86_64-2.7/jcc/classes/org/apache/jcc
copying jcc/classes/org/apache/jcc/PythonException.class -> build/lib.macosx-10.9-x86_64-2.7/jcc/classes/org/apache/jcc
running build_ext
building 'jcc' extension
clang -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Qunused-arguments -Qunused-arguments -dynamiclib -D_jcc_lib -DJCC_VER="2.20" -I/Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home/include/darwin -I_jcc -Ijcc/sources -I/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c jcc/sources/jcc.cpp -o build/temp.macosx-10.9-x86_64-2.7/jcc/sources/jcc.o -DPYTHON -fno-strict-aliasing -Wno-write-strings
clang -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Qunused-arguments -Qunused-arguments -dynamiclib -D_jcc_lib -DJCC_VER="2.20" -I/Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home/include/darwin -I_jcc -Ijcc/sources -I/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c jcc/sources/JCCEnv.cpp -o build/temp.macosx-10.9-x86_64-2.7/jcc/sources/JCCEnv.o -DPYTHON -fno-strict-aliasing -Wno-write-strings
clang++ -Wl,-x -dynamiclib -undefined dynamic_lookup -Qunused-arguments -Qunused-arguments build/temp.macosx-10.9-x86_64-2.7/jcc/sources/jcc.o build/temp.macosx-10.9-x86_64-2.7/jcc/sources/JCCEnv.o -o build/lib.macosx-10.9-x86_64-2.7/libjcc.dylib -L/Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home/jre/lib -ljava -L/Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home/jre/lib/server -ljvm -Wl,-rpath -Wl,/Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home/jre/lib -Wl,-rpath -Wl,/Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home/jre/lib/server -Wl,-S -install_name #rpath/libjcc.dylib -current_version 2.20 -compatibility_version 2.20
ld: internal error: atom not found in symbolIndex(__ZN7JNIEnv_13CallIntMethodEP8_jobjectP10_jmethodIDz) for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'clang++' failed with exit status 1
You either need to build Python from source with the same compiler, as described here, or alternatively build it in NO_SHARED mode. The latter is the default for the pylucene homebrew formula.
I'm running Linux dev-tools image (link at the end) on my intel galileo. I tried to install greenlet but I got an error stating python.h no such file.
root#clanton:/media/realroot/greenlet-0.4.2# python setup.py install
running install
running build
running build_ext
creating /tmp/tmpuKbWhk/tmp
creating /tmp/tmpuKbWhk/tmp/tmpuKbWhk
i586-poky-linux-uclibc-gcc -m32 -march=i586 -fno-strict-aliasing -O2 -pipe -g -feliminate-unused-debug-types -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -fno-tree-dominator-opts -I/usr/include/python2.7 -c /tmp/tmpuKbWhk/simple.c -o /tmp/tmpuKbWhk/tmp/tmpuKbWhk/simple.o
/tmp/tmpuKbWhk/simple.c:1:6: warning: function declaration isn't a prototype [-Wstrict-prototypes]
building 'greenlet' extension
creating build
creating build/temp.linux-i586-2.7
i586-poky-linux-uclibc-gcc -m32 -march=i586 -fno-strict-aliasing -O2 -pipe -g -feliminate-unused-debug-types -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -fno-tree-dominator-opts -I/usr/include/python2.7 -c greenlet.c -o build/temp.linux-i586-2.7/greenlet.o
In file included from greenlet.c:5:0:
greenlet.h:8:20: fatal error: Python.h: No such file or directory
compilation terminated.
error: command 'i586-poky-linux-uclibc-gcc' failed with exit status 1**
I know there are many posts with the same python.h error but my problem is the Linux image I have can't run sudo or apt commands
I need to setup python-dev environment onto my Linux image running on Galileo board.
Link to the Linux dev-tools image I'm using is here below.
http://telekinect.media.mit.edu/galileo/image-devtools-1.0.1-2.tar.bz2
p.s. it has gcc and python2.7 already.
I am trying to install the fabric library to an old machine. There are some legacy libraries in /usr/lib, such as libgmp.
(py27)[qrtt1#hcservice app]$ ls /usr/lib|grep gmp
libgmp.a
libgmp.so
libgmp.so.3
libgmp.so.3.3.3
libgmpxx.a
libgmpxx.so
libgmpxx.so.3
libgmpxx.so.3.0.5
I have compiled the libgmp 5.x in my $HOME/app, and then am trying to install pycrypto (it is the dependency of fab):
CFLGAS=-I/home/qrtt1/app/include LDFLGAS=-L/home/qrtt1/app/lib pip install pycrypto
I observed that none of my include or lib directories are in the in the compilation / linking options:
gcc -pthread -fno-strict-aliasing -fwrapv -Wall -Wstrict-prototypes -fPIC -std=c99 -O3 -fomit-frame-pointer -Isrc/ -I/usr/include/ -I/home/qrtt1/app/include/python2.7 -c src/_fastmath.c -o build/temp.linux-i686-2.7/src/_fastmath.o
gcc -pthread -shared build/temp.linux-i686-2.7/src/_fastmath.o -lgmp -o build/lib.linux-i686-2.7/Crypto/PublicKey/_fastmath.so
building 'Crypto.Hash._MD2' extension
gcc -pthread -fno-strict-aliasing -fwrapv -Wall -Wstrict-prototypes -fPIC -std=c99 -O3 -fomit-frame-pointer -Isrc/ -I/home/qrtt1/app/include/python2.7 -c src/MD2.c -o build/temp.linux-i686-2.7/src/MD2.o
gcc -pthread -shared build/temp.linux-i686-2.7/src/MD2.o -o build/lib.linux-i686-2.7/Crypto/Hash/_MD2.so
building 'Crypto.Hash._MD4' extension
gcc -pthread -fno-strict-aliasing -fwrapv -Wall -Wstrict-prototypes -fPIC -std=c99 -O3 -fomit-frame-pointer -Isrc/ -I/home/qrtt1/app/include/python2.7 -c src/MD4.c -o build/temp.linux-i686-2.7/src/MD4.o
gcc -pthread -shared build/temp.linux-i686-2.7/src/MD4.o -o build/lib.linux-i686-2.
How do I assign the CFLAGS and LDFLAGS correctly for building pycrypto ?
I try to download pycrypto-2.5 and install it:
(py27)[qrtt1#hcservice pycrypto-2.5]$ CFLGAS=-I/home/qrtt1/app/include LDFLGAS=-L/home/qrtt1/app/lib python setup.py install
No CFLAGS or LDFLAGS set up with it. May be the pycrypto-2.5 going wrong ?
Please check what you have typed :
CFLAGS=-I/home/qrtt1/app/include LDFLAGS=-L/home/qrtt1/app/lib pip install pycrypto
it should be CFLAGS