[fix] CMake linker failure on ARM when DNN is disabled and NEON uses RTCD#478
Open
uilianries wants to merge 1 commit into
Open
[fix] CMake linker failure on ARM when DNN is disabled and NEON uses RTCD#478uilianries wants to merge 1 commit into
uilianries wants to merge 1 commit into
Conversation
The arm_dnn_map.c was compiled unconditionally when NEON RTCD is active, causing linker errors when DNN is disabled. Signed-off-by: Uilian Ries <uilianries@gmail.com>
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Greetings!
As the Opus project is packaged in Conan Center already, and the newest version 1.6.1 is available, we are packaging 1.6.1 as well on PR conan-io/conan-center-index#30332.
However, during the build, was noted a regression regarding Windows ARM build:
The full build log can be found here: https://c3i.jfrog.io/artifactory/cci-build-logs/cci/prod/PR-30332/1/package_build_logs/build_log_opus_1_6_1_3e860e0cda08f385295e313be24b0569_4432a0a14d3f85a3674742d1be4261502c686dae.txt
Previously, on version 1.5.2, we could build Opus for Windows ARM without errors: https://c3i.jfrog.io/artifactory/cci-build-logs/cci/prod/PR-28391/1/package_build_logs/build_log_opus_1_5_2_18fcc73dcd16edae063173f3ceb3ed56_4432a0a14d3f85a3674742d1be4261502c686dae.success.txt.
When comparing version 1.5.2 and 1.6.1 (v1.5.2...v1.6.1), it's possible to note a few changes regarding ARM, including the commit aa0e5a0.
When building for an ARM target with NEON detected at runtime (RTCD path, e.g.
OPUS_MAY_HAVE_NEONis true andOPUS_ARM_PRESUME_NEONis false), the CMakeLists.txt unconditionally adds dnn/arm/arm_dnn_map.c to the build regardless of whether the DNN subsystem (OPUS_DNN) is enabled. This is the cause of the observed link failure.This PR brings a change in the
CMakeLists.txt, by wrappingdnn_sources_arm_rtcdinif(OPUS_DNN)soarm_dnn_map.cis only compiled when the symbols it references are actually present. Same fordnn_sources_arm_neon, so affectingnnet_neon.c.Later, the
if(OPUS_DNN AND NOT OPUS_MAY_HAVE_NEON)preventsnnet_neon.cfrom being added twice when bothOPUS_DNNandOPUS_MAY_HAVE_NEONare true.To prove this log is working, I executed an internal build with this change, with Opus 1.6.1:
Environment
The CI environment is configured as follows:
Opus version: 1.6.1
Build system: CMake (Ninja generator)
Host: Windows x86_64 (cross-compiling)
Compiler: MSVC 194
Target: Windows ARM64
Options: shared=True, fixed_point=False — DNN features (OPUS_DEEP_PLC, OPUS_DRED, OPUS_OSCE) are all OFF (defaults)
Feel free to ask for any extra information about the case. Regards!