You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Neon is a hardware acceleration feature that is enabled by default in libpng, for builds targeting Arm processors. However, thtk does not include the neon source files from the libpng/arm/ directory when building the libpng static library, causing the linking step to fail with undefined symbols. Nor does thtk disable the neon optimization to prevent the error from occurring.
Affected Architectures
armv7
aarch64
Related Issues
Compile failure under macOS Monterey ARM #94: user managed to circumvent this problem by linking a system library instead of building a new libpng, where they used the -DWITH_LIBPNG_SOURCE=OFF option while making the buildsystem
Observations
For mysterious reasons, this bug also affects armv7, even though the logic of libpng's cmakelists implies that neon should only be enabled in 64-bit arm execution contexts.
Proposed Fixes
To fix the issue, I suggest one of the following revisions to extlib/CMakeLists.txt
Disable neon:
add_compile_definitions(PNG_ARM_NEON_OPT=0)
or...
Include neon implementation source files for all ARM targets:
I don't know much about the arm platform, and can't guarantee that thtk will continue to work normally with neon optimizations turned on. Is it safer to disable them until thoroughly tested?
Steps to Reproduce
Install a cross-toolchain that can target Arm processors.
I used llvm-mingw for Ubuntu host (it's compatible with other Linuxes)
Create a cmake toolchain file for some arm platform
About
Neon is a hardware acceleration feature that is enabled by default in libpng, for builds targeting Arm processors. However, thtk does not include the neon source files from the libpng/arm/ directory when building the libpng static library, causing the linking step to fail with undefined symbols. Nor does thtk disable the neon optimization to prevent the error from occurring.
Affected Architectures
Related Issues
-DWITH_LIBPNG_SOURCE=OFFoption while making the buildsystemObservations
For mysterious reasons, this bug also affects armv7, even though the logic of libpng's cmakelists implies that neon should only be enabled in 64-bit arm execution contexts.
Proposed Fixes
To fix the issue, I suggest one of the following revisions to
extlib/CMakeLists.txtDisable neon:
or...
Include neon implementation source files for all ARM targets:
Disclaimer
I don't know much about the arm platform, and can't guarantee that thtk will continue to work normally with neon optimizations turned on. Is it safer to disable them until thoroughly tested?
Steps to Reproduce
Install a cross-toolchain that can target Arm processors.
Create a cmake toolchain file for some arm platform
win32-arm64.cmakeMake a build folder in the thtk source and switch to it
Generate thtk's buildsystem, adding your toolchain
cmake .. -DCMAKE_TOOLCHAIN_FILE=/where/you/placed/win32-arm64.cmakeTry to build thtk
cmake --build .ormakeDisabling Neon (or adding its dependencies) in extlib/CMakeLists.txt should solve the issue.