-
Notifications
You must be signed in to change notification settings - Fork 885
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
Ensure pg_config --cppflags are passed #5786
Conversation
@mkindahl, @lkshminarayanan: please review this pull request.
|
@@ -7,8 +7,8 @@ if(UNIX) | |||
set(CMAKE_C_STANDARD 11) | |||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -L${PG_LIBDIR}") | |||
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -L${PG_LIBDIR}") | |||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${PG_CFLAGS}") | |||
set(CMAKE_CPP_FLAGS "${CMAKE_CPP_FLAGS} ${PG_CPPFLAGS}") | |||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${PG_CFLAGS} ${PG_CPPFLAGS}") |
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.
What are you building that needs C++ flags? TimescaleDB itself doesn't use them IIRC. Postgres only uses them for the JIT engine if you configure it with --with-llvm
This line in particular doesn't look correct, you can't generally put the C++ flags into the C ones.
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.
pg_config
passes include paths in the CPPFLAGS
. On my system it looks like this:
-I/opt/homebrew/Cellar/icu4c/72.1/include -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/openssl@1.1/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/Cellar/lz4/1.9.4/include
while OpenSSL and MacOSX13.sdk are correctly discovered in by CMake, it knows nothing about icu4c
and gettext
leading to #2777
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 realized that CPPFLAGS are C preprocessor flags, not C++ flags. CMake doesn't have support for them, so it's OK to just paste them with the rest of the C flags. So this line looks correct.
Codecov Report
@@ Coverage Diff @@
## main #5786 +/- ##
=======================================
Coverage 87.85% 87.85%
=======================================
Files 239 239
Lines 55483 55478 -5
Branches 12288 12287 -1
=======================================
- Hits 48743 48739 -4
+ Misses 4866 4843 -23
- Partials 1874 1896 +22 see 25 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
f12f62d
to
5c263dd
Compare
CMAKE_CPP_FLAGS is not a thing at all. Furthermore, CMAKE_CXX_FLAGS is not passed to a C compiler. pg_config uses CPPGLAGS for all includes, and needs to be passed into CMAKE_C_FLAGS as well.
2146e10
to
54f2eb1
Compare
This release contains bug fixes since the 2.11.0 release. We recommend that you upgrade at the next available opportunity. **Features** * timescale#5909 CREATE INDEX ONLY ON hypertable creates index on chunks * timescale#5923 Feature flags for TimescaleDB features **Bugfixes** * timescale#5680 Fix DISTINCT query with JOIN on multiple segmentby columns * timescale#5774 Fixed two bugs in decompression sorted merge code * timescale#5786 Ensure pg_config --cppflags are passed * timescale#5906 Fix quoting owners in sql scripts. * timescale#5912 Fix crash in 1-step integer policy creation **Thanks** * @mrksngl for submitting a PR to fix extension upgrade scripts * @ericdevries for reporting an issue with DISTINCT queries using segmentby columns of compressed hypertable
This release contains bug fixes since the 2.11.1 release. We recommend that you upgrade at the next available opportunity. **Features** * timescale#5909 CREATE INDEX ONLY ON hypertable creates index on chunks * timescale#5923 Feature flags for TimescaleDB features **Bugfixes** * timescale#5680 Fix DISTINCT query with JOIN on multiple segmentby columns * timescale#5774 Fixed two bugs in decompression sorted merge code * timescale#5786 Ensure pg_config --cppflags are passed * timescale#5906 Fix quoting owners in sql scripts. * timescale#5912 Fix crash in 1-step integer policy creation **Thanks** * @mrksngl for submitting a PR to fix extension upgrade scripts * @ericdevries for reporting an issue with DISTINCT queries using segmentby columns of compressed hypertable
This release contains bug fixes since the 2.11.1 release. We recommend that you upgrade at the next available opportunity. **Features** * timescale#5909 CREATE INDEX ONLY ON hypertable creates index on chunks * timescale#5923 Feature flags for TimescaleDB features **Bugfixes** * timescale#5680 Fix DISTINCT query with JOIN on multiple segmentby columns * timescale#5774 Fixed two bugs in decompression sorted merge code * timescale#5786 Ensure pg_config --cppflags are passed * timescale#5906 Fix quoting owners in sql scripts. * timescale#5912 Fix crash in 1-step integer policy creation **Thanks** * @mrksngl for submitting a PR to fix extension upgrade scripts * @ericdevries for reporting an issue with DISTINCT queries using segmentby columns of compressed hypertable
This release contains bug fixes since the 2.11.1 release. We recommend that you upgrade at the next available opportunity. **Features** * timescale#5909 CREATE INDEX ONLY ON hypertable creates index on chunks * timescale#5923 Feature flags for TimescaleDB features **Bugfixes** * timescale#5680 Fix DISTINCT query with JOIN on multiple segmentby columns * timescale#5774 Fixed two bugs in decompression sorted merge code * timescale#5786 Ensure pg_config --cppflags are passed * timescale#5906 Fix quoting owners in sql scripts. * timescale#5912 Fix crash in 1-step integer policy creation **Thanks** * @mrksngl for submitting a PR to fix extension upgrade scripts * @ericdevries for reporting an issue with DISTINCT queries using segmentby columns of compressed hypertable
This release contains bug fixes since the 2.11.1 release. We recommend that you upgrade at the next available opportunity. **Features** * timescale#5909 CREATE INDEX ONLY ON hypertable creates index on chunks * timescale#5923 Feature flags for TimescaleDB features **Bugfixes** * timescale#5680 Fix DISTINCT query with JOIN on multiple segmentby columns * timescale#5774 Fixed two bugs in decompression sorted merge code * timescale#5786 Ensure pg_config --cppflags are passed * timescale#5906 Fix quoting owners in sql scripts. * timescale#5912 Fix crash in 1-step integer policy creation **Thanks** * @mrksngl for submitting a PR to fix extension upgrade scripts * @ericdevries for reporting an issue with DISTINCT queries using segmentby columns of compressed hypertable
This release contains bug fixes since the 2.11.1 release. We recommend that you upgrade at the next available opportunity. **Features** * timescale#5909 CREATE INDEX ONLY ON hypertable creates index on chunks * timescale#5923 Feature flags for TimescaleDB features **Bugfixes** * timescale#5680 Fix DISTINCT query with JOIN on multiple segmentby columns * timescale#5774 Fixed two bugs in decompression sorted merge code * timescale#5786 Ensure pg_config --cppflags are passed * timescale#5906 Fix quoting owners in sql scripts. * timescale#5912 Fix crash in 1-step integer policy creation **Thanks** * @mrksngl for submitting a PR to fix extension upgrade scripts * @ericdevries for reporting an issue with DISTINCT queries using segmentby columns of compressed hypertable
This release contains bug fixes since the 2.11.1 release. We recommend that you upgrade at the next available opportunity. **Features** * timescale#5923 Feature flags for TimescaleDB features **Bugfixes** * timescale#5680 Fix DISTINCT query with JOIN on multiple segmentby columns * timescale#5774 Fixed two bugs in decompression sorted merge code * timescale#5786 Ensure pg_config --cppflags are passed * timescale#5906 Fix quoting owners in sql scripts. * timescale#5912 Fix crash in 1-step integer policy creation **Thanks** * @mrksngl for submitting a PR to fix extension upgrade scripts * @ericdevries for reporting an issue with DISTINCT queries using segmentby columns of compressed hypertable
This release contains bug fixes since the 2.11.1 release. We recommend that you upgrade at the next available opportunity. **Features** * timescale#5923 Feature flags for TimescaleDB features **Bugfixes** * timescale#5680 Fix DISTINCT query with JOIN on multiple segmentby columns * timescale#5774 Fixed two bugs in decompression sorted merge code * timescale#5786 Ensure pg_config --cppflags are passed * timescale#5906 Fix quoting owners in sql scripts. * timescale#5912 Fix crash in 1-step integer policy creation **Thanks** * @mrksngl for submitting a PR to fix extension upgrade scripts * @ericdevries for reporting an issue with DISTINCT queries using segmentby columns of compressed hypertable
This release contains bug fixes since the 2.11.1 release. We recommend that you upgrade at the next available opportunity. **Features** * #5923 Feature flags for TimescaleDB features **Bugfixes** * #5680 Fix DISTINCT query with JOIN on multiple segmentby columns * #5774 Fixed two bugs in decompression sorted merge code * #5786 Ensure pg_config --cppflags are passed * #5906 Fix quoting owners in sql scripts. * #5912 Fix crash in 1-step integer policy creation **Thanks** * @mrksngl for submitting a PR to fix extension upgrade scripts * @ericdevries for reporting an issue with DISTINCT queries using segmentby columns of compressed hypertable
This release contains bug fixes since the 2.11.1 release. We recommend that you upgrade at the next available opportunity. **Features** * timescale#5923 Feature flags for TimescaleDB features **Bugfixes** * timescale#5680 Fix DISTINCT query with JOIN on multiple segmentby columns * timescale#5774 Fixed two bugs in decompression sorted merge code * timescale#5786 Ensure pg_config --cppflags are passed * timescale#5906 Fix quoting owners in sql scripts. * timescale#5912 Fix crash in 1-step integer policy creation **Thanks** * @mrksngl for submitting a PR to fix extension upgrade scripts * @ericdevries for reporting an issue with DISTINCT queries using segmentby columns of compressed hypertable
This release contains bug fixes since the 2.11.1 release. We recommend that you upgrade at the next available opportunity. **Features** * timescale#5923 Feature flags for TimescaleDB features **Bugfixes** * timescale#5680 Fix DISTINCT query with JOIN on multiple segmentby columns * timescale#5774 Fixed two bugs in decompression sorted merge code * timescale#5786 Ensure pg_config --cppflags are passed * timescale#5906 Fix quoting owners in sql scripts. * timescale#5912 Fix crash in 1-step integer policy creation **Thanks** * @mrksngl for submitting a PR to fix extension upgrade scripts * @ericdevries for reporting an issue with DISTINCT queries using segmentby columns of compressed hypertable
This release contains bug fixes since the 2.11.1 release. We recommend that you upgrade at the next available opportunity. **Features** * #5923 Feature flags for TimescaleDB features **Bugfixes** * #5680 Fix DISTINCT query with JOIN on multiple segmentby columns * #5774 Fixed two bugs in decompression sorted merge code * #5786 Ensure pg_config --cppflags are passed * #5906 Fix quoting owners in sql scripts. * #5912 Fix crash in 1-step integer policy creation **Thanks** * @mrksngl for submitting a PR to fix extension upgrade scripts * @ericdevries for reporting an issue with DISTINCT queries using segmentby columns of compressed hypertable
This release contains bug fixes since the 2.11.1 release. We recommend that you upgrade at the next available opportunity. **Features** * #5923 Feature flags for TimescaleDB features **Bugfixes** * #5680 Fix DISTINCT query with JOIN on multiple segmentby columns * #5774 Fixed two bugs in decompression sorted merge code * #5786 Ensure pg_config --cppflags are passed * #5906 Fix quoting owners in sql scripts. * #5912 Fix crash in 1-step integer policy creation **Thanks** * @mrksngl for submitting a PR to fix extension upgrade scripts * @ericdevries for reporting an issue with DISTINCT queries using segmentby columns of compressed hypertable
This release contains bug fixes since the 2.11.1 release. We recommend that you upgrade at the next available opportunity. **Features** * #5923 Feature flags for TimescaleDB features **Bugfixes** * #5680 Fix DISTINCT query with JOIN on multiple segmentby columns * #5774 Fixed two bugs in decompression sorted merge code * #5786 Ensure pg_config --cppflags are passed * #5906 Fix quoting owners in sql scripts. * #5912 Fix crash in 1-step integer policy creation **Thanks** * @mrksngl for submitting a PR to fix extension upgrade scripts * @ericdevries for reporting an issue with DISTINCT queries using segmentby columns of compressed hypertable
CMAKE_CPP_FLAGS
is not a thing at all. Furthermore,CMAKE_CXX_FLAGS
is not passed to a C compiler.pg_config
usesCPPGLAGS
for all includes, and needs to be propagated intoCMAKE_C_FLAGS
as well.I ran into #2777 on my system and that's what prompted this PR.