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

cmake build failure with XNNPACK_BUILD_TESTS=ON and XNNPACK_LIBRARY_TYPE=shared #6285

Open
loqs opened this issue Apr 14, 2024 · 0 comments
Open

Comments

@loqs
Copy link

loqs commented Apr 14, 2024

Building 058ff10 with:

  • cmake 3.29.2
  • gcc 13.2.1
  • binutils 2.42
    using:
$ CFLAGS='-fPIC'  cmake -B build -S xnnpack -DXNNPACK_BUILD_TESTS=ON -DXNNPACK_LIBRARY_TYPE=shared
$ cmake --build build
....
/usr/bin/ld: [ 52%] Building C object CMakeFiles/microkernels-all.dir/src/f16-dwconv/gen/f16-dwconv-6f6m7l8c8s4r-minmax-fma3.c.o
CMakeFiles/deconvolution-nhwc-test.dir/test/deconvolution-nhwc.cc.o: in function `DECONVOLUTION_NHWC_QS8_kernel_1x1_Test::TestBody()':
deconvolution-nhwc.cc:(.text+0x22d): undefined reference to `xnn_init_qs8_qc8w_gemm_config'
/usr/bin/ld: CMakeFiles/deconvolution-nhwc-test.dir/test/deconvolution-nhwc.cc.o: in function `DECONVOLUTION_NHWC_QS8_kernel_1x1_varying_input_width_Test::TestBody()':
deconvolution-nhwc.cc:(.text+0x45d): undefined reference to `xnn_init_qs8_qc8w_gemm_config'
/usr/bin/ld: CMakeFiles/deconvolution-nhwc-test.dir/test/deconvolution-nhwc.cc.o: in function `DECONVOLUTION_NHWC_QS8_kernel_1x1_varying_input_height_Test::TestBody()':
deconvolution-nhwc.cc:(.text+0x6b9): undefined reference to `xnn_init_qs8_qc8w_gemm_config'
/usr/bin/ld: CMakeFiles/deconvolution-nhwc-test.dir/test/deconvolution-nhwc.cc.o: in function `DECONVOLUTION_NHWC_QS8_kernel_1x1_varying_input_channels_Test::TestBody()':
deconvolution-nhwc.cc:(.text+0x913): undefined reference to `xnn_init_qs8_qc8w_gemm_config'
/usr/bin/ld: CMakeFiles/deconvolution-nhwc-test.dir/test/deconvolution-nhwc.cc.o: in function `DECONVOLUTION_NHWC_QS8_kernel_1x1_varying_output_channels_Test::TestBody()':
deconvolution-nhwc.cc:(.text+0xb71): undefined reference to `xnn_init_qs8_qc8w_gemm_config'
/usr/bin/ld: CMakeFiles/deconvolution-nhwc-test.dir/test/deconvolution-nhwc.cc.o:deconvolution-nhwc.cc:(.text+0xdc9): more undefined references to `xnn_init_qs8_qc8w_gemm_config' follow
/usr/bin/ld: CMakeFiles/deconvolution-nhwc-test.dir/test/deconvolution-nhwc.cc.o: in function `DECONVOLUTION_NHWC_QU8_kernel_1x1_Test::TestBody()':
deconvolution-nhwc.cc:(.text+0x28f97): undefined reference to `xnn_init_qu8_gemm_config'
/usr/bin/ld: CMakeFiles/deconvolution-nhwc-test.dir/test/deconvolution-nhwc.cc.o: in function `DECONVOLUTION_NHWC_QU8_kernel_1x1_varying_input_width_Test::TestBody()':
deconvolution-nhwc.cc:(.text+0x291c7): undefined reference to `xnn_init_qu8_gemm_config'
/usr/bin/ld: CMakeFiles/deconvolution-nhwc-test.dir/test/deconvolution-nhwc.cc.o: in function `DECONVOLUTION_NHWC_QU8_kernel_1x1_varying_input_height_Test::TestBody()':
deconvolution-nhwc.cc:(.text+0x29423): undefined reference to `xnn_init_qu8_gemm_config'
/usr/bin/ld: CMakeFiles/deconvolution-nhwc-test.dir/test/deconvolution-nhwc.cc.o: in function `DECONVOLUTION_NHWC_QU8_kernel_1x1_varying_input_channels_Test::TestBody()':
deconvolution-nhwc.cc:(.text+0x2967d): undefined reference to `xnn_init_qu8_gemm_config'
/usr/bin/ld: CMakeFiles/deconvolution-nhwc-test.dir/test/deconvolution-nhwc.cc.o: in function `DECONVOLUTION_NHWC_QU8_kernel_1x1_varying_output_channels_Test::TestBody()':
deconvolution-nhwc.cc:(.text+0x298db): undefined reference to `xnn_init_qu8_gemm_config'
/usr/bin/ld: CMakeFiles/deconvolution-nhwc-test.dir/test/deconvolution-nhwc.cc.o:deconvolution-nhwc.cc:(.text+0x29b33): more undefined references to `xnn_init_qu8_gemm_config' follow
/usr/bin/ld: CMakeFiles/deconvolution-nhwc-test.dir/test/deconvolution-nhwc.cc.o: in function `DECONVOLUTION_NHWC_F16_kernel_1x1_Test::TestBody()':
deconvolution-nhwc.cc:(.text+0x51d01): undefined reference to `xnn_init_f16_gemm_config'
/usr/bin/ld: CMakeFiles/deconvolution-nhwc-test.dir/test/deconvolution-nhwc.cc.o: in function `DECONVOLUTION_NHWC_F16_kernel_1x1_with_fp32_weights_Test::TestBody()':
deconvolution-nhwc.cc:(.text+0x51ea5): undefined reference to `xnn_init_f16_gemm_config'
/usr/bin/ld: CMakeFiles/deconvolution-nhwc-test.dir/test/deconvolution-nhwc.cc.o: in function `DECONVOLUTION_NHWC_F16_kernel_1x1_varying_input_width_Test::TestBody()':
deconvolution-nhwc.cc:(.text+0x52057): undefined reference to `xnn_init_f16_gemm_config'
/usr/bin/ld: CMakeFiles/deconvolution-nhwc-test.dir/test/deconvolution-nhwc.cc.o: in function `DECONVOLUTION_NHWC_F16_kernel_1x1_varying_input_height_Test::TestBody()':
deconvolution-nhwc.cc:(.text+0x52227): undefined reference to `xnn_init_f16_gemm_config'
/usr/bin/ld: CMakeFiles/deconvolution-nhwc-test.dir/test/deconvolution-nhwc.cc.o: in function `DECONVOLUTION_NHWC_F16_kernel_1x1_varying_input_channels_Test::TestBody()':
deconvolution-nhwc.cc:(.text+0x523f5): undefined reference to `xnn_init_f16_gemm_config'
/usr/bin/ld: CMakeFiles/deconvolution-nhwc-test.dir/test/deconvolution-nhwc.cc.o:deconvolution-nhwc.cc:(.text+0x525c7): more undefined references to `xnn_init_f16_gemm_config' follow
/usr/bin/ld: CMakeFiles/deconvolution-nhwc-test.dir/test/deconvolution-nhwc.cc.o: in function `DECONVOLUTION_NHWC_F32_kernel_1x1_Test::TestBody()':
deconvolution-nhwc.cc:(.text+0x7379f): undefined reference to `xnn_init_f32_gemm_config'
/usr/bin/ld: CMakeFiles/deconvolution-nhwc-test.dir/test/deconvolution-nhwc.cc.o: in function `DECONVOLUTION_NHWC_F32_kernel_1x1_varying_input_width_Test::TestBody()':
deconvolution-nhwc.cc:(.text+0x739cf): undefined reference to `xnn_init_f32_gemm_config'
/usr/bin/ld: CMakeFiles/deconvolution-nhwc-test.dir/test/deconvolution-nhwc.cc.o: in function `DECONVOLUTION_NHWC_F32_kernel_1x1_varying_input_height_Test::TestBody()':
deconvolution-nhwc.cc:(.text+0x73c2b): undefined reference to `xnn_init_f32_gemm_config'
/usr/bin/ld: CMakeFiles/deconvolution-nhwc-test.dir/test/deconvolution-nhwc.cc.o: in function `DECONVOLUTION_NHWC_F32_kernel_1x1_varying_input_channels_Test::TestBody()':
deconvolution-nhwc.cc:(.text+0x73e85): undefined reference to `xnn_init_f32_gemm_config'
/usr/bin/ld: CMakeFiles/deconvolution-nhwc-test.dir/test/deconvolution-nhwc.cc.o: in function `DECONVOLUTION_NHWC_F32_kernel_1x1_varying_output_channels_Test::TestBody()':
deconvolution-nhwc.cc:(.text+0x740e3): undefined reference to `xnn_init_f32_gemm_config'
/usr/bin/ld: CMakeFiles/deconvolution-nhwc-test.dir/test/deconvolution-nhwc.cc.o:deconvolution-nhwc.cc:(.text+0x7433b): more undefined references to `xnn_init_f32_gemm_config' follow
[ 52%] Building C object CMakeFiles/microkernels-all.dir/src/f16-dwconv/gen/f16-dwconv-6f6m7l16c8s4r-minmax-fma3.c.o
[ 52%] Building C object CMakeFiles/microkernels-all.dir/src/f16-dwconv/gen/f16-dwconv-6f6m7l16c8s4r-minmax-fma3-acc2.c.o
[ 52%] Building C object CMakeFiles/microkernels-all.dir/src/f16-dwconv/gen/f16-dwconv-6f6m7l32c8s4r-minmax-fma3-acc2.c.o
[ 52%] Building C object CMakeFiles/microkernels-all.dir/src/f16-dwconv/gen/f16-dwconv-6f6m7l32c8s4r-minmax-fma3.c.o
/usr/bin/ld: deconvolution-nhwc-test: internal symbol `xnn_init_f32_gemm_config' isn't defined
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/deconvolution-nhwc-test.dir/build.make:103: deconvolution-nhwc-test] Error 1
make[1]: *** [CMakeFiles/Makefile2:2881: CMakeFiles/deconvolution-nhwc-test.dir/all] Error 2

Full build log xnnpack-r3783.51a9875-1-x86_64-build.log

Building with either option alone succeeds.

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

1 participant