Solaris 10 gcc 3.4.6 perl compile error HELP!

Solaris 10 gcc 3.4.6 perl compile error HELP!

am 30.08.2007 22:20:51 von 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
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.)

Re: Solaris 10 gcc 3.4.6 perl compile error HELP!

am 31.08.2007 00:56:49 von Ben Morrow

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
> 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

Re: Solaris 10 gcc 3.4.6 perl compile error HELP!

am 31.08.2007 09:56:49 von jrpfinch

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

Re: Solaris 10 gcc 3.4.6 perl compile error HELP!

am 31.08.2007 10:06:00 von jrpfinch

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.

Re: Solaris 10 gcc 3.4.6 perl compile error HELP!

am 31.08.2007 18:04:58 von mancat

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