Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failed on arm64 with -DKFR_ENABLE_CAPI_BUILD=ON in capi/CMakeFiles/kfr_capi.dir/capi.cpp.o #199

Closed
dubrsl opened this issue Oct 30, 2023 · 9 comments
Milestone

Comments

@dubrsl
Copy link

dubrsl commented Oct 30, 2023

Hi.
Trying build krf-5.1.0 on arm64. Build failed with error:

#7 400.8 + cmake -Wno-dev -GNinja -DKFR_ENABLE_CAPI_BUILD=ON -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Release ..
#7 402.4 -- The CXX compiler identification is Clang 15.0.7
#7 402.5 -- Detecting CXX compiler ABI info
#7 404.1 -- Detecting CXX compiler ABI info - done
#7 404.1 -- Check for working CXX compiler: /usr/bin/clang++ - skipped
#7 404.1 -- Detecting CXX compile features
#7 404.1 -- Detecting CXX compile features - done
#7 404.1 -- Default CPU architecture for KFR is detect (set by cmake variable)
#7 404.2 -- Configuring done
#7 404.5 -- Generating done
#7 404.6 -- Build files have been written to: /tmp/tmp.h0abk2FB2x/build
#7 404.6 + ninja
#7 546.5 [1/80] Building CXX object CMakeFiles/kfr_io.dir/include/kfr/io/impl/audiofile-impl.cpp.o
#7 548.1 [2/80] Linking CXX static library libkfr_io.a
==== skip ====
#7 1782.6 [48/80] Building CXX object capi/CMakeFiles/kfr_capi.dir/capi.cpp.o
#7 1782.6 FAILED: capi/CMakeFiles/kfr_capi.dir/capi.cpp.o
#7 1782.6 /usr/bin/clang++ -DCMT_MULTI=1 -DCMT_MULTI_ENABLED_AVX2=1 -DCMT_MULTI_ENABLED_AVX512=1 -DCMT_MULTI_ENABLED_AVX=1 -DCMT_MULTI_ENABLED_SSE2=1 -DCMT_MULTI_ENABLED_SSE41=1 -DKFR_BUILDING_DLL=1 -DKFR_DFT_MULTI=1 -Dkfr_capi_EXPORTS -I../include -O3 -DNDEBUG -fPIC -fvisibility=default -fdiagnostics-absolute-paths -mstackrealign -Wno-c++1z-extensions -Wno-psabi -std=gnu++17 -MD -MT capi/CMakeFiles/kfr_capi.dir/capi.cpp.o -MF capi/CMakeFiles/kfr_capi.dir/capi.cpp.o.d -o capi/CMakeFiles/kfr_capi.dir/capi.cpp.o -c ../capi/capi.cpp
#7 1782.6 In file included from ../capi/capi.cpp:29:
#7 1782.6 In file included from ../include/kfr/dft.hpp:27:
#7 1782.6 In file included from ../include/kfr/dft/convolution.hpp:35:
#7 1782.6 In file included from ../include/kfr/dft/cache.hpp:28:
#7 1782.6 /tmp/tmp.h0abk2FB2x/include/kfr/dft/fft.hpp:148:21: error: no member named 'avx512' in 'kfr::cpu_t'
#7 1782.6         case cpu_t::avx512:
#7 1782.6              ~~~~~~~^
#7 1782.6 /tmp/tmp.h0abk2FB2x/include/kfr/dft/fft.hpp:150:21: error: no member named 'avx2' in 'kfr::cpu_t'
#7 1782.6         case cpu_t::avx2:
#7 1782.6              ~~~~~~~^
#7 1782.6 /tmp/tmp.h0abk2FB2x/include/kfr/dft/fft.hpp:152:21: error: no member named 'avx' in 'kfr::cpu_t'
#7 1782.6         case cpu_t::avx:
#7 1782.6              ~~~~~~~^
#7 1782.6 /tmp/tmp.h0abk2FB2x/include/kfr/dft/fft.hpp:154:21: error: no member named 'sse42' in 'kfr::cpu_t'
#7 1782.6         case cpu_t::sse42:
#7 1782.6              ~~~~~~~^
#7 1782.6 /tmp/tmp.h0abk2FB2x/include/kfr/dft/fft.hpp:155:21: error: no member named 'sse41' in 'kfr::cpu_t'
#7 1782.6         case cpu_t::sse41:
#7 1782.6              ~~~~~~~^
#7 1782.6 /tmp/tmp.h0abk2FB2x/include/kfr/dft/fft.hpp:157:21: error: no member named 'ssse3' in 'kfr::cpu_t'
#7 1782.6         case cpu_t::ssse3:
#7 1782.6              ~~~~~~~^
#7 1782.6 /tmp/tmp.h0abk2FB2x/include/kfr/dft/fft.hpp:159:21: error: no member named 'sse3' in 'kfr::cpu_t'
#7 1782.6         case cpu_t::sse3:
#7 1782.6              ~~~~~~~^
#7 1782.6 /tmp/tmp.h0abk2FB2x/include/kfr/dft/fft.hpp:319:21: error: no member named 'avx512' in 'kfr::cpu_t'
#7 1782.6         case cpu_t::avx512:
#7 1782.6              ~~~~~~~^
#7 1782.6 /tmp/tmp.h0abk2FB2x/include/kfr/dft/fft.hpp:321:21: error: no member named 'avx2' in 'kfr::cpu_t'
#7 1782.6         case cpu_t::avx2:
#7 1782.6              ~~~~~~~^
#7 1782.6 /tmp/tmp.h0abk2FB2x/include/kfr/dft/fft.hpp:323:21: error: no member named 'avx' in 'kfr::cpu_t'
#7 1782.6         case cpu_t::avx:
#7 1782.6              ~~~~~~~^
#7 1782.6 /tmp/tmp.h0abk2FB2x/include/kfr/dft/fft.hpp:325:21: error: no member named 'sse42' in 'kfr::cpu_t'
#7 1782.6         case cpu_t::sse42:
#7 1782.6              ~~~~~~~^
#7 1782.6 /tmp/tmp.h0abk2FB2x/include/kfr/dft/fft.hpp:326:21: error: no member named 'sse41' in 'kfr::cpu_t'
#7 1782.6         case cpu_t::sse41:
#7 1782.6              ~~~~~~~^
#7 1782.6 /tmp/tmp.h0abk2FB2x/include/kfr/dft/fft.hpp:328:21: error: no member named 'ssse3' in 'kfr::cpu_t'
#7 1782.6         case cpu_t::ssse3:
#7 1782.6              ~~~~~~~^
#7 1782.6 /tmp/tmp.h0abk2FB2x/include/kfr/dft/fft.hpp:330:21: error: no member named 'sse3' in 'kfr::cpu_t'
#7 1782.6         case cpu_t::sse3:
#7 1782.6              ~~~~~~~^
#7 1782.6 In file included from ../capi/capi.cpp:29:
#7 1782.6 In file included from ../include/kfr/dft.hpp:27:
#7 1782.6 /tmp/tmp.h0abk2FB2x/include/kfr/dft/convolution.hpp:159:5: error: no member named 'avx512' in 'kfr::cpu_t'
#7 1782.6     CMT_MULTI_PROTO_GATE(make_convolve_filter<T>(taps, block_size))
#7 1782.6     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#7 1782.6 /tmp/tmp.h0abk2FB2x/include/kfr/cident.h:799:17: note: expanded from macro 'CMT_MULTI_PROTO_GATE'
#7 1782.6     case cpu_t::avx512:                                                                                      \
#7 1782.6          ~~~~~~~^
#7 1782.6 In file included from ../capi/capi.cpp:29:
#7 1782.6 In file included from ../include/kfr/dft.hpp:27:
#7 1782.6 /tmp/tmp.h0abk2FB2x/include/kfr/dft/convolution.hpp:159:5: error: no member named 'avx2' in 'kfr::cpu_t'
#7 1782.6     CMT_MULTI_PROTO_GATE(make_convolve_filter<T>(taps, block_size))
#7 1782.6     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#7 1782.6 /tmp/tmp.h0abk2FB2x/include/kfr/cident.h:801:17: note: expanded from macro 'CMT_MULTI_PROTO_GATE'
#7 1782.6     case cpu_t::avx2:                                                                                        \
#7 1782.6          ~~~~~~~^
#7 1782.6 In file included from ../capi/capi.cpp:29:
#7 1782.6 In file included from ../include/kfr/dft.hpp:27:
#7 1782.6 /tmp/tmp.h0abk2FB2x/include/kfr/dft/convolution.hpp:159:5: error: no member named 'avx' in 'kfr::cpu_t'
#7 1782.6     CMT_MULTI_PROTO_GATE(make_convolve_filter<T>(taps, block_size))
#7 1782.6     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#7 1782.6 /tmp/tmp.h0abk2FB2x/include/kfr/cident.h:803:17: note: expanded from macro 'CMT_MULTI_PROTO_GATE'
#7 1782.6     case cpu_t::avx:                                                                                         \
#7 1782.6          ~~~~~~~^
#7 1782.6 In file included from ../capi/capi.cpp:29:
#7 1782.6 In file included from ../include/kfr/dft.hpp:27:
#7 1782.6 /tmp/tmp.h0abk2FB2x/include/kfr/dft/convolution.hpp:159:5: error: no member named 'sse41' in 'kfr::cpu_t'
#7 1782.6     CMT_MULTI_PROTO_GATE(make_convolve_filter<T>(taps, block_size))
#7 1782.6     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#7 1782.6 /tmp/tmp.h0abk2FB2x/include/kfr/cident.h:805:17: note: expanded from macro 'CMT_MULTI_PROTO_GATE'
#7 1782.6     case cpu_t::sse41:                                                                                       \
#7 1782.6          ~~~~~~~^
#7 1782.6 In file included from ../capi/capi.cpp:29:
#7 1782.6 In file included from ../include/kfr/dft.hpp:27:
#7 1782.6 /tmp/tmp.h0abk2FB2x/include/kfr/dft/convolution.hpp:159:5: error: no member named 'ssse3' in 'kfr::cpu_t'
#7 1782.6     CMT_MULTI_PROTO_GATE(make_convolve_filter<T>(taps, block_size))
#7 1782.6     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#7 1782.6 /tmp/tmp.h0abk2FB2x/include/kfr/cident.h:807:17: note: expanded from macro 'CMT_MULTI_PROTO_GATE'
#7 1782.6     case cpu_t::ssse3:                                                                                       \
#7 1782.6          ~~~~~~~^
#7 1782.6 fatal error: too many errors emitted, stopping now [-ferror-limit=]
#7 1782.6 20 errors generated.
@dubrsl dubrsl changed the title Build failed on arm64 in capi/CMakeFiles/kfr_capi.dir/capi.cpp.o Build failed on arm64 with -DKFR_ENABLE_CAPI_BUILD=ON in capi/CMakeFiles/kfr_capi.dir/capi.cpp.o Oct 30, 2023
@dancazarin
Copy link
Member

