[MacPorts] #64805: libprelude: python bindings fail to build on OSX 10.12 and earlier

MacPorts noreply at macports.org
Fri Mar 11 18:50:17 UTC 2022


#64805: libprelude: python bindings fail to build on OSX 10.12 and earlier
------------------------+------------------------
 Reporter:  ctreleaven  |      Owner:  ToToL
     Type:  defect      |     Status:  assigned
 Priority:  Normal      |  Milestone:
Component:  ports       |    Version:
 Keywords:              |       Port:  libprelude
------------------------+------------------------
 Relevant portion of the log seems to be:

 {{{
 gnumake[3]: Entering directory
 `/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_security_libprelude/libprelude/work/libprelude-5.2.0/bindings/python'
 CC="/usr/bin/clang++" /opt/local/bin/python3.8 setup.py build
 running build
 running build_py
 creating build
 creating build/lib.macosx-10.12-x86_64-3.8
 copying prelude.py -> build/lib.macosx-10.12-x86_64-3.8
 running build_ext
 building '_prelude' extension
 creating build/temp.macosx-10.12-x86_64-3.8
 /usr/bin/clang++ -Wno-unused-result -Wsign-compare -Wunreachable-code
 -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -pipe -Os
 -I/opt/local/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8
 -c _prelude.cxx -o build/temp.macosx-10.12-x86_64-3.8/_prelude.o -I../..
 -I../../src/include -I../../src/include -I../../src/libprelude-error
 -I../../bindings/c++/include
 In file included from _prelude.cxx:188:
 In file included from
 /opt/local/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8/Python.h:85:
 In file included from
 /opt/local/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8/pytime.h:6:
 In file included from
 /opt/local/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8/object.h:746:
 /opt/local/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8/cpython/object.h:177:16:
 warning: 'tp_print' is deprecated [-Wdeprecated-declarations]
 typedef struct _typeobject {
                ^
 /opt/local/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8/cpython/object.h:260:5:
 note: 'tp_print' has been explicitly marked deprecated here
     Py_DEPRECATED(3.8) int (*tp_print)(PyObject *, FILE *, int);
     ^
 /opt/local/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8/pyport.h:515:54:
 note: expanded from macro 'Py_DEPRECATED'
 #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                      ^
 In file included from _prelude.cxx:188:
 In file included from
 /opt/local/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8/Python.h:85:
 In file included from
 /opt/local/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8/pytime.h:6:
 In file included from
 /opt/local/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8/object.h:746:
 /opt/local/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8/cpython/object.h:177:16:
 warning: 'tp_print' is deprecated [-Wdeprecated-declarations]
 typedef struct _typeobject {
                ^
 /opt/local/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8/cpython/object.h:260:5:
 note: 'tp_print' has been explicitly marked deprecated here
     Py_DEPRECATED(3.8) int (*tp_print)(PyObject *, FILE *, int);
     ^
 /opt/local/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8/pyport.h:515:54:
 note: expanded from macro 'Py_DEPRECATED'
 #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                      ^
 _prelude.cxx:6388:22: error: use of undeclared identifier 'fmemopen'; did
 you mean 'freopen'?
                 fd = fmemopen(buf, len, "r");
                      ^~~~~~~~
                      freopen
 /usr/include/stdio.h:248:7: note: 'freopen' declared here
 FILE    *freopen(const char * __restrict, const char * __restrict,
          ^
 _prelude.cxx:6388:36: error: cannot initialize a parameter of type 'const
 char *' with an lvalue of type 'ssize_t' (aka 'long')
                 fd = fmemopen(buf, len, "r");
                                    ^~~
 /usr/include/stdio.h:248:63: note: passing argument to parameter here
 FILE    *freopen(const char * __restrict, const char * __restrict,
                                                                  ^
 2 warnings and 2 errors generated.
 error: command '/usr/bin/clang++' failed with exit status 1
 gnumake[3]: *** [python-build] Error 1
 }}}

 I suspect this is obvious to some but not me.

-- 
Ticket URL: <https://trac.macports.org/ticket/64805>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list