Skip to content
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 builds that use older clang versions #248

Merged
merged 4 commits into from
Oct 3, 2024
Merged

fix builds that use older clang versions #248

merged 4 commits into from
Oct 3, 2024

Conversation

wuputah
Copy link
Collaborator

@wuputah wuputah commented Oct 3, 2024

pass PG_CPPFLAGS and PG_CXXFLAGS to COMPILE.cxx.bc like we did for COMPILE.cc.bc

this fixes the build on ubuntu:22.04

@wuputah wuputah requested review from Y-- and JelteF October 3, 2024 18:13
@wuputah
Copy link
Collaborator Author

wuputah commented Oct 3, 2024

Another cause looks like our %.bc: %.cpp rule isn't being picked up as it's defined before the include. However, if moved after the include, that rule doesn't seem to work.

g++ -Wno-ignored-attributes -Wno-register -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -O2  -Wall -Wpointer-arith -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wshadow=compatible-local -Wformat-security -fno-strict-aliasing -fwrapv -moutline-atomics -g -g -O2 -flto=auto -ffat-lto-objects -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -std=c++17 -Wno-sign-compare -Wno-register  -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -Iinclude -Ithird_party/duckdb/src/include -Ithird_party/duckdb/third_party/re2 -std=c++17 -Wno-sign-compare -Wno-register  -I/usr/include/postgresql/16/server -emit-llvm -c -Wl,-rpath,/usr/lib/postgresql/16/lib/ -lpq -Lthird_party/duckdb/build/release/src -L/usr/lib/postgresql/16/lib -lduckdb -lstdc++ -llz4  -I -o src/pgduckdb.bc src/pgduckdb.cpp
g++: error: unrecognized command-line option '-Xclang'
g++: error: unrecognized command-line option '-no-opaque-pointers'

Copy link
Collaborator

@Y-- Y-- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM if it works :-)

Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
Makefile Show resolved Hide resolved
@JelteF JelteF added the developer experience Improves our own lives label Oct 3, 2024
@wuputah
Copy link
Collaborator Author

wuputah commented Oct 3, 2024

Build is failing for the -Wall issue I mentioned in #240 -- now that duckdb is being recompiled after switching to 24.04.

pass PG_CPPFLAGS and PG_CXXFLAGS to COMPILE.cxx.bc like we did for
COMPILE.cc.bc

this fixes the build on ubuntu:22.04
this rule was not being used as it was replaced when Makefile.global was
included
@wuputah wuputah merged commit 038b92a into main Oct 3, 2024
4 checks passed
@wuputah wuputah deleted the jd/fix-clang-15 branch October 3, 2024 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
developer experience Improves our own lives
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants