-
Notifications
You must be signed in to change notification settings - Fork 0
ADBDEV-8377: Enable build as PG extension for GP/GG #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Build fails for Greengage without #1, so I suggest rewording the description. After doing:
|
According to the documentation, ./configure
make extension-installAlso, according to the same documentation, several Python packages must be installed first. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I built madlib as extension by following commands:
./configure
make extension-install
But it requires to apply patch. Without this patch there are compilation errors:
In file included from /home/evgeniy/gpdb/madlib/src/ports/greenplum/dbconnector/../../postgres/dbconnector/dbconnector.hpp:275:
/home/evgeniy/gpdb/madlib/src/ports/greenplum/dbconnector/../../postgres/dbconnector/Allocator_impl.hpp: In instantiation of ‘madlib::dbconnector::postgres::MutableArrayHandle<T> madlib::dbconnector::postgres::Allocator::allocateArray(std::size_t) const [with T = double; std::size_t = long unsigned int]’:
/home/evgeniy/gpdb/madlib/src/ports/greenplum/dbconnector/../../postgres/dbconnector/EigenIntegration_impl.hpp:311:46: required from ‘ArrayType* madlib::dbconnector::postgres::VectorToNativeArray(const Eigen::MatrixBase<Derived>&) [with Derived = Eigen::Matrix<double, -1, 1>; ArrayType = ArrayType]’
/home/evgeniy/gpdb/madlib/src/ports/greenplum/dbconnector/../../postgres/dbconnector/TypeTraits_impl.hpp:650:5: required from here
/home/evgeniy/gpdb/madlib/src/ports/greenplum/dbconnector/../../postgres/dbconnector/Allocator_impl.hpp:78:50: error: ‘std::array<long unsigned int, 1> numElements’ has incomplete type
78 | std::array<std::size_t, BOOST_PP_INC(n)> numElements = {{ \
| ^~~~~~~~~~~
/usr/include/boost/preprocessor/repetition/limits/repeat_256.hpp:18:36: note: in expansion of macro ‘MADLIB_ALLOCATE_ARRAY_DEF’
18 | # define BOOST_PP_REPEAT_1_1(m, d) m(2, 0, d)
| ^
/home/evgeniy/gpdb/madlib/src/ports/greenplum/dbconnector/../../postgres/dbconnector/Allocator_impl.hpp: In instantiation of ‘madlib::dbconnector::postgres::MutableArrayHandle<T> madlib::dbconnector::postgres::Allocator::allocateArray(std::size_t) const [with T = int; std::size_t = long unsigned int]’:
/home/evgeniy/gpdb/madlib/src/ports/greenplum/dbconnector/../../postgres/dbconnector/EigenIntegration_impl.hpp:311:46: required from ‘ArrayType* madlib::dbconnector::postgres::VectorToNativeArray(const Eigen::MatrixBase<Derived>&) [with Derived = Eigen::Matrix<int, -1, 1>; ArrayType = ArrayType]’
/home/evgeniy/gpdb/madlib/src/ports/greenplum/dbconnector/../../postgres/dbconnector/TypeTraits_impl.hpp:663:5: required from here
/home/evgeniy/gpdb/madlib/src/ports/greenplum/dbconnector/../../postgres/dbconnector/Allocator_impl.hpp:78:50: error: ‘std::array<long unsigned int, 1> numElements’ has incomplete type
78 | std::array<std::size_t, BOOST_PP_INC(n)> numElements = {{ \
| ^~~~~~~~~~~
/usr/include/boost/preprocessor/repetition/limits/repeat_256.hpp:18:36: note: in expansion of macro ‘MADLIB_ALLOCATE_ARRAY_DEF’
18 | # define BOOST_PP_REPEAT_1_1(m, d) m(2, 0, d)
| ^
Madlib creates all objects in the "public" schema:
List of functions
Schema | Name | Result data type | Argument data types | Type
--------+--------------------+-------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------
public | pca_sparse_project | character varying | | func
public | pca_sparse_project | void | source_table text, pc_table text, out_table text, row_id text, col_id text, val_id text, row_dim integer, col_dim integer | func
public | pca_sparse_project | void | source_table text, pc_table text, out_table text, row_id text, col_id text, val_id text, row_dim integer, col_dim integer, residual_table text | func
public | pca_sparse_project | void | source_table text, pc_table text, out_table text, row_id text, col_id text, val_id text, row_dim integer, col_dim integer, residual_table text, result_summary_table text | func
public | pca_sparse_project | character varying | usage_string text | func
(5 rows)
postgres=# \d+
List of relations
Schema | Name | Type | Owner | Storage | Size | Description
--------+-------------------------+----------+---------+---------+--------+-------------
public | migrationhistory | table | evgeniy | heap | 32 kB |
public | migrationhistory_id_seq | sequence | evgeniy | | 128 kB |
(2 rows)
Is it correct? Should we add changes from patch?
I updated the branch and this is no longer needed. |
No, Madlib is installed in the default scheme in search path, but you can always explicitly set the scheme when creating extension. |
on greengage, I hope? |
The system boost needs to be removed, Madlib will put his own. |
I built madlib with changes from #1, but it also requires changes from patch |
of course |
No, I am successfully compiled without additional patches like that (as described in the documentation). |
Madlib does not download required libs, there is just compilation error: |
Can you show a full log? |
|
madlib will put his own boost_1_61_0.tar.gz ! |
|
It would be great to put steps for building extension, making it loaded, verifying it was loaded and running tests to the some description file. README.md has some information but it's not related to greengage and local demo cluster. |
I suggest fixing README in a separate task, because this task is only about |
I think that completed work should include instructions how to use that work, otherwise we and potential users will have to waste a lot of time in a future discovering how to do basic things. |
The current README files don't contain instructions for installing |
|
okay |
Enable build as PG extension for GP/GG
Commit c2ac230 added Madlib building as an extension for Postgres. This patch
adds Madlib building as an extension for Greenplum/Greengage.
Ticket: ADBDEV-8377