1 - Thanks to Randal for pointing me to Perl Porters Mailing List - this is the source for all of your Perl building answers.

2 - The problem is that they have added a whole pack of "libswanted" to Configure in Perl 5.6. This means that when Configure runs it is going to scan through the lib path and link perl against any of those libs that are found. I anticipate this will change again for 5.7 as the amount of linking libs to the main perl binary is excessive for most platforms.

So what? You ask. Well if you have different instances of a library you might not get the instance you want. In my case I am building on a RedHat 6.2 box. Why RedHat felt it a smart idea to symlink libdb-3.0 to libdb-2.0 and then link programs against libdb-3 when they really wanted libdb-2 is beyond me.

788401 Feb 29 2000 /lib/libdb-2.1.3.so 15 Aug 1 16:28 /lib/libdb.so.2 -> libdb1-2.1.3.so 14 Aug 1 16:28 /lib/libdb.so.3 -> libdb-2.1.3.so 221411 Feb 29 2000 /lib/libdb1-2.1.3.so 15 Aug 1 16:28 /lib/libdb1.so.2 -> libdb1-2.1.3.so
I want all of the glamour that BerkeleyDB 3 has to offer. Transactions, locking, yadda, yadda. So trying to one-up RedHat I download db-3.1.17 and, successfully, make it. All of my attempts to make Perl 5.6 NOT link against RedHat's funky /lib/libdb-3 and against my wonderful /opt/lib/libdb-3 fail fail fail. Why???? This worked with Perl 5.005*! Leave that damn lib alone.

Alas, finally getting my answer, I remove "db" from a libswanted assignment in Configure and rebuild my perl (*again*) this time holding my breath the entire time. (If I was building on a 386 I might not be alive to write this ... thank god for faster processors).

ldd happily reports that the main perl binary is NOT linking against any libdb. (YES!) So I run off and build the BerkeleyDB module and make test works!!!! Yaaaah.

Now, how did I do all of this?????

My build for BerkeleyDB 3.1.17 shared lib:

cd ../db/dist; make distclean >/dev/null; ./configure --enable-shared \ --prefix=/opt >/opt/src/config/logs/db-config; make >/opt/src/config/logs/db.shared; make test >/opt/src/config/logs/db.shared-test; make install >/opt/src/config/logs/db.shared-install
My build for perl on Linux:
make distclean >/dev/null sh Configure -de -Dprefix=/opt -Duselargefiles='undef' \ >/opt/src/config/logs/perl-config make depend >/dev/null make >/opt/src/config/logs/perl-build make test >/opt/src/config/logs/perl-test make install >/opt/src/config/logs/perl-install
My build for BerkeleyDB module:
BERKELEYDB_INCLUDE=/opt/include; export BERKELEYDB_INCLUDE BERKELEYDB_LIB=/opt/include; export BERKELEYDB_LIB /opt/bin/perl -MCPAN -e 'install BerkeleyDB'
Why I am taking so much time and detail to explain this? Well I have burned HOURS of my time trying to get this software combo to work and build properly. I hope I can save someone else that time in the future. That someone I save will burn HOURS on another problem but will remember this and do the same thing when they finally solve that other issue.

Jay


In reply to Answer to RE: Where's the library? Building Perl with alternate libdb probs! by jlawrenc
in thread Where's the library? Building Perl with alternate libdb probs! by jlawrenc

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.