Обсуждение: BUG #6045: Compilation of contribs fail

Поиск
Список
Период
Сортировка

BUG #6045: Compilation of contribs fail

От
"Emanuel"
Дата:
The following bug has been logged online:

Bug reference:      6045
Logged by:          Emanuel
Email address:      postgres.arg@gmail.com
PostgreSQL version: 9.1beta
Operating system:   Ubuntu 10.04 2.6.31
Description:        Compilation of contribs fail
Details:

make and make installs work well. To compile correctly I must hardcode the
libdir. I happens with several contribs.

root@dell-desktop:/home/ecalvo-laptop/postgresql-9.1beta1/contrib/pgstattupl
e# /usr/local/pgsql/bin/psql -Upostgres < pgstattuple--1.0.sql
ERROR:  could not access file "MODULE_PATHNAME": No existe el archivo o
directorio
ERROR:  could not access file "MODULE_PATHNAME": No existe el archivo o
directorio
ERROR:  could not access file "MODULE_PATHNAME": No existe el archivo o
directorio
ERROR:  could not access file "MODULE_PATHNAME": No existe el archivo o
directorio

##### ECHO .control
root@dell-desktop:/home/ecalvo-laptop/postgresql-9.1beta1/contrib/pgstattupl
e# cat pgstattuple.control
# pgstattuple extension
comment = 'show tuple-level statistics'
default_version = '1.0'
module_pathname = '$libdir/pgstattuple'
relocatable = true

##### PG_CONFIG LIBDIR location
root@dell-desktop:/home/ecalvo-laptop/postgresql-9.1beta1/contrib/pgstattupl
e# /usr/local/pgsql/bin/pg_config | grep -i libdir
LIBDIR = /usr/local/pgsql/lib
PKGLIBDIR = /usr/local/pgsql/lib


#### Content of sql:
root@dell-desktop:/home/ecalvo-laptop/postgresql-9.1beta1/contrib/pgstattupl
e# grep -i MODULE pgstattuple--1.0.sql
AS 'MODULE_PATHNAME', 'pgstattuple'
AS 'MODULE_PATHNAME', 'pgstattuplebyid'
AS 'MODULE_PATHNAME', 'pgstatindex'
AS 'MODULE_PATHNAME', 'pg_relpages'

Seems that it didn't replace the correct MODULE_PATHNAME with
$libdir/contrib...

Re: BUG #6045: Compilation of contribs fail

От
hubert depesz lubaczewski
Дата:
On Sun, May 29, 2011 at 11:16:30AM +0000, Emanuel wrote:
> make and make installs work well. To compile correctly I must hardcode the
> libdir. I happens with several contribs.

did you actually do make and make install *in* contrib directory?

one shouldn't load sql files from the sources, and it looks like you're
trying to do it.

Best regards,

depesz

--
The best thing about modern society is how easy it is to avoid contact with it.
                                                             http://depesz.com/

Re: BUG #6045: Compilation of contribs fail

От
Emanuel Calvo
Дата:
2011/5/29 hubert depesz lubaczewski <depesz@depesz.com>:
> On Sun, May 29, 2011 at 11:16:30AM +0000, Emanuel wrote:
>> make and make installs work well. To compile correctly I must hardcode t=
he
>> libdir. I happens with several contribs.
>
> did you actually do make and make install *in* contrib directory?
>

No, I'm making the make inside the contrib/pgstattuple , not in contrib
directory (as always do in other versions).

> one shouldn't load sql files from the sources, and it looks like you're
> trying to do it.
>

I'm doing like other versions:

make; make install
and then:
psql < xxxx.sql


Does it change for 9.1?


--=20
--
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Emanuel Calvo
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Helpame.com

Re: BUG #6045: Compilation of contribs fail

От
Tom Lane
Дата:
Emanuel Calvo <postgres.arg@gmail.com> writes:
> 2011/5/29 hubert depesz lubaczewski <depesz@depesz.com>:
>> did you actually do make and make install *in* contrib directory?

> I'm doing like other versions:

> make; make install

That's correct.

> and then:
> psql < xxxx.sql

That's not correct anymore.  Use CREATE EXTENSION.

            regards, tom lane

Re: BUG #6045: Compilation of contribs fail

От
Emanuel Calvo
Дата:
>> I'm doing like other versions:
>
>> make; make install
>
> That's correct.
>
>> and then:
>> psql < xxxx.sql
>
> That's not correct anymore. =C2=A0Use CREATE EXTENSION.
>

Thanks Tom, I thougth that the old way was already compatible.

Regards,

--=20
--
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Emanuel Calvo
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Helpame.com