mkleehammer / pyodbc

Python ODBC bridge
https://github.com/mkleehammer/pyodbc/wiki
MIT No Attribution
2.93k stars 562 forks source link

Long series of shared object errors when trying to compile on RHEL 7 #573

Closed AEHamrick closed 3 years ago

AEHamrick commented 5 years ago

Environment

To diagnose, we usually need to know the following, including version numbers. On Windows, be sure to specify 32-bit Python or 64-bit:

Issue

Getting the following error trying to install, whether with poetry or pip. I suspect this indicates unixODBC or some pre-req is not installed correctly, based on previous interaction with the server I'm using, but diagnosing what's going over here is (currently) over my head.

[EnvCommandError]                                                
Command ['/var/lib/jenkins/.cache/pypoetry/virtualenvs/ds-ops-tools-py3.6/bi  
n/python', '-m', 'pip', 'install', '--no-deps', 'pyodbc==4.0.26'] errored wi  
th the following output:                                                      
Collecting pyodbc==4.0.26                                                     
  Using cached https://files.pythonhosted.org/packages/b4/41/f3eb5e56af207a8  
fcc02f1f84cc3fed9fcf315565e65f418ae815e399929/pyodbc-4.0.26.tar.gz            
Installing collected packages: pyodbc                                         
  Running setup.py install for pyodbc: started                                
    Running setup.py install for pyodbc: finished with status 'error'         
    Complete output from command /var/lib/jenkins/.cache/pypoetry/virtualenv  
s/ds-ops-tools-py3.6/bin/python -u -c "import setuptools, tokenize;__file__=  
'/tmp/pip-build-i2_4l6cq/pyodbc/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-oqv50di8-record/install-record.  
txt --single-version-externally-managed --compile --install-headers /var/lib  
/jenkins/.cache/pypoetry/virtualenvs/ds-ops-tools-py3.6/include/site/python3  
.6/pyodbc:                                                                    
    running install                                                           
    running build                                                             
    running build_ext                                                         
    building 'pyodbc' extension                                               
    creating build                                                            
    creating build/temp.linux-x86_64-3.6                                      
    creating build/temp.linux-x86_64-3.6/src                                  
    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -  
Wall -Wstrict-prototypes -fPIC -DPYODBC_VERSION=4.0.26 -I/var/lib/jenkins/.c  
ache/pypoetry/virtualenvs/ds-ops-tools-py3.6/include -I/usr/local/include/py  
thon3.6m -c src/buffer.cpp -o build/temp.linux-x86_64-3.6/src/buffer.o -Wno-  
write-strings -DHAVE_UNISTD_H -DHAVE_PWD_H -DHAVE_SYS_TYPES_H -DHAVE_LONG_LO  
NG -DSIZEOF_LONG_INT=8 -I/usr/include                                         
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for  
 C/ObjC but not for C++ [enabled by default]                                  
    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -  
Wall -Wstrict-prototypes -fPIC -DPYODBC_VERSION=4.0.26 -I/var/lib/jenkins/.c  
ache/pypoetry/virtualenvs/ds-ops-tools-py3.6/include -I/usr/local/include/py  
thon3.6m -c src/cnxninfo.cpp -o build/temp.linux-x86_64-3.6/src/cnxninfo.o -  
Wno-write-strings -DHAVE_UNISTD_H -DHAVE_PWD_H -DHAVE_SYS_TYPES_H -DHAVE_LON  
G_LONG -DSIZEOF_LONG_INT=8 -I/usr/include                                     
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for  
 C/ObjC but not for C++ [enabled by default]                                  
    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -  
Wall -Wstrict-prototypes -fPIC -DPYODBC_VERSION=4.0.26 -I/var/lib/jenkins/.c  
ache/pypoetry/virtualenvs/ds-ops-tools-py3.6/include -I/usr/local/include/py  
thon3.6m -c src/connection.cpp -o build/temp.linux-x86_64-3.6/src/connection  
.o -Wno-write-strings -DHAVE_UNISTD_H -DHAVE_PWD_H -DHAVE_SYS_TYPES_H -DHAVE  
_LONG_LONG -DSIZEOF_LONG_INT=8 -I/usr/include                                 
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for  
 C/ObjC but not for C++ [enabled by default]                                  
    src/connection.cpp: In function ‘PyObject* Connection_getinfo(PyObject*,  
 PyObject*)’:                                                                 
    src/connection.cpp:835:40: warning: dereferencing type-punned pointer wi  
ll break strict-aliasing rules [-Wstrict-aliasing]                            
             SQLUINTEGER n = *(SQLUINTEGER*)szBuffer; // Does this work on P  
PC or do we need a union?                                                     
                                            ^                                 
    src/connection.cpp:848:49: warning: dereferencing type-punned pointer wi  
ll break strict-aliasing rules [-Wstrict-aliasing]                            
             result = PyInt_FromLong(*(SQLUSMALLINT*)szBuffer);               
                                                     ^                        
    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -  
Wall -Wstrict-prototypes -fPIC -DPYODBC_VERSION=4.0.26 -I/var/lib/jenkins/.c  
ache/pypoetry/virtualenvs/ds-ops-tools-py3.6/include -I/usr/local/include/py  
thon3.6m -c src/cursor.cpp -o build/temp.linux-x86_64-3.6/src/cursor.o -Wno-  
write-strings -DHAVE_UNISTD_H -DHAVE_PWD_H -DHAVE_SYS_TYPES_H -DHAVE_LONG_LO  
NG -DSIZEOF_LONG_INT=8 -I/usr/include                                         
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for  
 C/ObjC but not for C++ [enabled by default]                                  
    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -  
Wall -Wstrict-prototypes -fPIC -DPYODBC_VERSION=4.0.26 -I/var/lib/jenkins/.c  
ache/pypoetry/virtualenvs/ds-ops-tools-py3.6/include -I/usr/local/include/py  
thon3.6m -c src/errors.cpp -o build/temp.linux-x86_64-3.6/src/errors.o -Wno-  
write-strings -DHAVE_UNISTD_H -DHAVE_PWD_H -DHAVE_SYS_TYPES_H -DHAVE_LONG_LO  
NG -DSIZEOF_LONG_INT=8 -I/usr/include                                         
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for  
 C/ObjC but not for C++ [enabled by default]                                  
    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -  
Wall -Wstrict-prototypes -fPIC -DPYODBC_VERSION=4.0.26 -I/var/lib/jenkins/.c  
ache/pypoetry/virtualenvs/ds-ops-tools-py3.6/include -I/usr/local/include/py  
thon3.6m -c src/getdata.cpp -o build/temp.linux-x86_64-3.6/src/getdata.o -Wn  
o-write-strings -DHAVE_UNISTD_H -DHAVE_PWD_H -DHAVE_SYS_TYPES_H -DHAVE_LONG_  
LONG -DSIZEOF_LONG_INT=8 -I/usr/include                                       
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for  
 C/ObjC but not for C++ [enabled by default]                                  
    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -  
Wall -Wstrict-prototypes -fPIC -DPYODBC_VERSION=4.0.26 -I/var/lib/jenkins/.c  
ache/pypoetry/virtualenvs/ds-ops-tools-py3.6/include -I/usr/local/include/py  
thon3.6m -c src/params.cpp -o build/temp.linux-x86_64-3.6/src/params.o -Wno-  
write-strings -DHAVE_UNISTD_H -DHAVE_PWD_H -DHAVE_SYS_TYPES_H -DHAVE_LONG_LO  
NG -DSIZEOF_LONG_INT=8 -I/usr/include                                         
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for  
 C/ObjC but not for C++ [enabled by default]                                  
    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -  
Wall -Wstrict-prototypes -fPIC -DPYODBC_VERSION=4.0.26 -I/var/lib/jenkins/.c  
ache/pypoetry/virtualenvs/ds-ops-tools-py3.6/include -I/usr/local/include/py  
thon3.6m -c src/pyodbccompat.cpp -o build/temp.linux-x86_64-3.6/src/pyodbcco  
mpat.o -Wno-write-strings -DHAVE_UNISTD_H -DHAVE_PWD_H -DHAVE_SYS_TYPES_H -D  
HAVE_LONG_LONG -DSIZEOF_LONG_INT=8 -I/usr/include                             
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for  
 C/ObjC but not for C++ [enabled by default]                                  
    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -  
Wall -Wstrict-prototypes -fPIC -DPYODBC_VERSION=4.0.26 -I/var/lib/jenkins/.c  
ache/pypoetry/virtualenvs/ds-ops-tools-py3.6/include -I/usr/local/include/py  
thon3.6m -c src/pyodbcdbg.cpp -o build/temp.linux-x86_64-3.6/src/pyodbcdbg.o  
 -Wno-write-strings -DHAVE_UNISTD_H -DHAVE_PWD_H -DHAVE_SYS_TYPES_H -DHAVE_L  
ONG_LONG -DSIZEOF_LONG_INT=8 -I/usr/include                                   
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for  
 C/ObjC but not for C++ [enabled by default]                                  
    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -  
Wall -Wstrict-prototypes -fPIC -DPYODBC_VERSION=4.0.26 -I/var/lib/jenkins/.c  
ache/pypoetry/virtualenvs/ds-ops-tools-py3.6/include -I/usr/local/include/py  
thon3.6m -c src/pyodbcmodule.cpp -o build/temp.linux-x86_64-3.6/src/pyodbcmo  
dule.o -Wno-write-strings -DHAVE_UNISTD_H -DHAVE_PWD_H -DHAVE_SYS_TYPES_H -D  
HAVE_LONG_LONG -DSIZEOF_LONG_INT=8 -I/usr/include                             
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for  
 C/ObjC but not for C++ [enabled by default]                                  
    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -  
Wall -Wstrict-prototypes -fPIC -DPYODBC_VERSION=4.0.26 -I/var/lib/jenkins/.c  
ache/pypoetry/virtualenvs/ds-ops-tools-py3.6/include -I/usr/local/include/py  
thon3.6m -c src/row.cpp -o build/temp.linux-x86_64-3.6/src/row.o -Wno-write-  
strings -DHAVE_UNISTD_H -DHAVE_PWD_H -DHAVE_SYS_TYPES_H -DHAVE_LONG_LONG -DS  
IZEOF_LONG_INT=8 -I/usr/include                                               
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for  
 C/ObjC but not for C++ [enabled by default]                                  
    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -  
Wall -Wstrict-prototypes -fPIC -DPYODBC_VERSION=4.0.26 -I/var/lib/jenkins/.c  
ache/pypoetry/virtualenvs/ds-ops-tools-py3.6/include -I/usr/local/include/py  
thon3.6m -c src/textenc.cpp -o build/temp.linux-x86_64-3.6/src/textenc.o -Wn  
o-write-strings -DHAVE_UNISTD_H -DHAVE_PWD_H -DHAVE_SYS_TYPES_H -DHAVE_LONG_  
LONG -DSIZEOF_LONG_INT=8 -I/usr/include                                       
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for  
 C/ObjC but not for C++ [enabled by default]                                  
    creating build/lib.linux-x86_64-3.6                                       
    g++ -pthread -shared -Wl,-rpath /usr/local/lib build/temp.linux-x86_64-3  
.6/src/buffer.o build/temp.linux-x86_64-3.6/src/cnxninfo.o build/temp.linux-  
x86_64-3.6/src/connection.o build/temp.linux-x86_64-3.6/src/cursor.o build/t  
emp.linux-x86_64-3.6/src/errors.o build/temp.linux-x86_64-3.6/src/getdata.o   
build/temp.linux-x86_64-3.6/src/params.o build/temp.linux-x86_64-3.6/src/pyo  
dbccompat.o build/temp.linux-x86_64-3.6/src/pyodbcdbg.o build/temp.linux-x86  
_64-3.6/src/pyodbcmodule.o build/temp.linux-x86_64-3.6/src/row.o build/temp.  
linux-x86_64-3.6/src/textenc.o -L/usr/lib -L/usr/local/lib -L/usr/local/lib   
-lodbc -lpython3.6m -o build/lib.linux-x86_64-3.6/pyodbc.cpython-36m-x86_64-  
linux-gnu.so -L/usr/lib64 -lodbc                                              
    /bin/ld: /usr/lib/libpython3.6m.a(abstract.o): relocation R_X86_64_32S a  
gainst symbol `_Py_NotImplementedStruct' can not be used when making a share  
d object; recompile with -fPIC                                                
    /bin/ld: /usr/lib/libpython3.6m.a(boolobject.o): relocation R_X86_64_32   
against `.data' can not be used when making a shared object; recompile with   
-fPIC                                                                         
    /bin/ld: /usr/lib/libpython3.6m.a(bytearrayobject.o): relocation R_X86_6  
4_32 against symbol `_PyByteArray_empty_string' can not be used when making   
a shared object; recompile with -fPIC                                         
    /bin/ld: /usr/lib/libpython3.6m.a(bytesobject.o): relocation R_X86_64_32  
 against symbol `_Py_NoneStruct' can not be used when making a shared object  
; recompile with -fPIC                                                        
    /bin/ld: /usr/lib/libpython3.6m.a(exceptions.o): relocation R_X86_64_32S  
 against symbol `_Py_NoneStruct' can not be used when making a shared object  
; recompile with -fPIC                                                        
    /bin/ld: /usr/lib/libpython3.6m.a(genobject.o): relocation R_X86_64_32 a  
gainst symbol `_Py_NoneStruct' can not be used when making a shared object;   
recompile with -fPIC                                                          
    /bin/ld: /usr/lib/libpython3.6m.a(floatobject.o): relocation R_X86_64_32  
 against `.rodata.str1.1' can not be used when making a shared object; recom  
pile with -fPIC                                                               
    /bin/ld: /usr/lib/libpython3.6m.a(funcobject.o): relocation R_X86_64_32S  
 against symbol `PyCode_Type' can not be used when making a shared object; r  
ecompile with -fPIC                                                           
    /bin/ld: /usr/lib/libpython3.6m.a(iterobject.o): relocation R_X86_64_32   
against symbol `_Py_NoneStruct' can not be used when making a shared object;  
 recompile with -fPIC                                                         
    /bin/ld: /usr/lib/libpython3.6m.a(listobject.o): relocation R_X86_64_32   
against symbol `_Py_NoneStruct' can not be used when making a shared object;  
 recompile with -fPIC                                                         
    /bin/ld: /usr/lib/libpython3.6m.a(longobject.o): relocation R_X86_64_32   
against `.rodata.str1.1' can not be used when making a shared object; recomp  
ile with -fPIC                                                                
    /bin/ld: /usr/lib/libpython3.6m.a(dictobject.o): relocation R_X86_64_32S  
 against `.text' can not be used when making a shared object; recompile with  
 -fPIC                                                                        
    /bin/ld: /usr/lib/libpython3.6m.a(memoryobject.o): relocation R_X86_64_3  
2 against `.rodata.str1.8' can not be used when making a shared object; reco  
mpile with -fPIC                                                              
    /bin/ld: /usr/lib/libpython3.6m.a(methodobject.o): relocation R_X86_64_3  
2 against symbol `_Py_NoneStruct' can not be used when making a shared objec  
t; recompile with -fPIC                                                       
    /bin/ld: /usr/lib/libpython3.6m.a(moduleobject.o): relocation R_X86_64_3  
2 against `.rodata.str1.8' can not be used when making a shared object; reco  
mpile with -fPIC                                                              
    /bin/ld: /usr/lib/libpython3.6m.a(object.o): relocation R_X86_64_32 agai  
nst `.rodata.str1.1' can not be used when making a shared object; recompile   
with -fPIC                                                                    
    /bin/ld: /usr/lib/libpython3.6m.a(obmalloc.o): relocation R_X86_64_32S a  
gainst `.data' can not be used when making a shared object; recompile with -  
fPIC                                                                          
    /bin/ld: /usr/lib/libpython3.6m.a(capsule.o): relocation R_X86_64_32 aga  
inst `.rodata.str1.1' can not be used when making a shared object; recompile  
 with -fPIC                                                                   
    /bin/ld: /usr/lib/libpython3.6m.a(rangeobject.o): relocation R_X86_64_32  
 against symbol `_Py_NoneStruct' can not be used when making a shared object  
; recompile with -fPIC                                                        
    /bin/ld: /usr/lib/libpython3.6m.a(setobject.o): relocation R_X86_64_32S   
against `.data' can not be used when making a shared object; recompile with   
-fPIC                                                                         
    /bin/ld: /usr/lib/libpython3.6m.a(sliceobject.o): relocation R_X86_64_32  
 against `.rodata.str1.1' can not be used when making a shared object; recom  
pile with -fPIC                                                               
    /bin/ld: /usr/lib/libpython3.6m.a(structseq.o): relocation R_X86_64_32 a  
gainst `.data' can not be used when making a shared object; recompile with -  
fPIC                                                                          
    /bin/ld: /usr/lib/libpython3.6m.a(tupleobject.o): relocation R_X86_64_32  
 against symbol `_PyEval_SliceIndex' can not be used when making a shared ob  
ject; recompile with -fPIC                                                    
    /bin/ld: /usr/lib/libpython3.6m.a(typeobject.o): relocation R_X86_64_32   
against `.text' can not be used when making a shared object; recompile with   
-fPIC                                                                         
    /bin/ld: /usr/lib/libpython3.6m.a(unicodeobject.o): relocation R_X86_64_  
32 against `.rodata.str1.1' can not be used when making a shared object; rec  
ompile with -fPIC                                                             
    /bin/ld: /usr/lib/libpython3.6m.a(unicodectype.o): relocation R_X86_64_3  
2S against `.rodata' can not be used when making a shared object; recompile   
with -fPIC                                                                    
    /bin/ld: /usr/lib/libpython3.6m.a(weakrefobject.o): relocation R_X86_64_  
32 against `.rodata.str1.1' can not be used when making a shared object; rec  
ompile with -fPIC                                                             
    /bin/ld: /usr/lib/libpython3.6m.a(_warnings.o): relocation R_X86_64_32 a  
gainst symbol `_Py_NoneStruct' can not be used when making a shared object;   
recompile with -fPIC                                                          
    /bin/ld: /usr/lib/libpython3.6m.a(bltinmodule.o): relocation R_X86_64_32  
S against symbol `PyFilter_Type' can not be used when making a shared object  
; recompile with -fPIC                                                        
    /bin/ld: /usr/lib/libpython3.6m.a(ceval.o): relocation R_X86_64_32 again  
st `.bss' can not be used when making a shared object; recompile with -fPIC   
    /bin/ld: /usr/lib/libpython3.6m.a(compile.o): relocation R_X86_64_32S ag  
ainst `.rodata' can not be used when making a shared object; recompile with   
-fPIC                                                                         
    /bin/ld: /usr/lib/libpython3.6m.a(codecs.o): relocation R_X86_64_32 agai  
nst `.rodata.str1.1' can not be used when making a shared object; recompile   
with -fPIC                                                                    
    /bin/ld: /usr/lib/libpython3.6m.a(errors.o): relocation R_X86_64_32S aga  
inst symbol `PyTraceBack_Type' can not be used when making a shared object;   
recompile with -fPIC                                                          
    /bin/ld: /usr/lib/libpython3.6m.a(future.o): relocation R_X86_64_32 agai  
nst `.rodata.str1.1' can not be used when making a shared object; recompile   
with -fPIC                                                                    
    /bin/ld: /usr/lib/libpython3.6m.a(getargs.o): relocation R_X86_64_32S ag  
ainst symbol `_Py_NoneStruct' can not be used when making a shared object; r  
ecompile with -fPIC                                                           
    /bin/ld: /usr/lib/libpython3.6m.a(import.o): relocation R_X86_64_32 agai  
nst `.rodata.str1.1' can not be used when making a shared object; recompile   
with -fPIC                                                                    
    /bin/ld: /usr/lib/libpython3.6m.a(importdl.o): relocation R_X86_64_32 ag  
ainst `.rodata.str1.1' can not be used when making a shared object; recompil  
e with -fPIC                                                                  
    /bin/ld: /usr/lib/libpython3.6m.a(marshal.o): relocation R_X86_64_32 aga  
inst `.rodata.str1.1' can not be used when making a shared object; recompile  
 with -fPIC                                                                   
    /bin/ld: /usr/lib/libpython3.6m.a(modsupport.o): relocation R_X86_64_32S  
 against `.rodata' can not be used when making a shared object; recompile wi  
th -fPIC                                                                      
    /bin/ld: /usr/lib/libpython3.6m.a(peephole.o): relocation R_X86_64_32S a  
gainst `.rodata' can not be used when making a shared object; recompile with  
 -fPIC                                                                        
    /bin/ld: /usr/lib/libpython3.6m.a(pyhash.o): relocation R_X86_64_32S aga  
inst `.rodata' can not be used when making a shared object; recompile with -  
fPIC                                                                          
    /bin/ld: /usr/lib/libpython3.6m.a(pylifecycle.o): relocation R_X86_64_32  
 against `.rodata.str1.1' can not be used when making a shared object; recom  
pile with -fPIC                                                               
    /bin/ld: /usr/lib/libpython3.6m.a(pystate.o): relocation R_X86_64_32S ag  
ainst symbol `_PyEval_EvalFrameDefault' can not be used when making a shared  
 object; recompile with -fPIC                                                 
    /bin/ld: /usr/lib/libpython3.6m.a(pythonrun.o): relocation R_X86_64_32 a  
gainst `.data' can not be used when making a shared object; recompile with -  
fPIC                                                                          
    /bin/ld: /usr/lib/libpython3.6m.a(pytime.o): relocation R_X86_64_32 agai  
nst `.rodata.str1.8' can not be used when making a shared object; recompile   
with -fPIC                                                                    
    /bin/ld: /usr/lib/libpython3.6m.a(random.o): relocation R_X86_64_32 agai  
nst `.rodata.str1.1' can not be used when making a shared object; recompile   
with -fPIC                                                                    
    /bin/ld: /usr/lib/libpython3.6m.a(symtable.o): relocation R_X86_64_32 ag  
ainst `.rodata.str1.8' can not be used when making a shared object; recompil  
e with -fPIC                                                                  
    /bin/ld: /usr/lib/libpython3.6m.a(sysmodule.o): relocation R_X86_64_32 a  
gainst symbol `_Py_NoneStruct' can not be used when making a shared object;   
recompile with -fPIC                                                          
    /bin/ld: /usr/lib/libpython3.6m.a(traceback.o): relocation R_X86_64_32 a  
gainst `.rodata.str1.1' can not be used when making a shared object; recompi  
le with -fPIC                                                                 
    /bin/ld: /usr/lib/libpython3.6m.a(pystrtod.o): relocation R_X86_64_32S a  
gainst symbol `_Py_ctype_tolower' can not be used when making a shared objec  
t; recompile with -fPIC                                                       
    /bin/ld: /usr/lib/libpython3.6m.a(dtoa.o): relocation R_X86_64_32S again  
st `.bss' can not be used when making a shared object; recompile with -fPIC   
    /bin/ld: /usr/lib/libpython3.6m.a(formatter_unicode.o): relocation R_X86  
_64_32S against symbol `_Py_ctype_table' can not be used when making a share  
d object; recompile with -fPIC                                                
    /bin/ld: /usr/lib/libpython3.6m.a(fileutils.o): relocation R_X86_64_32S   
against `.rodata.str1.1' can not be used when making a shared object; recomp  
ile with -fPIC                                                                
    /bin/ld: /usr/lib/libpython3.6m.a(dynload_shlib.o): relocation R_X86_64_  
32 against `.rodata.str1.1' can not be used when making a shared object; rec  
ompile with -fPIC                                                             
    /bin/ld: /usr/lib/libpython3.6m.a(thread.o): relocation R_X86_64_32 agai  
nst `.rodata.str1.1' can not be used when making a shared object; recompile   
with -fPIC                                                                    
    /bin/ld: /usr/lib/libpython3.6m.a(getpath.o): relocation R_X86_64_32 aga  
inst `.rodata.str1.8' can not be used when making a shared object; recompile  
 with -fPIC                                                                   
    /bin/ld: /usr/lib/libpython3.6m.a(gcmodule.o): relocation R_X86_64_32 ag  
ainst symbol `_Py_NoneStruct' can not be used when making a shared object; r  
ecompile with -fPIC                                                           
    /bin/ld: /usr/lib/libpython3.6m.a(_threadmodule.o): relocation R_X86_64_  
32 against symbol `_Py_NoneStruct' can not be used when making a shared obje  
ct; recompile with -fPIC                                                      
    /bin/ld: /usr/lib/libpython3.6m.a(posixmodule.o): relocation R_X86_64_32  
S against symbol `_Py_NoneStruct' can not be used when making a shared objec  
t; recompile with -fPIC                                                       
    /bin/ld: /usr/lib/libpython3.6m.a(errnomodule.o): relocation R_X86_64_32  
 against `.data' can not be used when making a shared object; recompile with  
 -fPIC                                                                        
    /bin/ld: /usr/lib/libpython3.6m.a(pwdmodule.o): relocation R_X86_64_32 a  
gainst `.bss' can not be used when making a shared object; recompile with -f  
PIC                                                                           
    /bin/ld: /usr/lib/libpython3.6m.a(_sre.o): relocation R_X86_64_32S again  
st symbol `_Py_ctype_tolower' can not be used when making a shared object; r  
ecompile with -fPIC                                                           
    /bin/ld: /usr/lib/libpython3.6m.a(_codecsmodule.o): relocation R_X86_64_  
32 against `.rodata.str1.1' can not be used when making a shared object; rec  
ompile with -fPIC                                                             
    /bin/ld: /usr/lib/libpython3.6m.a(_weakref.o): relocation R_X86_64_32 ag  
ainst `.rodata.str1.1' can not be used when making a shared object; recompil  
e with -fPIC                                                                  
    /bin/ld: /usr/lib/libpython3.6m.a(_functoolsmodule.o): relocation R_X86_  
64_32 against `.data' can not be used when making a shared object; recompile  
 with -fPIC                                                                   
    /bin/ld: /usr/lib/libpython3.6m.a(_operator.o): relocation R_X86_64_32 a  
gainst `.data' can not be used when making a shared object; recompile with -  
fPIC                                                                          
    /bin/ld: /usr/lib/libpython3.6m.a(_collectionsmodule.o): relocation R_X8  
6_64_32 against symbol `_Py_NoneStruct' can not be used when making a shared  
 object; recompile with -fPIC                                                 
    /bin/ld: /usr/lib/libpython3.6m.a(itertoolsmodule.o): relocation R_X86_6  
4_32S against `.data' can not be used when making a shared object; recompile  
 with -fPIC                                                                   
    /bin/ld: /usr/lib/libpython3.6m.a(atexitmodule.o): relocation R_X86_64_3  
2 against `.rodata.str1.8' can not be used when making a shared object; reco  
mpile with -fPIC                                                              
    /bin/ld: /usr/lib/libpython3.6m.a(signalmodule.o): relocation R_X86_64_3  
2 against `.rodata.str1.8' can not be used when making a shared object; reco  
mpile with -fPIC                                                              
    /bin/ld: /usr/lib/libpython3.6m.a(_stat.o): relocation R_X86_64_32 again  
st `.rodata.str1.1' can not be used when making a shared object; recompile w  
ith -fPIC                                                                     
    /bin/ld: /usr/lib/libpython3.6m.a(timemodule.o): relocation R_X86_64_32   
against `.rodata.str1.1' can not be used when making a shared object; recomp  
ile with -fPIC                                                                
    /bin/ld: /usr/lib/libpython3.6m.a(_localemodule.o): relocation R_X86_64_  
32 against `.rodata.str1.1' can not be used when making a shared object; rec  
ompile with -fPIC                                                             
    /bin/ld: /usr/lib/libpython3.6m.a(_iomodule.o): relocation R_X86_64_32 a  
gainst `.data' can not be used when making a shared object; recompile with -  
fPIC                                                                          
    /bin/ld: /usr/lib/libpython3.6m.a(iobase.o): relocation R_X86_64_32 agai  
nst symbol `_Py_FalseStruct' can not be used when making a shared object; re  
compile with -fPIC                                                            
    /bin/ld: /usr/lib/libpython3.6m.a(fileio.o): relocation R_X86_64_32 agai  
nst `.rodata.str1.1' can not be used when making a shared object; recompile   
with -fPIC                                                                    
    /bin/ld: /usr/lib/libpython3.6m.a(bytesio.o): relocation R_X86_64_32 aga  
inst `.rodata.str1.1' can not be used when making a shared object; recompile  
 with -fPIC                                                                   
    /bin/ld: /usr/lib/libpython3.6m.a(bufferedio.o): relocation R_X86_64_32   
against `.rodata.str1.1' can not be used when making a shared object; recomp  
ile with -fPIC                                                                
    /bin/ld: /usr/lib/libpython3.6m.a(textio.o): relocation R_X86_64_32 agai  
nst symbol `_Py_NoneStruct' can not be used when making a shared object; rec  
ompile with -fPIC                                                             
    /bin/ld: /usr/lib/libpython3.6m.a(stringio.o): relocation R_X86_64_32 ag  
ainst `.rodata.str1.1' can not be used when making a shared object; recompil  
e with -fPIC                                                                  
    /bin/ld: /usr/lib/libpython3.6m.a(zipimport.o): relocation R_X86_64_32 a  
gainst `.rodata.str1.1' can not be used when making a shared object; recompi  
le with -fPIC                                                                 
    /bin/ld: /usr/lib/libpython3.6m.a(faulthandler.o): relocation R_X86_64_3  
2 against `.rodata.str1.1' can not be used when making a shared object; reco  
mpile with -fPIC                                                              
    /bin/ld: /usr/lib/libpython3.6m.a(_tracemalloc.o): relocation R_X86_64_3  
2 against `.rodata.str1.1' can not be used when making a shared object; reco  
mpile with -fPIC                                                              
    /bin/ld: /usr/lib/libpython3.6m.a(hashtable.o): relocation R_X86_64_32 a  
gainst symbol `PyMem_RawFree' can not be used when making a shared object; r  
ecompile with -fPIC                                                           
    /bin/ld: /usr/lib/libpython3.6m.a(symtablemodule.o): relocation R_X86_64  
_32 against symbol `PyUnicode_FSDecoder' can not be used when making a share  
d object; recompile with -fPIC                                                
    /bin/ld: /usr/lib/libpython3.6m.a(xxsubtype.o): relocation R_X86_64_32 a  
gainst `.data' can not be used when making a shared object; recompile with -  
fPIC                                                                          
    /bin/ld: /usr/lib/libpython3.6m.a(getbuildinfo.o): relocation R_X86_64_3  
2 against `.rodata.str1.1' can not be used when making a shared object; reco  
mpile with -fPIC                                                              
    /bin/ld: /usr/lib/libpython3.6m.a(acceler.o): relocation R_X86_64_32 aga  
inst `.rodata.str1.1' can not be used when making a shared object; recompile  
 with -fPIC                                                                   
    /bin/ld: /usr/lib/libpython3.6m.a(grammar1.o): relocation R_X86_64_32 ag  
ainst `.rodata.str1.1' can not be used when making a shared object; recompil  
e with -fPIC                                                                  
    /bin/ld: /usr/lib/libpython3.6m.a(myreadline.o): relocation R_X86_64_32   
against `.rodata.str1.1' can not be used when making a shared object; recomp  
ile with -fPIC                                                                
    /bin/ld: /usr/lib/libpython3.6m.a(parsetok.o): relocation R_X86_64_32S a  
gainst `.rodata.str1.8' can not be used when making a shared object; recompi  
le with -fPIC                                                                 
    /bin/ld: /usr/lib/libpython3.6m.a(tokenizer.o): relocation R_X86_64_32 a  
gainst `.rodata.str1.1' can not be used when making a shared object; recompi  
le with -fPIC                                                                 
    /bin/ld: /usr/lib/libpython3.6m.a(accu.o): relocation R_X86_64_32 agains  
t `.rodata.str1.1' can not be used when making a shared object; recompile wi  
th -fPIC                                                                      
    /bin/ld: /usr/lib/libpython3.6m.a(bytes_methods.o): relocation R_X86_64_  
32S against symbol `_Py_NoneStruct' can not be used when making a shared obj  
ect; recompile with -fPIC                                                     
    /bin/ld: /usr/lib/libpython3.6m.a(cellobject.o): relocation R_X86_64_32   
against `.rodata.str1.1' can not be used when making a shared object; recomp  
ile with -fPIC                                                                
    /bin/ld: /usr/lib/libpython3.6m.a(classobject.o): relocation R_X86_64_32  
 against `.rodata.str1.1' can not be used when making a shared object; recom  
pile with -fPIC                                                               
    /bin/ld: /usr/lib/libpython3.6m.a(codeobject.o): relocation R_X86_64_32S  
 against symbol `PyUnicode_Type' can not be used when making a shared object  
; recompile with -fPIC                                                        
    /bin/ld: /usr/lib/libpython3.6m.a(complexobject.o): relocation R_X86_64_  
32 against `.data' can not be used when making a shared object; recompile wi  
th -fPIC                                                                      
    /bin/ld: /usr/lib/libpython3.6m.a(descrobject.o): relocation R_X86_64_32  
 against `.rodata.str1.1' can not be used when making a shared object; recom  
pile with -fPIC                                                               
    /bin/ld: /usr/lib/libpython3.6m.a(enumobject.o): relocation R_X86_64_32   
against `.data' can not be used when making a shared object; recompile with   
-fPIC                                                                         
    /bin/ld: /usr/lib/libpython3.6m.a(fileobject.o): relocation R_X86_64_32   
against symbol `_Py_NoneStruct' can not be used when making a shared object;  
 recompile with -fPIC                                                         
    /bin/ld: /usr/lib/libpython3.6m.a(frameobject.o): relocation R_X86_64_32  
 against symbol `_Py_NoneStruct' can not be used when making a shared object  
; recompile with -fPIC                                                        
    /bin/ld: /usr/lib/libpython3.6m.a(odictobject.o): relocation R_X86_64_32  
 against `.rodata.str1.8' can not be used when making a shared object; recom  
pile with -fPIC                                                               
    /bin/ld: /usr/lib/libpython3.6m.a(namespaceobject.o): relocation R_X86_6  
4_32S against symbol `_PyNamespace_Type' can not be used when making a share  
d object; recompile with -fPIC                                                
    /bin/ld: /usr/lib/libpython3.6m.a(Python-ast.o): relocation R_X86_64_32   
against symbol `_Py_NoneStruct' can not be used when making a shared object;  
 recompile with -fPIC                                                         
    /bin/ld: /usr/lib/libpython3.6m.a(ast.o): relocation R_X86_64_32 against  
 `.rodata.str1.1' can not be used when making a shared object; recompile wit  
h -fPIC                                                                       
    /bin/ld: /usr/lib/libpython3.6m.a(getcopyright.o): relocation R_X86_64_3  
2 against `.rodata' can not be used when making a shared object; recompile w  
ith -fPIC                                                                     
    /bin/ld: /usr/lib/libpython3.6m.a(getplatform.o): relocation R_X86_64_32  
 against `.rodata.str1.1' can not be used when making a shared object; recom  
pile with -fPIC                                                               
    /bin/ld: /usr/lib/libpython3.6m.a(getversion.o): relocation R_X86_64_32   
against `.rodata.str1.1' can not be used when making a shared object; recomp  
ile with -fPIC                                                                
    /bin/ld: /usr/lib/libpython3.6m.a(mystrtoul.o): relocation R_X86_64_32S   
against symbol `_Py_ctype_table' can not be used when making a shared object  
; recompile with -fPIC                                                        
    /bin/ld: /usr/lib/libpython3.6m.a(structmember.o): relocation R_X86_64_3  
2S against `.rodata' can not be used when making a shared object; recompile   
with -fPIC                                                                    
    /bin/ld: /usr/lib/libpython3.6m.a(parser.o): relocation R_X86_64_32 agai  
nst `.rodata.str1.8' can not be used when making a shared object; recompile   
with -fPIC                                                                    
    /bin/ld: /usr/lib/libpython3.6m.a(getcompiler.o): relocation R_X86_64_32  
 against `.rodata.str1.8' can not be used when making a shared object; recom  
pile with -fPIC                                                               
    /bin/ld: final link failed: Nonrepresentable section on output            
    collect2: error: ld returned 1 exit status                                
    error: command 'g++' failed with exit status 1       
AEHamrick commented 5 years ago

I was able to resolve this by the following, but I'm afraid I still don't quite understand what's going on:

mkleehammer commented 5 years ago

Yikes. Was this box upgraded from RHEL6 to 7, by any chance?

prgore commented 4 years ago

I am facing same issue as described, the solution given AEHamrick is not worked for me. Would anyone please help on same.

v-chojas commented 4 years ago

Do you have the exact same set of error messages? Your situation may be slightly different. Please post them to ascertain.

prgore commented 4 years ago

Below is log

[root@SERVR1234 ~]# pip3 install pyodbc Collecting pyodbc Using cached pyodbc-4.0.30.tar.gz (266 kB) Building wheels for collected packages: pyodbc Building wheel for pyodbc (setup.py) ... 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-1_h311wy/pyodbc/setup.py'"'"'; file='"'"'/tmp/pip-install-1_h311wy/pyodbc/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-zf41tmxz cwd: /tmp/pip-install-1_h311wy/pyodbc/ Complete output (146 lines): /usr/lib64/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'long_description_content_type' warnings.warn(msg) running bdist_wheel running build running build_ext building 'pyodbc' extension creating build creating build/temp.linux-x86_64-3.6 creating build/temp.linux-x86_64-3.6/src gcc -pthread -Wno-unused-result -Wsign-compare -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 -DPYODBC_VERSION=4.0.30 -I/usr/include/python3.6m -c src/buffer.cpp -o build/temp.linux-x86_64-3.6/src/buffer.o -Wno-write-strings -DHAVE_UNISTD_H -DHAVE_PWD_H -DHAVE_SYS_TYPES_H -DHAVE_LONG_LONG -DSIZEOF_LONG_INT=8 -I/usr/include gcc -pthread -Wno-unused-result -Wsign-compare -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 -DPYODBC_VERSION=4.0.30 -I/usr/include/python3.6m -c src/cnxninfo.cpp -o build/temp.linux-x86_64-3.6/src/cnxninfo.o -Wno-write-strings -DHAVE_UNISTD_H -DHAVE_PWD_H -DHAVE_SYS_TYPES_H -DHAVE_LONG_LONG -DSIZEOF_LONG_INT=8 -I/usr/include gcc -pthread -Wno-unused-result -Wsign-compare -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 -DPYODBC_VERSION=4.0.30 -I/usr/include/python3.6m -c src/connection.cpp -o build/temp.linux-x86_64-3.6/src/connection.o -Wno-write-strings -DHAVE_UNISTD_H -DHAVE_PWD_H -DHAVE_SYS_TYPES_H -DHAVE_LONG_LONG -DSIZEOF_LONG_INT=8 -I/usr/include src/connection.cpp: In function ‘PyObject Connection_getinfo(PyObject, PyObject)’: src/connection.cpp:835:40: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] SQLUINTEGER n = (SQLUINTEGER)szBuffer; // Does this work on PPC or do we need a union? ^ src/connection.cpp:848:49: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] result = PyInt_FromLong((SQLUSMALLINT*)szBuffer); ^ gcc -pthread -Wno-unused-result -Wsign-compare -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 -DPYODBC_VERSION=4.0.30 -I/usr/include/python3.6m -c src/cursor.cpp -o build/temp.linux-x86_64-3.6/src/cursor.o -Wno-write-strings -DHAVE_UNISTD_H -DHAVE_PWD_H -DHAVE_SYS_TYPES_H -DHAVE_LONG_LONG -DSIZEOF_LONG_INT=8 -I/usr/include gcc -pthread -Wno-unused-result -Wsign-compare -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 -DPYODBC_VERSION=4.0.30 -I/usr/include/python3.6m -c src/errors.cpp -o build/temp.linux-x86_64-3.6/src/errors.o -Wno-write-strings -DHAVE_UNISTD_H -DHAVE_PWD_H -DHAVE_SYS_TYPES_H -DHAVE_LONG_LONG -DSIZEOF_LONG_INT=8 -I/usr/include gcc -pthread -Wno-unused-result -Wsign-compare -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 -DPYODBC_VERSION=4.0.30 -I/usr/include/python3.6m -c src/getdata.cpp -o build/temp.linux-x86_64-3.6/src/getdata.o -Wno-write-strings -DHAVE_UNISTD_H -DHAVE_PWD_H -DHAVE_SYS_TYPES_H -DHAVE_LONG_LONG -DSIZEOF_LONG_INT=8 -I/usr/include gcc -pthread -Wno-unused-result -Wsign-compare -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 -DPYODBC_VERSION=4.0.30 -I/usr/include/python3.6m -c src/params.cpp -o build/temp.linux-x86_64-3.6/src/params.o -Wno-write-strings -DHAVE_UNISTD_H -DHAVE_PWD_H -DHAVE_SYS_TYPES_H -DHAVE_LONG_LONG -DSIZEOF_LONG_INT=8 -I/usr/include gcc -pthread -Wno-unused-result -Wsign-compare -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 -DPYODBC_VERSION=4.0.30 -I/usr/include/python3.6m -c src/pyodbccompat.cpp -o build/temp.linux-x86_64-3.6/src/pyodbccompat.o -Wno-write-strings -DHAVE_UNISTD_H -DHAVE_PWD_H -DHAVE_SYS_TYPES_H -DHAVE_LONG_LONG -DSIZEOF_LONG_INT=8 -I/usr/include gcc -pthread -Wno-unused-result -Wsign-compare -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 -DPYODBC_VERSION=4.0.30 -I/usr/include/python3.6m -c src/pyodbcdbg.cpp -o build/temp.linux-x86_64-3.6/src/pyodbcdbg.o -Wno-write-strings -DHAVE_UNISTD_H -DHAVE_PWD_H -DHAVE_SYS_TYPES_H -DHAVE_LONG_LONG -DSIZEOF_LONG_INT=8 -I/usr/include gcc -pthread -Wno-unused-result -Wsign-compare -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 -DPYODBC_VERSION=4.0.30 -I/usr/include/python3.6m -c src/pyodbcmodule.cpp -o build/temp.linux-x86_64-3.6/src/pyodbcmodule.o -Wno-write-strings -DHAVE_UNISTD_H -DHAVE_PWD_H -DHAVE_SYS_TYPES_H -DHAVE_LONG_LONG -DSIZEOF_LONG_INT=8 -I/usr/include gcc -pthread -Wno-unused-result -Wsign-compare -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 -DPYODBC_VERSION=4.0.30 -I/usr/include/python3.6m -c src/row.cpp -o build/temp.linux-x86_64-3.6/src/row.o -Wno-write-strings -DHAVE_UNISTD_H -DHAVE_PWD_H -DHAVE_SYS_TYPES_H -DHAVE_LONG_LONG -DSIZEOF_LONG_INT=8 -I/usr/include gcc -pthread -Wno-unused-result -Wsign-compare -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 -DPYODBC_VERSION=4.0.30 -I/usr/include/python3.6m -c src/textenc.cpp -o build/temp.linux-x86_64-3.6/src/textenc.o -Wno-write-strings -DHAVE_UNISTD_H -DHAVE_PWD_H -DHAVE_SYS_TYPES_H -DHAVE_LONG_LONG -DSIZEOF_LONG_INT=8 -I/usr/include creating build/lib.linux-x86_64-3.6 g++ -pthread -shared -Wl,-z,relro -g build/temp.linux-x86_64-3.6/src/buffer.o build/temp.linux-x86_64-3.6/src/cnxninfo.o build/temp.linux-x86_64-3.6/src/connection.o build/temp.linux-x86_64-3.6/src/cursor.o build/temp.linux-x86_64-3.6/src/errors.o build/temp.linux-x86_64-3.6/src/getdata.o build/temp.linux-x86_64-3.6/src/params.o build/temp.linux-x86_64-3.6/src/pyodbccompat.o build/temp.linux-x86_64-3.6/src/pyodbcdbg.o build/temp.linux-x86_64-3.6/src/pyodbcmodule.o build/temp.linux-x86_64-3.6/src/row.o build/temp.linux-x86_64-3.6/src/textenc.o -L/usr/lib -L/usr/local/lib -L/usr/lib64 -lodbc -lpython3.6m -o build/lib.linux-x86_64-3.6/pyodbc.cpython-36m-x86_64-linux-gnu.so -L/usr/lib64 -lodbc /bin/ld: /usr/local/lib/libpython3.6m.a(abstract.o): relocation R_X86_64_32S against symbol _Py_NotImplementedStruct' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(boolobject.o): relocation R_X86_64_32 against.data' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(bytearrayobject.o): relocation R_X86_64_32 against symbol _PyByteArray_empty_string' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(bytesobject.o): relocation R_X86_64_32 against symbol_Py_NoneStruct' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(exceptions.o): relocation R_X86_64_32S against symbol _Py_NoneStruct' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(genobject.o): relocation R_X86_64_32 against symbol_Py_NoneStruct' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(floatobject.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(funcobject.o): relocation R_X86_64_32S against symbolPyCode_Type' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(iterobject.o): relocation R_X86_64_32 against symbol _Py_NoneStruct' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(listobject.o): relocation R_X86_64_32 against symbol_Py_NoneStruct' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(longobject.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(dictobject.o): relocation R_X86_64_32S against.text' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(memoryobject.o): relocation R_X86_64_32 against .rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(methodobject.o): relocation R_X86_64_32 against symbol_Py_NoneStruct' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(moduleobject.o): relocation R_X86_64_32 against .rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(object.o): relocation R_X86_64_32 against.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(obmalloc.o): relocation R_X86_64_32S against .data' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(capsule.o): relocation R_X86_64_32 against.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(rangeobject.o): relocation R_X86_64_32 against symbol _Py_NoneStruct' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(setobject.o): relocation R_X86_64_32S against.data' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(sliceobject.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(structseq.o): relocation R_X86_64_32 against.data' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(tupleobject.o): relocation R_X86_64_32 against symbol _PyEval_SliceIndex' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(typeobject.o): relocation R_X86_64_32 against.text' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(unicodeobject.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(unicodectype.o): relocation R_X86_64_32S against.rodata' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(weakrefobject.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(_warnings.o): relocation R_X86_64_32 against symbol_Py_NoneStruct' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(bltinmodule.o): relocation R_X86_64_32S against symbol PyFilter_Type' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(ceval.o): relocation R_X86_64_32 against.bss' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(compile.o): relocation R_X86_64_32S against .rodata' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(codecs.o): relocation R_X86_64_32 against.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(errors.o): relocation R_X86_64_32S against symbol PyTraceBack_Type' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(future.o): relocation R_X86_64_32 against.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(getargs.o): relocation R_X86_64_32S against symbol _Py_NoneStruct' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(import.o): relocation R_X86_64_32 against.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(importdl.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(marshal.o): relocation R_X86_64_32 against.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(modsupport.o): relocation R_X86_64_32S against .rodata' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(peephole.o): relocation R_X86_64_32S against.rodata' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(pyhash.o): relocation R_X86_64_32S against .rodata' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(pylifecycle.o): relocation R_X86_64_32 against.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(pystate.o): relocation R_X86_64_32S against symbol _PyEval_EvalFrameDefault' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(pythonrun.o): relocation R_X86_64_32 against.data' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(pytime.o): relocation R_X86_64_32 against .rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(random.o): relocation R_X86_64_32 against.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(symtable.o): relocation R_X86_64_32 against .rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(sysmodule.o): relocation R_X86_64_32 against symbol_Py_NoneStruct' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(traceback.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(pystrtod.o): relocation R_X86_64_32S against symbol_Py_ctype_tolower' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(dtoa.o): relocation R_X86_64_32S against .bss' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(formatter_unicode.o): relocation R_X86_64_32S against symbol_Py_ctype_table' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(fileutils.o): relocation R_X86_64_32S against .rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(dynload_shlib.o): relocation R_X86_64_32 against.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(thread.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(getpath.o): relocation R_X86_64_32 against.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(gcmodule.o): relocation R_X86_64_32 against symbol _Py_NoneStruct' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(_threadmodule.o): relocation R_X86_64_32 against symbol_Py_NoneStruct' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(posixmodule.o): relocation R_X86_64_32S against symbol _Py_NoneStruct' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(errnomodule.o): relocation R_X86_64_32 against.data' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(pwdmodule.o): relocation R_X86_64_32 against .bss' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(_sre.o): relocation R_X86_64_32S against symbol_Py_ctype_tolower' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(_codecsmodule.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(_weakref.o): relocation R_X86_64_32 against.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(_functoolsmodule.o): relocation R_X86_64_32 against .data' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(_operator.o): relocation R_X86_64_32 against.data' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(_collectionsmodule.o): relocation R_X86_64_32 against symbol _Py_NoneStruct' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(itertoolsmodule.o): relocation R_X86_64_32S against.data' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(atexitmodule.o): relocation R_X86_64_32 against .rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(signalmodule.o): relocation R_X86_64_32 against.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(_stat.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(timemodule.o): relocation R_X86_64_32 against.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(_localemodule.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(_iomodule.o): relocation R_X86_64_32 against.data' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(iobase.o): relocation R_X86_64_32 against symbol _Py_FalseStruct' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(fileio.o): relocation R_X86_64_32 against.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(bytesio.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(bufferedio.o): relocation R_X86_64_32 against.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(textio.o): relocation R_X86_64_32 against symbol _Py_NoneStruct' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(stringio.o): relocation R_X86_64_32 against.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(zipimport.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(faulthandler.o): relocation R_X86_64_32 against.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(_tracemalloc.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(hashtable.o): relocation R_X86_64_32 against symbolPyMem_RawFree' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(symtablemodule.o): relocation R_X86_64_32 against symbol PyUnicode_FSDecoder' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(xxsubtype.o): relocation R_X86_64_32 against.data' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(getbuildinfo.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(acceler.o): relocation R_X86_64_32 against.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(grammar1.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(myreadline.o): relocation R_X86_64_32 against.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(parsetok.o): relocation R_X86_64_32S against .rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(tokenizer.o): relocation R_X86_64_32 against.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(accu.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(bytes_methods.o): relocation R_X86_64_32S against symbol_Py_NoneStruct' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(cellobject.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(classobject.o): relocation R_X86_64_32 against.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(codeobject.o): relocation R_X86_64_32S against symbol PyUnicode_Type' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(complexobject.o): relocation R_X86_64_32 against.data' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(descrobject.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(enumobject.o): relocation R_X86_64_32 against.data' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(fileobject.o): relocation R_X86_64_32 against symbol _Py_NoneStruct' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(frameobject.o): relocation R_X86_64_32 against symbol_Py_NoneStruct' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(odictobject.o): relocation R_X86_64_32 against .rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(namespaceobject.o): relocation R_X86_64_32S against symbol_PyNamespace_Type' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(Python-ast.o): relocation R_X86_64_32 against symbol _Py_NoneStruct' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(ast.o): relocation R_X86_64_32 against.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(getcopyright.o): relocation R_X86_64_32 against .rodata' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(getplatform.o): relocation R_X86_64_32 against.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(getversion.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(mystrtoul.o): relocation R_X86_64_32S against symbol_Py_ctype_table' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(structmember.o): relocation R_X86_64_32S against .rodata' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(parser.o): relocation R_X86_64_32 against.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(getcompiler.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /bin/ld: final link failed: Nonrepresentable section on output collect2: error: ld returned 1 exit status error: command 'g++' failed with exit status 1

ERROR: Failed building wheel for pyodbc Running setup.py clean for pyodbc Failed to build pyodbc Installing collected packages: pyodbc Running setup.py install for pyodbc ... 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-1_h311wy/pyodbc/setup.py'"'"'; file='"'"'/tmp/pip-install-1_h311wy/pyodbc/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-cnydwc7q/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.6m/pyodbc cwd: /tmp/pip-install-1_h311wy/pyodbc/ Complete output (146 lines): /usr/lib64/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'long_description_content_type' warnings.warn(msg) running install running build running build_ext building 'pyodbc' extension creating build creating build/temp.linux-x86_64-3.6 creating build/temp.linux-x86_64-3.6/src gcc -pthread -Wno-unused-result -Wsign-compare -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 -DPYODBC_VERSION=4.0.30 -I/usr/include/python3.6m -c src/buffer.cpp -o build/temp.linux-x86_64-3.6/src/buffer.o -Wno-write-strings -DHAVE_UNISTD_H -DHAVE_PWD_H -DHAVE_SYS_TYPES_H -DHAVE_LONG_LONG -DSIZEOF_LONG_INT=8 -I/usr/include gcc -pthread -Wno-unused-result -Wsign-compare -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 -DPYODBC_VERSION=4.0.30 -I/usr/include/python3.6m -c src/cnxninfo.cpp -o build/temp.linux-x86_64-3.6/src/cnxninfo.o -Wno-write-strings -DHAVE_UNISTD_H -DHAVE_PWD_H -DHAVE_SYS_TYPES_H -DHAVE_LONG_LONG -DSIZEOF_LONG_INT=8 -I/usr/include gcc -pthread -Wno-unused-result -Wsign-compare -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 -DPYODBC_VERSION=4.0.30 -I/usr/include/python3.6m -c src/connection.cpp -o build/temp.linux-x86_64-3.6/src/connection.o -Wno-write-strings -DHAVE_UNISTD_H -DHAVE_PWD_H -DHAVE_SYS_TYPES_H -DHAVE_LONG_LONG -DSIZEOF_LONG_INT=8 -I/usr/include src/connection.cpp: In function ‘PyObject Connection_getinfo(PyObject, PyObject)’: src/connection.cpp:835:40: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] SQLUINTEGER n = (SQLUINTEGER)szBuffer; // Does this work on PPC or do we need a union? ^ src/connection.cpp:848:49: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] result = PyInt_FromLong((SQLUSMALLINT*)szBuffer); ^ gcc -pthread -Wno-unused-result -Wsign-compare -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 -DPYODBC_VERSION=4.0.30 -I/usr/include/python3.6m -c src/cursor.cpp -o build/temp.linux-x86_64-3.6/src/cursor.o -Wno-write-strings -DHAVE_UNISTD_H -DHAVE_PWD_H -DHAVE_SYS_TYPES_H -DHAVE_LONG_LONG -DSIZEOF_LONG_INT=8 -I/usr/include gcc -pthread -Wno-unused-result -Wsign-compare -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 -DPYODBC_VERSION=4.0.30 -I/usr/include/python3.6m -c src/errors.cpp -o build/temp.linux-x86_64-3.6/src/errors.o -Wno-write-strings -DHAVE_UNISTD_H -DHAVE_PWD_H -DHAVE_SYS_TYPES_H -DHAVE_LONG_LONG -DSIZEOF_LONG_INT=8 -I/usr/include gcc -pthread -Wno-unused-result -Wsign-compare -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 -DPYODBC_VERSION=4.0.30 -I/usr/include/python3.6m -c src/getdata.cpp -o build/temp.linux-x86_64-3.6/src/getdata.o -Wno-write-strings -DHAVE_UNISTD_H -DHAVE_PWD_H -DHAVE_SYS_TYPES_H -DHAVE_LONG_LONG -DSIZEOF_LONG_INT=8 -I/usr/include gcc -pthread -Wno-unused-result -Wsign-compare -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 -DPYODBC_VERSION=4.0.30 -I/usr/include/python3.6m -c src/params.cpp -o build/temp.linux-x86_64-3.6/src/params.o -Wno-write-strings -DHAVE_UNISTD_H -DHAVE_PWD_H -DHAVE_SYS_TYPES_H -DHAVE_LONG_LONG -DSIZEOF_LONG_INT=8 -I/usr/include gcc -pthread -Wno-unused-result -Wsign-compare -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 -DPYODBC_VERSION=4.0.30 -I/usr/include/python3.6m -c src/pyodbccompat.cpp -o build/temp.linux-x86_64-3.6/src/pyodbccompat.o -Wno-write-strings -DHAVE_UNISTD_H -DHAVE_PWD_H -DHAVE_SYS_TYPES_H -DHAVE_LONG_LONG -DSIZEOF_LONG_INT=8 -I/usr/include gcc -pthread -Wno-unused-result -Wsign-compare -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 -DPYODBC_VERSION=4.0.30 -I/usr/include/python3.6m -c src/pyodbcdbg.cpp -o build/temp.linux-x86_64-3.6/src/pyodbcdbg.o -Wno-write-strings -DHAVE_UNISTD_H -DHAVE_PWD_H -DHAVE_SYS_TYPES_H -DHAVE_LONG_LONG -DSIZEOF_LONG_INT=8 -I/usr/include gcc -pthread -Wno-unused-result -Wsign-compare -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 -DPYODBC_VERSION=4.0.30 -I/usr/include/python3.6m -c src/pyodbcmodule.cpp -o build/temp.linux-x86_64-3.6/src/pyodbcmodule.o -Wno-write-strings -DHAVE_UNISTD_H -DHAVE_PWD_H -DHAVE_SYS_TYPES_H -DHAVE_LONG_LONG -DSIZEOF_LONG_INT=8 -I/usr/include gcc -pthread -Wno-unused-result -Wsign-compare -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 -DPYODBC_VERSION=4.0.30 -I/usr/include/python3.6m -c src/row.cpp -o build/temp.linux-x86_64-3.6/src/row.o -Wno-write-strings -DHAVE_UNISTD_H -DHAVE_PWD_H -DHAVE_SYS_TYPES_H -DHAVE_LONG_LONG -DSIZEOF_LONG_INT=8 -I/usr/include gcc -pthread -Wno-unused-result -Wsign-compare -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 -DPYODBC_VERSION=4.0.30 -I/usr/include/python3.6m -c src/textenc.cpp -o build/temp.linux-x86_64-3.6/src/textenc.o -Wno-write-strings -DHAVE_UNISTD_H -DHAVE_PWD_H -DHAVE_SYS_TYPES_H -DHAVE_LONG_LONG -DSIZEOF_LONG_INT=8 -I/usr/include creating build/lib.linux-x86_64-3.6 g++ -pthread -shared -Wl,-z,relro -g build/temp.linux-x86_64-3.6/src/buffer.o build/temp.linux-x86_64-3.6/src/cnxninfo.o build/temp.linux-x86_64-3.6/src/connection.o build/temp.linux-x86_64-3.6/src/cursor.o build/temp.linux-x86_64-3.6/src/errors.o build/temp.linux-x86_64-3.6/src/getdata.o build/temp.linux-x86_64-3.6/src/params.o build/temp.linux-x86_64-3.6/src/pyodbccompat.o build/temp.linux-x86_64-3.6/src/pyodbcdbg.o build/temp.linux-x86_64-3.6/src/pyodbcmodule.o build/temp.linux-x86_64-3.6/src/row.o build/temp.linux-x86_64-3.6/src/textenc.o -L/usr/lib -L/usr/local/lib -L/usr/lib64 -lodbc -lpython3.6m -o build/lib.linux-x86_64-3.6/pyodbc.cpython-36m-x86_64-linux-gnu.so -L/usr/lib64 -lodbc /bin/ld: /usr/local/lib/libpython3.6m.a(abstract.o): relocation R_X86_64_32S against symbol _Py_NotImplementedStruct' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(boolobject.o): relocation R_X86_64_32 against.data' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(bytearrayobject.o): relocation R_X86_64_32 against symbol _PyByteArray_empty_string' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(bytesobject.o): relocation R_X86_64_32 against symbol_Py_NoneStruct' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(exceptions.o): relocation R_X86_64_32S against symbol _Py_NoneStruct' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(genobject.o): relocation R_X86_64_32 against symbol_Py_NoneStruct' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(floatobject.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(funcobject.o): relocation R_X86_64_32S against symbolPyCode_Type' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(iterobject.o): relocation R_X86_64_32 against symbol _Py_NoneStruct' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(listobject.o): relocation R_X86_64_32 against symbol_Py_NoneStruct' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(longobject.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(dictobject.o): relocation R_X86_64_32S against.text' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(memoryobject.o): relocation R_X86_64_32 against .rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(methodobject.o): relocation R_X86_64_32 against symbol_Py_NoneStruct' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(moduleobject.o): relocation R_X86_64_32 against .rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(object.o): relocation R_X86_64_32 against.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(obmalloc.o): relocation R_X86_64_32S against .data' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(capsule.o): relocation R_X86_64_32 against.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(rangeobject.o): relocation R_X86_64_32 against symbol _Py_NoneStruct' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(setobject.o): relocation R_X86_64_32S against.data' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(sliceobject.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(structseq.o): relocation R_X86_64_32 against.data' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(tupleobject.o): relocation R_X86_64_32 against symbol _PyEval_SliceIndex' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(typeobject.o): relocation R_X86_64_32 against.text' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(unicodeobject.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(unicodectype.o): relocation R_X86_64_32S against.rodata' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(weakrefobject.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(_warnings.o): relocation R_X86_64_32 against symbol_Py_NoneStruct' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(bltinmodule.o): relocation R_X86_64_32S against symbol PyFilter_Type' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(ceval.o): relocation R_X86_64_32 against.bss' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(compile.o): relocation R_X86_64_32S against .rodata' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(codecs.o): relocation R_X86_64_32 against.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(errors.o): relocation R_X86_64_32S against symbol PyTraceBack_Type' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(future.o): relocation R_X86_64_32 against.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(getargs.o): relocation R_X86_64_32S against symbol _Py_NoneStruct' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(import.o): relocation R_X86_64_32 against.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(importdl.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(marshal.o): relocation R_X86_64_32 against.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(modsupport.o): relocation R_X86_64_32S against .rodata' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(peephole.o): relocation R_X86_64_32S against.rodata' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(pyhash.o): relocation R_X86_64_32S against .rodata' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(pylifecycle.o): relocation R_X86_64_32 against.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(pystate.o): relocation R_X86_64_32S against symbol _PyEval_EvalFrameDefault' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(pythonrun.o): relocation R_X86_64_32 against.data' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(pytime.o): relocation R_X86_64_32 against .rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(random.o): relocation R_X86_64_32 against.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(symtable.o): relocation R_X86_64_32 against .rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(sysmodule.o): relocation R_X86_64_32 against symbol_Py_NoneStruct' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(traceback.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(pystrtod.o): relocation R_X86_64_32S against symbol_Py_ctype_tolower' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(dtoa.o): relocation R_X86_64_32S against .bss' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(formatter_unicode.o): relocation R_X86_64_32S against symbol_Py_ctype_table' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(fileutils.o): relocation R_X86_64_32S against .rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(dynload_shlib.o): relocation R_X86_64_32 against.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(thread.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(getpath.o): relocation R_X86_64_32 against.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(gcmodule.o): relocation R_X86_64_32 against symbol _Py_NoneStruct' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(_threadmodule.o): relocation R_X86_64_32 against symbol_Py_NoneStruct' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(posixmodule.o): relocation R_X86_64_32S against symbol _Py_NoneStruct' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(errnomodule.o): relocation R_X86_64_32 against.data' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(pwdmodule.o): relocation R_X86_64_32 against .bss' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(_sre.o): relocation R_X86_64_32S against symbol_Py_ctype_tolower' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(_codecsmodule.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(_weakref.o): relocation R_X86_64_32 against.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(_functoolsmodule.o): relocation R_X86_64_32 against .data' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(_operator.o): relocation R_X86_64_32 against.data' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(_collectionsmodule.o): relocation R_X86_64_32 against symbol _Py_NoneStruct' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(itertoolsmodule.o): relocation R_X86_64_32S against.data' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(atexitmodule.o): relocation R_X86_64_32 against .rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(signalmodule.o): relocation R_X86_64_32 against.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(_stat.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(timemodule.o): relocation R_X86_64_32 against.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(_localemodule.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(_iomodule.o): relocation R_X86_64_32 against.data' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(iobase.o): relocation R_X86_64_32 against symbol _Py_FalseStruct' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(fileio.o): relocation R_X86_64_32 against.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(bytesio.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(bufferedio.o): relocation R_X86_64_32 against.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(textio.o): relocation R_X86_64_32 against symbol _Py_NoneStruct' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(stringio.o): relocation R_X86_64_32 against.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(zipimport.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(faulthandler.o): relocation R_X86_64_32 against.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(_tracemalloc.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(hashtable.o): relocation R_X86_64_32 against symbolPyMem_RawFree' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(symtablemodule.o): relocation R_X86_64_32 against symbol PyUnicode_FSDecoder' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(xxsubtype.o): relocation R_X86_64_32 against.data' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(getbuildinfo.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(acceler.o): relocation R_X86_64_32 against.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(grammar1.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(myreadline.o): relocation R_X86_64_32 against.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(parsetok.o): relocation R_X86_64_32S against .rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(tokenizer.o): relocation R_X86_64_32 against.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(accu.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(bytes_methods.o): relocation R_X86_64_32S against symbol_Py_NoneStruct' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(cellobject.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(classobject.o): relocation R_X86_64_32 against.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(codeobject.o): relocation R_X86_64_32S against symbol PyUnicode_Type' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(complexobject.o): relocation R_X86_64_32 against.data' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(descrobject.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(enumobject.o): relocation R_X86_64_32 against.data' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(fileobject.o): relocation R_X86_64_32 against symbol _Py_NoneStruct' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(frameobject.o): relocation R_X86_64_32 against symbol_Py_NoneStruct' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(odictobject.o): relocation R_X86_64_32 against .rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(namespaceobject.o): relocation R_X86_64_32S against symbol_PyNamespace_Type' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(Python-ast.o): relocation R_X86_64_32 against symbol _Py_NoneStruct' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(ast.o): relocation R_X86_64_32 against.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(getcopyright.o): relocation R_X86_64_32 against .rodata' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(getplatform.o): relocation R_X86_64_32 against.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(getversion.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(mystrtoul.o): relocation R_X86_64_32S against symbol_Py_ctype_table' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(structmember.o): relocation R_X86_64_32S against .rodata' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(parser.o): relocation R_X86_64_32 against.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /bin/ld: /usr/local/lib/libpython3.6m.a(getcompiler.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /bin/ld: final link failed: Nonrepresentable section on output collect2: error: ld returned 1 exit status error: command 'g++' 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-1_h311wy/pyodbc/setup.py'"'"'; file='"'"'/tmp/pip-install-1_h311wy/pyodbc/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-cnydwc7q/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.6m/pyodbc Check the logs for full command output. WARNING: You are using pip version 20.0.2; however, version 20.1 is available. You should consider upgrading via the '/usr/bin/python3 -m pip install --upgrade pip' command.

v-chojas commented 4 years ago

Try to rename the /usr/local/lib/libpython3.6m.a to e.g. libpython3.6m.a.bak and try again. Also see if you have a libpython3.6m.so which is what it should be trying to link with.

prgore commented 4 years ago

Thank you very much v-chojas.

The above solution worked for me.