Greetings all,
I recently (like, 40 minutes ago) installed Perl 5.6.1 on an HPUX 11.0 system. As my
goal is to interact with an Oracle database, I followed Lincoln Baxter's README.hpux
(THANK YOU!) and tried to build a dynamically linked version of Perl. However, in
earlier attempts (stretching back over the last week or so) it died in the linking stage,
admonishing me that a file was created without position independent code and advising me
that I should recompile using the "+z" flag. As I was using gcc (which has no
+z flag) this was very confusing until I noticed that the file to which the message was
referring was libgdbm, which I had built just last week, and realized that I was using
HPUX's ld ('cuz the GNU binutils ld won't work on HPUX) and this ld doesn't know about
gcc.
Well, it was simple enough to fix: go back to the libgdm build and add -fPIC to
the complier options. After that, Perl built and loaded just like the
documentation says it should.
My "bug"? It would have helped me, I think, if the three sets of documentation were more
blatant about building everything PIC. The configure/build process for libgdbm does not have an
obvious method to specify PIC, and neither the Perl documentation nor Lincoln Baxter's README.hpux
remind the user that all files in a dynamic build need to be PIC. Yes, it's "well known"
(and, if I had been asked, would have said as much...), but a mild reminder might have helped me.
Also, in the Makefile for libgdbm:
30c30
< CFLAGS = -O -fPIC
---
CFLAGS = -O
although this is specific to gcc.
As is often the case in the software biz, just a few characters can make all
the difference.
Thank you, and thank you very much for various contributions.
--
Mike Schuh