Hi there,
I'm trying to compile from source, and I'm following the build pdf in the develop branch for the software. On Step 1 for Windows, I'm running into a problem involving Python/pybind. I have Python 3.11.2 installed, and my machine is Windows 11. Any assistance is appreciated.
From the MSYS2 MINGW64 terminal:
$ mingw32-make package
[ 1%] Built target libUsb
[ 1%] Built target wxregex
[ 3%] Built target wxzlib
[ 15%] Built target base
[ 17%] Built target wxexpat
[ 17%] Built target xml
[ 30%] Built target SDL2-static
[ 35%] Built target wxjpeg
[ 37%] Built target wxpng
[ 72%] Built target core
[ 72%] Built target adv
[ 75%] Built target html
[ 75%] Built target propgrid
[ 77%] Built target richtext
[ 92%] Built target wxscintilla
[ 92%] Built target stc
[ 92%] Building CXX object source/CMakeFiles/ScopeFun.dir/scopefun/app/app.cpp.obj
[ 92%] Building CXX object source/CMakeFiles/ScopeFun.dir/scopefun/gui/osc.cpp.obj
[ 92%] Building CXX object source/CMakeFiles/ScopeFun.dir/scopefun/gui/OsciloskopConnection.cpp.obj
[ 93%] Building CXX object source/CMakeFiles/ScopeFun.dir/scopefun/gui/OsciloskopDebug.cpp.obj
[ 93%] Building CXX object source/CMakeFiles/ScopeFun.dir/scopefun/gui/OsciloskopDisplay.cpp.obj
[ 93%] Building CXX object source/CMakeFiles/ScopeFun.dir/scopefun/gui/OsciloskopHardwareGenerator.cpp.obj
[ 93%] Building CXX object source/CMakeFiles/ScopeFun.dir/scopefun/gui/OsciloskopInfo.cpp.obj
[ 93%] Building CXX object source/CMakeFiles/ScopeFun.dir/scopefun/gui/OsciloskopMeasure.cpp.obj
[ 93%] Building CXX object source/CMakeFiles/ScopeFun.dir/scopefun/gui/OsciloskopOsciloskop.cpp.obj
[ 93%] Building CXX object source/CMakeFiles/ScopeFun.dir/scopefun/gui/OsciloskopSoftwareGenerator.cpp.obj
[ 93%] Building CXX object source/CMakeFiles/ScopeFun.dir/scopefun/gui/OsciloskopStorage.cpp.obj
[ 93%] Building CXX object source/CMakeFiles/ScopeFun.dir/scopefun/gui/OsciloskopThermal.cpp.obj
[ 93%] Building CXX object source/CMakeFiles/ScopeFun.dir/scopefun/gui/OsciloskopTools.cpp.obj
[ 94%] Building C object source/CMakeFiles/ScopeFun.dir/api/scopefunapi.c.obj
C:\msys64\home\Jared\scopefun-software\source\api\scopefunapi.c: In function 'sfApiExit':
C:\msys64\home\Jared\scopefun-software\source\api\scopefunapi.c:338:5: warning: implicit declaration of function 'socketExit' [-Wimplicit-function-declaration]
338 | socketExit();
| ^~~~~~~~~~
[ 94%] Linking CXX executable sfDebug.exe
[ 98%] Built target ScopeFun
[100%] Building CXX object source/CMakeFiles/pythonApi.dir/api/pythonApi/pythonApi.cpp.obj
In file included from C:/msys64/home/Jared/scopefun-software/lib/pybind11/include/pybind11/cast.h:1
,
from C:/msys64/home/Jared/scopefun-software/lib/pybind11/include/pybind11/attr.h:1
,
from C:/msys64/home/Jared/scopefun-software/lib/pybind11/include/pybind11/pybind11.h:13,
from C:\msys64\home\Jared\scopefun-software\source\api\pythonApi\pythonApi.cpp:22:
C:/msys64/home/Jared/scopefun-software/lib/pybind11/include/pybind11/detail/type_caster_base.h: In function 'std::string pybind11::detail::error_string()':
C:/msys64/home/Jared/scopefun-software/lib/pybind11/include/pybind11/detail/type_caster_base.h:473:36: error: invalid use of incomplete type 'PyFrameObject' {aka 'struct _frame'}
473 | " " + handle(frame->f_code->co_filename).cast<std::string>() +
| ^~
In file included from C:/Users/Jared/AppData/Local/Programs/Python/Python311/include/Python.h:42,
from C:/msys64/home/Jared/scopefun-software/lib/pybind11/include/pybind11/detail/common.h:186,
from C:/msys64/home/Jared/scopefun-software/lib/pybind11/include/pybind11/pytypes.h:12,
from C:/msys64/home/Jared/scopefun-software/lib/pybind11/include/pybind11/cast.h:1
:
C:/Users/Jared/AppData/Local/Programs/Python/Python311/include/pytypedefs.h:22:16: note: forward declaration of 'PyFrameObject' {aka 'struct _frame'}
22 | typedef struct _frame PyFrameObject;
| ^~~~~~
C:/msys64/home/Jared/scopefun-software/lib/pybind11/include/pybind11/detail/type_caster_base.h:473:75: error: expected primary-expression before '>' token
473 | " " + handle(frame->f_code->co_filename).cast<std::string>() +
| ^
C:/msys64/home/Jared/scopefun-software/lib/pybind11/include/pybind11/detail/type_caster_base.h:473:77: error: expected primary-expression before ')' token
473 | " " + handle(frame->f_code->co_filename).cast<std::string>() +
| ^
C:/msys64/home/Jared/scopefun-software/lib/pybind11/include/pybind11/detail/type_caster_base.h:475:29: error: invalid use of incomplete type 'PyFrameObject' {aka 'struct _frame'}
475 | handle(frame->f_code->co_name).cast<std::string>() + "\n";
| ^~
C:/Users/Jared/AppData/Local/Programs/Python/Python311/include/pytypedefs.h:22:16: note: forward declaration of 'PyFrameObject' {aka 'struct _frame'}
22 | typedef struct _frame PyFrameObject;
| ^~~~~~
C:/msys64/home/Jared/scopefun-software/lib/pybind11/include/pybind11/detail/type_caster_base.h:475:64: error: expected primary-expression before '>' token
475 | handle(frame->f_code->co_name).cast<std::string>() + "\n";
| ^
C:/msys64/home/Jared/scopefun-software/lib/pybind11/include/pybind11/detail/type_caster_base.h:475:66: error: expected primary-expression before ')' token
475 | handle(frame->f_code->co_name).cast<std::string>() + "\n";
| ^
C:/msys64/home/Jared/scopefun-software/lib/pybind11/include/pybind11/detail/type_caster_base.h:476:26: error: invalid use of incomplete type 'PyFrameObject' {aka 'struct _frame'}
476 | frame = frame->f_back;
| ^~
C:/Users/Jared/AppData/Local/Programs/Python/Python311/include/pytypedefs.h:22:16: note: forward declaration of 'PyFrameObject' {aka 'struct _frame'}
22 | typedef struct _frame PyFrameObject;
| ^~~~~~
C:/msys64/home/Jared/scopefun-software/lib/pybind11/include/pybind11/pybind11.h: In function 'pybind11::function pybind11::detail::get_type_override(const void*, const type_info*, const char*)':
C:/msys64/home/Jared/scopefun-software/lib/pybind11/include/pybind11/pybind11.h:2338:49: error: 'PyThreadState' {aka 'struct _ts'} has no member named 'frame'; did you mean 'cframe'?
2338 | PyFrameObject *frame = PyThreadState_Get()->frame;
| ^~~~~
| cframe
C:/msys64/home/Jared/scopefun-software/lib/pybind11/include/pybind11/pybind11.h:2339:52: error: invalid use of incomplete type 'PyFrameObject' {aka 'struct _frame'}
2339 | if (frame != nullptr && (std::string) str(frame->f_code->co_name) == name
| ^~
C:/Users/Jared/AppData/Local/Programs/Python/Python311/include/pytypedefs.h:22:16: note: forward declaration of 'PyFrameObject' {aka 'struct _frame'}
22 | typedef struct _frame PyFrameObject;
| ^~~~~~
C:/msys64/home/Jared/scopefun-software/lib/pybind11/include/pybind11/pybind11.h:2340:17: error: invalid use of incomplete type 'PyFrameObject' {aka 'struct _frame'}
2340 | && frame->f_code->co_argcount > 0) {
| ^~
C:/Users/Jared/AppData/Local/Programs/Python/Python311/include/pytypedefs.h:22:16: note: forward declaration of 'PyFrameObject' {aka 'struct _frame'}
22 | typedef struct _frame PyFrameObject;
| ^~~~~~
C:/msys64/home/Jared/scopefun-software/lib/pybind11/include/pybind11/pybind11.h:2343:18: error: invalid use of incomplete type 'PyFrameObject' {aka 'struct _frame'}
2343 | frame->f_locals, PyTuple_GET_ITEM(frame->f_code->co_varnames, 0));
| ^~
C:/Users/Jared/AppData/Local/Programs/Python/Python311/include/pytypedefs.h:22:16: note: forward declaration of 'PyFrameObject' {aka 'struct _frame'}
22 | typedef struct _frame PyFrameObject;
| ^~~~~~
In file included from C:/Users/Jared/AppData/Local/Programs/Python/Python311/include/Python.h:35:
C:/msys64/home/Jared/scopefun-software/lib/pybind11/include/pybind11/pybind11.h:2343:30: error: invalid use of incomplete type 'PyFrameObject' {aka 'struct _frame'}
2343 | frame->f_locals, PyTuple_GET_ITEM(frame->f_code->co_varnames, 0));
| ^~~~~~~~~~~~~~~~
C:/Users/Jared/AppData/Local/Programs/Python/Python311/include/pytypedefs.h:22:16: note: forward declaration of 'PyFrameObject' {aka 'struct _frame'}
22 | typedef struct _frame PyFrameObject;
| ^~~~~~
In file included from C:/Users/Jared/AppData/Local/Programs/Python/Python311/include/Python.h:38:
C:/msys64/home/Jared/scopefun-software/lib/pybind11/include/pybind11/pybind11.h:2343:30: error: invalid use of incomplete type 'PyFrameObject' {aka 'struct _frame'}
2343 | frame->f_locals, PyTuple_GET_ITEM(frame->f_code->co_varnames, 0));
| ^~~~~~~~~~~~~~~~
C:/Users/Jared/AppData/Local/Programs/Python/Python311/include/pytypedefs.h:22:16: note: forward declaration of 'PyFrameObject' {aka 'struct _frame'}
22 | typedef struct _frame PyFrameObject;
| ^~~~~~
mingw32-make[2]: *** [source\CMakeFiles\pythonApi.dir\build.make:76: source/CMakeFiles/pythonApi.dir/api/pythonApi/pythonApi.cpp.obj] Error 1
mingw32-make[1]: *** [CMakeFiles\Makefile2:1324: source/CMakeFiles/pythonApi.dir/all] Error 2
mingw32-make: *** [Makefile:155: all] Error 2