Bug#1026599: cadabra2: FTBFS: type_caster_base.h:482:26: error: invalid use of incomplete type ‘PyFrameObject’ {aka ‘struct _frame’}

2023-01-03 Thread Stefano Rivera
Control: tag -1 + fixed-upstream

Looks like upstream has updated the embedded pybind11 for Python 3.11
support in 
https://github.com/kpeeters/cadabra2/commit/217bc21f9fff3de8eeb9ed651b2143a4f9c8a4b6
available from 2.4.2.2.

Of course it's worth asking if the Debian package should be using these
bundled libraries at all

SR

-- 
Stefano Rivera
  http://tumbleweed.org.za/
  +1 415 683 3272



Bug#1026599: cadabra2: FTBFS: type_caster_base.h:482:26: error: invalid use of incomplete type ‘PyFrameObject’ {aka ‘struct _frame’}

2022-12-20 Thread Lucas Nussbaum
Source: cadabra2
Version: 2.4.0.2-2
Severity: serious
Justification: FTBFS
Tags: bookworm sid ftbfs
User: lu...@debian.org
Usertags: ftbfs-20221220 ftbfs-bookworm

Hi,

During a rebuild of all packages in sid, your package failed to build
on amd64.


Relevant part (hopefully):
> cd /<>/obj-x86_64-linux-gnu/core && /usr/bin/c++  
> -I/usr/include/glibmm-2.4 -I/usr/lib/x86_64-linux-gnu/glibmm-2.4/include 
> -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include 
> -I/usr/include/sigc++-2.0 -I/usr/lib/x86_64-linux-gnu/sigc++-2.0/include 
> -I/<>/core/. -I/<>/libs/internal/include 
> -I/<>/libs/whereami -I/<>/libs/base64 
> -I/<>/libs/dbg -I/<>/libs/linenoise 
> -I/<>/libs/nlohmann -g -O2 -ffile-prefix-map=/<>=. 
> -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time 
> -D_FORTIFY_SOURCE=2 -g -O2 -Wall -fvisibility=hidden 
> -Wno-unused-but-set-variable -std=gnu++17 -MD -MT 
> core/CMakeFiles/test_preprocessor.dir/PreProcessor.cc.o -MF 
> CMakeFiles/test_preprocessor.dir/PreProcessor.cc.o.d -o 
> CMakeFiles/test_preprocessor.dir/PreProcessor.cc.o -c 
> /<>/core/PreProcessor.cc
> In file included from 
> /<>/libs/pybind11/include/pybind11/cast.h:16,
>  from 
> /<>/libs/pybind11/include/pybind11/attr.h:13,
>  from 
> /<>/libs/pybind11/include/pybind11/pybind11.h:13,
>  from /<>/core/cadabra2-cli.hh:10,
>  from /<>/core/cadabra2-cli.cc:15:
> /<>/libs/pybind11/include/pybind11/detail/type_caster_base.h: In 
> function ‘std::string pybind11::detail::error_string()’:
> /<>/libs/pybind11/include/pybind11/detail/type_caster_base.h:482:26:
>  error: invalid use of incomplete type ‘PyFrameObject’ {aka ‘struct _frame’}
>   482 | frame = frame->f_back;
>   |  ^~
> In file included from /usr/include/python3.11/Python.h:42,
>  from /<>/core/cadabra2-cli.hh:9:
> /usr/include/python3.11/pytypedefs.h:22:16: note: forward declaration of 
> ‘PyFrameObject’ {aka ‘struct _frame’}
>22 | typedef struct _frame PyFrameObject;
>   |^~
> [  5%] Building CXX object core/CMakeFiles/cadabra2.dir/NTensor.cc.o
> cd /<>/obj-x86_64-linux-gnu/core && /usr/bin/c++ 
> -DBOOST_ALL_NO_LIB -DBOOST_SYSTEM_DYN_LINK -Dcadabra2_EXPORTS 
> -I/usr/include/glibmm-2.4 -I/usr/lib/x86_64-linux-gnu/glibmm-2.4/include 
> -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include 
> -I/usr/include/sigc++-2.0 -I/usr/lib/x86_64-linux-gnu/sigc++-2.0/include 
> -I/<>/core/. -I/<>/libs/internal/include 
> -I/<>/libs/whereami -I/<>/libs/base64 
> -I/<>/libs/dbg -I/<>/libs/linenoise 
> -I/<>/libs/nlohmann -isystem 
> /<>/libs/pybind11/include -isystem /usr/include/python3.11 -g 
> -O2 -ffile-prefix-map=/<>=. -fstack-protector-strong -Wformat 
> -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -Wall 
> -fvisibility=hidden -Wno-unused-but-set-variable -fPIC -fvisibility=default 
> -flto -fno-fat-lto-objects -std=gnu++17 -MD -MT 
> core/CMakeFiles/cadabra2.dir/NTensor.cc.o -MF 
> CMakeFiles/cadabra2.dir/NTensor.cc.o.d -o 
> CMakeFiles/cadabra2.dir/NTensor.cc.o -c /<>/core/NTensor.cc
> In file included from /<>/core/cadabra2-cli.hh:11:
> /<>/libs/pybind11/include/pybind11/embed.h: In function ‘void 
> pybind11::detail::set_interpreter_argv(int, const char* const*, bool)’:
> /<>/libs/pybind11/include/pybind11/embed.h:155:20: warning: 
> ‘void PySys_SetArgvEx(int, wchar_t**, int)’ is deprecated 
> [-Wdeprecated-declarations]
>   155 | PySys_SetArgvEx(argc, pysys_argv, 
> static_cast(add_program_dir_to_path));
>   | 
> ~~~^
> In file included from /usr/include/python3.11/Python.h:96:
> /usr/include/python3.11/sysmodule.h:14:38: note: declared here
>14 | Py_DEPRECATED(3.11) PyAPI_FUNC(void) PySys_SetArgvEx(int, wchar_t **, 
> int);
>   |  ^~~
> [  5%] Building CXX object 
> core/CMakeFiles/test_preprocessor.dir/__/libs/base64/base64.cc.o
> cd /<>/obj-x86_64-linux-gnu/core && /usr/bin/c++  
> -I/usr/include/glibmm-2.4 -I/usr/lib/x86_64-linux-gnu/glibmm-2.4/include 
> -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include 
> -I/usr/include/sigc++-2.0 -I/usr/lib/x86_64-linux-gnu/sigc++-2.0/include 
> -I/<>/core/. -I/<>/libs/internal/include 
> -I/<>/libs/whereami -I/<>/libs/base64 
> -I/<>/libs/dbg -I/<>/libs/linenoise 
> -I/<>/libs/nlohmann -g -O2 -ffile-prefix-map=/<>=. 
> -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time 
> -D_FORTIFY_SOURCE=2 -g -O2 -Wall -fvisibility=hidden 
> -Wno-unused-but-set-variable -std=gnu++17 -MD -MT 
> core/CMakeFiles/test_preprocessor.dir/__/libs/base64/base64.cc.o -MF 
> CMakeFiles/test_preprocessor.dir/__/libs/base64/base64.cc.o.d -o 
> CMakeFiles/test_preprocessor.dir/__/libs/base64/base64.cc.o -c 
> /<>/libs/base64/base64.cc
> [  6%] Linking CXX executable