gdabah / distorm

Powerful Disassembler Library For x86/AMD64
Other
1.26k stars 238 forks source link

RuntimeError: Invalid binary wheel, found shared library "libdistorm3.so" in purelib folder. #132

Closed mvilanova closed 5 years ago

mvilanova commented 5 years ago

Getting the following error when running auditwheel repair distorm3-3.3.8-cp27-cp27mu-linux_x86_64.whl:

Repairing distorm3-3.3.8-cp27-cp27mu-linux_x86_64.whl
Traceback (most recent call last):
  File "/home/user/venv36/bin/auditwheel", line 11, in <module>
    sys.exit(main())
  File "/home/user/venv36/lib/python3.6/site-packages/auditwheel/main.py", line 49, in main
    rval = args.func(args, p)
  File "/home/user/venv36/lib/python3.6/site-packages/auditwheel/main_repair.py", line 56, in execute
    wheel_abi = analyze_wheel_abi(args.WHEEL_FILE)
  File "/home/user/venv36/lib/python3.6/site-packages/auditwheel/wheel_abi.py", line 101, in analyze_wheel_abi
    get_wheel_elfdata(wheel_fn)
  File "/home/user/venv36/lib/python3.6/site-packages/auditwheel/wheel_abi.py", line 44, in get_wheel_elfdata
    so_path_split[-1])
RuntimeError: Invalid binary wheel, found shared library "libdistorm3.so" in purelib folder.
The wheel has to be platlib compliant in order to be repaired by auditwheel.

Same issue in a different project described here. Potential fixes here and here.

The check in auditwheel was introduced in this PR.

gdabah commented 5 years ago

@mvilanova Hi, I just updated it, can you give it a shot please?

mvilanova commented 5 years ago

@gleeda it worked, thanks! When are you planning to package and publish this version to pypi?

~/distorm/dist $ auditwheel repair --plat linux_x86_64 -w wheelhouse/2.7/ distorm3-3.4.0-cp36-cp36m-linux_x86_64.whl
Repairing distorm3-3.4.0-cp36-cp36m-linux_x86_64.whl
Grafting: /lib/x86_64-linux-gnu/libc-2.27.so -> distorm3/.libs/libc-2-cd7c1a03.27.so
Setting RPATH: distorm3/libdistorm3.so to "$ORIGIN/.libs"
Previous filename tags: linux_x86_64
New filename tags: linux_x86_64
Previous WHEEL info tags: cp36-cp36m-linux_x86_64
No WHEEL info change needed.

Fixed-up wheel written to /home/user/distorm/dist/wheelhouse/2.7/distorm3-3.4.0-cp36-cp36m-linux_x86_64.whl

The shared lib is not being written in the root directory:

~/distorm/dist $ unzip -l /home/user/distorm/dist/wheelhouse/2.7/distorm3-3.4.0-cp36-cp36m-linux_x86_64.whl
Archive:  /home/user/distorm/dist/wheelhouse/2.7/distorm3-3.4.0-cp36-cp36m-linux_x86_64.whl
  Length      Date    Time    Name
---------  ---------- -----   ----
   230688  2018-12-07 16:06   distorm3/libdistorm3.so
    44852  2018-12-07 15:07   distorm3/__init__.py
  4157792  2018-12-07 16:06   distorm3/.libs/libc-2-cd7c1a03.27.so
    36897  2018-12-07 16:03   distorm3/__pycache__/__init__.cpython-36.opt-1.pyc
      104  2018-12-07 16:03   distorm3-3.4.0.dist-info/WHEEL
        9  2018-12-07 16:03   distorm3-3.4.0.dist-info/top_level.txt
     1535  2018-12-07 16:03   distorm3-3.4.0.dist-info/COPYING
     1194  2018-12-07 16:03   distorm3-3.4.0.dist-info/METADATA
      764  2018-12-07 16:06   distorm3-3.4.0.dist-info/RECORD
---------                     -------
  4473835                     9 files
gleeda commented 5 years ago

I think you tagged the wrong person ;-)

Should be @gdabah

gdabah commented 5 years ago

@mvilanova sorry, was afk last few days, so is it important I package this soon?

mvilanova commented 5 years ago

@gdabah not urgent, whenever you get a chance. Thanks

gdabah commented 5 years ago

@mvilanova done uploading a new package, please let me know if there's still some issue. BTW - do you happen to know anything about this issue: https://github.com/gdabah/distorm/issues/124

mvilanova commented 5 years ago

@gdabah I don't, sorry. Thanks for the quick turnaround!

gdabah commented 4 years ago

@mvilanova Do you still get this issue? Sorry for bumping an old thread.

mvilanova commented 4 years ago

No, not anymore. Thanks for following up

Marc

On Dec 30, 2019, at 08:15, Gil Dabah notifications@github.com wrote:

 @mvilanova Do you still get this issue? Sorry for bumping an old thread.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.