WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: need help getting 32-bit binaries to run on 64-bit system  (Read 6665 times)

Offline rmrichesjr

  • Newbie
  • *
  • Posts: 19
need help getting 32-bit binaries to run on 64-bit system
« on: August 24, 2014, 10:44:53 PM »
Need help getting 32-bit userspace binaries to run in a remastered 64-bit system based on corepure64.gz 5.X with 32-bit userspace binaries from .../5.x/x86/tzc/...

The 64-bit system works fine.  For packages that exist in 32-bit form but not in 64-bit form, I unpack the .tcz files and move files from /usr/local/bin to /usr/local/binx32 and from /usr/local/lib to /usr/local/libx32.  I added /usr/local/libx32 to /etc/ld.so.conf and ran ldconfig.

On the booted system, "ldconfig -p" shows both 32-bit and 64-bit libraries properly annotated.  An example binary, /usr/local/binx32/ps exists, is owned by root.root, and has mode 555.  The "file" command says this: (hand-typed due to lack of network connectivity)

    /usr/local/binx32/ps: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.0, stripped

The "ldd" command says this:

    /usr/local/binx32/ps: error while loading shared libraries: /usr/local/binx32/ps: wrong ELF class: ELFCLASS32

Attempting to run (or exec) /usr/local/binx32/ps from bash yields this:

    bash: /usr/local/binx32/ps: No such file or directory

Attempting to run /usr/local/binx32/ps from /bin/sh yields this:

    /bin/sh: /usr/local/binx32/ps: Not found

Is there something I need to poke into /proc or /sys to enable running 32-bit binaries on the 64-bit kernel?

Any other suggestions?

Thanks in advance.

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: need help getting 32-bit binaries to run on 64-bit system
« Reply #1 on: August 24, 2014, 10:53:17 PM »
32bit binaries require 32bit libraries.
Corepure64 does not support separate library paths for 64bit and 32 bit binaries.
If that is what you are attempting to develop, it is fork, and not supported here.
Forked systems must supply their own support.

Offline rmrichesjr

  • Newbie
  • *
  • Posts: 19
Re: need help getting 32-bit binaries to run on 64-bit system
« Reply #2 on: August 25, 2014, 10:55:52 PM »
Sorry to ruffle feathers.  That was not my intent.  I was attempting to build a one-of-a-kind ISO that will probably ever run on only one diskless machine and never be redistributed, had chosen Corepure64 for performance advantage, found some packages are available for 32-bit but not 64-bit, so was trying to use 32-bit binaries where 64-bit binaries are not available.  If that constitutes a fork, that's a different usage of the term than I'm used to.  My question came after considerable experimenting and Googling to try to find a solution myself.  I guess I'll have to switch to a 32-bit base system.  Thanks at least for the information that I'm on my own.

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: need help getting 32-bit binaries to run on 64-bit system
« Reply #3 on: August 25, 2014, 11:09:04 PM »
Got to the extension request thread and request the 32bit extension you found be compiled for 64 bit.

Corepure64 is PURE 64 bit.
You can use the other 64 bit version of core that is a 64 bit kernel with a 32 bit userspace, but it is ONLY 32 bit userspace.

Core is not a dual architecture system.  That would require a complete redesign.

Offline bjorn

  • Newbie
  • *
  • Posts: 3
Re: need help getting 32-bit binaries to run on 64-bit system
« Reply #4 on: March 12, 2015, 03:20:13 PM »
When can we expect Putty for tinycore pure 64? Or is there something equivalent that can be used?

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: need help getting 32-bit binaries to run on 64-bit system
« Reply #5 on: March 12, 2015, 03:28:58 PM »
What do you need putty for?
Core repo has dropbear and openssh.
Sorry, no dropbear, but it has openssh.
« Last Edit: March 12, 2015, 03:32:08 PM by gerald_clark »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14756
Re: need help getting 32-bit binaries to run on 64-bit system
« Reply #6 on: March 14, 2015, 06:53:26 AM »
putty posted

Offline hal9king

  • Newbie
  • *
  • Posts: 49
Re: need help getting 32-bit binaries to run on 64-bit system
« Reply #7 on: June 11, 2015, 02:47:15 PM »
Stealing works - find a system with your needed programs (in 64bit) and copy them over to the system.
In science, we know ... what we don't know.