Thread: Compiling 8.0.1 on Ubuntu AMD_64

Compiling 8.0.1 on Ubuntu AMD_64

From
Tim Bowden
Date:
I'm trying to compile 8.0.1 on a 64bit Ubuntu system and get the following error:
make[3]: Entering directory `/home/tim/source/postgresql/postgresql-8.0.1/src/pl/plperl'
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wendif-labels -fno-strict-aliasing -fpic -shared
-Wl,-soname,libplperl.so.0 plperl.o spi_internal.o SPI.o -L../../../src/port -L/usr/local/lib
/usr/lib/perl/5.8/auto/DynaLoader/DynaLoader.a-L/usr/lib/perl/5.8/CORE -lperl -ldl -lm -lpthread -lc -lcrypt
-Wl,-rpath,/usr/lib/perl/5.8/CORE-o libplperl.so.0.0 
/usr/bin/ld: cannot find -lperl
collect2: ld returned 1 exit status
make[3]: *** [libplperl.so.0.0] Error 1
make[3]: Leaving directory `/home/tim/source/postgresql/postgresql-8.0.1/src/pl/plperl'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/tim/source/postgresql/postgresql-8.0.1/src/pl'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/tim/source/postgresql/postgresql-8.0.1/src'
make: *** [all] Error 2

Google hasn't helped.  Any ideas?

Thanks,
Tim Bowden


Re: Compiling 8.0.1 on Ubuntu AMD_64

From
Tom Lane
Date:
Tim Bowden <tim.bowden@westnet.com.au> writes:
> I'm trying to compile 8.0.1 on a 64bit Ubuntu system and get the following error:
> gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wendif-labels -fno-strict-aliasing -fpic -shared
-Wl,-soname,libplperl.so.0 plperl.o spi_internal.o SPI.o -L../../../src/port -L/usr/local/lib
/usr/lib/perl/5.8/auto/DynaLoader/DynaLoader.a-L/usr/lib/perl/5.8/CORE -lperl -ldl -lm -lpthread -lc -lcrypt
-Wl,-rpath,/usr/lib/perl/5.8/CORE-o libplperl.so.0.0 
> /usr/bin/ld: cannot find -lperl

Is there a libperl.so or libperl.a in /usr/lib/perl/5.8/CORE?  If not,
but you see one in some related directory, then our configure script
messed up (or Ubuntu is using a whacked-out Perl setup).  If there's
none to be found anywhere, you have an incomplete Perl installation.

Another possibility is that you have only libperl.a and need libperl.so,
but offhand I'd not expect that particular error message if that were
the issue.

            regards, tom lane

Re: Compiling 8.0.1 on Ubuntu AMD_64

From
Tim Bowden
Date:
On Tue, 2005-03-22 at 13:19 -0500, Tom Lane wrote:
> Tim Bowden <tim.bowden@westnet.com.au> writes:
> > I'm trying to compile 8.0.1 on a 64bit Ubuntu system and get the following error:
> > gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wendif-labels -fno-strict-aliasing -fpic -shared
-Wl,-soname,libplperl.so.0 plperl.o spi_internal.o SPI.o -L../../../src/port -L/usr/local/lib
/usr/lib/perl/5.8/auto/DynaLoader/DynaLoader.a-L/usr/lib/perl/5.8/CORE -lperl -ldl -lm -lpthread -lc -lcrypt
-Wl,-rpath,/usr/lib/perl/5.8/CORE-o libplperl.so.0.0 
> > /usr/bin/ld: cannot find -lperl
>
> Is there a libperl.so or libperl.a in /usr/lib/perl/5.8/CORE?  If not,
> but you see one in some related directory, then our configure script
> messed up (or Ubuntu is using a whacked-out Perl setup).  If there's
> none to be found anywhere, you have an incomplete Perl installation.

Jackpot.  apt-get install libperl-dev did the trick.  Thanks Tom and
Geff.  Your assistance is much appreciated.

Tim Bowden


Re: Compiling 8.0.1 on Ubuntu AMD_64

From
vladimir
Date:
> `/home/tim/source/postgresql/postgresql-8.0.1/src/pl/plperl'

the build is trying to compile plperl extension language (for writing stored
procedures).

> -o libplperl.so.0.0 /usr/bin/ld: cannot find -lperl collect2: ld returned

the perl's .so library is not found.

Try to disable plperl (if you do not need writing stored procedures in it)
when running ./configure for postgresql. Otherwise I do not know....

Vlad