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

postgresql makefile needs to be updated to use c++17 #5685

Closed
mbanck opened this issue Oct 24, 2022 · 2 comments · Fixed by #5708
Closed

postgresql makefile needs to be updated to use c++17 #5685

mbanck opened this issue Oct 24, 2022 · 2 comments · Fixed by #5708
Labels
bug infrastructure build infrastructure and the like
Milestone

Comments

@mbanck
Copy link
Contributor

mbanck commented Oct 24, 2022

Describe the bug
Build failure:

/usr/bin/clang-14 -xc++ -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -O2  -I/usr/local/include -I/<<PKGBUILDDIR>>/Code -DRDKITVER='"007300"' -DRDK_TOOLKIT_VERSION='"2021.09.02"'   -I. -I/<<PKGBUILDDIR>>/Code/PgSQL/rdkit -I/usr/include/postgresql/15/server -I/usr/include/postgresql/internal  -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2  -emit-llvm -c -o adapter.bc /<<PKGBUILDDIR>>/Code/PgSQL/rdkit/adapter.cpp
In file included from /<<PKGBUILDDIR>>/Code/PgSQL/rdkit/adapter.cpp:49:
In file included from /<<PKGBUILDDIR>>/Code/GraphMol/RDKitBase.h:23:
In file included from /<<PKGBUILDDIR>>/Code/GraphMol/Atom.h:25:
In file included from /<<PKGBUILDDIR>>/Code/RDGeneral/types.h:28:
/<<PKGBUILDDIR>>/Code/RDGeneral/Dict.h:261:26: error: no template named 'is_same_v' in namespace 'std'; did you mean 'is_same'?
    static_assert(! std::is_same_v<T, std::string_view>,
                    ~~~~~^~~~~~~~~
                         is_same

This seems to be related to c++17 and clang-14.

Recompiling 202203.2 with Postgres-15 support (Debian has recently switched) works fine and the same clang command-line is run.

To Reproduce
Build rdkit on Debian unstable

Expected behavior
Build succeeds

Configuration (please complete the following information):

  • RDKit version: 2209.1
  • OS: Debian unstable
  • Python version (if relevant): 3.10.6
  • Are you using conda? no
  • If you are not using conda: how did you install the RDKit? Debian unstable
@mbanck mbanck added the bug label Oct 24, 2022
@greglandrum
Copy link
Member

Hi @mbanck, I’m not sure what we should do here. That is a valid C++17 construct and the 2022.09 release does require C++17.

Could you add a patch on your side until you can use a compiler which fully supports the standard. I can probably help come up with the patch.

@greglandrum greglandrum added not a bug and removed bug labels Oct 29, 2022
@mbanck
Copy link
Contributor Author

mbanck commented Oct 30, 2022

Ah, looks like one has to add -std=c++17 to COMPILE.cxx.bc in Code/PgSQL/rdkit/Makefile (which isn't used by default)

mbanck pushed a commit to debichem/rdkit that referenced this issue Oct 30, 2022
@greglandrum greglandrum added bug infrastructure build infrastructure and the like and removed not a bug labels Oct 31, 2022
@greglandrum greglandrum added this to the 2022_09_2 milestone Oct 31, 2022
@greglandrum greglandrum changed the title 202209.1 build fails on Debian unstable postgresql makefile needs to be updated to use c++17 Oct 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug infrastructure build infrastructure and the like
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants