index : packages | |
Archlinux32 package modifications | gitolite user |
summaryrefslogtreecommitdiff |
-rw-r--r-- | extra/python-qdldl/0001-Fix-i686-builds.patch | 63 |
diff --git a/extra/python-qdldl/0001-Fix-i686-builds.patch b/extra/python-qdldl/0001-Fix-i686-builds.patch new file mode 100644 index 00000000..e8eb42bb --- /dev/null +++ b/extra/python-qdldl/0001-Fix-i686-builds.patch @@ -0,0 +1,63 @@ +From 3516c7a43624d991b05669064ec1c00549f1d853 Mon Sep 17 00:00:00 2001 +From: Tasos Sahanidis <tasos@tasossah.com> +Date: Sun, 8 Sep 2024 20:31:05 +0300 +Subject: [PATCH] Fix i686 builds + +--- + c/amd/include/SuiteSparse_config.h | 1 - + c/amd/include/amd_internal.h | 3 --- + cpp/qdldl.cpp | 5 +++++ + 3 files changed, 5 insertions(+), 4 deletions(-) + +diff --git a/c/amd/include/SuiteSparse_config.h b/c/amd/include/SuiteSparse_config.h +index ea3cea4..5a15deb 100644 +--- a/c/amd/include/SuiteSparse_config.h ++++ b/c/amd/include/SuiteSparse_config.h +@@ -43,7 +43,6 @@ extern "C" { + #endif + + #include "qdldl_types.h" +-#define DLONG + typedef QDLDL_float c_float; + + #include <limits.h> +diff --git a/c/amd/include/amd_internal.h b/c/amd/include/amd_internal.h +index eccde9f..cd745fd 100644 +--- a/c/amd/include/amd_internal.h ++++ b/c/amd/include/amd_internal.h +@@ -38,9 +38,6 @@ + #endif + + #include "qdldl_types.h" +-#ifndef DLONG +-#define DLONG +-#endif + + /* + To enable debugging, uncomment the following line: +diff --git a/cpp/qdldl.cpp b/cpp/qdldl.cpp +index e304dbe..4751926 100644 +--- a/cpp/qdldl.cpp ++++ b/cpp/qdldl.cpp +@@ -1,5 +1,6 @@ + #include "qdldl.hpp" + ++#include "qdldl/include/qdldl_types.h" + using namespace qdldl; + + +@@ -31,7 +32,11 @@ Solver::Solver(QDLDL_int n, QDLDL_int * Ap, QDLDL_int *Ai, QDLDL_float * Ax){ + Pinv = new QDLDL_int[n]; + + // Permutation ++#ifdef DLONG + QDLDL_int amd_status = amd_l_order(nx, Ap, Ai, P, NULL, NULL); ++#else ++ QDLDL_int amd_status = amd_order(nx, Ap, Ai, P, NULL, NULL); ++#endif + if (amd_status < 0) + throw std::runtime_error(std::string("Error in AMD computation ") + std::to_string(amd_status)); + +-- +2.34.1 + |