-
Notifications
You must be signed in to change notification settings - Fork 146
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
Fix compilation failures for gpdb7. #612
base: madlib2-master
Are you sure you want to change the base?
Conversation
This patch fixes 2 compilation errors: 1. Incomplete type: forget to include the header file `<array>` ``` /home/v/workspace/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 = {{ \ | ^~~~~~~~~~~ ``` 2. `snprintf` gets expanded to `pg_snprintf` in PostgreSQL/Greenplum. ``` In file included from /home/v/.local/gpdb7/include/postgresql/server/c.h:1330, from /home/v/.local/gpdb7/include/postgresql/server/postgres.h:46, from /home/v/workspace/madlib/src/ports/greenplum/dbconnector/dbconnector.hpp:16: /usr/include/boost/assert/source_location.hpp: In member function 'std::string boost::source_location::to_string() const': /usr/include/boost/assert/source_location.hpp:97:9: error: 'pg_snprintf' is not a member of 'std'; did you mean 'vsnprintf'? 97 | BOOST_ASSERT_SNPRINTF( buffer, ":%lu", ln ); | ^~~~~~~~~~~~~~~~~~~~~ /usr/include/boost/assert/source_location.hpp:104:13: error: 'pg_snprintf' is not a member of 'std'; did you mean 'vsnprintf'? 104 | BOOST_ASSERT_SNPRINTF( buffer, ":%lu", co ); | ^~~~~~~~~~~~~~~~~~~~~ ```
Could you post the details of the environment you see these errors? I just re-tested on RHEL8, RHEL9 and Ubuntu 20 and it compiles as expected. With your commit I do get a new compilation error. |
Ah, I'm using ArchLinux. Could you please paste your compilation error with my patch? |
Here is the error.
I think I can work around it by adding -DCXX11=True to the cmake command. |
Thanks! I didn't test my patch against gpdb6. I'll try to do it. |
I was able to get cmake/compile done but it causes a means failure on both rhel8/9 and both gp6/7:
|
https://cmake.org/cmake/help/latest/prop_tgt/CXX_STANDARD.html maybe specify the C++ version by |
Dear Madlib Maintainers, I am writing to raise an issue I encountered while using Madlib. I attempted to execute the following command: ”madpack install -s madlib -p postgres -c postgres@localhost/madlib_db“ However, I found that this command requires a Python 2.x environment. As Python 2.x is no longer maintained and considering that the rest of the Madlib project is based on Python 3.x, this poses a significant compatibility and security issue. I understand the complexities involved in migrating code from Python 2.x to Python 3.x, but given the end of life for Python 2, it is crucial for the long-term sustainability of the Madlib project. Therefore, I kindly request that the team consider updating the madpack install command to be compatible with Python 3.x environments. This change would not only align with the current Python standards but also enhance the usability and security of Madlib. Thank you for your attention to this matter. I appreciate the hard work that goes into maintaining such a valuable project and look forward to a possible update in this regard. |
Python 3 support was released with MADlib 2.x. You can find it in the following branch: https://github.com/apache/madlib/tree/madlib2-master. Is it possible you are using the master branch where Python 2 resides? |
This patch fixes 2 compilation errors:
<array>
snprintf
gets expanded topg_snprintf
in PostgreSQL/Greenplum.