Mailing List Archive

Re: Tk on HP-UX 9.05 - DynaLoader issues.
In <9508032142.AA70833@ssec.ssec.wisc.edu>
On Thu, 3 Aug 1995 16:42:06 -0500
Dave Glowacki <dglo@SSEC.WISC.EDU> writes:
>When I tried to build Tk-b7 on my HP, I got complaints about something like
>"Invalid loader fixup needed". From what I could tell, these were due to
>definitions like 'static char *list[] = { "a", "bc", "d" };'
>
>When I changed these to something like 'static char list[][3] = {"a","bc","d"};'
>the loader stopped whining and I got a working Tk.
>
>Has anyone else seen this? Is there another way around this?

It is odd. It seems quite happy to initialize char *'s this way if they
are in struct's.

I don't want to do this to distributed perl/Tk. I consider it a compiler
or linker bug. It is possible that there is something missing from the
command line flags which would fix the problem.

It may be related to the -pic vs -PIC issues on other platforms.

I cannot test it myself as neither bundled "cc" nor "gcc" I have for HPUX
can build dynamically loaded code at all.

I would appreciate input from HPUX/DynaLoader "experts" on perl5-porters.


>
>Here's a patch file with my changes:
>
>*** /tmp/,RCSt1a12097 Wed Aug 2 13:49:54 1995
>--- pTk/tkButton.c Wed Aug 2 13:03:13 1995
>***************
>*** 186,192
> * Class names for buttons, indexed by one of the type values above.
> */
>
>! static char *classNames[] = {"Label", "Button", "Checkbutton", "Radiobutton"};
>
> /*
> * Flag bits for buttons:
>
>--- 186,192 -----
> * Class names for buttons, indexed by one of the type values above.
> */
>
>! static char classNames[][12] = {"Label", "Button", "Checkbutton", "Radiobutton"};
>
> /*
> * Flag bits for buttons:
>***************
Re: Tk on HP-UX 9.05 - DynaLoader issues. [ In reply to ]
> >When I tried to build Tk-b7 on my HP, I got complaints about something like
> >"Invalid loader fixup needed". From what I could tell, these were due to
> >definitions like 'static char *list[] = { "a", "bc", "d" };'

If someone will point me at Tk-b7, I'll check and see on my machine here.

Jeff
Re: Tk on HP-UX 9.05 - DynaLoader issues. [ In reply to ]
> From: Nick.Ing-Simmons@tiuk.ti.com
>
> In <9508032142.AA70833@ssec.ssec.wisc.edu>
> On Thu, 3 Aug 1995 16:42:06 -0500
> Dave Glowacki <dglo@SSEC.WISC.EDU> writes:
> >
> >When I tried to build Tk-b7 on my HP, I got complaints about something like
> >"Invalid loader fixup needed". From what I could tell, these were due to
> >definitions like 'static char *list[] = { "a", "bc", "d" };'
> >
> >When I changed these to something like
> > 'static char list[][3] = {"a","bc","d"};'
> >the loader stopped whining and I got a working Tk.
> >
> >Has anyone else seen this? Is there another way around this?
>
> It is odd. It seems quite happy to initialize char *'s this way if they
> are in struct's.
>
> I don't want to do this to distributed perl/Tk. I consider it a compiler
> or linker bug. It is possible that there is something missing from the
> command line flags which would fix the problem.
>
> It may be related to the -pic vs -PIC issues on other platforms.
>
> I cannot test it myself as neither bundled "cc" nor "gcc" I have for HPUX
> can build dynamically loaded code at all.
>
> I would appreciate input from HPUX/DynaLoader "experts" on perl5-porters.
>
I've had the same HPUX ld error from DBD::Oracle users in the perldb-interest
mailing list. I don't know if it's any help but the DBD::Oracle README has
this entry:

: HP-UX: Terry Greenlaw <z50816@mip.lasc.lockheed.com>
:
: I traced a problem with "ld: Invalid loader fixup needed" to the file
: libocic.a. On HP-UX it contains position-dependant code and cannot be
: used to generate dynamic load libraries. The only shared library that
: Oracle ships under HP-UX is liboracle.sl which replaces libxa.a,
: libsql.a, libora.a, libcvg.a, and libnlsrtl.a. The OCI stuff still
: appears to only link statically under HU-UX.

I seem to recall a recent message saying that HP have a patch for ld
that may help.

Tim.

CC'd to some HPUX DBD::Oracle users in case they can help.