🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.utils.bug
Article #69

finger1.37 hpux and -lPW (again)

#69
From: Neal Becker
Date: Wed, 04 Nov 1992 16:13
44 lines
2207 bytes
Setup:
	gcc2.3.1 hppa1.1-hpux hpux8.07

Problem:

		gcc -O -O -o finger finger.o ../lib/libfinger.a ./../version.o ./../maildir.o -lc -lPW
ld: Unsatisfied symbols:
   atexit (code)
collect: /bin/ld returned 1 exit status

Fix:

  Don't use -lPW!  It excites wierd hpux linker bugs.

Explanation:

  FROM HPUX regex MAN PAGE:
 WARNINGS
      regcmp and regex are kept in /lib/libPW.a.  Unfortunately,
      /lib/libPW.a also contains some functions that have the same names as
      functions contained in the default C library, /lib/libc.a.  To prevent
      unexpected results due to these name conflicts, always search libc
      before searching libPW.  This is done with the ld (or cc) command line

Well, as you can see above, this doesn't always work.  I can also send
another example of this kind of stupid hpux linker problem.  The
solution is don't use -lPW!  If you want alloca, extract alloca.o from
/lib/libPW.a and make yourself a liballoca.a.  This is almost always
the only reason for using -lPW in gnu stuff on hpux.

*My suggested procedure is endorsed by fileutils-3.4* (Take a look at
the README)* I recommend that all gnu stuff should be converted to
look for /usr/local/lib/liballoca.a in preference to /lib/libPW.a to
get alloca on hpux.



 I feel that this [1981] is my first year, that next year is an
 election year, that the third year is the mid point and that the
 fourth year is the last chance I'll have to make a record since the
 last two years, I'll be a candidate again.  Everything I do in those
 last two years will be posturing for the election.  But right now I
 don't have to do that.
       -- Senator Dan Quayle 
Technical Details
Message-ID: <m0mmnMk-0003TdC@neal.ctd.comsat.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!iggy.GW.Vitalink.COM!cs.widener.edu!umn.edu!spool.mu.edu!caen!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!ctd.COMsat.COM!neal

Show Full Headers
Complete Article Headers
Newsgroups: gnu.utils.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!iggy.GW.Vitalink.COM!cs.widener.edu!umn.edu!spool.mu.edu!caen!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!ctd.COMsat.COM!neal
From: neal@ctd.COMsat.COM (Neal Becker)
Subject: finger1.37 hpux and -lPW (again)
Message-ID: <m0mmnMk-0003TdC@neal.ctd.comsat.com>
Sender: gnulists@ai.mit.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Wed, 4 Nov 1992 16:13:00 GMT
Approved: bug-gnu-utils@prep.ai.mit.edu
Lines: 45