-
Notifications
You must be signed in to change notification settings - Fork 296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] ERROR /usr/local/lib/python3.11/dist-packages/pyarmor/cli/core/pytransform3.so: invalid ELF header #969
Comments
Linux 7e7e3fde4ede 5.15.78-0-virt #1-Alpine SMP Fri, 11 Nov 2022 10:19:45 +0000 x86_64 x86_64 x86_64 GNU/Linux |
Pyarmor 8.0.x only works x86_64 platforms, other platforms will be supported later. |
@jondy, but I’m running this inside container with virtual “x86_64”, will this only work on actual x86_64 and not in container ? |
This is Alpine, it use It will be supported later. |
@jondy I also encountered this issue on the following system, is it caused by Linux x 6.1.0-kali5-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.12-1kali2 (2023-02-23) x86_64 GNU/Linux $ pyarmor reg --upgrade -p "non-profits" assets/pyarmor-regcode-xxxx.txt
INFO Python 3.11.2
INFO Pyarmor 8.0 (trial), 000000, non-profits
INFO prepare "assets/pyarmor-regcode-xxxx.txt"
INFO query key file from server
You are about to upgrade old Pyarmor license to Pyarmor Basic
License for Pyarmor 8.0+
The original license no: pyarmor-vax-00xxxx
The upgraded license information will be
License Type : pyarmor-old
License Owner : xxx
Bind Product : non-profits
This license is about to be ussd for non-profits
Are you sure to continue? (yes/no) yes
INFO process upgrading file "assets/pyarmor-regcode-xxxx.txt"
INFO old license no: pyarmor-vax-00xxxx
INFO send upgrade request to server
INFO update license token
CRITICAL unknown error, please check pyarmor.error.log
ERROR /home/x/.local/lib/python3.11/site-packages/pyarmor/cli/core/pytransform3.so: invalid ELF header |
This python script could check which c lib is used, now only glib-c is supported: import platform
print(platform.libc_ver()) |
Confirmed, my system is using glib-c 2.36, but also encountered this issue: Python 3.11.2 (main, Feb 12 2023, 00:48:52) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>> import platform
>>> print(platform.libc_ver())
('glibc', '2.36') |
My system also...
|
@fO-000 @SamComber |
Seems the system is little endian, what else could be causing this?
|
Check it by
|
@jondy , my guess is the below would work on little endian system? Thanks for your work on pyarmor 8+ release btw :)
|
@jondy Would you reopen this issue? @SamComber My output is exactly the same as yours. But another way of checking $ env LD_TRACE_LOADED_OBJECTS=1 /home/x/.local/lib/python3.11/site-packages/pyarmor/cli/core/pytransform3.so
linux-vdso.so.1 (0x00007ffe8c132000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f5346e3e000)
/lib64/ld-linux-x86-64.so.2 (0x00007f534704a000) |
@jondy Found that the $ file ~/.local/lib/python3.11/site-packages/pyarmor/cli/core/pytransform3.so
/home/x/.local/lib/python3.11/site-packages/pyarmor/cli/core/pytransform3.so: Mach-O 64-bit x86_64 dynamically linked shared library, flags:<NOUNDEFS|DYLDLINK|TWOLEVEL|NO_REEXPORTED_DYLIBS> |
@fO-000 Thanks. I'll check it. |
@fO-000 please upgrade
|
Great, the issue is solved with $ pyarmor reg --upgrade assets/pyarmor-regcode-xxxx.txt
INFO Python 3.11.2
INFO Pyarmor 8.0 (trial), 000000, non-profits
INFO prepare "assets/pyarmor-regcode-xxxx.txt"
INFO query key file from server
You are about to upgrade old Pyarmor license to Pyarmor Basic
License for Pyarmor 8.0+
The original license no: pyarmor-vax-00xxxx
The upgraded license information will be
License Type : pyarmor-old
License Owner : xxx
Bind Product : non-profits
This license is about to be ussd for non-profits
Are you sure to continue? (yes/no) yes
INFO process upgrading file "assets/pyarmor-regcode-xxxx.txt"
INFO old license no: pyarmor-vax-00xxxx
INFO send upgrade request to server
INFO update license token
CRITICAL unknown error, please check pyarmor.error.log
ERROR request license token faild (1) The corresponding 51838 MainProcess 2023-03-17 17:20:52,813
Traceback (most recent call last):
File "/home/x/.local/lib/python3.11/site-packages/pyarmor/cli/__main__.py", line 559, in main
main_entry(sys.argv[1:])
File "/home/x/.local/lib/python3.11/site-packages/pyarmor/cli/__main__.py", line 547, in main_entry
args.func(ctx, args)
File "/home/x/.local/lib/python3.11/site-packages/pyarmor/cli/__main__.py", line 184, in cmd_reg
getattr(regsvr, meth)(regfile, args.product)
File "/home/x/.local/lib/python3.11/site-packages/pyarmor/cli/register.py", line 290, in upgrade
self.update_token()
File "/home/x/.local/lib/python3.11/site-packages/pyarmor/cli/register.py", line 110, in update_token
Pytransform3._update_token(self.ctx)
File "/home/x/.local/lib/python3.11/site-packages/pyarmor/cli/core/__init__.py", line 72, in _update_token
m = Pytransform3.init(ctx)
^^^^^^^^^^^^^^^^^^^^^^
File "/home/x/.local/lib/python3.11/site-packages/pyarmor/cli/core/__init__.py", line 42, in init
m.init_ctx(ctx)
RuntimeError: request license token faild (1) |
I've installed pyarmor 8.0.1 inside a container, I haven't yet supplied a license (we have a license for 5.6.0 pyarmor and not sure if this will work with pyarmor 8.0.1).
I'm running a very simple obfuscation to do a quick test with the new version inside my hardware, and in accordance to trial version rules
The maximum size of code object is 35728 bytes in trial version
What is going on here?
The text was updated successfully, but these errors were encountered: