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

Hacking 32-bit rebol for 64-bit ubuntu

 [1/11] 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

 [2/11] from: gregg:pointillistic at: 25-May-2007 10:26


Hi Tim, TJ> Now for a bit of a rant: TJ> RT likes to advertise rebol's portability - RT: put your money where your TJ> mouth is and provide a build that is compatible with 64-bit ubuntu, 'cuz I TJ> suspect that there is going to be a lot of those distros being installed in TJ> the future. It seems that the portability is there, if you could hack the binary in a couple places to make it work. :) Also, even though I'll probably complain loudly when REBOL doesn't work on a platform I need it on, portability doesn't mean always available on every platform. That said, I think it would be good for RT to have someone on the inside that deals with issues like this, and charges a fee to build REBOL for a particular platform upon request. The service fee would vary, based on how much work needed to be done and the desired timeframe. In a case like this, your fee should be low because a) the fix is easy, and b) you did the work to find out what needed to be done. -- Gregg

 [3/11] from: tim-johnsons::web::com at: 25-May-2007 8:49


On Friday 25 May 2007 16:26, Gregg Irwin wrote: <...>
> It seems that the portability is there, if you could hack the binary > in a couple places to make it work. :) Also, even though I'll probably > complain loudly when REBOL doesn't work on a platform I need it on, > portability doesn't mean always available on every platform.
Not keeping up ubuntu distros would be a *serious* omission..
> That said, I think it would be good for RT to have someone on the > inside that deals with issues like this, and charges a fee to build
<<quoted lines omitted: 3>>
> fix is easy, and b) you did the work to find out what needed to be > done.
OK then, should I send RT a bill because I got this to work? Just kidding - well, sort of kidding. I would not pay for such a build because ubuntu is so widely used. I'd quit using rebol first. It isn't the only game in town. Maybe rebol should go full open source, like mysql. I'm mentioning mysql because it is an open source model that seems to make money for its developers. MTCW tim -- Tim Johnson <tim-johnsons-web.com> Palmer, Alaska, USA

 [4/11] from: pwawood::gmail at: 26-May-2007 7:40


Tim Is it living in Alaska that gave you such persistence and ingenuity? I'm more than impressed. Thanks for taking the time to tell us. On the portability front, RT has been finding it difficult to keep up for the last couple of years. The versions for many platforms are stuck at Core 2.5.1. I think that Carl recognised the problem and has adopted a different design for Rebol 3 to ease porting Rebol. (You may want to take a look at his slides from the recent DevCon - http://www.rebol.com/notes/devcon07-carl.zip ) From my point of view, at the moment RT still sees Windows as its main platform based, I presume, on current installed PC numbers. Linux and Mac OS X come a distant second, even though I believe they are more popular with the type of developers who are likely to adopt Rebol. (Windows developers seem to develop exclusively for Windows, developers who use other systems appear more likely to be interested in cross-platform). Regards Peter On Friday, May 25, 2007, at 04:00 pm, Tim Johnson wrote:

 [5/11] from: btiffin::rogers::com at: 25-May-2007 21:12


Alright Tim! Woohoo. Well done. Cheers, Brian. And part of your rant...I've started an NROFF file for a REBOL man page. One of many steps in creating a .DEB, but useful nonetheless. The man page should be usable by next week. I was thinking about trying for Debian Developer status, and if I make it in, I'll press harder for permission to .DEB (but Debian has some fairly sticky rules with "free" licensing. Even in the "non-free" category. There was an attempt a few years back...but I don't know what came of it. The google trail just stops with a question of licensing. Ubuntu may be more forgiving in this area. And it may be nice to have a .DEB whether it is 'sanctioned' or not. Again, well done. On Friday 25 May 2007 04:00, Tim Johnson wrote:

 [6/11] from: anton:wilddsl:au at: 26-May-2007 13:25


Hi Tim, good hack job! I just would like to understand what you did here a little better. What do you mean by "ported all to the ubuntu machine" ? Do I understand correctly that all that was necessary was: 1) edit the rebol executable 2) copy some .so files ? Or is there also a compiling step ? Regards, Anton.

 [7/11] from: anton::wilddsl::net::au at: 26-May-2007 15:41


Hi Tim, What version of 64bit Ubuntu was your target platform, by the way. ("Feisty" ?) Anton.

 [8/11] from: tim-johnsons:web at: 26-May-2007 7:04


