Closed feint9 closed 3 years ago
Hey @feint9! Thanks for reaching out! pysap
is currently only Python 2 compatible, in the log you pasted it's clear that it's trying to build it against Python 3.9.
Make sure you're using Python 2.7 and have the python2.7-dev
package installed. I suggest you use a virtualenv
, pyenv
or similar to make things easier. Kali provides a nice guide for this cases in https://www.kali.org/docs/general-use/using-eol-python-versions/
Hi,
# vmware workstation 15 OS kali 2021.1 x64 full updated
errors
copying pysap/SAPDiag.py -> build/lib.linux-x86_64-3.9/pysap
copying pysap/SAPCAR.py -> build/lib.linux-x86_64-3.9/pysap
copying pysap/init.py -> build/lib.linux-x86_64-3.9/pysap
copying pysap/SAPRouter.py -> build/lib.linux-x86_64-3.9/pysap
copying pysap/SAPNI.py -> build/lib.linux-x86_64-3.9/pysap
creating build/lib.linux-x86_64-3.9/pysap/utils
copying pysap/utils/fields.py -> build/lib.linux-x86_64-3.9/pysap/utils
copying pysap/utils/console.py -> build/lib.linux-x86_64-3.9/pysap/utils
copying pysap/utils/crypto.py -> build/lib.linux-x86_64-3.9/pysap/utils
copying pysap/utils/init.py -> build/lib.linux-x86_64-3.9/pysap/utils
running build_ext
building 'pysapcompress' extension
creating build/temp.linux-x86_64-3.9
creating build/temp.linux-x86_64-3.9/pysapcompress
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-RNBry6/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-RNBry6/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.9 -c pysapcompress/pysapcompress.cpp -o build/temp.linux-x86_64-3.9/pysapcompress/pysapcompress.o
pysapcompress/pysapcompress.cpp: In function ‘int decompress_packet(const unsigned char*, int, unsigned char*, int)’:
pysapcompress/pysapcompress.cpp:122:10: warning: variable ‘bufin_length’ set but not used [-Wunused-but-set-variable]
122
~~~pysapcompress/pysapcompress.cpp: In function ‘int compress_packet(const unsigned char*, int, unsigned char*, int, unsigned int)’:
pysapcompress/pysapcompress.cpp:252:12: warning: variable ‘bufin’ set but not used [-Wunused-but-set-variable]
252
pysapcompress/pysapcompress.cpp: In function ‘PyObject* initpysapcompress()’:
pysapcompress/pysapcompress.cpp:460:14: error: ‘Py_InitModule3’ was not declared in this scope
460
~~~~~pysapcompress/pysapcompress.cpp:473:1: warning: no return statement in function returning non-void [-Wreturn-type]
473
error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
cwd: /tmp/pip-install-spn9quud/pysap_9ef140eec1b346a6b434e46b9a8dc4c8/
Complete output (48 lines):
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.9
creating build/lib.linux-x86_64-3.9/pysap
copying pysap/SAPDiagItems.py -> build/lib.linux-x86_64-3.9/pysap
copying pysap/SAPEnqueue.py -> build/lib.linux-x86_64-3.9/pysap
copying pysap/SAPRFC.py -> build/lib.linux-x86_64-3.9/pysap
copying pysap/SAPIGS.py -> build/lib.linux-x86_64-3.9/pysap
copying pysap/SAPDiagClient.py -> build/lib.linux-x86_64-3.9/pysap
copying pysap/SAPPSE.py -> build/lib.linux-x86_64-3.9/pysap
copying pysap/SAPLPS.py -> build/lib.linux-x86_64-3.9/pysap
copying pysap/SAPMS.py -> build/lib.linux-x86_64-3.9/pysap
copying pysap/SAPCredv2.py -> build/lib.linux-x86_64-3.9/pysap
copying pysap/SAPHDB.py -> build/lib.linux-x86_64-3.9/pysap
copying pysap/SAPSNC.py -> build/lib.linux-x86_64-3.9/pysap
copying pysap/SAPDiag.py -> build/lib.linux-x86_64-3.9/pysap
copying pysap/SAPCAR.py -> build/lib.linux-x86_64-3.9/pysap
copying pysap/init.py -> build/lib.linux-x86_64-3.9/pysap
copying pysap/SAPRouter.py -> build/lib.linux-x86_64-3.9/pysap
copying pysap/SAPNI.py -> build/lib.linux-x86_64-3.9/pysap
creating build/lib.linux-x86_64-3.9/pysap/utils
copying pysap/utils/fields.py -> build/lib.linux-x86_64-3.9/pysap/utils
copying pysap/utils/console.py -> build/lib.linux-x86_64-3.9/pysap/utils
copying pysap/utils/crypto.py -> build/lib.linux-x86_64-3.9/pysap/utils
copying pysap/utils/init.py -> build/lib.linux-x86_64-3.9/pysap/utils
running build_ext
building 'pysapcompress' extension
creating build/temp.linux-x86_64-3.9
creating build/temp.linux-x86_64-3.9/pysapcompress
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-RNBry6/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-RNBry6/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.9 -c pysapcompress/pysapcompress.cpp -o build/temp.linux-x86_64-3.9/pysapcompress/pysapcompress.o
pysapcompress/pysapcompress.cpp: In function ‘int decompress_packet(const unsigned char*, int, unsigned char*, int)’:
pysapcompress/pysapcompress.cpp:122:10: warning: variable ‘bufin_length’ set but not used [-Wunused-but-set-variable]
122
~~~pysapcompress/pysapcompress.cpp: In function ‘int compress_packet(const unsigned char*, int, unsigned char*, int, unsigned int)’:
pysapcompress/pysapcompress.cpp:252:12: warning: variable ‘bufin’ set but not used [-Wunused-but-set-variable]
252
pysapcompress/pysapcompress.cpp: In function ‘PyObject* initpysapcompress()’:
pysapcompress/pysapcompress.cpp:460:14: error: ‘Py_InitModule3’ was not declared in this scope
460
~~~~~pysapcompress/pysapcompress.cpp:473:1: warning: no return statement in function returning non-void [-Wreturn-type]
473
error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-spn9quud/pysap_9ef140eec1b346a6b434e46b9a8dc4c8/setup.py'"'"'; file='"'"'/tmp/pip-install-spn9quud/pysap_9ef140eec1b346a6b434e46b9a8dc4c8/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-33c9a0ih/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.9/pysap Check the logs for full command output.