Thread: BUG #5802: configure script does not check for perl devel files

BUG #5802: configure script does not check for perl devel files

From
"Mario Ohnewald"
Date:
The following bug has been logged online:

Bug reference:      5802
Logged by:          Mario Ohnewald
Email address:      mo@imos.net
PostgreSQL version: 8.4.6
Operating system:   Linux / Debian Lenny 5.0.6
Description:        configure script does not check for perl devel files
Details:

to build postgresql from source on debian lenny you need to install the
following packages:


apt-get install bison flex libreadline5-dev zlib1g-dev libssl-dev
libxml2-dev libxslt1-dev

in order to run ./configure without any errors.

However, during the make, postgres requires perl devel. Should this not be
covered in the configure script?

gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith
-Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv
-fpic -shared  plperl.o spi_internal.o SPI.o  -L/usr/local/lib
-L/usr/lib/perl/5.10/CORE -L../../../src/port -lperl -ldl -lm -lpthread -lc
-lcrypt -Wl,-rpath,'/usr/lib/perl/5.10/CORE' -o plperl.so
/usr/bin/ld: cannot find -lperl
collect2: ld returned 1 exit status
make[3]: *** [plperl.so] Error 1

Re: BUG #5802: configure script does not check for perl devel files

From
Peter Eisentraut
Date:
On tis, 2010-12-28 at 12:19 +0000, Mario Ohnewald wrote:
> However, during the make, postgres requires perl devel. Should this
> not be covered in the configure script?

No, it's not configure's job to do the job of make or the compiler.

Re: BUG #5802: configure script does not check for perl devel files

From
John R Pierce
Date:
On 12/28/10 3:22 PM, Peter Eisentraut wrote:
> On tis, 2010-12-28 at 12:19 +0000, Mario Ohnewald wrote:
>> However, during the make, postgres requires perl devel. Should this
>> not be covered in the configure script?
> No, it's not configure's job to do the job of make or the compiler.

I believe he's suggesting that configure should be confirming the
availability and location of these prerequisites, just as it locates and
validates the perl install and many other prerequisite tools.

that said, in a generic sense, Perl doesn't distinguish between
developer and runtime, this is purely a platform/distribution specific
packaging issue.

Re: BUG #5802: configure script does not check for perl devel files

From
Gurjeet Singh
Date:
On Tue, Dec 28, 2010 at 6:22 PM, Peter Eisentraut <peter_e@gmx.net> wrote:

> On tis, 2010-12-28 at 12:19 +0000, Mario Ohnewald wrote:
> > However, during the make, postgres requires perl devel. Should this
> > not be covered in the configure script?
>
> No, it's not configure's job to do the job of make or the compiler.
>
>
What is the difference between this and how libreadline or zlib are checked
by configure? I am referring to the configure error that pronpts us to use
--without-readline.

Regards,
--
gurjeet.singh
@ EnterpriseDB - The Enterprise Postgres Company
http://www.EnterpriseDB.com

singh.gurjeet@{ gmail | yahoo }.com
Twitter/Skype: singh_gurjeet

Mail sent from my BlackLaptop device

Re: BUG #5802: configure script does not check for perl devel files

From
Peter Eisentraut
Date:
On tis, 2010-12-28 at 15:29 -0800, John R Pierce wrote:
> I believe he's suggesting that configure should be confirming the
> availability and location of these prerequisites, just as it locates
> and validates the perl install and many other prerequisite tools.

Sure, but that's just extra code to maintain for little extra benefit.
You can just install the headers and restart the build and it will pick
up where it left.

Re: BUG #5802: configure script does not check for perl devel files

From
Peter Eisentraut
Date:
On tis, 2010-12-28 at 18:30 -0500, Gurjeet Singh wrote:
> What is the difference between this and how libreadline or zlib are checked
> by configure? I am referring to the configure error that pronpts us to use
> --without-readline.

Sure, it's inconsistent.  It's just a matter of how much code you want
to maintain.

Since readline and zlib are on by default, user complaints in those
areas were much more frequent.

Re: BUG #5802: configure script does not check for perl devel files

From
"Greg Sabino Mullane"
Date:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160


>> However, during the make, postgres requires perl devel. Should this
>> not be covered in the configure script?
>
> No, it's not configure's job to do the job of make or the compiler.

Nonsense, we should be checking everything we can. Why wait until
a future step fails if we can rule it out as early as possible?
We already do that for a number of other things.

- --
Greg Sabino Mullane greg@turnstep.com
PGP Key: 0x14964AC8 201012291437
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-----BEGIN PGP SIGNATURE-----

iEYEAREDAAYFAk0bjfMACgkQvJuQZxSWSsh6OACgpnMGAIdNXMljmzqV1ur18cV2
4RQAoNHPioGbelSpd9Dcm55bgkwqmZq7
=gy/W
-----END PGP SIGNATURE-----

Re: BUG #5802: configure script does not check for perl devel files

From
Robert Haas
Date:
On Wed, Dec 29, 2010 at 2:37 PM, Greg Sabino Mullane <greg@turnstep.com> wrote:
>>> However, during the make, postgres requires perl devel. Should this
>>> not be covered in the configure script?
>>
>> No, it's not configure's job to do the job of make or the compiler.
>
> Nonsense, we should be checking everything we can. Why wait until
> a future step fails if we can rule it out as early as possible?
> We already do that for a number of other things.

I think the real problem with leaving it until compile time is that
it's often rather non-obvious to the user where things have gone
south.  At least, that's been my experience when trying to install
software from source in the past.  A configure error that says "you
need libperl" is annoying, but it's better than an incomprehensible
error during compile.  My personal top hate is when you get a
complaint that some header file you've never heard of is missing, and
you get to guess which of 3000 packages you need to install to have
it.  Or maybe you already do have it, but it's not installed quite
where it's expected to be, or it's the wrong version, or ...

But in this particular case the error message seems just as
self-explanatory as anything configure would emit, so I'm not totally
sure I see the point.  Though on the flip side I see no real reason
NOT to add a configure check, either.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company