I'm having troubles with an odd error. I use Cython to compile some c++ files. It works perfectly fine under OS X but under Linux i have the following error.
clang++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -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,-Bsymbolic-functions -Wl,-z,relro -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/test.o build/temp.linux-x86_64-2.7/ocv.o build/temp.linux-x86_64-2.7/fructueux.o build/temp.linux-x86_64-2.7/Face_keypoint_extractor_minimal.o build/temp.linux-x86_64-2.7/tools/mimic.o build/temp.linux-x86_64-2.7/Unrestricted_local_binary_pattern_modified.o build/temp.linux-x86_64-2.7/Over_sampling.o -L -o /home/AM/Documents/code_dw/Python_deep_dev/Cython_interface/First_import/test.so -L/usr/local/lib -lopencv_calib3d -lopencv_contrib -lopencv_core -lopencv_features2d -lopencv_flann -lopencv_gpu -lopencv_highgui -lopencv_imgproc -lopencv_legacy -lopencv_ml -lopencv_nonfree -lopencv_objdetect -lopencv_ocl -lopencv_photo -lopencv_stitching -lopencv_superres -lopencv_ts -lopencv_video -lopencv_videostab -ltbb -lrt -lpthread -lm -ldl -lboost_system -lboost_filesystem ./libFD.a
=> -L -o /home/AM/Documents/code_dw/Python_deep_dev/Cython_interface/First_import/test.so
clang: error: no such file or directory: '/home/AM/Documents/code_dw/Python_deep_dev/Cython_interface/First_import/test.so'
The -o is perfectly normal but i don't know the effect of the -L just before and i guess it is the reason it crashes.
Does someone has an idea of the reason why distutils and/or clang could produce such an output ?
PS : I have never written the string "test.so" in any of my file.
Stupid but it always happens
in the setup.py :
library_dirs=[""]
Create the -L in the compiler command and the -L ignore the -o and get the next path.
Related
I installed Cython 0.24.1 on my Raspberry Pi by doing this:
Pasted below is the command and terminal output.
pi#raspberrypi:~ $ sudo pip3 install --upgrade cython==0.24.1
Downloading/unpacking cython==0.24.1
Downloading Cython-0.24.1.tar.gz (1.7MB): 1.7MB downloaded
Running setup.py (path:/tmp/pip-build-hprgsgiw/cython/setup.py) egg_info for package cython
Unable to find pgen, not compiling formal grammar.
warning: no files found matching '*.pyx' under directory 'Cython/Debugger/Tests'
warning: no files found matching '*.pxd' under directory 'Cython/Debugger/Tests'
warning: no files found matching '*.h' under directory 'Cython/Debugger/Tests'
warning: no files found matching '*.pxd' under directory 'Cython/Utility'
Installing collected packages: cython
Running setup.py install for cython
Unable to find pgen, not compiling formal grammar.
cythoning /tmp/pip-build-hprgsgiw/cython/Cython/Plex/Scanners.py to /tmp/pip-build-hprgsgiw/cython/Cython/Plex/Scanners.c
building 'Cython.Plex.Scanners' extension
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.4m -c /tmp/pip-build-hprgsgiw/cython/Cython/Plex/Scanners.c -o build/temp.linux-armv7l-3.4/tmp/pip-build-hprgsgiw/cython/Cython/Plex/Scanners.o
arm-linux-gnueabihf-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 build/temp.linux-armv7l-3.4/tmp/pip-build-hprgsgiw/cython/Cython/Plex/Scanners.o -o build/lib.linux-armv7l-3.4/Cython/Plex/Scanners.cpython-34m.so
cythoning /tmp/pip-build-hprgsgiw/cython/Cython/Plex/Actions.py to /tmp/pip-build-hprgsgiw/cython/Cython/Plex/Actions.c
building 'Cython.Plex.Actions' extension
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.4m -c /tmp/pip-build-hprgsgiw/cython/Cython/Plex/Actions.c -o build/temp.linux-armv7l-3.4/tmp/pip-build-hprgsgiw/cython/Cython/Plex/Actions.o
arm-linux-gnueabihf-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 build/temp.linux-armv7l-3.4/tmp/pip-build-hprgsgiw/cython/Cython/Plex/Actions.o -o build/lib.linux-armv7l-3.4/Cython/Plex/Actions.cpython-34m.so
cythoning /tmp/pip-build-hprgsgiw/cython/Cython/Compiler/Lexicon.py to /tmp/pip-build-hprgsgiw/cython/Cython/Compiler/Lexicon.c
building 'Cython.Compiler.Lexicon' extension
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.4m -c /tmp/pip-build-hprgsgiw/cython/Cython/Compiler/Lexicon.c -o build/temp.linux-armv7l-3.4/tmp/pip-build-hprgsgiw/cython/Cython/Compiler/Lexicon.o
arm-linux-gnueabihf-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 build/temp.linux-armv7l-3.4/tmp/pip-build-hprgsgiw/cython/Cython/Compiler/Lexicon.o -o build/lib.linux-armv7l-3.4/Cython/Compiler/Lexicon.cpython-34m.so
cythoning /tmp/pip-build-hprgsgiw/cython/Cython/Compiler/Scanning.py to /tmp/pip-build-hprgsgiw/cython/Cython/Compiler/Scanning.c
building 'Cython.Compiler.Scanning' extension
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.4m -c /tmp/pip-build-hprgsgiw/cython/Cython/Compiler/Scanning.c -o build/temp.linux-armv7l-3.4/tmp/pip-build-hprgsgiw/cython/Cython/Compiler/Scanning.o
arm-linux-gnueabihf-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 build/temp.linux-armv7l-3.4/tmp/pip-build-hprgsgiw/cython/Cython/Compiler/Scanning.o -o build/lib.linux-armv7l-3.4/Cython/Compiler/Scanning.cpython-34m.so
cythoning /tmp/pip-build-hprgsgiw/cython/Cython/Compiler/Parsing.py to /tmp/pip-build-hprgsgiw/cython/Cython/Compiler/Parsing.c
building 'Cython.Compiler.Parsing' extension
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.4m -c /tmp/pip-build-hprgsgiw/cython/Cython/Compiler/Parsing.c -o build/temp.linux-armv7l-3.4/tmp/pip-build-hprgsgiw/cython/Cython/Compiler/Parsing.o
arm-linux-gnueabihf-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 build/temp.linux-armv7l-3.4/tmp/pip-build-hprgsgiw/cython/Cython/Compiler/Parsing.o -o build/lib.linux-armv7l-3.4/Cython/Compiler/Parsing.cpython-34m.so
cythoning /tmp/pip-build-hprgsgiw/cython/Cython/Compiler/Visitor.py to /tmp/pip-build-hprgsgiw/cython/Cython/Compiler/Visitor.c
building 'Cython.Compiler.Visitor' extension
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.4m -c /tmp/pip-build-hprgsgiw/cython/Cython/Compiler/Visitor.c -o build/temp.linux-armv7l-3.4/tmp/pip-build-hprgsgiw/cython/Cython/Compiler/Visitor.o
arm-linux-gnueabihf-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 build/temp.linux-armv7l-3.4/tmp/pip-build-hprgsgiw/cython/Cython/Compiler/Visitor.o -o build/lib.linux-armv7l-3.4/Cython/Compiler/Visitor.cpython-34m.so
cythoning /tmp/pip-build-hprgsgiw/cython/Cython/Compiler/FlowControl.py to /tmp/pip-build-hprgsgiw/cython/Cython/Compiler/FlowControl.c
building 'Cython.Compiler.FlowControl' extension
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.4m -c /tmp/pip-build-hprgsgiw/cython/Cython/Compiler/FlowControl.c -o build/temp.linux-armv7l-3.4/tmp/pip-build-hprgsgiw/cython/Cython/Compiler/FlowControl.o
arm-linux-gnueabihf-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 build/temp.linux-armv7l-3.4/tmp/pip-build-hprgsgiw/cython/Cython/Compiler/FlowControl.o -o build/lib.linux-armv7l-3.4/Cython/Compiler/FlowControl.cpython-34m.so
cythoning /tmp/pip-build-hprgsgiw/cython/Cython/Compiler/Code.py to /tmp/pip-build-hprgsgiw/cython/Cython/Compiler/Code.c
building 'Cython.Compiler.Code' extension
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.4m -c /tmp/pip-build-hprgsgiw/cython/Cython/Compiler/Code.c -o build/temp.linux-armv7l-3.4/tmp/pip-build-hprgsgiw/cython/Cython/Compiler/Code.o
arm-linux-gnueabihf-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 build/temp.linux-armv7l-3.4/tmp/pip-build-hprgsgiw/cython/Cython/Compiler/Code.o -o build/lib.linux-armv7l-3.4/Cython/Compiler/Code.cpython-34m.so
cythoning /tmp/pip-build-hprgsgiw/cython/Cython/Runtime/refnanny.pyx to /tmp/pip-build-hprgsgiw/cython/Cython/Runtime/refnanny.c
building 'Cython.Runtime.refnanny' extension
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.4m -c /tmp/pip-build-hprgsgiw/cython/Cython/Runtime/refnanny.c -o build/temp.linux-armv7l-3.4/tmp/pip-build-hprgsgiw/cython/Cython/Runtime/refnanny.o
arm-linux-gnueabihf-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 build/temp.linux-armv7l-3.4/tmp/pip-build-hprgsgiw/cython/Cython/Runtime/refnanny.o -o build/lib.linux-armv7l-3.4/Cython/Runtime/refnanny.cpython-34m.so
cythoning /tmp/pip-build-hprgsgiw/cython/Cython/Tempita/_tempita.py to /tmp/pip-build-hprgsgiw/cython/Cython/Tempita/_tempita.c
building 'Cython.Tempita._tempita' extension
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.4m -c /tmp/pip-build-hprgsgiw/cython/Cython/Tempita/_tempita.c -o build/temp.linux-armv7l-3.4/tmp/pip-build-hprgsgiw/cython/Cython/Tempita/_tempita.o
arm-linux-gnueabihf-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 build/temp.linux-armv7l-3.4/tmp/pip-build-hprgsgiw/cython/Cython/Tempita/_tempita.o -o build/lib.linux-armv7l-3.4/Cython/Tempita/_tempita.cpython-34m.so
warning: no files found matching '*.pyx' under directory 'Cython/Debugger/Tests'
warning: no files found matching '*.pxd' under directory 'Cython/Debugger/Tests'
warning: no files found matching '*.h' under directory 'Cython/Debugger/Tests'
warning: no files found matching '*.pxd' under directory 'Cython/Utility'
Installing cygdb script to /usr/local/bin
Installing cython script to /usr/local/bin
Installing cythonize script to /usr/local/bin
Successfully installed cython
Cleaning up...
Looks like the installation has completed fine. But after this, if I do the following, it still return the old version. What am I missing?
pi#raspberrypi:~ $ python3 -c "import cython;print(cython.__version__)"
0.21.1
From the log, I can read Installing cython script to /usr/local/bin. I extrapolate that the library has installed in /usr/local/python3something. Two alternatives:
re-install using pip3 install --user --upgrade cython==0.24.1 and make sure that ~/.local/bin is in your PATH environment variable.
add /usr/local/bin to your PATH environment variable and /usr/local/python3something/site-packages to your LD_LIBRARY_PATH environment variable.
Indeed, the python3something part must be changed to reflect the exact path on your system. Option "1" above should work even if my extrapolation is wrong.
I'm trying to install pjsip's Python binding but am running into a build error that I feel is environmental but am just not able to figure out what's wrong.
I'm able to build pjsip without issue but run into a problem when trying to build the python bindings -- I'm getting an error from ld about a bad value in one of the static libraries.
Any thoughts?
root#0fcbc7b108af:/src/pjproject-2.5.5/pjsip-apps/src/python# python setup.py install
running install
running build
running build_py
running build_ext
building '_pjsua' extension
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DPJ_AUTOCONF=1 -I/src/pjproject-2.5.5/pjlib/include -I/src/pjproject-2.5.5/pjlib-util/include -I/src/pjproject-2.5.5/pjnath/include -I/src/pjproject-2.5.5/pjmedia/include -I/src/pjproject-2.5.5/pjsip/include -I/usr/include/python2.7 -c _pjsua.c -o build/temp.linux-x86_64-2.7/_pjsua.o
_pjsua.c: In function 'py_pjsua_enum_transports':
_pjsua.c:1202:17: warning: variable 'status' set but not used [-Wunused-but-set-variable]
pj_status_t status;
^
_pjsua.c: In function 'py_pjsua_conf_get_port_info':
_pjsua.c:2338:9: warning: variable 'status' set but not used [-Wunused-but-set-variable]
int status;
^
_pjsua.c: In function 'py_pjsua_get_snd_dev':
_pjsua.c:2714:9: warning: variable 'status' set but not used [-Wunused-but-set-variable]
int status;
^
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 -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z,relro -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/_pjsua.o -L/src/pjproject-2.5.5/pjlib/lib -L/src/pjproject-2.5.5/pjlib-util/lib -L/src/pjproject-2.5.5/pjnath/lib -L/src/pjproject-2.5.5/pjmedia/lib -L/src/pjproject-2.5.5/pjsip/lib -L/src/pjproject-2.5.5/third_party/lib -lpjsua-x86_64-unknown-linux-gnu -lpjsip-ua-x86_64-unknown-linux-gnu -lpjsip-simple-x86_64-unknown-linux-gnu -lpjsip-x86_64-unknown-linux-gnu -lpjmedia-codec-x86_64-unknown-linux-gnu -lpjmedia-x86_64-unknown-linux-gnu -lpjmedia-videodev-x86_64-unknown-linux-gnu -lpjmedia-audiodev-x86_64-unknown-linux-gnu -lpjmedia-x86_64-unknown-linux-gnu -lpjnath-x86_64-unknown-linux-gnu -lpjlib-util-x86_64-unknown-linux-gnu -lsrtp-x86_64-unknown-linux-gnu -lresample-x86_64-unknown-linux-gnu -lgsmcodec-x86_64-unknown-linux-gnu -lspeex-x86_64-unknown-linux-gnu -lilbccodec-x86_64-unknown-linux-gnu -lg7221codec-x86_64-unknown-linux-gnu -lyuv-x86_64-unknown-linux-gnu -lpj-x86_64-unknown-linux-gnu -lm -lrt -lpthread -lasound -o build/lib.linux-x86_64-2.7/_pjsua.so
/usr/bin/ld: /src/pjproject-2.5.5/pjsip/lib/libpjsua-x86_64-unknown-linux-gnu.a(pjsua_acc.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
/src/pjproject-2.5.5/pjsip/lib/libpjsua-x86_64-unknown-linux-gnu.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
I was able to find an answer in an old mailing list entry (http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/2008-August/004456.html).
Set CFLAGS=-fPIC and rebuild the PJSIP library (make clean && ./configure && make dep && make), then follow the directions for making the Python library.
When i run make command i receive following error
rm -f html/index.html && ln -s pam_python.html html/index.html
make[1]: Leaving directory `/home/vagrant/pam-python-1.0.5/doc'
make --directory src
make[1]: Entering directory `/home/vagrant/pam-python-1.0.5/src'
gcc -O0 -Wall -Wextra -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wsign-compare -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Werror -g -o ctest ctest.c -lpam
CFLAGS="-Wall -Wextra -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wsign-compare -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Werror" ./setup.py build
running build
running build_ext
building 'pam_python' extension
creating build
creating build/temp.linux-x86_64-2.6
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -Wall -Wextra -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wsign-compare -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Werror -fPIC -DLIBPYTHON_SO="libpython2.6.so.1.0" -I/usr/include/python2.6 -c pam_python.c -o build/temp.linux-x86_64-2.6/pam_python.o
In file included from /usr/include/python2.6/pyconfig.h:6,
from /usr/include/python2.6/Python.h:8,
from pam_python.c:36:
/usr/include/python2.6/pyconfig-64.h:1043:1: error: "_XOPEN_SOURCE" redefined
In file included from /usr/include/stdlib.h:25,
from /usr/include/security/_pam_macros.h:12,
from pam_python.c:32:
/usr/include/features.h:164:1: error: this is the location of the previous definition
error: command 'gcc' failed with exit status 1
System which i am using is CentOs 6.7.
Is there any other way to directly install pam module for python so that it generated pam_python.so in lib64/security directory.
Suggest : Use the stable version = python-pam-1.8.2 .
The EL6 package : python-pam-1.8.2-2.el6.noarch.rpm ( 9.7kB ) https://drive.google.com/file/d/0B7S255p3kFXNQ1FrM1poTXR5Nmc/view?usp=sharing
Download the package, and ...
cd Downloads/
# yum install python-pam-1.8.2-2.el6.noarch.rpm
EDIT : About the other "module" = pam-python 1.0.5 : Seems I found a solution →
cd pam-python-1.0.5/src/
python setup.py build
... and the file build/lib.linux-x86_64-2.6/pam-python.so was created.
Install : # python setup.py install ... the install text shows what's installed ... pam_python.py, pam_python.pyc,
/usr/lib64/python2.6/site-packages/pam_python-1.0.5-py2.6-linux-x86_64.egg/pam_python.so
trying to install matplotlib (1.1.0 with python 2.7.3 on CentOS)
python setup.py build
looks good until:
running build_ext
building 'matplotlib.ft2font' extension
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/mnt/storage/laviniag/Tools/Qiime/qiime_software/numpy-1.5.1-release/lib/python2.7/site-packages/numpy/core/include -I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I. -I/mnt/storage/laviniag/Tools/Qiime/qiime_software/python-2.7.3-release/include/python2.7 -c src/ft2font.cpp -o build/temp.linux-x86_64-2.7/src/ft2font.o
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/mnt/storage/laviniag/Tools/Qiime/qiime_software/numpy-1.5.1-release/lib/python2.7/site-packages/numpy/core/include -I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I. -I/mnt/storage/laviniag/Tools/Qiime/qiime_software/python-2.7.3-release/include/python2.7 -c src/mplutils.cpp -o build/temp.linux-x86_64-2.7/src/mplutils.o
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/mnt/storage/laviniag/Tools/Qiime/qiime_software/numpy-1.5.1-release/lib/python2.7/site-packages/numpy/core/include -I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I. -I/mnt/storage/laviniag/Tools/Qiime/qiime_software/python-2.7.3-release/include/python2.7 -c CXX/cxx_extensions.cxx -o build/temp.linux-x86_64-2.7/CXX/cxx_extensions.o
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/mnt/storage/laviniag/Tools/Qiime/qiime_software/numpy-1.5.1-release/lib/python2.7/site-packages/numpy/core/include -I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I. -I/mnt/storage/laviniag/Tools/Qiime/qiime_software/python-2.7.3-release/include/python2.7 -c CXX/IndirectPythonInterface.cxx -o build/temp.linux-x86_64-2.7/CXX/IndirectPythonInterface.o
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/mnt/storage/laviniag/Tools/Qiime/qiime_software/numpy-1.5.1-release/lib/python2.7/site-packages/numpy/core/include -I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I. -I/mnt/storage/laviniag/Tools/Qiime/qiime_software/python-2.7.3-release/include/python2.7 -c CXX/cxxsupport.cxx -o build/temp.linux-x86_64-2.7/CXX/cxxsupport.o
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/mnt/storage/laviniag/Tools/Qiime/qiime_software/numpy-1.5.1-release/lib/python2.7/site-packages/numpy/core/include -I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I. -I/mnt/storage/laviniag/Tools/Qiime/qiime_software/python-2.7.3-release/include/python2.7 -c CXX/cxxextensions.c -o build/temp.linux-x86_64-2.7/CXX/cxxextensions.o
g++ -pthread -shared build/temp.linux-x86_64-2.7/src/ft2font.o build/temp.linux-x86_64-2.7/src/mplutils.o build/temp.linux-x86_64-2.7/CXX/cxx_extensions.o build/temp.linux-x86_64-2.7/CXX/IndirectPythonInterface.o build/temp.linux-x86_64-2.7/CXX/cxxsupport.o build/temp.linux-x86_64-2.7/CXX/cxxextensions.o -L/usr/local/lib -L/usr/lib -L/usr/local/lib64 -L/usr/lib64 -L/mnt/storage/laviniag/Tools/Qiime/qiime_software/python-2.7.3-release/lib -lfreetype -lz -lstdc++ -lm -lpython2.7 -o build/lib.linux-x86_64-2.7/matplotlib/ft2font.so
**/usr/bin/ld: /usr/local/lib/libpython2.7.a(parsetok.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libpython2.7.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
error: command 'g++' failed with exit status 1**
So I'm guessing I need to either edit the config file maybe to allow sharing? Any help appreciated, thanks.
matplotlib is one of the packages that can be really hard to install, there are plenty of others (ahem... lxml, pyside/pyqt4, etc).
Save yourself some trouble and checkout one of the pre-builts. Anaconda from continuum or canopy from enthought are good on cetos and will save you a log of headaches (free installs).
Just use pip and virtualenv, it should work fine (CentOS-6.5, x86_64, python-2.6) Installing Matplotlib on CentOS 6.5
I am trying to use the Windmill Testing Framework over https. I'm running Ubuntu 11.10 with Python 2.7, installing windmill and pyopenssl in a virtualenv via pip. (Installation sequence is included below for reference.)
When I run windmill firefox http://en.wikipedia.org the Windmill IDE comes up fine. When I run windmill firefox https://en.wikipedia.org Firefox starts, but the IDE never appears. (I have verified that when Windmill starts Firefox on Ubuntu, the CA for https is already installed.)
Am I encountering a bug, or is there something else I need to do to get the IDE to work on https addresses?
Installation sequence
myuser#mycomputer:~$ mkvirtualenv --no-site-packages windmill_test
New python executable in windmill_test/bin/python
Installing distribute....................................................................................................................................................................................done.
Installing pip...............done.
virtualenvwrapper.user_scripts creating /home/myuser/.virtualenvs/windmill_test/bin/predeactivate
virtualenvwrapper.user_scripts creating /home/myuser/.virtualenvs/windmill_test/bin/postdeactivate
virtualenvwrapper.user_scripts creating /home/myuser/.virtualenvs/windmill_test/bin/preactivate
virtualenvwrapper.user_scripts creating /home/myuser/.virtualenvs/windmill_test/bin/postactivate
virtualenvwrapper.user_scripts creating /home/myuser/.virtualenvs/windmill_test/bin/get_env_details
(windmill_test)myuser#mycomputer:~$ pip install pyopenssl
Downloading/unpacking pyopenssl
Downloading pyOpenSSL-0.13.tar.gz (250Kb): 250Kb downloaded
Running setup.py egg_info for package pyopenssl
warning: no previously-included files matching '*.pyc' found anywhere in distribution
Installing collected packages: pyopenssl
Running setup.py install for pyopenssl
building 'OpenSSL.crypto' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c OpenSSL/crypto/crypto.c -o build/temp.linux-i686-2.7/OpenSSL/crypto/crypto.o
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c OpenSSL/crypto/x509.c -o build/temp.linux-i686-2.7/OpenSSL/crypto/x509.o
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c OpenSSL/crypto/x509name.c -o build/temp.linux-i686-2.7/OpenSSL/crypto/x509name.o
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c OpenSSL/crypto/pkey.c -o build/temp.linux-i686-2.7/OpenSSL/crypto/pkey.o
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c OpenSSL/crypto/x509store.c -o build/temp.linux-i686-2.7/OpenSSL/crypto/x509store.o
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c OpenSSL/crypto/x509req.c -o build/temp.linux-i686-2.7/OpenSSL/crypto/x509req.o
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c OpenSSL/crypto/x509ext.c -o build/temp.linux-i686-2.7/OpenSSL/crypto/x509ext.o
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c OpenSSL/crypto/pkcs7.c -o build/temp.linux-i686-2.7/OpenSSL/crypto/pkcs7.o
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c OpenSSL/crypto/pkcs12.c -o build/temp.linux-i686-2.7/OpenSSL/crypto/pkcs12.o
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c OpenSSL/crypto/netscape_spki.c -o build/temp.linux-i686-2.7/OpenSSL/crypto/netscape_spki.o
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c OpenSSL/crypto/revoked.c -o build/temp.linux-i686-2.7/OpenSSL/crypto/revoked.o
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c OpenSSL/crypto/crl.c -o build/temp.linux-i686-2.7/OpenSSL/crypto/crl.o
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c OpenSSL/util.c -o build/temp.linux-i686-2.7/OpenSSL/util.o
gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions build/temp.linux-i686-2.7/OpenSSL/crypto/crypto.o build/temp.linux-i686-2.7/OpenSSL/crypto/x509.o build/temp.linux-i686-2.7/OpenSSL/crypto/x509name.o build/temp.linux-i686-2.7/OpenSSL/crypto/pkey.o build/temp.linux-i686-2.7/OpenSSL/crypto/x509store.o build/temp.linux-i686-2.7/OpenSSL/crypto/x509req.o build/temp.linux-i686-2.7/OpenSSL/crypto/x509ext.o build/temp.linux-i686-2.7/OpenSSL/crypto/pkcs7.o build/temp.linux-i686-2.7/OpenSSL/crypto/pkcs12.o build/temp.linux-i686-2.7/OpenSSL/crypto/netscape_spki.o build/temp.linux-i686-2.7/OpenSSL/crypto/revoked.o build/temp.linux-i686-2.7/OpenSSL/crypto/crl.o build/temp.linux-i686-2.7/OpenSSL/util.o -lssl -lcrypto -o build/lib.linux-i686-2.7/OpenSSL/crypto.so
building 'OpenSSL.rand' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c OpenSSL/rand/rand.c -o build/temp.linux-i686-2.7/OpenSSL/rand/rand.o
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c OpenSSL/util.c -o build/temp.linux-i686-2.7/OpenSSL/util.o
gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions build/temp.linux-i686-2.7/OpenSSL/rand/rand.o build/temp.linux-i686-2.7/OpenSSL/util.o -lssl -lcrypto -o build/lib.linux-i686-2.7/OpenSSL/rand.so
building 'OpenSSL.SSL' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c OpenSSL/ssl/connection.c -o build/temp.linux-i686-2.7/OpenSSL/ssl/connection.o
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c OpenSSL/ssl/context.c -o build/temp.linux-i686-2.7/OpenSSL/ssl/context.o
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c OpenSSL/ssl/ssl.c -o build/temp.linux-i686-2.7/OpenSSL/ssl/ssl.o
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c OpenSSL/util.c -o build/temp.linux-i686-2.7/OpenSSL/util.o
gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions build/temp.linux-i686-2.7/OpenSSL/ssl/connection.o build/temp.linux-i686-2.7/OpenSSL/ssl/context.o build/temp.linux-i686-2.7/OpenSSL/ssl/ssl.o build/temp.linux-i686-2.7/OpenSSL/util.o -lssl -lcrypto -o build/lib.linux-i686-2.7/OpenSSL/SSL.so
warning: no previously-included files matching '*.pyc' found anywhere in distribution
Successfully installed pyopenssl
Cleaning up...
(windmill_test)myuser#mycomputer:~$ pip install windmill
Downloading/unpacking windmill
Downloading windmill-1.6.tar.gz (1.6Mb): 1.6Mb downloaded
Running setup.py egg_info for package windmill
Installing collected packages: windmill
Running setup.py install for windmill
Installing windmill script to /home/myuser/.virtualenvs/windmill_test/bin
Successfully installed windmill
Cleaning up...
(windmill_test)myuser#mycomputer:~$ pip freeze
distribute==0.6.19
pyOpenSSL==0.13
windmill==1.6
wsgiref==0.1.2
http
(windmill_test)myuser#mycomputer:~$ windmill firefox http://en.wikipedia.org
windmill.bin.shell_objects: INFO ['/home/myuser/.mozilla/firefox/p3t9ijqj.mozrunner//mozrunner-firefox', '-profile', '/home/myuser/.mozilla/firefox/p3t9ijqj.mozrunner/', 'http://en.wikipedia.org/windmill-serv/start.html']
Attempts to load http://en.wikipedia.org/windmill-serv/start.html but resolves to http://en.wikipedia.org/wiki/Main_Page . IDE loads.
https
(windmill_test)myuser#mycomputer:~$ windmill firefox https://en.wikipedia.org
windmill.bin.shell_objects: INFO ['/home/myuser/.mozilla/firefox/p3t9ijqj.mozrunner//mozrunner-firefox', '-profile', '/home/myuser/.mozilla/firefox/p3t9ijqj.mozrunner/', 'https://en.wikipedia.org/windmill-serv/start.html']
Attempts to load https://en.wikipedia.org/windmill-serv/start.html and resolves to that pages (which displays a 404 page, which then redirects to https://en.wikipedia.org/wiki/Windmill-serv/start.html - I'm just using Wikipedia as an example here, so it doesn't matter that it returns 404s or "Wikipedia does not have an article with this exact name"). The IDE never loads.
This is not a bug, this was a user error :D
I was running windmill firefox https://www.example.com instead of windmill firefox https://www.example.com ssl