public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/psi4] rawhide: Patch for libxc 7.1.x
@ 2026-07-29 13:42 Susi Lehtola
  0 siblings, 0 replies; only message in thread
From: Susi Lehtola @ 2026-07-29 13:42 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/psi4
Branch : rawhide
Commit : 3057912d419a52bb551f3fd9ad6fbda971552ab3
Author : Susi Lehtola <jussilehtola@fedoraproject.org>
Date   : 2026-07-29T13:42:43+00:00
Stats  : +132/-0 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/psi4/c/3057912d419a52bb551f3fd9ad6fbda971552ab3?branch=rawhide

Log:
Patch for libxc 7.1.x

---
diff --git a/3464.patch b/3464.patch
new file mode 100644
index 0000000..5d1b155
--- /dev/null
+++ b/3464.patch
@@ -0,0 +1,129 @@
+From feb01d8b0803a62b1a437603b0936b840e4cc711 Mon Sep 17 00:00:00 2001
+From: Susi Lehtola <susi.lehtola@gmail.com>
+Date: Fri, 17 Jul 2026 21:06:17 +0300
+Subject: [PATCH 1/3] Fetch libxc 7.1.2
+
+---
+ external/upstream/libxc/CMakeLists.txt | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/external/upstream/libxc/CMakeLists.txt b/external/upstream/libxc/CMakeLists.txt
+index cc7a5bb852a..579b122b16e 100644
+--- a/external/upstream/libxc/CMakeLists.txt
++++ b/external/upstream/libxc/CMakeLists.txt
+@@ -25,8 +25,8 @@ else()
+         # development version of libxc, instead, comment the URL line,
+         # and uncomment the GIT lines.
+         #GIT_REPOSITORY https://gitlab.com/ libxc/libxc.git
+-        #GIT_TAG 5.1.5
+-        URL https://gitlab.com/libxc/libxc/-/archive/7.0.0/libxc-7.0.0.tar.gz  # edit in codedeps
++        #GIT_TAG 7.1.2
++        URL https://gitlab.com/libxc/libxc/-/archive/7.1.2/libxc-7.1.2.tar.gz  # edit in codedeps
+         #UPDATE_COMMAND ""
+         CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${STAGED_INSTALL_PREFIX}
+                    -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
+
+From 5d07be2ec34a617b8e2df12ac9e29c86a98834f5 Mon Sep 17 00:00:00 2001
+From: Susi Lehtola <susi.lehtola@gmail.com>
+Date: Thu, 23 Jul 2026 17:26:54 +0300
+Subject: [PATCH 2/3] dft: TH-FL is LDA_XC_TH_FL in libxc 7.1
+
+libxc 7.1 reclassified the Tozer-Handy TH-FL functional from GGA to LDA,
+so GGA_XC_TH_FL no longer exists (GGA_XC_TH_FC/FCFO/FCO are unaffected).
+Building the functional table therefore failed at import with
+"Could not find required LibXC functional" for XC_GGA_XC_TH_FL.
+Point TH-FL at LDA_XC_TH_FL. Verified: full driver imports and TH-FL,
+PBE, B3LYP energies all compute against system libxc 7.1.2.
+
+Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
+Claude-Session: https://claude.ai/code/session_017ix9BB7uVGBHkcMCrEMmMY
+---
+ psi4/driver/procrouting/dft/libxc_functionals.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/psi4/driver/procrouting/dft/libxc_functionals.py b/psi4/driver/procrouting/dft/libxc_functionals.py
+index d1ed5e1a27b..c63b0e9782d 100644
+--- a/psi4/driver/procrouting/dft/libxc_functionals.py
++++ b/psi4/driver/procrouting/dft/libxc_functionals.py
+@@ -61,7 +61,7 @@
+ funcs.append({"name": "PBELYP1W"       , "xc_functionals": {"GGA_XC_PBELYP1W"           : {}}})
+ funcs.append({"name": "MOHLYP"         , "xc_functionals": {"GGA_XC_MOHLYP"             : {}}})
+ funcs.append({"name": "MOHLYP2"        , "xc_functionals": {"GGA_XC_MOHLYP2"            : {}}})
+-funcs.append({"name": "TH-FL"          , "xc_functionals": {"GGA_XC_TH_FL"              : {}}})
++funcs.append({"name": "TH-FL"          , "xc_functionals": {"LDA_XC_TH_FL"              : {}}})
+ funcs.append({"name": "TH-FC"          , "xc_functionals": {"GGA_XC_TH_FC"              : {}}})
+ funcs.append({"name": "TH-FCFO"        , "xc_functionals": {"GGA_XC_TH_FCFO"            : {}}})
+ funcs.append({"name": "TH-FCO"         , "xc_functionals": {"GGA_XC_TH_FCO"             : {}}})
+
+From db0ecb835c9fe025e53838f65eca95242516fff9 Mon Sep 17 00:00:00 2001
+From: Susi Lehtola <susi.lehtola@gmail.com>
+Date: Thu, 23 Jul 2026 19:58:40 +0300
+Subject: [PATCH 3/3] require libxc >= 7.1.0 for the TH-FL reclassification
+
+The TH-FL functional was renamed GGA_XC_TH_FL -> LDA_XC_TH_FL in libxc 7.1,
+and psi4 now references LDA_XC_TH_FL, so libxc 7.1.0 is the true minimum.
+Bump the find_package constraint to 7.1.0 and drop the v6 fallback: the two
+find_package calls existed only to span major versions v6/v7, but v6 cannot
+provide LDA_XC_TH_FL, so a single v7 (>= 7.1.0) requirement is correct.
+
+Update codedeps.yaml accordingly (constraint 7.1.0; also sync repository
+commit to 7.1.2 to match the already-bumped build tarball URL). Verified
+find_package(Libxc 7.1.0 CONFIG REQUIRED) resolves against libxc 7.1.2.
+
+Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
+Claude-Session: https://claude.ai/code/session_017ix9BB7uVGBHkcMCrEMmMY
+---
+ codedeps.yaml                          | 6 +++---
+ external/upstream/libxc/CMakeLists.txt | 6 +-----
+ psi4/CMakeLists.txt                    | 5 +----
+ 3 files changed, 5 insertions(+), 12 deletions(-)
+
+diff --git a/codedeps.yaml b/codedeps.yaml
+index cab5b48ed8d..5b5da5a2977 100644
+--- a/codedeps.yaml
++++ b/codedeps.yaml
+@@ -929,11 +929,11 @@ data:
+       host: gitlab
+       account: libxc
+       name: libxc
+-      commit: 7.0.0
++      commit: 7.1.2
+     cmake:
+       name: Libxc
+-      constraint: 7.0.0
+-      constraint_note: "v6.1.0 required for HYB_MGGA_XC_R2SCAN0, etc. but v7 preferred"
++      constraint: 7.1.0
++      constraint_note: "v7.1.0 required: LDA_XC_TH_FL was renamed from GGA_XC_TH_FL in libxc 7.1"
+       target: Libxc::xc
+       components:
+         - C
+diff --git a/external/upstream/libxc/CMakeLists.txt b/external/upstream/libxc/CMakeLists.txt
+index 579b122b16e..03cef1d635c 100644
+--- a/external/upstream/libxc/CMakeLists.txt
++++ b/external/upstream/libxc/CMakeLists.txt
+@@ -1,8 +1,4 @@
+-find_package(Libxc 7.0.0 COMPONENTS C CONFIG QUIET)  # edit in codedeps
+-if(NOT ${Libxc_FOUND})
+-    # LibxcConfig.cmake encodes searching only within major version, so need two calls to allow v6 or v7
+-    find_package( Libxc 6.1.0 COMPONENTS C CONFIG QUIET)
+-endif()
++find_package(Libxc 7.1.0 COMPONENTS C CONFIG QUIET)  # edit in codedeps
+ 
+ if(${Libxc_FOUND})
+     get_property(_loc TARGET Libxc::xc PROPERTY LOCATION)
+diff --git a/psi4/CMakeLists.txt b/psi4/CMakeLists.txt
+index 88eba661038..f548dc5ad35 100644
+--- a/psi4/CMakeLists.txt
++++ b/psi4/CMakeLists.txt
+@@ -248,10 +248,7 @@ else()
+     message(STATUS "Disabled BrianQC ${BrianQC_DIR}")
+ endif()
+ 
+-find_package(Libxc 7.0.0 COMPONENTS C CONFIG QUIET)  # edit in codedeps
+-if(NOT ${Libxc_FOUND})
+-    find_package( Libxc 6.1.0 COMPONENTS C CONFIG REQUIRED)
+-endif()
++find_package(Libxc 7.1.0 COMPONENTS C CONFIG REQUIRED)  # edit in codedeps
+ get_property(_loc TARGET Libxc::xc PROPERTY LOCATION)
+ list(APPEND _addons ${_loc})
+ message(STATUS "${Cyan}Using Libxc${ColourReset}: ${_loc} (version ${Libxc_VERSION})")

diff --git a/psi4.spec b/psi4.spec
index 72daf38..5c6608a 100644
--- a/psi4.spec
+++ b/psi4.spec
@@ -24,6 +24,8 @@ Source0:        https://github.com/psi4/psi4/archive/v%{version}/psi4-%{version}
 
 # Make qcmanybody optional, from https://github.com/psi4/psi4/pull/3389.patch
 Patch0:         3389_new.patch
+# Patch for libxc 7.1.x compatibility
+Patch1:         https://github.com/psi4/psi4/pull/3464.patch
 
 BuildRequires:  cmake
 BuildRequires:  bison-devel
@@ -116,6 +118,7 @@ and the quadrature grids.
 %prep
 %setup -q
 %patch -P 0 -p 1 -b .noqcmb
+%patch -P 1 -p 1 -b .libxc710
 # Prevent versioner from seeing any top-level git directories
 sed -i 's/if is_git_repo(cwd=cwd, extraneous_toplevel_patterns=.*):/if False:/' psi4/versioner.py
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-07-29 13:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-29 13:42 [rpms/psi4] rawhide: Patch for libxc 7.1.x Susi Lehtola

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox