in reply to Error during compilation of 5.8.8 on solaris 10

'libdb.so.*' isn't going to help you; that's not what the compiler is looking for. From 'man gcc', describing the '-llibrary' option:

The linker searches a standard list of directories for the library, which is actually a file 
named 'liblibrary.a'.

Usually, this means that you need the development package for a given lib. Since you're using Solaris, Sunfreeware is your friend.


-- 
Human history becomes more and more a race between education and catastrophe. -- HG Wells
  • Comment on Re: Error during compilation of 5.8.8 on solaris 10

Replies are listed 'Best First'.
Re^2: Error during compilation of 5.8.8 on solaris 10
by mmakarczyk (Initiate) on Apr 09, 2008 at 23:02 UTC
    so, if I am understanding you correctly, there should be a development package for the libdb.a library that I can download from sunfreeware.com? (I'm basing this on the fact that the -1db is the library that is missing (or 'shared' based on the above output)

      Close. It should be a dev package for 'libdb' - which will include 'libdb.a'. If I recall correctly, that should be the Berkeley DB package - e.g., db-4.2.52.NC-sol10-sparc-local.gz for Solaris 10.

      
      -- 
      Human history becomes more and more a race between education and catastrophe. -- HG Wells
      
        Your advice is correct in some respects, but incorrect in others.
        1. libdb.so is a shared library, whereas libdb.a is a static library. If you have both libdb.so and libdb.a available in the search paths used by a C compiler (gcc in this case), then the shared library is preferred. Shared libraries are preferred because they prevent the code from begin compiled into your resulting Perl binary, which increases binary size and requires more resources every time it is invoked. The previous comments about needing libdb.a instead of libdb.so were incorrect.
        2. Having the library is not sufficient; you need the development headers as well. This was a correct stateement.

        If you or someone you know has root access to the system, you can start at this page for the version of Solaris you have (as opposed to using the SunFreeware one):

        http://www.sun.com/software/solaris/freeware/index.xml

        You can get the Berkeley DB companion software for Solaris 8, 9, 10 and on Sparc and Intel platforms. Sun requires a free login to access the downloads (both DVD ISO image and individual package downloads).

        Sinistral- Per your comment of "Having the library is not sufficient; you need the development headers as well. " Will the 4.2.52.NC-sol10-sparc-local package from sunfreeware install both? This is going on a server that is running an oracle 9i database (production) Do you think there is anything in this package that could adversely affect the functionality of that database. The reason I ask is that the details page of the package discusses how Berkeley DB integrates w/ "Oracle's Overall Embedded database strategy." Since I don't have a non production server to test this package on, i'm a bit nervous. Thanks again- Matt
      This is the closest I see to a package that installs libdb: db-4.2.52.NC-sol10-sparc-local.gz
      db is the Berkeley open source embedded database system - installs in /usr/local/BerkeleyDB.4.2. This packages also requires that you have install either libgcc or gcc.

      note.. I have installed the gcc
      does that sound close to what I need?
      Thanks again for all the help.
      matt

        Yep. I definitely prefer 'gcc' for compiling on Solaris; in my experience, it's more flexible and forgiving than Sun's own compiler.

        You may also find this to be a useful and pertinent read: DB_File-1.817.readme.

        
        -- 
        Human history becomes more and more a race between education and catastrophe. -- HG Wells