Thank you, Paolo. I found a generated export.h in Oxygen, used that, and got
past that issue.
The CMake script enforces a minimum Boost version of Boost-1.56.0, whereas
we’re on Boost-1.55.0. Since I’m using a PGXS-style make now, I tried building
on Boost-1.55.0, and make doesn’t fail. What is it that depends on
Boost-1.56.0 that would probably fail if we’re running on Boost-1.55.0?
The CMake process also replaces some strings in the rdkit--3.8.sql file. One
looks odd, though. In OPERATOR CLASS gin_bfp_ops, the replacement skips over
“5”. Is this expected?
FUNCTION 4 gin_bfp_consistent(internal, int2, bfp, int4, internal,
internal, internal, internal),
FUNCTION 6 gin_bfp_triconsistent(internal, int2, bfp, int4, internal,
internal, internal), -- jlf @RDKIT_GIN_BFP_TRICONSISTENT@
Running with Boost-1.55.0 and using the definition above, without running CMake
(and with a PGXS-style Makefile), rdkit.so does in fact build; however, when
the extension is loaded it fails because symbol rdErrorLog is not defined. How
should I define it with my PGXS-style build process?
postgres=# create extension rdkit;
ERROR: could not load library
"/local/home/jfinnert/workspace/AuroraML/build/RDSManfredDev/RDSManfredDev-Development/RHEL5_64/DEV.STD.PTHREAD/build/RDSManfred/lib/postgresql/rdkit.so":
/local/home/jfinnert/workspace/AuroraML/build/RDSManfredDev/RDSManfredDev-Development/RHEL5_64/DEV.STD.PTHREAD/build/RDSManfred/lib/postgresql/rdkit.so:
undefined symbol: rdErrorLog
Thank you,
/Jim
From: Paolo Tosco <[email protected]>
Date: Sunday, March 29, 2020 at 12:58 PM
To: "Finnerty, Jim" <[email protected]>, "[email protected]"
<[email protected]>
Subject: RE: [EXTERNAL] [Rdkit-devel] PostgreSQL PGXS-style Makefile, and
RDGeneral/export.h: No such file or directory
CAUTION: This email originated from outside of the organization. Do not click
links or open attachments unless you can confirm the sender and know the
content is safe.
Hi Jim,
RDGeneral/export.h is generated when you run cmake; it is not part of the
distribution.
If you do a
mkdir build && cd build && cmake ..
in the RDKit root directory the file will be generated, then you may copy it in
your RDGeneral directory.
It is worth mentioning that the PGXS-style Makefile is currently deprecated;
you can build the PostgreSQL cartridge as part of a standard CMake build by
setting the relevant cmake variables, e.g.
-DRDK_BUILD_PGSQL=ON \
-DRDK_PGSQL_STATIC=ON \
-DPostgreSQL_ROOT=/usr/pgsql-12 \
-DPostgreSQL_INCLUDE_DIR=/usr/pgsql-12/include \
-DPostgreSQL_TYPE_INCLUDE_DIR=/usr/pgsql-12/include/server \
-DPostgreSQL_LIBRARY_DIR=/usr/pgsql-12/lib \
However, if you prefer to use the PGXS-style Makefile, it should work provided
you generate RDGeneral/export.h by running cmake once and then copy it to your
own RDGeneral directory.
I hope the above helps, cheers
p.
On 29/03/2020 17:18, Finnerty, Jim via Rdkit-devel wrote:
Hello RDKit developers. I’m trying to make the RDKit extension available for
use in AWS Aurora PostgreSQL. Usually the way we integrate new extensions is
with a PGXS-style Makefile, and with all of the C or C++ sourcefiles, .config,
PGXS-style Makefile, .sql, and /sql files in one directory.
I copied the following files into a separate build directory (on Linux):
adapter.cpp bfp_gist.c bitstring.c cache.c CMakeLists.txt DataStructs
Geometry guc.c low_gist.c mol_op.c rdkit--3.8.sql rdkit_gist.c
rdkit_io.c README sfp_op.c
bfp_gin.c bfp_op.c bitstring.h cache.h data expected
GraphMol guc.h Makefile RDGeneral rdkit.control rdkit.h
rdkit.sql.in rxn_op.c sql
where /Geometry, /GraphMol, /RDGeneral, and /DataStructs are rsync’d from the
source directories under /Code, rdkit—3.8.sql is generated, and Makefile
replaces what CMake would have generated with a simpler PGXS-style Makefile:
MODULE_big = rdkit
OBJS = adapter.o bfp_gin.o bfp_gist.o bfp_op.o bitstring.o cache.o guc.o
low_gist.o mol_op.o rdkit_gist.o rdkit_io.o rxn_op.o sfp_op.o
EXTENSION = rdkit
DATA = rdkit--3.8.sql
REGRESS = bfpgin bfpgist-91 btree fpgist fps molgist props rdkit-91 reaction
sfpgist slfpgist
PG_CONFIG = pg_config
PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)
When I attempt to ‘make’ with this definition and with these files, I get:
In file included from adapter.cpp:32:0:
./GraphMol/RDKitBase.h:17:30: fatal error: RDGeneral/export.h: No such file or
directory
#include <RDGeneral/export.h>
and this is true: export.h isn’t in /RDGeneral, but it is included from
<GraphMol/RDKitBase.h>, at adapter.cpp line 32.
Where can I find export.h, and why isn’t it in RDGeneral/export.h?
Once I get past this issue, is there some reason why building RDKit in this way
won’t work?
Are the list of source files above complete for building the RDKit extension,
if you don’t need Python wrapper support?
Thank you,
/Jim
_______________________________________________
Rdkit-devel mailing list
[email protected]<mailto:[email protected]>
https://lists.sourceforge.net/lists/listinfo/rdkit-devel
_______________________________________________
Rdkit-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-devel