Hi,
As of now C API is not officially supported on arm. But there are plans to make it fully work on all supported platforms in KFR 6 that will be released soon.

@dancazarin dancazarin added this to the KFR 6 milestone Oct 31, 2023
@dubrsl
Copy link
Author

dubrsl commented Nov 1, 2023

Hi, As of now C API is not officially supported on arm. But there are plans to make it fully work on all supported platforms in KFR 6 that will be released soon.

Thank you for clarification.
I was misled by this phrase in the changelog:
"Allow C API to be built on non-x86 systems".

I'm really looking forward to this opportunity.

@XzuluX
Copy link

XzuluX commented Dec 21, 2023

@dancazarin Is there already a specific schedule for when KFR 6 will be released? I would also like to use the C API on aarch64.

@dancazarin
Copy link
Member

KFR 6 prerelease is planned for release in late December/early January. There is a possibility that this feature will be backported to KFR 5.x, then it will be released in coming days.

@XzuluX
Copy link

XzuluX commented Dec 21, 2023

Thank you for the quick response, that sounds promising, and it would be nice if the C API could be compiled on ARM soon.

@dancazarin
Copy link
Member

@XzuluX @dubrsl KFR6 preview has been pushed to a separate branch v6. See more #196 (comment)

@XzuluX
Copy link

XzuluX commented Jan 25, 2024

@dancazarin Great, thank's for for the notification!

@dancazarin
Copy link
Member

Note: on linux/macOS KFR C API requires passing -DCMAKE_POSITION_INDEPENDENT_CODE=ON to cmake.

@dancazarin
Copy link
Member

KFR6 features are now available in main branch. ARM64 support for C API is added too. See documentation for more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants