Hello Kevin

Any chance we can cherry-pick the fix for this?
https://github.com/zeroc-ice/ice/pull/2910/files

While the upstream issue report is tied to the milestone for the next
release, there's no indication when that might be, and the previous
release was quite awhile ago.

I'm inquiring as this is blocking mumble, which I'd like to see make it
into trixie.

I want Mumble released too so I had a look at the above pull -- unfortunately it doesn't directly apply. zeroc-ice upstream hasn't had a release since Nov 2023 and there's been 1500+ commits since then. :-(

I attempted to create a patch based on the upstream 2910 pull to fix the build. The patch blow doesn't fix the build, but it does change the build error, and I've attached the tail of the build log to show the error.

   -- Chris

--
Chris Knadle
chris.kna...@coredump.us
--- a/python/modules/IcePy/Types.cpp
+++ b/python/modules/IcePy/Types.cpp
@@ -462,7 +462,7 @@
         throw AbortMarshaling();
     }
 
-    PyObjectHandle sd = PyEval_CallObject(_slicedDataType, args.get());
+    PyObjectHandle sd = PyObject_CallObject(_slicedDataType, nullptr);
     if(!sd.get())
     {
         assert(PyErr_Occurred());
@@ -488,7 +488,7 @@
     int i = 0;
     for(vector<Ice::SliceInfoPtr>::const_iterator p = slicedData->slices.begin(); p != slicedData->slices.end(); ++p)
     {
-        PyObjectHandle slice = PyEval_CallObject(_sliceInfoType, args.get());
+        PyObjectHandle slice = PyObject_CallObject(_sliceInfoType, nullptr);
         if(!slice.get())
         {
             assert(PyErr_Occurred());
@@ -1669,18 +1669,17 @@
             Py_ssize_t sz = 0;
             if(p != Py_None)
             {
-                const void* buf = 0;
-                if(PyObject_AsReadBuffer(p, &buf, &sz) == 0)
+                Py_buffer pybuf;
+                if (pi && PyObject_GetBuffer(p, &pybuf, PyBUF_SIMPLE | PyBUF_FORMAT) == 0)
                 {
-                    if(pi->kind == PrimitiveInfo::KindString)
-                    {
-                        PyErr_Format(PyExc_ValueError, STRCAST("expected sequence value"));
-                        throw AbortMarshaling();
-                    }
+                    // Strings are handled as variable length types above.
+                    assert(pi->kind != PrimitiveInfo::KindString);
+                    sz = pybuf.len;
+                    PyBuffer_Release(&pybuf);
                 }
                 else
                 {
-                    PyErr_Clear(); // PyObject_AsReadBuffer sets an exception on failure.
+                    PyErr_Clear(); // PyObject_GetBuffer sets an exception on failure.
 
                     PyObjectHandle fs;
                     if(pi)
@@ -1906,7 +1905,7 @@
     if(pi->kind != PrimitiveInfo::KindString)
     {
         //
-        // With Python 3 and greater we marshal sequences of pritive types using the new
+        // With Python 3 and greater we marshal sequences of primitive types using the new
         // buffer protocol when possible, for older versions we use the old buffer protocol.
         //
 #if PY_VERSION_HEX >= 0x03000000
@@ -2030,7 +2029,7 @@
         }
         else
         {
-            PyErr_Clear(); // PyObject_GetBuffer/PyObject_AsReadBuffer sets an exception on failure.
+            PyErr_Clear(); // PyObject_GetBuffer sets an exception on failure.
         }
     }
 
--- a/python/modules/IcePy/Util.cpp
+++ b/python/modules/IcePy/Util.cpp
@@ -729,12 +729,7 @@
 IcePy::createExceptionInstance(PyObject* type)
 {
     assert(PyExceptionClass_Check(type));
-    IcePy::PyObjectHandle args = PyTuple_New(0);
-    if(!args.get())
-    {
-        return 0;
-    }
-    return PyEval_CallObject(type, args.get());
+    return PyObject_CallObject(type, nullptr);
 }
 
 static void
mv -f  src/IceBT/build/x86_64-linux-gnu/cpp11-static/Types.Td  src/IceBT/build/x86_64-linux-gnu/cpp11-static/Types.cpp.d
x86_64-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/zeroc-ice-3.7.10=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -MT src/IceBT/build/x86_64-linux-gnu/cpp11-static/PluginI.o -MMD -MP -MF  src/IceBT/build/x86_64-linux-gnu/cpp11-static/PluginI.Td -Wall -Wextra -Wredundant-decls -Wshadow -Wdeprecated -pthread -DNDEBUG -Isrc -Isrc/IceBT/generated -Iinclude -Iinclude/generated -DICE_BUILDING_SRC -DICEBT_API_EXPORTS -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -DICE_CPP11_MAPPING -DICE_STATIC_LIBS -Wdate-time -D_FORTIFY_SOURCE=2 -c src/IceBT/PluginI.cpp -o src/IceBT/build/x86_64-linux-gnu/cpp11-static/PluginI.o
mv -f  src/IceBT/build/x86_64-linux-gnu/cpp11-static/ConnectionInfo.Td  src/IceBT/build/x86_64-linux-gnu/cpp11-static/ConnectionInfo.cpp.d
x86_64-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/zeroc-ice-3.7.10=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -MT src/IceBT/build/x86_64-linux-gnu/cpp11-static/StreamSocket.o -MMD -MP -MF  src/IceBT/build/x86_64-linux-gnu/cpp11-static/StreamSocket.Td -Wall -Wextra -Wredundant-decls -Wshadow -Wdeprecated -pthread -DNDEBUG -Isrc -Isrc/IceBT/generated -Iinclude -Iinclude/generated -DICE_BUILDING_SRC -DICEBT_API_EXPORTS -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -DICE_CPP11_MAPPING -DICE_STATIC_LIBS -Wdate-time -D_FORTIFY_SOURCE=2 -c src/IceBT/StreamSocket.cpp -o src/IceBT/build/x86_64-linux-gnu/cpp11-static/StreamSocket.o
mv -f  src/IceBT/build/x86_64-linux-gnu/cpp11-static/ConnectorI.Td  src/IceBT/build/x86_64-linux-gnu/cpp11-static/ConnectorI.cpp.d
x86_64-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/zeroc-ice-3.7.10=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -MT src/IceBT/build/x86_64-linux-gnu/cpp11-static/TransceiverI.o -MMD -MP -MF  src/IceBT/build/x86_64-linux-gnu/cpp11-static/TransceiverI.Td -Wall -Wextra -Wredundant-decls -Wshadow -Wdeprecated -pthread -DNDEBUG -Isrc -Isrc/IceBT/generated -Iinclude -Iinclude/generated -DICE_BUILDING_SRC -DICEBT_API_EXPORTS -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -DICE_CPP11_MAPPING -DICE_STATIC_LIBS -Wdate-time -D_FORTIFY_SOURCE=2 -c src/IceBT/TransceiverI.cpp -o src/IceBT/build/x86_64-linux-gnu/cpp11-static/TransceiverI.o
mv -f  src/IceBT/build/x86_64-linux-gnu/cpp11-static/DBus.Td  src/IceBT/build/x86_64-linux-gnu/cpp11-static/DBus.cpp.d
x86_64-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/zeroc-ice-3.7.10=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -MT src/IceBT/build/x86_64-linux-gnu/cpp11-static/Util.o -MMD -MP -MF  src/IceBT/build/x86_64-linux-gnu/cpp11-static/Util.Td -Wall -Wextra -Wredundant-decls -Wshadow -Wdeprecated -pthread -DNDEBUG -Isrc -Isrc/IceBT/generated -Iinclude -Iinclude/generated -DICE_BUILDING_SRC -DICEBT_API_EXPORTS -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -DICE_CPP11_MAPPING -DICE_STATIC_LIBS -Wdate-time -D_FORTIFY_SOURCE=2 -c src/IceBT/Util.cpp -o src/IceBT/build/x86_64-linux-gnu/cpp11-static/Util.o
mv -f  src/IceBT/build/x86_64-linux-gnu/cpp11-static/PluginI.Td  src/IceBT/build/x86_64-linux-gnu/cpp11-static/PluginI.cpp.d
mv -f  src/IceBT/build/x86_64-linux-gnu/cpp11-static/AcceptorI.Td  src/IceBT/build/x86_64-linux-gnu/cpp11-static/AcceptorI.cpp.d
src/IceBT/Instance.cpp:28:1: fatal error: error writing to /tmp/ccTGpqE6.s: No space left on device
   28 | }
      | ^
compilation terminated.
make[3]: *** [Makefile:25: src/IceBT/build/x86_64-linux-gnu/cpp11-static/Instance.o] Error 1
make[3]: *** Waiting for unfinished jobs....
/tmp/cc3v220g.s: Assembler messages:
/tmp/cc3v220g.s: Fatal error: can't write 3903 bytes to section .debug_str of src/IceBT/build/x86_64-linux-gnu/cpp11-static/EndpointI.o: 'No space left on device'
/tmp/cc3v220g.s: Fatal error: src/IceBT/build/x86_64-linux-gnu/cpp11-static/EndpointI.o: No such file or directory
make[3]: *** [Makefile:25: src/IceBT/build/x86_64-linux-gnu/cpp11-static/EndpointI.o] Error 1
mv -f  src/IceBT/build/x86_64-linux-gnu/cpp11-static/StreamSocket.Td  src/IceBT/build/x86_64-linux-gnu/cpp11-static/StreamSocket.cpp.d
src/IceBT/Engine.cpp:1417:1: fatal error: error writing to /tmp/cc1w0ejC.s: No space left on device
 1417 | }
      | ^
compilation terminated.
make[3]: *** [Makefile:25: src/IceBT/build/x86_64-linux-gnu/cpp11-static/Engine.o] Error 1
src/IceBT/Util.cpp:219:1: fatal error: error writing to /tmp/ccMsXuNH.s: No space left on device
  219 | }
      | ^
compilation terminated.
make[3]: *** [Makefile:25: src/IceBT/build/x86_64-linux-gnu/cpp11-static/Util.o] Error 1
/tmp/ccFjnR0u.s: Assembler messages:
/tmp/ccFjnR0u.s: Fatal error: can't write 16 bytes to section .group of src/IceBT/build/x86_64-linux-gnu/cpp11-static/TransceiverI.o: 'No space left on device'
/tmp/ccFjnR0u.s: Fatal error: src/IceBT/build/x86_64-linux-gnu/cpp11-static/TransceiverI.o: No such file or directory
make[3]: *** [Makefile:25: src/IceBT/build/x86_64-linux-gnu/cpp11-static/TransceiverI.o] Error 1
make[3]: Leaving directory '/build/zeroc-ice-3.7.10/cpp'
make[2]: *** [Makefile:18: srcs] Error 1
make[2]: Leaving directory '/build/zeroc-ice-3.7.10'
make[1]: *** [debian/rules:89: override_dh_auto_build-arch] Error 2
make[1]: Leaving directory '/build/zeroc-ice-3.7.10'
make: *** [debian/rules:86: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
I: copying local configuration

Reply via email to