angr / angr-dev

Some helper scripts to set up an environment for angr development.
BSD 2-Clause "Simplified" License
116 stars 95 forks source link

Installation Error #87

Closed valour01 closed 5 years ago

valour01 commented 5 years ago

While compiling pyvex, the following error occurs. Feel free if you need more debug information.

    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DPYVEX_STATIC=1 -I./vex_include -I/usr/include/python3.5m -I/home/jmh/.virtualenvs/tz/include/python3.5m -c pyvex/pyvex_irsb.c -o build/temp.linux-x86_64-3.5/pyvex/pyvex_irsb.o --std=c99
    In file included from pyvex/pyvex_enums.h:7:0,
                     from pyvex/pyvex_irsb.c:7:
    pyvex/pyvex_irsb.c: In function ‘pyIRSB_dealloc’:
    pyvex/pymare.h:44:83: error: ‘pyIRSB {aka struct <anonymous>}’ has no member named ‘ob_type’
     #define PYMARE_DEALLOC(type) static void py##type##_dealloc(py##type* self) { self->ob_type->tp_free((PyObject*)self); }
rhelmot commented 5 years ago

hi!!! um!!! it looks like you're somehow compiling a version of python that is multiple years old. pymare has been gone from pyvex for a long, long, long, long, long time. Can you check what commit you've checked out of pyvex and what remotes it's synced with?

valour01 commented 5 years ago

python version is 3.5.2. Is it because the version is too old? pyvex is

On branch master
Your branch is up-to-date with 'origin/master'.

I just clone the angr-dev and then run ./setup.sh -i -e myenvname. Feel free if you need more information.

valour01 commented 5 years ago

Problem is solved after installed python 3.7.4. Thanks

ltfish commented 5 years ago

The PyVEX you are trying to compile is too old (probably from 2016 or earlier). This might be because you have a left-over Python package for an ancient version of PyVEX in your system. Can you please get rid of any pyvex package that has pymare.h in it from your system, and then reinstall pyvex?

I just clone the angr-dev and then run ./setup.sh -i -e myenvname

angr-dev should be cloning everything from GitHub so I don't understand how that error could happen.

ltfish commented 5 years ago

Problem is solved after installed python 3.7.4. Thanks

Oh interesting... Maybe the pip that came with Python 3.5 downloaded a very old version of PyVEX from PyPI? Upgrading the pip for Python 3.5 could also solve the problem (maybe).

rhelmot commented 5 years ago

We should support python 3.5. Our CI tests with 3.5 so like... it def works... The only thing I can think of is that setup.sh found some weird clone of pyvex from forever ago. That's why I wanted to see what your remotes were - origin is not a remote I can use to determine what's happening :P

if it is indeed pointing at angr/pyvex, the only thing left that could have messed up is that there was some version pin mismatch causing it to fetch from pypi instead of your local repo, and that your pip and setuptools were so out of date that it pulled something ancient.

ltfish commented 5 years ago

I think I found it: https://github.com/zardus/pyvex

I bet this is what happened: The initial clone from angr/pyvex failed (because Git cloning in China from GitHub just fails sometimes) and then it continued to try zardus/pyvex...

ltfish commented 5 years ago

@zardus Can you please remove https://github.com/zardus/pyvex ? It will make the world a better place and help poor souls like @valour01 .

valour01 commented 5 years ago

@ltfish You are right. I just found the log below. The reason is exactly what you mentioned. Many thanks.

[+] 13:37:02 Cloning repo pyvex.
[-] 13:37:02 Trying to clone from https://github.com/angr/pyvex
[-] 13:37:04 Trying to clone from https://github.com/shellphish/pyvex
[-] 13:37:06 Trying to clone from https://github.com/mechaphish/pyvex
[-] 13:37:08 Trying to clone from https://git:@github.com/zardus/pyvex
[-] 13:37:10 Success - pyvex cloned!

Besides, I use python 3.5 once again just now and it could compile pyvex successfully.

[+] 16:17:43 Cloning repo pyvex.
[-] 16:17:43 Trying to clone from https://github.com/angr/pyvex
[-] 16:17:46 Success - pyvex cloned!