Solaris 10 gcc 3.4.6 perl compile error HELP!

Discussion in 'Perl Misc' started by mancat, Aug 30, 2007.

  1. mancat

    mancat Guest

    I am tring to compile Perl 5.8.8 on a Solaris 10 box with gcc 3.4.6
    and am getting this error. I am at a total loss, So if someone could
    point me to a resource or in the right direction that would be
    GREAT!!!!!

    thanks
    -mancat



    Checking your choice of C compiler and flags for coherency...
    I've tried to compile and run the following simple program:

    #include <stdio.h>
    int main() { printf("Ok\n"); return(0); }

    I used the command:

    gcc -o try -O -fno-strict-aliasing -pipe -Wdeclaration-after-
    statement -I/usr/local/include -L/usr/local/lib try.c -lsocket -lnsl -
    lgdbm -ldb -ldl -lm -lc
    ./try

    and I got the following output:

    ld: fatal: library -ldb: not found
    ld: fatal: File processing errors. No output written to try
    collect2: ld returned 1 exit status
    I can't compile the test program.
    (The supplied flags or libraries might be incorrect.)
    mancat, Aug 30, 2007
    #1
    1. Advertising

  2. mancat

    Ben Morrow Guest

    Quoth mancat <>:
    > I am tring to compile Perl 5.8.8 on a Solaris 10 box with gcc 3.4.6
    > and am getting this error. I am at a total loss, So if someone could
    > point me to a resource or in the right direction that would be
    > GREAT!!!!!
    >
    > thanks
    > -mancat
    >
    >
    >
    > Checking your choice of C compiler and flags for coherency...
    > I've tried to compile and run the following simple program:
    >
    > #include <stdio.h>
    > int main() { printf("Ok\n"); return(0); }
    >
    > I used the command:
    >
    > gcc -o try -O -fno-strict-aliasing -pipe -Wdeclaration-after-
    > statement -I/usr/local/include -L/usr/local/lib try.c -lsocket -lnsl -
    > lgdbm -ldb -ldl -lm -lc
    > ./try
    >
    > and I got the following output:
    >
    > ld: fatal: library -ldb: not found
    > ld: fatal: File processing errors. No output written to try
    > collect2: ld returned 1 exit status
    > I can't compile the test program.
    > (The supplied flags or libraries might be incorrect.)


    How did you run Configure? What is the whole output of Configure? Do you
    have a -ldb?

    Ben
    Ben Morrow, Aug 30, 2007
    #2
    1. Advertising

  3. mancat

    jrpfinch Guest

    I _think_ that in Solaris 10, there is no /usr/lib/libldb.so file;
    only libldb.so.x files. I _think_ if you create a link from /usr/lib/
    libldb.so to one of your libldb.so.x files, then the compile will
    work.

    Try googling for this, I'm sure I've seen a similar problem before but
    have yet to have any luck finding a reference.

    Jon
    jrpfinch, Aug 31, 2007
    #3
  4. mancat

    jrpfinch Guest

    Try:

    ln -s /usr/lib/libdb.so.1 /usr/lib/libdb.so

    Then recompile.

    Let me know if that works - if so, it's the first time I've answered
    rather than asked a question on this group and I will have a warm glow
    in my heart.
    jrpfinch, Aug 31, 2007
    #4
  5. mancat

    mancat Guest

    On Aug 31, 3:06 am, jrpfinch <> wrote:
    > Try:
    >
    > ln -s /usr/lib/libdb.so.1 /usr/lib/libdb.so
    >
    > Then recompile.
    >
    > Let me know if that works - if so, it's the first time I've answered
    > rather than asked a question on this group and I will have a warm glow
    > in my heart.


    This worked thanks
    -mancat
    mancat, Aug 31, 2007
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Brice Breeden

    Link error using gcc 3.3 on Solaris 9

    Brice Breeden, Aug 1, 2003, in forum: C++
    Replies:
    0
    Views:
    488
    Brice Breeden
    Aug 1, 2003
  2. Bimal
    Replies:
    1
    Views:
    462
    Tim Prince
    Aug 20, 2003
  3. Replies:
    5
    Views:
    357
    Nathan Addy
    Sep 17, 2005
  4. Jeff
    Replies:
    3
    Views:
    519
  5. fAnSKyer
    Replies:
    2
    Views:
    530
    Alf P. Steinbach
    Jun 7, 2009
Loading...

Share This Page