[From nobody Tue Oct  6 17:37:12 2026
Received: (at submit) by bugs.debian.org; 21 Aug 2026 16:37:13 +0000
X-Spam-Checker-Version: SpamAssassin 4.0.1-bugs.debian.org_2005_01_02
 (2024-03-25) on buxtehude.debian.org
X-Spam-Level: 
X-Spam-Status: No, score=-107.4 required=4.0 tests=ALL_TRUSTED,BAYES_00,
 DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,
 FOURLA,FROMDEVELOPER,FVGT_m_MULTI_ODD,SPF_HELO_NONE,SPF_PASS,
 USER_IN_DKIM_WELCOMELIST autolearn=ham autolearn_force=no
 version=4.0.1-bugs.debian.org_2005_01_02
X-Spam-Bayes: score:0.0000 Tokens: new, 102; hammy, 150; neutral, 177; spammy,
 0. spammytokens:
 hammytokens:0.000-+--Hx-spam-relays-external:sk:stravin,
 0.000-+--H*RT:sk:stravin, 0.000-+--Hx-spam-relays-external:311,
 0.000-+--H*RT:311, 0.000-+--H*RT:108
Return-path: &lt;rafael@debian.org&gt;
Received: from stravinsky.debian.org ([2001:41b8:202:deb::311:108]:39182)
 by buxtehude.debian.org with esmtps
 (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256)
 (Exim 4.96) (envelope-from &lt;rafael@debian.org&gt;) id 1wxSEy-009O9R-2r
 for submit@bugs.debian.org; Fri, 21 Aug 2026 16:37:13 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debian.org; 
 s=smtpauto.stravinsky;
 h=X-Debian-User:Content-Transfer-Encoding:Content-Type
 :MIME-Version:Message-ID:Subject:To:From:Date:Reply-To:Cc:Content-ID:
 Content-Description:In-Reply-To:References;
 bh=2gW5R7iudOKEx4bWM4uU+1Wwp9U1jmg5ANTIcDfdI/k=; b=iP5+VYZKhky46f8TvkS3NXSFcl
 SOkbGFI852JBZqJy183oe5aZgFAWgw7Zaa3gn/Vd8051+xFqvogeZIi+dYWaBv9iTX0Pl+fwHNtaL
 i/0NF3qb+1s6tFgw6qCCiOV86rQtIclabzJ8NKV4zOnWak4DMC9DTFaNeVMc++BncynXB8URfhxsb
 x2S6Y7PVz9zCTjh+xmmP2A/bCRqLQ7bbo3CWOQVobR0GaFSoBwzaro2Ay6ujC4xWNEVKk1VWGrhuR
 ORN+gfuAUUAQS6WrH9+yoKntpE1re36hS2kaqCkmmtJRDLEjZ9SixFP9epHIH+mEa8IsyqZmzhwhX
 Kz4WTNtQ==;
Received: from authenticated-user by stravinsky.debian.org with esmtpsa
 (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256)
 (Exim 4.96) (envelope-from &lt;rafael@debian.org&gt;) id 1wxSEx-00BTRP-0t
 for submit@bugs.debian.org; Fri, 21 Aug 2026 16:37:11 +0000
Received: from rafael by laboissiere.net with local (Exim 4.100-RC3)
 (envelope-from &lt;rafael@laboissiere.net&gt;) id 1wxSEw-0000000BOEY-365Z;
 Fri, 21 Aug 2026 18:37:10 +0200
Date: Fri, 21 Aug 2026 18:37:10 +0200
From: Rafael =?utf-8?Q?Laboissi=C3=A8re?= &lt;rafael@debian.org&gt;
To: Debian Bug Tracking System &lt;submit@bugs.debian.org&gt;
Subject: casadi: FTBFS with swig 4.5.0
Message-ID: &lt;aoh-th63gwxPFXbs@laboissiere.net&gt;
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
Organization: Debian GNU/Linux
X-Content-Language: en-us
X-Position: 153
X-Debian-User: rafael
Delivered-To: submit@bugs.debian.org

Source: casadi
Version: 3.7.2+ds2-1
Severity: serious
Tags: ftbfs sid forky
Justification: Policy 4.9
User: rafael@debian.org
Usertags: swig-4.5.0

Dear Maintainer,

The casadi package FTBFS with swig 4.5.0, which is currently in unstable. An excerpt of the build log is shown below.

This is due to the removal of the Python 2 compatibility macros in version 4.5.0. According to the SWIG authors, these macros were retained in the generated code (pyhead.swg) solely for user typemaps. Any typemap using these macros must be updated to call the Python 3 C API directly.

Best,

Rafael Laboissière

##### Build log excerpt

[ 60%] Building CXX object casadi/solvers/CMakeFiles/casadi_conic_ipqp.dir/ipqp_meta.cpp.o
cd &lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/casadi/solvers &amp;&amp; /usr/bin/x86_64-linux-gnu-g++ -DCASADI_DEFAULT_COMPILER_PLUGIN=shell -DCASADI_IS_RELEASE=1 -DCASADI_MAJOR_VERSION=3 -DCASADI_MINOR_VERSION
=7 -DCASADI_PATCH_VERSION=2 -DCASADI_SNPRINTF=snprintf -DCASADI_VERSION=31 -DHAVE_MKSTEMPS -DUSE_CXX11 -DWITH_DEEPBIND -DWITH_DEPRECATED_FEATURES -DWITH_DL -D_SCL_SECURE_NO_WARNINGS -D_USE_MATH_DEFINES -Dcasadi_
conic_ipqp_EXPORTS -I&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/. -I&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu -I&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/casadi/core/runtime -I&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+
ds2/casadi/core/../.. -I&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/casadi/core/../.. -g -O2 -ffile-prefix-map=&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2=. -fstack-protector-strong -fstack-clash-protection -Wformat 
-Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC  -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -MD -MT casadi/solvers/CMakeFiles/casadi_conic_ipqp.dir/ipqp_meta.cpp.o -MF CM
akeFiles/casadi_conic_ipqp.dir/ipqp_meta.cpp.o.d -o CMakeFiles/casadi_conic_ipqp.dir/ipqp_meta.cpp.o -c &lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/casadi/solvers/ipqp_meta.cpp
&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/swig/casadiPYTHON_wrap.cxx: In function ‘PyObject* casadi::full(const DM&amp;, bool)’:
&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/swig/casadiPYTHON_wrap.cxx:5591:31: error: ‘PyString_FromString’ was not declared in this scope; did you mean ‘PyLong_FromString’?
 5591 |       PyObject *method_name = PyString_FromString(&quot;toarray&quot;);
      |                               ^~~~~~~~~~~~~~~~~~~
      |                               PyLong_FromString
&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/swig/casadiPYTHON_wrap.cxx: In function ‘PyObject* casadi::get_Python_helper(const std::string&amp;)’:
&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/swig/casadiPYTHON_wrap.cxx:5644:26: error: ‘PyString_FromString’ was not declared in this scope; did you mean ‘PyLong_FromString’?
 5644 |       PyObject* c_name = PyString_FromString(&quot;casadi&quot;);
      |                          ^~~~~~~~~~~~~~~~~~~
      |                          PyLong_FromString
&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/swig/casadiPYTHON_wrap.cxx: In function ‘bool casadi::to_ptr(PyObject*, std::vector&lt;T&gt;**)’:
&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/swig/casadiPYTHON_wrap.cxx:6204:30: error: there are no arguments to ‘PyString_Check’ that depend on a template parameter, so a declaration of ‘PyString_Check’
 must be available [-Wtemplate-body]
 6204 |       if (PyDict_Check(p) || PyString_Check(p) || PySet_Check(p) || PyUnicode_Check(p)) return false;
      |                              ^~~~~~~~~~~~~~
&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/swig/casadiPYTHON_wrap.cxx:6204:30: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/swig/casadiPYTHON_wrap.cxx: In function ‘bool casadi::to_ptr(PyObject*, std::string**)’:
&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/swig/casadiPYTHON_wrap.cxx:6480:11: error: ‘PyString_Check’ was not declared in this scope; did you mean ‘PyMapping_Check’?
 6480 |       if (PyString_Check(p) || PyUnicode_Check(p)) {
      |           ^~~~~~~~~~~~~~
      |           PyMapping_Check
&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/swig/casadiPYTHON_wrap.cxx: In function ‘PyObject* casadi::from_ptr(const std::string*)’:
&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/swig/casadiPYTHON_wrap.cxx:6515:14: error: ‘PyString_FromString’ was not declared in this scope; did you mean ‘PyLong_FromString’?
 6515 |       return PyString_FromString(a-&gt;c_str());
      |              ^~~~~~~~~~~~~~~~~~~
      |              PyLong_FromString
&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/swig/casadiPYTHON_wrap.cxx: In function ‘bool casadi::to_ptr(PyObject*, Slice**)’:
&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/swig/casadiPYTHON_wrap.cxx:6539:11: error: ‘PyInt_Check’ was not declared in this scope; did you mean ‘PySet_Check’?
 6539 |       if (PyInt_Check(p)) {
      |           ^~~~~~~~~~~
      |           PySet_Check
&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/swig/casadiPYTHON_wrap.cxx:6541:25: error: ‘PyInt_AsLong’ was not declared in this scope; did you mean ‘PyLong_AsLong’?
 6541 |           (**m).start = PyInt_AsLong(p);
      |                         ^~~~~~~~~~~~
      |                         PyLong_AsLong
&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/swig/casadiPYTHON_wrap.cxx:6552:56: error: ‘PyInt_AsLong’ was not declared in this scope; did you mean ‘PyLong_AsLong’?
 6552 |             ? std::numeric_limits&lt;casadi_int&gt;::min() : PyInt_AsLong(r-&gt;start);
      |                                                        ^~~~~~~~~~~~
      |                                                        PyLong_AsLong
&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/swig/casadiPYTHON_wrap.cxx: In function ‘bool casadi::to_ptr(PyObject*, std::map&lt;std::__cxx11::basic_string&lt;char&gt;, T2&gt;**)’:
&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/swig/casadiPYTHON_wrap.cxx:6579:17: error: there are no arguments to ‘PyString_Check’ that depend on a template parameter, so a declaration of ‘PyString_Check’
 must be available [-Wtemplate-body]
 6579 |           if (!(PyString_Check(key) || PyUnicode_Check(key))) return false;
      |                 ^~~~~~~~~~~~~~
[ 61%] Building CXX object casadi/solvers/CMakeFiles/casadi_nlpsol_qrsqp.dir/qrsqp_meta.cpp.o
cd &lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/casadi/solvers &amp;&amp; /usr/bin/x86_64-linux-gnu-g++ -DCASADI_DEFAULT_COMPILER_PLUGIN=shell -DCASADI_IS_RELEASE=1 -DCASADI_MAJOR_VERSION=3 -DCASADI_MINOR_VERSION
=7 -DCASADI_PATCH_VERSION=2 -DCASADI_SNPRINTF=snprintf -DCASADI_VERSION=31 -DHAVE_MKSTEMPS -DUSE_CXX11 -DWITH_DEEPBIND -DWITH_DEPRECATED_FEATURES -DWITH_DL -D_SCL_SECURE_NO_WARNINGS -D_USE_MATH_DEFINES -Dcasadi_
nlpsol_qrsqp_EXPORTS -I&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/. -I&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu -I&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/casadi/core/runtime -I&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.
2+ds2/casadi/core/../.. -I&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/casadi/core/../.. -g -O2 -ffile-prefix-map=&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2=. -fstack-protector-strong -fstack-clash-protection -Wforma
t -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC  -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -MD -MT casadi/solvers/CMakeFiles/casadi_nlpsol_qrsqp.dir/qrsqp_meta.cpp.o -
MF CMakeFiles/casadi_nlpsol_qrsqp.dir/qrsqp_meta.cpp.o.d -o CMakeFiles/casadi_nlpsol_qrsqp.dir/qrsqp_meta.cpp.o -c &lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/casadi/solvers/qrsqp_meta.cpp
&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/swig/casadiPYTHON_wrap.cxx: In instantiation of ‘bool casadi::to_ptr(PyObject*, std::vector&lt;T&gt;**) [with M = long long int; PyObject = _object]’:
&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/swig/casadiPYTHON_wrap.cxx:11657:22:   required from here
11657 |   if (!casadi::to_ptr(swig_obj[0], &amp;arg1)) SWIG_exception_fail(SWIG_TypeError,&quot;Failed to convert input 1 to type '&quot; &quot;[&quot; &quot;int&quot; &quot;]&quot; &quot;'.&quot;);
      |        ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/swig/casadiPYTHON_wrap.cxx:6204:44: error: ‘PyString_Check’ was not declared in this scope; did you mean ‘PyMapping_Check’?
 6204 |       if (PyDict_Check(p) || PyString_Check(p) || PySet_Check(p) || PyUnicode_Check(p)) return false;
      |                              ~~~~~~~~~~~~~~^~~
      |                              PyMapping_Check
&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/swig/casadiPYTHON_wrap.cxx: In instantiation of ‘bool casadi::to_ptr(PyObject*, std::vector&lt;T&gt;**) [with M = bool; PyObject = _object]’:
&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/swig/casadiPYTHON_wrap.cxx:16475:22:   required from here
16475 |   if (!casadi::to_ptr(swig_obj[6], &amp;arg7)) SWIG_exception_fail(SWIG_TypeError,&quot;Failed to convert input to type '&quot; &quot;[&quot; &quot;bool&quot; &quot;]&quot; &quot;'.&quot;);
      |        ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/swig/casadiPYTHON_wrap.cxx:6204:44: error: ‘PyString_Check’ was not declared in this scope; did you mean ‘PyMapping_Check’?
 6204 |       if (PyDict_Check(p) || PyString_Check(p) || PySet_Check(p) || PyUnicode_Check(p)) return false;
      |                              ~~~~~~~~~~~~~~^~~
      |                              PyMapping_Check
&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/swig/casadiPYTHON_wrap.cxx: In instantiation of ‘bool casadi::to_ptr(PyObject*, std::map&lt;std::__cxx11::basic_string&lt;char&gt;, T2&gt;**) [with M = GenericType; PyObje
ct = _object]’:
&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/swig/casadiPYTHON_wrap.cxx:17021:24:   required from here
17021 |     if (!casadi::to_ptr(swig_obj[2], &amp;arg4)) SWIG_exception_fail(SWIG_TypeError,&quot;Failed to convert input 4 to type '&quot; &quot;dict&quot; &quot;'.&quot;);
      |          ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/swig/casadiPYTHON_wrap.cxx:6579:31: error: ‘PyString_Check’ was not declared in this scope; did you mean ‘PyMapping_Check’?
 6579 |           if (!(PyString_Check(key) || PyUnicode_Check(key))) return false;
      |                 ~~~~~~~~~~~~~~^~~~~
      |                 PyMapping_Check
&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/swig/casadiPYTHON_wrap.cxx: In instantiation of ‘bool casadi::to_ptr(PyObject*, std::vector&lt;T&gt;**) [with M = double; PyObject = _object]’:
&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/swig/casadiPYTHON_wrap.cxx:18763:22:   required from here
18763 |   if (!casadi::to_ptr(swig_obj[0], &amp;arg1)) SWIG_exception_fail(SWIG_TypeError,&quot;Failed to convert input 1 to type '&quot; &quot;[&quot; &quot;float&quot; &quot;]&quot; &quot;'.&quot;);
      |        ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/swig/casadiPYTHON_wrap.cxx:6204:44: error: ‘PyString_Check’ was not declared in this scope; did you mean ‘PyMapping_Check’?
 6204 |       if (PyDict_Check(p) || PyString_Check(p) || PySet_Check(p) || PyUnicode_Check(p)) return false;
      |                              ~~~~~~~~~~~~~~^~~
      |                              PyMapping_Check
&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/swig/casadiPYTHON_wrap.cxx: In instantiation of ‘bool casadi::to_ptr(PyObject*, std::vector&lt;T&gt;**) [with M = Matrix&lt;double&gt;; PyObject = _object]’:
&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/swig/casadiPYTHON_wrap.cxx:25350:22:   required from here
25350 |   if (!casadi::to_ptr(swig_obj[1], &amp;arg2)) SWIG_exception_fail(SWIG_TypeError,&quot;Failed to convert input 2 to type '&quot; &quot;[&quot; &quot;DM&quot; &quot;]&quot; &quot;'.&quot;);
      |        ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/swig/casadiPYTHON_wrap.cxx:6204:44: error: ‘PyString_Check’ was not declared in this scope; did you mean ‘PyMapping_Check’?
 6204 |       if (PyDict_Check(p) || PyString_Check(p) || PySet_Check(p) || PyUnicode_Check(p)) return false;
      |                              ~~~~~~~~~~~~~~^~~
      |                              PyMapping_Check
&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/swig/casadiPYTHON_wrap.cxx: In instantiation of ‘bool casadi::to_ptr(PyObject*, std::vector&lt;T&gt;**) [with M = SXElem; PyObject = _object]’:
&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/swig/casadiPYTHON_wrap.cxx:28209:22:   required from here
28209 |   if (!casadi::to_ptr(swig_obj[0], &amp;arg1)) SWIG_exception_fail(SWIG_TypeError,&quot;Failed to convert input 1 to type '&quot; &quot;[&quot; &quot;SXElem&quot; &quot;]&quot; &quot;'.&quot;);
      |        ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/swig/casadiPYTHON_wrap.cxx:6204:44: error: ‘PyString_Check’ was not declared in this scope; did you mean ‘PyMapping_Check’?
 6204 |       if (PyDict_Check(p) || PyString_Check(p) || PySet_Check(p) || PyUnicode_Check(p)) return false;
      |                              ~~~~~~~~~~~~~~^~~
      |                              PyMapping_Check
&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/swig/casadiPYTHON_wrap.cxx: In instantiation of ‘bool casadi::to_ptr(PyObject*, std::vector&lt;T&gt;**) [with M = Matrix&lt;SXElem&gt;; PyObject = _object]’:
&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/swig/casadiPYTHON_wrap.cxx:30132:22:   required from here
30132 |   if (!casadi::to_ptr(swig_obj[1], &amp;arg2)) SWIG_exception_fail(SWIG_TypeError,&quot;Failed to convert input 2 to type '&quot; &quot;[&quot; &quot;SX&quot; &quot;]&quot; &quot;'.&quot;);
      |        ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/swig/casadiPYTHON_wrap.cxx:6204:44: error: ‘PyString_Check’ was not declared in this scope; did you mean ‘PyMapping_Check’?
 6204 |       if (PyDict_Check(p) || PyString_Check(p) || PySet_Check(p) || PyUnicode_Check(p)) return false;
      |                              ~~~~~~~~~~~~~~^~~
      |                              PyMapping_Check
&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/swig/casadiPYTHON_wrap.cxx: In instantiation of ‘bool casadi::to_ptr(PyObject*, std::vector&lt;T&gt;**) [with M = MX; PyObject = _object]’:
&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/swig/casadiPYTHON_wrap.cxx:34506:22:   required from here
34506 |   if (!casadi::to_ptr(swig_obj[1], &amp;arg2)) SWIG_exception_fail(SWIG_TypeError,&quot;Failed to convert input 2 to type '&quot; &quot;[&quot; &quot;MX&quot; &quot;]&quot; &quot;'.&quot;);
      |        ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/swig/casadiPYTHON_wrap.cxx:6204:44: error: ‘PyString_Check’ was not declared in this scope; did you mean ‘PyMapping_Check’?
 6204 |       if (PyDict_Check(p) || PyString_Check(p) || PySet_Check(p) || PyUnicode_Check(p)) return false;
      |                              ~~~~~~~~~~~~~~^~~
      |                              PyMapping_Check
&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/swig/casadiPYTHON_wrap.cxx: In instantiation of ‘bool casadi::to_ptr(PyObject*, std::vector&lt;T&gt;**) [with M = std::__cxx11::basic_string&lt;char&gt;; PyObject = _objec
t]’:
&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/swig/casadiPYTHON_wrap.cxx:38233:22:   required from here
38233 |   if (!casadi::to_ptr(swig_obj[3], &amp;arg4)) SWIG_exception_fail(SWIG_TypeError,&quot;Failed to convert input 4 to type '&quot; &quot;[&quot; &quot;str&quot; &quot;]&quot; &quot;'.&quot;);
      |        ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/swig/casadiPYTHON_wrap.cxx:6204:44: error: ‘PyString_Check’ was not declared in this scope; did you mean ‘PyMapping_Check’?
 6204 |       if (PyDict_Check(p) || PyString_Check(p) || PySet_Check(p) || PyUnicode_Check(p)) return false;
      |                              ~~~~~~~~~~~~~~^~~
      |                              PyMapping_Check
&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/swig/casadiPYTHON_wrap.cxx: In instantiation of ‘bool casadi::to_ptr(PyObject*, std::map&lt;std::__cxx11::basic_string&lt;char&gt;, T2&gt;**) [with M = Matrix&lt;SXElem&gt;; PyO
bject = _object]’:
&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/swig/casadiPYTHON_wrap.cxx:38274:22:   required from here
38274 |   if (!casadi::to_ptr(swig_obj[1], &amp;arg2)) SWIG_exception_fail(SWIG_TypeError,&quot;Failed to convert input 2 to type '&quot; &quot;dict&quot; &quot;:&quot; &quot;SX&quot; &quot;'.&quot;);
      |        ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/swig/casadiPYTHON_wrap.cxx:6579:31: error: ‘PyString_Check’ was not declared in this scope; did you mean ‘PyMapping_Check’?
 6579 |           if (!(PyString_Check(key) || PyUnicode_Check(key))) return false;
      |                 ~~~~~~~~~~~~~~^~~~~
      |                 PyMapping_Check
&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/swig/casadiPYTHON_wrap.cxx: In instantiation of ‘bool casadi::to_ptr(PyObject*, std::map&lt;std::__cxx11::basic_string&lt;char&gt;, T2&gt;**) [with M = MX; PyObject = _obj
ect]’:
&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/swig/casadiPYTHON_wrap.cxx:38403:22:   required from here
38403 |   if (!casadi::to_ptr(swig_obj[1], &amp;arg2)) SWIG_exception_fail(SWIG_TypeError,&quot;Failed to convert input 2 to type '&quot; &quot;dict&quot; &quot;:&quot; &quot;MX&quot; &quot;'.&quot;);
      |        ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/swig/casadiPYTHON_wrap.cxx:6579:31: error: ‘PyString_Check’ was not declared in this scope; did you mean ‘PyMapping_Check’?
 6579 |           if (!(PyString_Check(key) || PyUnicode_Check(key))) return false;
      |                 ~~~~~~~~~~~~~~^~~~~
      |                 PyMapping_Check
&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/swig/casadiPYTHON_wrap.cxx: In instantiation of ‘bool casadi::to_ptr(PyObject*, std::vector&lt;T&gt;**) [with M = Sparsity; PyObject = _object]’:
&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/swig/casadiPYTHON_wrap.cxx:38499:22:   required from here
38499 |   if (!casadi::to_ptr(swig_obj[4], &amp;arg5)) SWIG_exception_fail(SWIG_TypeError,&quot;Failed to convert input 5 to type '&quot; &quot;[&quot; &quot;Sparsity&quot; &quot;]&quot; &quot;'.&quot;);
      |        ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/swig/casadiPYTHON_wrap.cxx:6204:44: error: ‘PyString_Check’ was not declared in this scope; did you mean ‘PyMapping_Check’?
 6204 |       if (PyDict_Check(p) || PyString_Check(p) || PySet_Check(p) || PyUnicode_Check(p)) return false;
      |                              ~~~~~~~~~~~~~~^~~
      |                              PyMapping_Check
&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/swig/casadiPYTHON_wrap.cxx: In instantiation of ‘bool casadi::to_ptr(PyObject*, std::map&lt;std::__cxx11::basic_string&lt;char&gt;, T2&gt;**) [with M = std::vector&lt;std::__
cxx11::basic_string&lt;char&gt; &gt;; PyObject = _object]’:
&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/swig/casadiPYTHON_wrap.cxx:40899:24:   required from here
40899 |     if (!casadi::to_ptr(swig_obj[4], &amp;arg5)) SWIG_exception_fail(SWIG_TypeError,&quot;Failed to convert input 5 to type '&quot; &quot;dict&quot; &quot;:&quot; &quot;[&quot; &quot;str&quot; &quot;]&quot; &quot;'.&quot;);
      |          ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/swig/casadiPYTHON_wrap.cxx:6579:31: error: ‘PyString_Check’ was not declared in this scope; did you mean ‘PyMapping_Check’?
 6579 |           if (!(PyString_Check(key) || PyUnicode_Check(key))) return false;
      |                 ~~~~~~~~~~~~~~^~~~~
      |                 PyMapping_Check
&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/swig/casadiPYTHON_wrap.cxx: In instantiation of ‘bool casadi::to_ptr(PyObject*, std::map&lt;std::__cxx11::basic_string&lt;char&gt;, T2&gt;**) [with M = Matrix&lt;double&gt;; PyO
bject = _object]’:
&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/swig/casadiPYTHON_wrap.cxx:41831:22:   required from here
41831 |   if (!casadi::to_ptr(swig_obj[1], &amp;arg2)) SWIG_exception_fail(SWIG_TypeError,&quot;Failed to convert input 2 to type '&quot; &quot;dict&quot; &quot;:&quot; &quot;DM&quot; &quot;'.&quot;);
      |        ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/swig/casadiPYTHON_wrap.cxx:6579:31: error: ‘PyString_Check’ was not declared in this scope; did you mean ‘PyMapping_Check’?
 6579 |           if (!(PyString_Check(key) || PyUnicode_Check(key))) return false;
      |                 ~~~~~~~~~~~~~~^~~~~
      |                 PyMapping_Check
&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/swig/casadiPYTHON_wrap.cxx: In instantiation of ‘bool casadi::to_ptr(PyObject*, std::vector&lt;T&gt;**) [with M = Function; PyObject = _object]’:
&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/swig/casadiPYTHON_wrap.cxx:42977:22:   required from here
42977 |   if (!casadi::to_ptr(swig_obj[1], &amp;arg2)) SWIG_exception_fail(SWIG_TypeError,&quot;Failed to convert input 2 to type '&quot; &quot;[&quot; &quot;Function&quot; &quot;]&quot; &quot;'.&quot;);
      |        ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/swig/casadiPYTHON_wrap.cxx:6204:44: error: ‘PyString_Check’ was not declared in this scope; did you mean ‘PyMapping_Check’?
 6204 |       if (PyDict_Check(p) || PyString_Check(p) || PySet_Check(p) || PyUnicode_Check(p)) return false;
      |                              ~~~~~~~~~~~~~~^~~
      |                              PyMapping_Check
&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/swig/casadiPYTHON_wrap.cxx: In instantiation of ‘bool casadi::to_ptr(PyObject*, std::map&lt;std::__cxx11::basic_string&lt;char&gt;, T2&gt;**) [with M = Sparsity; PyObject 
= _object]’:
&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/swig/casadiPYTHON_wrap.cxx:48392:22:   required from here
48392 |   if (!casadi::to_ptr(swig_obj[2], &amp;arg3)) SWIG_exception_fail(SWIG_TypeError,&quot;Failed to convert input 3 to type '&quot; &quot;dict&quot; &quot;:&quot; &quot;Sparsity&quot; &quot;'.&quot;);
      |        ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/swig/casadiPYTHON_wrap.cxx:6579:31: error: ‘PyString_Check’ was not declared in this scope; did you mean ‘PyMapping_Check’?
 6579 |           if (!(PyString_Check(key) || PyUnicode_Check(key))) return false;
      |                 ~~~~~~~~~~~~~~^~~~~
      |                 PyMapping_Check
&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/swig/casadiPYTHON_wrap.cxx: In instantiation of ‘bool casadi::to_ptr(PyObject*, std::vector&lt;T&gt;**) [with M = GenericType; PyObject = _object]’:
&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/swig/casadiPYTHON_wrap.cxx:95754:22:   required from here
95754 |   if (!casadi::to_ptr(swig_obj[1], &amp;arg2)) SWIG_exception_fail(SWIG_TypeError,&quot;Failed to convert input 2 to type '&quot; &quot;[&quot; &quot;GenericType&quot; &quot;]&quot; &quot;'.&quot;);
      |        ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
&lt;&lt;BUILD-DIR&gt;&gt;/casadi-3.7.2+ds2/obj-x86_64-linux-gnu/swig/casadiPYTHON_wrap.cxx:6204:44: error: ‘PyString_Check’ was not declared in this scope; did you mean ‘PyMapping_Check’?
 6204 |       if (PyDict_Check(p) || PyString_Check(p) || PySet_Check(p) || PyUnicode_Check(p)) return false;
      |                              ~~~~~~~~~~~~~~^~~
      |                              PyMapping_Check
]