[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Python pyinstaller produces bad binary file



Hi Dave,

Well, as much as I know about pyinstaller, it uses the system libraries and packages
the .so files in the app, sort of like Mozilla does with browsers. So, since there
are only PowerPC libraries available, I was thinking it was a header problem. I did
spend some time and managed to figure out the header format enough to get it
to be the correct 'endian' and also to report that it was a 32 bit PowerPC app. If
you check the headers for something like /bin/cp, that's what they say also.

Hmm...  that gives me an idea. I wonder if the 32 bit libraries are being included?

I think I did mention that running the python script for the app runs just fine ? 

I will put that on my list of things to do.  You will see a post from me on something
else that I would like to see resolved about the Xorg port.

Thanks for your help.

-- Jim



On Mar 23, 2014, at 2:59 PM, David Gosselin wrote:

Hi Jim,
System V should be ok as that’s just an API at this point.  If the original executable were compiled for 386, then changing the header won’t fix it for PowerPC.  Do you have the GNU compilers installed?  I think that you’ll have to rebuild this package from scratch on your system.
Or is this truly a PowerPC executable and the ELF header has been corrupted?  Either way, I think rebuilding from source will be the best path forward.
Dave
 
Sent: Friday, March 21, 2014 12:35 PM
Subject: Re: Python pyinstaller produces bad binary file
 
Sure does!
 
I was reading the specs for binary headers for 64 bit PowerPC and it looks like this is  a 32 bit Intel file and
the address that is jumped to to execute the program is all 0's ?
 
Check me on this as I haven't looked at this kind of stuff since college (long time ago). Looks like
 
Magic Number is OK
32 bit file
Little Endian
Original ELF version
System V    ???????  Should be Linux, I think ?
ABI is 1 (Not sure  if that's good or not)
Executable
PowerPC
Original ELF version  (again)
Jump to 0x9680
 
Thanks,
 
--Jim
 
 
On Mar 20, 2014, at 5:28 PM, David Gosselin wrote:

No problem, Jim, glad to help. It looks like 386 binaries landed on your PPC system from the pyinstaller.

On Mar 19, 2014, at 20:52, Jim Durham <jimdur@gmail.com> wrote:

Thanks for quick reply, Dave.

Here is the output from using 'file' on the original file:

XOlog0.8.9: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, BuildID[sha1]=0x0b7ec69824a1ff621c8e697a32d12f1cf42274c6, not stripped

and from the modified binary:

XOlog0.8.9mod: ELF 32-bit MSB executable, Intel 80386 - invalid byte order, (SYSV), statically linked, stripped

Obviously, that was a disaster. 

-- Jim


On 03/19/2014 05:53 PM, dave@appleside.org wrote:
What is the output of the ‘file’ command on the original unmodified binary and also on the modified binary?  Can you send along the results for both?  Thanks!
Dave
 
 
From: Jim Durham
Sent: ‎Wednesday‎, ‎March‎ ‎19‎, ‎2014 ‎1‎:‎02‎ ‎PM
To: PowerPC List Debian
 
Hi,

I have Debian 7.4 working fairly well on a 20 inch iMac G5 .  Python seems
to work OK,  except that pyinstaller produces a binary file that the shell
refuses to execute.

Looking at the file with beav (hex editor) I find that the header
differs from
other files that do execute.  I have 'fixed' these bytes, but still no
joy on
executing the file.

Its been a long time since I hacked on file headers,etc, so any thoughts
or help would
be appreciated.

Here is what the shell says:

bash: ./XOlog0.8.9: cannot execute binary file


And a dump of the file's header from beav.


           0: 7F 45 4C 46 01 01 01 00  00 00 00 00 00 00 00 00
.ELF............
          10: 02 00 03 00 01 00 00 00  80 96 04 08 34 00 00 00
............4...
          20: 60 6C 01 00 00 00 00 00  34 00 20 00 07 00 28 00
`l......4. ...(.
          30: 25 00 22 00 06 00 00 00  34 00 00 00 34 80 04 08
%.".....4...4...



Thanks,

Jim



--
To UNSUBSCRIBE, email to debian-powerpc-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: [🔎] 5329CDA2.1050807@gmail.com">https://lists.debian.org/[🔎] 5329CDA2.1050807@gmail.com


 


Reply to: