old desklib app recompile.. template file wrong?
Willard Goosey (5119) 257 posts |
I stumbled across a 26bit desklib app and I thought it would be an easy recompile for ARMv7, especially since there was already an lyonix version… I was wrong. I’ve been banging my head against this for days, and I admit defeat. in Window_CreateWithFlags()… I changed Template_find() to Template_Clone(). Template_find() was giving 0-page pointers. But it’s telling me (window_block *wb→numicons) is 580? The first template window is MoonTool and it has 22 icons, the template file has 77 icons total. So I can’t see where 580 is coming from. I have looked at the Templates file in formed, wined, winedit, and even regenerated it via ccres but I still get the wrong number there. Is the Templates file corrupt? Is desklib doing something wrong, or being used wrong? Help!?!?! |
David Pitt (3386) 1248 posts |
Both Iyonix builds run on the RPi1 in armv5 mode so maybe the Template file really is OK? This is how my build of 3.27 fails. Using DDE30 and DeskLib 2.80. Bad juju: hex not understood. Unexpected termination (e.g. abort() function) Postmortem requested fc187e44 in shared library function fc187ef8 in shared library function fc18aca0 in shared library function Arg1: 0x00000052 82 981c in function hdigit Arg3: 00000000 0 Arg2: 00000000 0 Arg1: 0x0000a2a0 41632 -> [0x6e6f6f4d 0x6c6f6f54 00000000 0x00011228] 9904 in function Window_CreateWithFlags Arg2: 0x000145ec 83436 -> [0x0001460c 0x00014621 0x00014624 00000000] Arg1: 0x00000003 3 9f54 in function main Arg2: 0x00009db0 40368 -> [0xe1a0c00d 0xe92ddbf3 0xe24cb004 0xed6d4206] Arg1: 0x000140f0 82160 -> [0x65626f3c 0x69642479 0x212e3e72 0x496e7552] fc17bc84 in shared library function cc10 in anonymous function See line 984 in |
Andrew Rawnsley (492) 1445 posts |
Oh, I remember this little “annoying thing”. It’s a nice program, but DeskLib has changed a lot since it was written. Someone asked me to update it for them to run on an ARMiniX, I think, about 7 years ago. I think we did succeed (although I may be wrong). But I cannot remember how. I will look and see if I still have it. I remember a lot of frustration, that’s for sure. |
Steve Pampling (1551) 8170 posts |
Am I misremembering or did Rick Murray mention having done things to modify DeskLib because of certain faults? |
Steve Fryatt (216) 2105 posts |
I’ve just built it using GCCSDK and the current DeskLib from RISCOS.info (which I have around thanks to WinEd), and it seems to run fine on a Titanium with no modifications. There’s a small window showing an image of the moon, which I assume is what it does. I’ve got other things to do in the next couple of hours, but I’ll follow up later with more details. In the meantime, check that your DeskLib has also been re-built from source using a new compiler. |
Willard Goosey (5119) 257 posts |
the “bad juju” message is because it calls template_find() instead of template_clone(). template_find() is returning a 0 page pointer and hdigit() is finding “DEFREFERENCE NULL” |
Steve Fryatt (216) 2105 posts |
Except that it works perfectly here using Are you sure that your DeskLib binary isn’t compiled for older hardware? |
Rick Murray (539) 13840 posts |
Yup. Click the window for nerdy info. Built and works fine for me using the DDE and my DeskLib32 (v2.30/RM32) → http://heyrick.ddns.net/desklib/ Had to change two things: First, amend the MakeFile to reference o.DeskLib32 instead of o.DeskLib, and secondly there is a redefinition of abs(), so I commented out the one that the compiler was complaining about.
Various things, yes. But in my experience, weird and illogical failures seem to come from builds that do faulty things like depend upon rotated unaligned loads. You should be using a recently compiled version of DeskLib, or rebuild it yourself.
I’m not even going to bother…
Wow. I loaded it into Zap, hit Sh^C, fixed the redef problem, hit Sh^C and then ran the newly built program. If only everything was that easy. ;-) Thanks for the pointer, Willard. It’s a useful little program. |
Willard Goosey (5119) 257 posts |
OK… Desklib 2.80 here, last DDE version from packman. Skuld only knows what hardware it was compiled for… I’ll upgrade to Rick’s version and try again. I admit I’m not enthused about trying to build my own copy of something as big as Desklib. |
Rick Murray (539) 13840 posts |
Some might suggest an alternative word in place of “upgrade”. ;-)
For my one, it should be a case of:
That ought to be all you need.
Within !DeskLib.o will be “DeskLib32” which will be the newly built library. That said, mine should be in a suitable state for current machines. |
Willard Goosey (5119) 257 posts |
Yay! Success!!!! Thank you Rick!!!! You Da MAN!!!! |
Steve Fryatt (216) 2105 posts |
The version in PackMan is ELF, for GCC, so I’m surprised that it’s even linking. Otherwise, if you’ve held on to an AOF copy, it’s going to be from pre 2009 or so — by then, it was clear that the official releases were being structured for GCC use only (although there are still UnixLib and SCL versions).
It probably won’t, because unhelpfully we now have a forked DeskLib: the one in SVN at RISCOS.info, and Rick’s.
It is. As I noted in my earlier email, it took about five minutes to build a working MoonTool with the GCCSDK — and most of that was renaming h. and c. into .h and .c, then adapting WinEd’s makefile to do the necessary. The version in PackMan is dated 2014, so should be ARMv7-safe, but is ELF format, not AOF. |
Willard Goosey (5119) 257 posts |
package “desklib” is ELF Makes me nervous about !oslib, !unixlib, and !slidinghp…. |
Steve Fryatt (216) 2105 posts |
Ah. Yes. They appear to have been getting hand maintained and built by Adam Richardson, so when he moved on to other things I suspect they didn’t see any more love. The last changes in SVN were around the time of the last WinEd releases, so 2008-9.
OSLib (but not OSLibSupport) shouldn’t be a problem — you can get the latest version in AOF format from http://ro-oslib.sourceforge.net/, and I’ve used it for building all of my C Tutorial code with Norcroft recently. |
Steve Fryatt (216) 2105 posts |
Not really. As I wrote earlier: five minutes to build a new version of MoonTools… Using an ELF library. |