<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">Do you use precompiled header? That NEEDS_PY_IDENTIFIER define is basically on top of mathmodule.c.<br></div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Tue, Dec 10, 2024 at 2:29 PM Patrick Stinson <<a href="mailto:patrickkidd@gmail.com">patrickkidd@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">FWIW, adding this seems to have fixed it:<br>
<br>
DEFINES += NEEDS_PY_IDENTIFIER<br>
<br>
I have no idea how tacky that is, however.<br>
<br>
> On Dec 9, 2024, at 9:52 PM, Patrick Stinson <<a href="mailto:patrickkidd@gmail.com" target="_blank">patrickkidd@gmail.com</a>> wrote:<br>
> <br>
> I am seeing this error using pyqtdeploy-3.3.1.dev2401021235 and a sysroot with Python-3.11.6 (the last supported version in the pyqtdeploy snapshot CHANGELOG), any ideas? It looks like it is failing to include some private python headers. I was building python-3.10.6 ok, though this looks major-version specific:<br>
> <br>
> <br>
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -cc1 -Wundef-prefix\=TARGET_OS_ -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit\=0 -fmessage-length\=178 -w -ferror-limit 19 -serialize-diagnostic-file /Users/patrick/dev/familydiagram/build/osx/.xcode/Family\ Diagram.build/Release/Family\ Diagram.build/Objects-normal/x86_64/mathmodule.dia -fcolor-diagnostics -Wdeprecated-objc-isa-usage -Werror\=deprecated-objc-isa-usage -Werror\=implicit-function-declaration -Wnon-modular-include-in-framework-module -Werror\=non-modular-include-in-framework-module -Wno-trigraphs -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-return-type -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wno-unused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-bool-conversion -Wno-enum-conversion -Wno-float-conversion -Wno-non-literal-null-conversion -Wno-objc-literal-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-implicit-fallthrough -Wdeprecated-declarations -Wno-sign-conversion -Wno-infinite-recursion -Wno-comma -Wno-block-capture-autoreleasing -Wno-strict-prototypes -Wno-semicolon-before-method-body -Wno-reorder-init-list -Wno-implicit-int-float-conversion -Wno-c99-designator -Wno-final-dtor-non-final-class -Wno-extra-semi-stmt -Wno-misleading-indentation -Wno-quoted-include-in-framework-header -Wno-implicit-fallthrough -Wno-enum-enum-conversion -Wno-enum-float-conversion -Wno-elaborated-enum-base -Wno-reserved-identifier -Wno-gnu-folding-constant -o /Users/patrick/dev/familydiagram/build/osx/.xcode/Family\ Diagram.build/Release/Family\ Diagram.build/Objects-normal/x86_64/mathmodule.o -disable-free -emit-obj -fmodule-file\=/Users/patrick/dev/familydiagram/build/osx/.xcode/ExplicitPrecompiledModules/_Builtin_stdatomic-45RKN09G0ZPVFJ632BPQBFG2O.pcm -fmodule-file\=/Users/patrick/dev/familydiagram/build/osx/.xcode/ExplicitPrecompiledModules/pthread-DRWWY68IHOZDW08IGE6ASGGMI.pcm -fmodule-file\=/Users/patrick/dev/familydiagram/build/osx/.xcode/ExplicitPrecompiledModules/_Builtin_stdbool-2LWC0JU4Y3AC9PYXW9IADV646.pcm -fmodule-file\=/Users/patrick/dev/familydiagram/build/osx/.xcode/ExplicitPrecompiledModules/_locale-CSOJP3LZRAMW8I37ET66EGZH5.pcm -fmodule-file\=/Users/patrick/dev/familydiagram/build/osx/.xcode/ExplicitPrecompiledModules/_Builtin_float-YS0RYVNLR9XUFXGP11I4OPDU.pcm -x c /Users/patrick/dev/familydiagram/sysroot/sysroot-macos-64/src/Python-3.11.6/Modules/mathmodule.c -tune-cpu generic -target-cpu penryn -triple x86_64-apple-macosx10.13.0 -target-linker-version 1115.7.3 -target-sdk-version\=15.1 -fmodules-validate-system-headers -fno-modulemap-allow-subdirectory-search -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.1.sdk -resource-dir /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/16 -fmodule-format\=obj -I /Users/patrick/dev/familydiagram/build/osx/.xcode/Family\ Diagram.build/Release/Family\ Diagram.build/Family\ Diagram-own-target-headers.hmap -I /Users/patrick/dev/familydiagram/build/osx/.xcode/Family\ Diagram.build/Release/Family\ Diagram.build/Family\ Diagram-all-target-headers.hmap -I /Users/patrick/dev/familydiagram/build/osx/Release/include -I . -I ../../pkdiagram/_pkdiagram -I ../../pkdiagram/_pkdiagram/build -I ../../sysroot/sysroot-macos-64/include -I ../../sysroot/sysroot-macos-64/include/python3.11 -I ../../sysroot/sysroot-macos-64/include/python3.11/internal -I ../../sysroot/sysroot-macos-64/src/Python-3.11.6/Modules/_blake2 -I ../../sysroot/sysroot-macos-64/src/Python-3.11.6/Modules/_sha3 -I ../../sysroot/sysroot-macos-64/src/Python-3.11.6/Modules/expat -I /Users/patrick/dev/familydiagram/vedanaprivate/build -I ../../sysroot/sysroot-macos-64/Qt/include -I ../../sysroot/sysroot-macos-64/Qt/include/QtQuickWidgets -I ../../sysroot/sysroot-macos-64/Qt/include/QtPrintSupport -I ../../sysroot/sysroot-macos-64/Qt/include/QtWidgets -I ../../sysroot/sysroot-macos-64/Qt/include/QtQuick -I ../../sysroot/sysroot-macos-64/Qt/include/QtGui -I ../../sysroot/sysroot-macos-64/Qt/include/QtQmlModels -I ../../sysroot/sysroot-macos-64/Qt/include/QtQml -I ../../sysroot/sysroot-macos-64/Qt/include/QtNetwork -I ../../sysroot/sysroot-macos-64/Qt/include/QtCore -I . -I /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.1.sdk/System/Library/Frameworks/OpenGL.framework/Headers -I /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.1.sdk/System/Library/Frameworks/AGL.framework/Headers -I ../../sysroot/sysroot-macos-64/Qt/mkspecs/macx-clang -I /Users/patrick/dev/familydiagram/build/osx/.xcode/Family\ Diagram.build/Release/Family\ Diagram.build/DerivedSources-normal/x86_64 -I /Users/patrick/dev/familydiagram/build/osx/.xcode/Family\ Diagram.build/Release/Family\ Diagram.build/DerivedSources/x86_64 -I /Users/patrick/dev/familydiagram/build/osx/.xcode/Family\ Diagram.build/Release/Family\ Diagram.build/DerivedSources -F /Users/patrick/dev/familydiagram/build/osx/Release -iquote /Users/patrick/dev/familydiagram/build/osx/.xcode/Family\ Diagram.build/Release/Family\ Diagram.build/Family\ Diagram-generated-files.hmap -iquote /Users/patrick/dev/familydiagram/build/osx/.xcode/Family\ Diagram.build/Release/Family\ Diagram.build/Family\ Diagram-project-headers.hmap -isystem /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.1.sdk/usr/local/include -isystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/16/include -internal-externc-isystem /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.1.sdk/usr/include -internal-externc-isystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -ivfsstatcache /Users/patrick/Library/Developer/Xcode/DerivedData/SDKStatCaches.noindex/macosx15.1-24B75-26c8390a7c93c703a57fb2538426748e.sdkstatcache -std\=c11 -fasm-blocks -fmodules -fno-implicit-modules -fmax-type-align\=16 -fpascal-strings -fvisibility\=hidden -fvisibility-inlines-hidden-static-local-var -mdarwin-stkchk-strong-link -fno-odr-hash-protocols -pic-level 2 -fencode-extended-block-signature -stack-protector 1 -fmodule-related-to-pch -fgnuc-version\=4.2.1 -fblocks -ffp-contract\=on -fclang-abi-compat\=4.0 -fno-experimental-relative-c++-abi-vtables -fno-file-reproducible -clang-vendor-feature\=+disableNonDependentMemberExprInCurrentInstantiation -clang-vendor-feature\=+enableAggressiveVLAFolding -clang-vendor-feature\=+revert09abecef7bbf -clang-vendor-feature\=+thisNoAlignAttr -clang-vendor-feature\=+thisNoNullAttr -clang-vendor-feature\=+disableAtImportPrivateFrameworkInImplementationError -O2 -fdebug-compilation-dir\=/Users/patrick/dev/familydiagram/build/osx -fcoverage-compilation-dir\=/Users/patrick/dev/familydiagram/build/osx -fcommon -fregister-global-dtors-with-atexit -ffunction-sections -fdata-sections -fno-strict-return -dwarf-version\=4 -debugger-tuning\=lldb -disable-llvm-verifier -dwarf-ext-refs -mframe-pointer\=all -funwind-tables\=2 -vectorize-loops -vectorize-slp -clear-ast-before-backend -discard-value-names -main-file-name mathmodule.c -finline-functions -debug-info-kind\=standalone -Os -fdiagnostics-hotness-threshold\=0 -fdiagnostics-misexpect-tolerance\=0 -include-pch /Users/patrick/dev/familydiagram/build/osx/.xcode/SharedPrecompiledHeaders/SharedPrecompiledHeaders/2268268309385945507/pkdiagram_pch.h.gch -D HAVE_EXPAT_CONFIG_H -D PYQTDEPLOY_OPTIMIZED -D Py_BUILD_CORE_MODULE -D QT_CORE_LIB -D QT_GUI_LIB -D QT_NETWORK_LIB -D QT_PRINTSUPPORT_LIB -D QT_QMLMODELS_LIB -D QT_QML_LIB -D QT_QUICKWIDGETS_LIB -D QT_QUICK_LIB -D QT_WIDGETS_LIB -D XML_DEV_URANDOM -D XML_STATIC -D __APPLE_USE_RFC_3542 -D __GCC_HAVE_DWARF2_CFI_ASM\=1 -MT dependencies -dependency-file /Users/patrick/dev/familydiagram/build/osx/.xcode/Family\ Diagram.build/Release/Family\ Diagram.build/Objects-normal/x86_64/mathmodule.d -skip-unused-modulemap-deps<br>
> /Users/patrick/dev/familydiagram/sysroot/sysroot-macos-64/src/Python-3.11.6/Modules/mathmodule.c:1218:5: error: call to undeclared function '_Py_IDENTIFIER';<br>
> ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]<br>
> 1218 | _Py_IDENTIFIER(__ceil__);<br>
> | ^<br>
> /Users/patrick/dev/familydiagram/sysroot/sysroot-macos-64/src/Python-3.11.6/Modules/mathmodule.c:1218:20: error: use of undeclared identifier '__ceil__'; did<br>
> you mean '__ceilf16'?<br>
> 1218 | _Py_IDENTIFIER(__ceil__);<br>
> | ^~~~~~~~<br>
> | __ceilf16<br>
> In module '_math' imported from /Users/patrick/dev/familydiagram/build/osx/../../sysroot/sysroot-macos-64/include/python3.11/pyport.h:218:<br>
> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/math.h:617:17: note: '__ceilf16' declared here<br>
> 617 | extern _Float16 __ceilf16(_Float16) __API_AVAILABLE(macos(15.0), ios(18.0), watchos(11.0), tvos(18.0));<br>
> | ^<br>
> /Users/patrick/dev/familydiagram/sysroot/sysroot-macos-64/src/Python-3.11.6/Modules/mathmodule.c:1221:63: error: use of undeclared identifier 'PyId___ceil__'<br>
> 1221 | PyObject *method = _PyObject_LookupSpecialId(number, &PyId___ceil__);<br>
> | ^<br>
> /Users/patrick/dev/familydiagram/sysroot/sysroot-macos-64/src/Python-3.11.6/Modules/mathmodule.c:1286:5: error: call to undeclared function '_Py_IDENTIFIER';<br>
> ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]<br>
> 1286 | _Py_IDENTIFIER(__floor__);<br>
> | ^<br>
> /Users/patrick/dev/familydiagram/sysroot/sysroot-macos-64/src/Python-3.11.6/Modules/mathmodule.c:1286:20: error: use of undeclared identifier '__floor__';<br>
> did you mean '__floorf16'?<br>
> 1286 | _Py_IDENTIFIER(__floor__);<br>
> | ^~~~~~~~~<br>
> | __floorf16<br>
> In module '_math' imported from /Users/patrick/dev/familydiagram/build/osx/../../sysroot/sysroot-macos-64/include/python3.11/pyport.h:218:<br>
> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/math.h:618:17: note: '__floorf16' declared here<br>
> 618 | extern _Float16 __floorf16(_Float16) __API_AVAILABLE(macos(15.0), ios(18.0), watchos(11.0), tvos(18.0));<br>
> | ^<br>
> /Users/patrick/dev/familydiagram/sysroot/sysroot-macos-64/src/Python-3.11.6/Modules/mathmodule.c:1293:63: error: use of undeclared identifier<br>
> 'PyId___floor__'<br>
> 1293 | PyObject *method = _PyObject_LookupSpecialId(number, &PyId___floor__);<br>
> | ^<br>
> /Users/patrick/dev/familydiagram/sysroot/sysroot-macos-64/src/Python-3.11.6/Modules/mathmodule.c:2159:5: error: call to undeclared function '_Py_IDENTIFIER';<br>
> ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]<br>
> 2159 | _Py_IDENTIFIER(__trunc__);<br>
> | ^<br>
> /Users/patrick/dev/familydiagram/sysroot/sysroot-macos-64/src/Python-3.11.6/Modules/mathmodule.c:2159:20: error: use of undeclared identifier '__trunc__';<br>
> did you mean '__truncf16'?<br>
> 2159 | _Py_IDENTIFIER(__trunc__);<br>
> | ^~~~~~~~~<br>
> | __truncf16<br>
> In module '_math' imported from /Users/patrick/dev/familydiagram/build/osx/../../sysroot/sysroot-macos-64/include/python3.11/pyport.h:218:<br>
> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/math.h:621:17: note: '__truncf16' declared here<br>
> 621 | extern _Float16 __truncf16(_Float16) __API_AVAILABLE(macos(15.0), ios(18.0), watchos(11.0), tvos(18.0));<br>
> | ^<br>
> /Users/patrick/dev/familydiagram/sysroot/sysroot-macos-64/src/Python-3.11.6/Modules/mathmodule.c:2171:43: error: use of undeclared identifier<br>
> 'PyId___trunc__'<br>
> 2171 | trunc = _PyObject_LookupSpecialId(x, &PyId___trunc__);<br>
> | ^<br>
> 9 errors generated.<br>
<br>
</blockquote></div>