ngse18@castle.ed.ac.uk (J R Evans) (08/03/90)
We are translating a large application from DECwindows to Motif, using Motif binary distributions for Ultrix 3.1 and VMS 5.3 made up for us in advance of the full release by our helpful DEC support staff (I guess that makes us some kind of beta-test site). Pages 36 and 63 of the Programmer's Guide Part 1 (Toolkit) tell us that the XmFileSelectionBox widget requires the libPW.a library to function properly, but we have been unable to find libPW.a anywhere within the Ultrix distribution or the Motif binary distribution provided by DEC. Although the application can be linked without -lPW and without yielding errors, when we do so, the structure returned by XmFileSelectionBox appears to contain a garbage .value field. We admit the possibility that our code may contain errors, but in view of the remarks in the Programmer's Manual, it seems quite possible that the problem lies in the missing library libPW.a; our helpful DEC support are making enquiries through their own channels. In the meantime, I wonder if any friends on the net can help us by explaining what libPW.a is and where we should expect to find it? Thanks in advance ... Russ
richard@unipalm.co.uk (Richard) (08/07/90)
> > Pages 36 and 63 of the Programmer's Guide Part 1 (Toolkit) tell us that > the XmFileSelectionBox widget requires the libPW.a library to function > properly, but we have been unable to find libPW.a anywhere within the > Ultrix distribution or the Motif binary distribution provided by DEC. > Although the application can be linked without -lPW and without yielding > errors, when we do so, the structure returned by XmFileSelectionBox > appears to contain a garbage .value field. We admit the possibility > that our code may contain errors, but in view of the remarks in the > Programmer's Manual, it seems quite possible that the problem lies in > the missing library libPW.a; our helpful DEC support are making > enquiries through their own channels. In the meantime, I wonder if any > friends on the net can help us by explaining what libPW.a is and where we > should expect to find it? > I have come across this problem before (well, a similar manifestation anyway). On HP workstations, the regcmp and regex routines required by the File selection Box to do its pattern matching are not in the standard C library, but in (you guessed it...) libPW.a . Therefore, when using an HP (9000/340 in my case), you must link with this library. This library is definately not present or required for Suns, and I can't speak for Dec machines, but assume that it is also not required there. Richard Nuttall richard@xtech.uucp XTech, Cambridge, England ukc!acorn!unipalm!xtech!richard Tel: +44 954 211862 richard@unipalm.uucp
ngse18@castle.edinburgh.ac.uk (J R Evans) (08/08/90)
Many thanks for your response - the only one I received to my posting; as it happens, I also got a response from DEC today, saying something similar but in a less definitive fashion - it was a copy of a note from someone at OSF to someone using a Sun who was also concerned about the 'missing' libPW.a. Your confirmation of their rather tentative view is most helpful. Of course, this still leaves me with the original problem - that this application has stopped reading/writing files!~ I am convinced that the motif for Ultrix file selection box code is buggy - the periodic demo produces : Fixed up unaligned data access for pid 932 (periodic) at pc 0x4de4b0 Fixed up unaligned data access for pid 932 (periodic) at pc 0x4de618 when the fsb is fetched and whenever the Filter button is pressed. Nevertheless, I think there must be a wild pointer or something in the application - if this were a routine problem with motif for Ultrix, I'm sure it would have been noticed before. Ah well, now that libPW.a has been eliminated from enquiries, it's back to thrashing the debugger, I think! Regards - Russ
dbrooks@osf.org (David Brooks) (08/08/90)
In article <9008080958.aa26375@castle.ed.ac.uk>, ngse18@castle.edinburgh.ac.uk (J R Evans) writes: |> ... I am convinced that the |> motif for Ultrix file selection box code is buggy - the periodic demo |> produces : |> Fixed up unaligned data access for pid 932 (periodic) at pc 0x4de4b0 |> Fixed up unaligned data access for pid 932 (periodic) at pc 0x4de618 |> when the fsb is fetched and whenever the Filter button is pressed. We kept getting this (on DECstations) and I finally found out it's a problem with Ultrix's libc.a. Either regcmp or regex (I forget which) generates the unaligned accesses. The cheap solution is to issue a "uac p 0" command. The proper solution is to build Xm with -DNO_REGEX, since Ultrix also very kindly provides re_comp and re_exec. Unfortunately that too was broken (by us) until the 1.0.2 patch release, which put decent code in the FileSB. The "fix" in Xm.h didn't know that regcmp and re_comp differ in their meanings of a zero return. If you have pre-1.0.2 binaries only, you might try linking in this module: I'm typing this in off the top of my head. char *re_comp(), *re_exec(); char *regcmp(a,b) char *a,*b; { return (re_comp(a)?0:a); } char *regex(a,b) char *a,*b; { return (re_exec(b)); } -- David Brooks dbrooks@osf.org Systems Engineering, OSF uunet!osf.org!dbrooks