public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/libxc] f44: Patch out the i686 issue.
@ 2026-07-17 19:34 Susi Lehtola
0 siblings, 0 replies; only message in thread
From: Susi Lehtola @ 2026-07-17 19:34 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/libxc
Branch : f44
Commit : 769cb8d62a3f7675bab8c4618307a4fa0c61b836
Author : Susi Lehtola <jussilehtola@fedoraproject.org>
Date : 2026-07-17T18:43:00+00:00
Stats : +49/-2 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/libxc/c/769cb8d62a3f7675bab8c4618307a4fa0c61b836?branch=f44
Log:
Patch out the i686 issue.
---
diff --git a/808.patch b/808.patch
new file mode 100644
index 0000000..471fb62
--- /dev/null
+++ b/808.patch
@@ -0,0 +1,44 @@
+From 06ee8c97b019ffca88c586e1fccd8642425d3d55 Mon Sep 17 00:00:00 2001
+From: Susi Lehtola <susi.lehtola@gmail.com>
+Date: Fri, 17 Jul 2026 21:32:22 +0300
+Subject: [PATCH] examples: use the c_size_t kind for np in the Fortran basic
+ example
+
+xc_f03_lda_exc / xc_f03_gga_exc declare np as integer(c_size_t). The example
+passed the literal 5_8 (INTEGER(8)), which matches c_size_t only on 64-bit
+platforms; on 32-bit targets (e.g. i686) c_size_t is 4 bytes and the build
+fails with "Type mismatch in argument 'np' ... passed INTEGER(8) to INTEGER(4)".
+This surfaced now that 7.1.0 compiles the examples as part of the build. Pass
+5_c_size_t instead (portable across ILP32/LP64).
+
+Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
+---
+ examples/fortran/basic.f90 | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/examples/fortran/basic.f90 b/examples/fortran/basic.f90
+index fd33d9a65..d6fef7ac5 100644
+--- a/examples/fortran/basic.f90
++++ b/examples/fortran/basic.f90
+@@ -1,5 +1,6 @@
+ program lxctest
+ use xc_f03_lib_m
++ use iso_c_binding, only : c_size_t
+
+ implicit none
+
+@@ -18,9 +19,9 @@ program lxctest
+
+ select case (xc_f03_func_info_get_family(xc_info))
+ case(XC_FAMILY_LDA)
+- call xc_f03_lda_exc(xc_func, 5_8, rho(1), exc(1))
++ call xc_f03_lda_exc(xc_func, 5_c_size_t, rho(1), exc(1))
+ case(XC_FAMILY_GGA, XC_FAMILY_HYB_GGA)
+- call xc_f03_gga_exc(xc_func, 5_8, rho(1), sigma(1), exc(1))
++ call xc_f03_gga_exc(xc_func, 5_c_size_t, rho(1), sigma(1), exc(1))
+ end select
+
+ do i = 1, 5
+--
+GitLab
+
diff --git a/libxc.spec b/libxc.spec
index 7d0f789..d63645f 100644
--- a/libxc.spec
+++ b/libxc.spec
@@ -19,10 +19,12 @@ Version: 7.1.0
Release: 1%{?dist}
License: MPL-2.0
Source0: https://gitlab.com/libxc/libxc/-/archive/%{version}/%{name}-%{version}.tar.gz
-# Don't rebuild libxc for pylibxc
-Patch0: libxc-7.1.0-pylibxc.patch
URL: http://www.tddft.org/programs/octopus/wiki/index.php/Libxc
+# Hardcode the system libxc library path in pylibxc instead of autodetecting it
+Patch0: libxc-7.1.0-pylibxc.patch
+Patch1: https://gitlab.com/libxc/libxc/-/merge_requests/808.patch
+
BuildRequires: make
BuildRequires: cmake
BuildRequires: gcc
@@ -78,6 +80,7 @@ This package contains the Python3 interface library to libxc.
%prep
%setup -q
%patch 0 -p1 -b .pylibxc
+%patch 1 -p1 -b .example
# Plug in library soversion
sed -i "s|@SOVERSION@|%{soversion}|g;s|@LIBDIR@|%{_libdir}|g" pylibxc/core.py
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-07-17 19:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-17 19:34 [rpms/libxc] f44: Patch out the i686 issue Susi Lehtola
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox