On 2012-04-26 08:37, Gianluca Sforna wrote:
> On Thu, Apr 26, 2012 at 8:26 AM, Jan Holst Jensen<[email protected]>  
> wrote:
>> jhje@ubuntu-lynet-test:~/RDKit_2012_03_1/Code/PgSQL/rdkit$
>>
>> After having installed the cartridge as the postgres user with "psql<
>> /opt/postgres/9.0/share/postgresql/contrib/rdkit.sql":
> I am not able to dig details now, but IIRC there are two different
> cartridges, one for 8.x and another one for 9.x.
> Just to be sure, I'd double check you are installing the right one in there.
>
>

Dear Gianluca,

The cartridge is indeed postgres-version specifc. Which one is built 
depends on your postgres environment when you run "make". On one machine 
I have both postgres 9.0 and 9.1 installed and so if I setup the 9.0 
environment and run make, it will build the 9.0 cartridge. And vice versa.

Like this (the third line in each block sources the version-specific 
postgres environment):


jhje@ubuntu-lynet-test:~/RDKit_2012_03_1/Code/PgSQL/rdkit$ export 
RDBASE=/home/jhje/RDKit_2012_03_1
jhje@ubuntu-lynet-test:~/RDKit_2012_03_1/Code/PgSQL/rdkit$ export 
LD_LIBRARY_PATH=/home/jhje/RDKit_2012_03_1/lib/
jhje@ubuntu-lynet-test:~/RDKit_2012_03_1/Code/PgSQL/rdkit$ . 
/opt/postgres/9.1/pg91-openscg.env
jhje@ubuntu-lynet-test:~/RDKit_2012_03_1/Code/PgSQL/rdkit$ make clean
rm -f rdkit.so   librdkit.a
rm -f rdkit_io.o mol_op.o bfp_op.o sfp_op.o rdkit_gist.o low_gist.o 
guc.o cache.o adapter.o
rm -f rdkit--3.1.sql
rm -rf results/ regression.diffs regression.out tmp_check/ log/
jhje@ubuntu-lynet-test:~/RDKit_2012_03_1/Code/PgSQL/rdkit$ make
cp rdkit.sql91.in rdkit--3.1.sql
gcc -I/usr/local/include -I/home/jhje/RDKit_2012_03_1/Code 
-DRDKITVER='"004100"'  -I. -I. 
-I/opt/postgres/9.1/include/postgresql/server 
-I/opt/postgres/9.1/include/postgresql/internal -D_GNU_SOURCE 
-I/usr/local/include/libxml2  -I/usr/local/openssl/include 
-I/usr/local/ldap-2.4.23/include -I/usr/local/include -fPIC -c -o 
rdkit_io.o rdkit_io.c
...


jhje@ubuntu-lynet-test:~/RDKit_2012_03_1/Code/PgSQL/rdkit$ export 
RDBASE=/home/jhje/RDKit_2012_03_1
jhje@ubuntu-lynet-test:~/RDKit_2012_03_1/Code/PgSQL/rdkit$ export 
LD_LIBRARY_PATH=/home/jhje/RDKit_2012_03_1/lib/
jhje@ubuntu-lynet-test:~/RDKit_2012_03_1/Code/PgSQL/rdkit$ . 
/opt/postgres/9.0/pg90-openscg.env
jhje@ubuntu-lynet-test:~/RDKit_2012_03_1/Code/PgSQL/rdkit$ make clean
rm -f rdkit.so   librdkit.a
rm -f rdkit.sql
rm -f rdkit_io.o mol_op.o bfp_op.o sfp_op.o rdkit_gist.o low_gist.o 
guc.o cache.o adapter.o
rm -rf results tmp_check log
rm -f regression.diffs regression.out regress.out run_check.out
jhje@ubuntu-lynet-test:~/RDKit_2012_03_1/Code/PgSQL/rdkit$ make
sed 's,MODULE_PATHNAME,$libdir/rdkit,g' rdkit.sql.in >rdkit.sql
gcc -I/usr/local/include -I/home/jhje/RDKit_2012_03_1/Code 
-DRDKITVER='"004100"'  -I. -I. 
-I/opt/postgres/9.0/include/postgresql/server 
-I/opt/postgres/9.0/include/postgresql/internal -D_GNU_SOURCE 
-I/usr/local/include/libxml2  -I/usr/local/include -fPIC -c -o 
rdkit_io.o rdkit_io.c
...


And you also have to take care that when you do "make install" as root 
that the environment is setup to point to your correct postgres version. 
You can verify that is the case by checking the output of "make install" 
and see what directories the library and SQL scripts are installed into, 
e.g. here I am installing into postgres 9.0:

root@ubuntu-lynet-test:~# cd /home/jhje/RDKit_2012_03_1/Code/PgSQL/rdkit/
root@ubuntu-lynet-test:/home/jhje/RDKit_2012_03_1/Code/PgSQL/rdkit# . 
/opt/postgres/9.0/pg90-openscg.env
root@ubuntu-lynet-test:/home/jhje/RDKit_2012_03_1/Code/PgSQL/rdkit# make 
install
/bin/mkdir -p '/opt/postgres/9.0/lib/postgresql'
/bin/mkdir -p '/opt/postgres/9.0/share/postgresql/contrib'
/bin/sh 
/opt/postgres/9.0/lib/postgresql/pgxs/src/makefiles/../../config/install-sh 
-c -m 755  rdkit.so '/opt/postgres/9.0/lib/postgresql/rdkit.so'
/bin/sh 
/opt/postgres/9.0/lib/postgresql/pgxs/src/makefiles/../../config/install-sh 
-c -m 644 ./uninstall_rdkit.sql '/opt/postgres/9.0/share/postgresql/contrib'
/bin/sh 
/opt/postgres/9.0/lib/postgresql/pgxs/src/makefiles/../../config/install-sh 
-c -m 644 rdkit.sql '/opt/postgres/9.0/share/postgresql/contrib'
root@ubuntu-lynet-test:/home/jhje/RDKit_2012_03_1/Code/PgSQL/rdkit#

So yes, it can certainly get mixed up, but if you only have a single 
postgres version installed and you build and test on that same machine 
this should not be an issue.

I haven't seen any differences in behavior between the 8.4 and 9.0 
series. I think the build script only changes when you go to 9.1 (?). I 
have the cartridge running fine in postgres 9.0 for a while now and I 
also recently got it installed on a postgres 8.4.5 in an emulated 
Raspberry Pi (ARM architecture) without any issues.

Kind regards
-- Jan

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to