miasm
miasm copied to clipboard
FreeBSD Build Error
Trying to install miasm in a virtualenv on FreeBSD 14.0, python3.11 via pip install miasm
and it fails with the following error:
copying miasm/runtime/export.h -> build/lib.freebsd-14.0-RELEASE-p3-amd64-cpython-311/miasm/runtime
copying miasm/runtime/int_endianness.h -> build/lib.freebsd-14.0-RELEASE-p3-amd64-cpython-311/miasm/runtime
copying miasm/runtime/int_lib.h -> build/lib.freebsd-14.0-RELEASE-p3-amd64-cpython-311/miasm/runtime
copying miasm/runtime/int_types.h -> build/lib.freebsd-14.0-RELEASE-p3-amd64-cpython-311/miasm/runtime
copying miasm/runtime/int_util.h -> build/lib.freebsd-14.0-RELEASE-p3-amd64-cpython-311/miasm/runtime
copying miasm/VERSION -> build/lib.freebsd-14.0-RELEASE-p3-amd64-cpython-311/miasm
running build_ext
building 'miasm.jitter.VmMngr' extension
creating build/temp.freebsd-14.0-RELEASE-p3-amd64-cpython-311
creating build/temp.freebsd-14.0-RELEASE-p3-amd64-cpython-311/miasm
creating build/temp.freebsd-14.0-RELEASE-p3-amd64-cpython-311/miasm/jitter
cc -pthread -Wsign-compare -Wunreachable-code -DNDEBUG -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -I/usr/local/include -fPIC -I/home/schrodinger/.venv/arcadia/include -I/usr/l
ocal/include/python3.11 -c miasm/jitter/bn.c -o build/temp.freebsd-14.0-RELEASE-p3-amd64-cpython-311/miasm/jitter/bn.o
cc -pthread -Wsign-compare -Wunreachable-code -DNDEBUG -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -I/usr/local/include -fPIC -I/home/schrodinger/.venv/arcadia/include -I/usr/l
ocal/include/python3.11 -c miasm/jitter/vm_mngr.c -o build/temp.freebsd-14.0-RELEASE-p3-amd64-cpython-311/miasm/jitter/vm_mngr.o
miasm/jitter/vm_mngr.c:88:22: error: use of undeclared identifier '__BYTE_ORDER'
if (vm_mngr->sex == __BYTE_ORDER)
^
miasm/jitter/vm_mngr.c:96:22: error: use of undeclared identifier '__BYTE_ORDER'
if (vm_mngr->sex == __BYTE_ORDER)
^
miasm/jitter/vm_mngr.c:104:22: error: use of undeclared identifier '__BYTE_ORDER'
if (vm_mngr->sex == __BYTE_ORDER)
^
3 errors generated.
SystemExit("error: command '/usr/bin/cc' failed with exit code 1")
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/tmp/pip-install-8lwbxs0k/miasm_8a409e44731743c6baee36bed6b9aeeb/setup.py", line 436, in <module>
build_all()
File "/tmp/pip-install-8lwbxs0k/miasm_8a409e44731743c6baee36bed6b9aeeb/setup.py", line 364, in build_all
raise ValueError("Unable to build Miasm!")
ValueError: Unable to build Miasm!
[end of output]
Hi @schrodyn
Oh, maybe the __BYTE_ORDER
is not the proper variable to use. Or we may add a typedef to __BYTE_ORDER__
?
Here are the defines in FreeBSD 14:
https://github.com/freebsd/freebsd-src/blob/releng/14.0/include/endian.h
https://github.com/cea-sec/miasm/issues/792#issuecomment-403376418 @PavelKotov1 after 6 years... are you still on FreeBSD?