On Saturday 26 May 2007 03:25, Anton Rolls wrote:
> Hi Tim, good hack job!
:-) It's an Alaskan thing!
> I just would like to understand what you did here a little better. > What do you mean by "ported all to the ubuntu machine" ?
copied the files from the slackware machine
> Do I understand correctly that all that was necessary was: > 1) edit the rebol executable
In overstrike/binary mode, just changed the 'i' in each name of each shared object to a '1'. That was an arbitrary choice, because I didn't want overwrite anything on the ubuntu side.
> 2) copy some .so files
make copies of the so files, changing their names to match the edits in the binary.
> Or is there also a compiling step ?
No. I would have needed the source code. Are you familiar with the process and rules regarding editing a binary? There is little that can be done, because you can't *insert* a single byte, because to do so would throw off the alignment in the code sector and destroy all function. So one much operate in overstrike mode and only change what would appear to be a string embedded in the code. That is why I just changed the one character in each name. Had I attempted to put in a whole new path such as "/lib/32bit/libc.so.6", the binary would have been 'destroyed'. Where I write:
> > I then edited the paths to the binaries as follows:
Would have been better written as "I then edited the names of the shared objects as follows:" I hope that is clearer. tim
> Regards, > Anton.
<<quoted lines omitted: 12>>
> > > > Tim
-- Tim Johnson <tim-johnsons-web.com> Palmer, Alaska, USA

 [9/11] from: tim-johnsons:web at: 26-May-2007 7:35


On Friday 25 May 2007 23:40, Peter Wood wrote:
> Tim > > Is it living in Alaska that gave you such persistence and ingenuity?
:-) No. It's growing up on a homestead in North Dakota
> I'm more than impressed. > Thanks for taking the time to tell us.
<<quoted lines omitted: 4>>
> take a look at his slides from the recent DevCon - > http://www.rebol.com/notes/devcon07-carl.zip )
I know a bit about the history of rebol. My niece worked for them in 2000. That's Jessica Johnson.
> From my point of view, at the moment RT still sees Windows as its main > platform based, I presume, on current installed PC numbers. Linux and
<<quoted lines omitted: 3>>
> who use other systems appear more likely to be interested in > cross-platform).
I developed in the windows/DOS environment for 13 years before migrating to linux. Even so, I run windows on top of linux. It is actually much more and stable this way and: :-) When windoze crashes you can reboot in seconds. I do mostly web programming. For the first 5 years I did so, I was compiling on NT machines and uploading executables to a NT web server. Now, although all of my clients use windows for workstations, *none* of them would allow their assets (i.e. work I do for them) to be served from a Windows web server. That's why they come to me... It is probably safe to say that the percentages of web programmers using non-windows OS is higher than that of the general population. In fact a windows programmer using rebol to do web development would want the rebol binary to be as portable as possible, to give him/here and clients the widest choice of platforms. Some speculations about a "tipping point" that may cause to a dramatic increase are: 1)A developing relationship between Dell and ubuntu - is happening 2)Walmart increasing sales of linux-based computers, perhaps introducing it's own OS 3)Stepped - up EU legal action against MS. 4)Resumption of US gov legal action against MS 5)Increase in state legal actions against MS 6)Increased adoption of Open Document exchange standards. 7)Some spinoff of Macintosh use of the BSD (linux kernel) 8)Greater use of Linux embedded systems and PC systems in the telecommunications industry. NOTE: These are not necessarily my opinions, I'm just listing. And I have two brothers in the telecommunications industry who are privy to much info, much of it confidential...... I still suspect that a "dramatic" increase would still leave MS with the market share. I don't want to be involved in an argument over OS choice, so I'm reluctant to elaborate on the speculation here - and :-) my niece has *no* juicy gossip to contribute. Cheers tim
> Regards > Peter
<<quoted lines omitted: 80>>
> > To unsubscribe from the list, just send an email to > > lists at rebol.com with unsubscribe as the subject.
-- Tim Johnson <tim-johnsons-web.com> Palmer, Alaska, USA

 [10/11] from: tim-johnsons::web::com at: 26-May-2007 7:36


On Saturday 26 May 2007 05:41, Anton Rolls wrote:
> Hi Tim, > > What version of 64bit Ubuntu was your target platform, > by the way. ("Feisty" ?)
Yes. I prefer the version number. Those goofy names make me think I've fallen into a alternate reality that is a Walt Disney cartoon.
> > 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 > > > > Tim
-- Tim Johnson <tim-johnsons-web.com> Palmer, Alaska, USA

 [11/11] from: anton::wilddsl::net::au at: 27-May-2007 19:00


Tim, Thankyou, that makes it clear. The word that threw me off was "ported". Regards, Anton.

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted