Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Hacking 32-bit rebol for 64-bit ubuntu

From: tim-johnsons:web at: 25-May-2007 8:00

When I attempted to install the 32-bit rebol binary which was compiled for 32-bit ubuntu on ubuntu 7.04, execution of the binary returned only a message: "No such file or directory". I believe that message came from rebol itself, but that is only speculation on my part. Running ldd was unsuccessful even tho' `file rebol' did report that is was a 32-bit executable. Running `ldd rebol' on slackware returned this information: libm.so.6 => /lib/libm.so.6 (0x4002c000) libc.so.6 => /lib/libc.so.6 (0x4004e000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000) libm.so.6 and libc.so.6 were present on the ubuntu machine, but ld-linux.so.2 - the dynamic loader - was not. Ubuntu has obsoleted it. Installing a 32-bit loader was unsuccessful. I'm an old (in more ways than one) "C" programmer with some experience working with dlls on windows, which are the equivalent of linux shared object libraries. I suspected that the paths to the shared objects were hard-coded in the binary and after some inspection I did find them. I made a copy of the rebol binary on opened with vim using the -b switch, thus putting vim in binary mode. -------------------------------------------------------------------------------------------- NOTE: There is a wonderful windows shareware application called ztreewin, and one of it's tools is a hex editor - actually it is a modern clone of xtreegold. ------------------------------------------------------------------------------------------- I then edited the paths to the binaries as follows: libm.so.6 => l1bm.so.6 libc.so.6 => l1bc.so.6 ld-linux.so.2 => ld-l1nux.so.2 and made copies of the shared objects with those name changes, ported all to the ubuntu machine and I have rebol running. ------------------------------------------------------------------------ Now for a bit of a rant: RT likes to advertise rebol's portability - RT: put your money where your mouth is and provide a build that is compatible with 64-bit ubuntu, 'cuz I suspect that there is going to be a lot of those distros being installed in the future. _and_ get rebol in the repositories!!! -------- end of rant------------------------------ In the next few days, I will be putting this ubuntu machine to work with rebol scripts. If the "hacked" rebol shows no problems, then the solution could be so simple as to recompile the standard linux build with different names for the shared objects and their paths, and include those renamed objects as part of the package. -------------- DISCLAIMER -------------------------- Since rebol is not open source, it is my hope that RT will have no objection to this "hack" as an interim solution. I want to thank everybody that helped me out with this issue. Couldn't have done it without you. :-) Tim -- Tim Johnson <tim-johnsons-web.com> Palmer, Alaska, USA