giaf / blasfeo

Basic linear algebra subroutines for embedded optimization
Other
322 stars 88 forks source link

Missing symbols kernel_dpack_buffer_* in the shared library #163

Closed yurivict closed 2 years ago

yurivict commented 2 years ago

Another project https://github.com/giaf/hpipm that uses blasfeo fails with missing symbols:

/usr/bin/cc -O2 -pipe -fno-omit-frame-pointer  -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -O2 -fPIC -DTARGET_AVX -m64 -mavx  -DUSE_C99_MATH -DRUNTIME_CHECKS -O2 -pipe -fno-omit-frame-pointer  -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -fstack-protector-strong test_problems/CMakeFiles/d_dense_qp.dir/test_d_dense.c.o -o test_problems/d_dense_qp  -Wl,-rpath,/usr/local/lib  libhpipm.a  /usr/local/lib/libblasfeo.so  -lm && :
ld: error: /usr/local/lib/libblasfeo.so: undefined reference to kernel_dpack_buffer_fn [--no-allow-shlib-undefined]
ld: error: /usr/local/lib/libblasfeo.so: undefined reference to kernel_dpack_buffer_ft [--no-allow-shlib-undefined]
ld: error: /usr/local/lib/libblasfeo.so: undefined reference to kernel_dpack_buffer_ln [--no-allow-shlib-undefined]
ld: error: /usr/local/lib/libblasfeo.so: undefined reference to kernel_dpack_buffer_lt [--no-allow-shlib-undefined]
ld: error: /usr/local/lib/libblasfeo.so: undefined reference to kernel_dpack_buffer_ut [--no-allow-shlib-undefined]
cc: error: linker command failed with exit code 1 (use -v to see invocation)

Version: 0.1.3 FreeBSD 13.1

yurivict commented 2 years ago

Tests in blasfeo also fail:

===>  Testing for blasfeo-0.1.3
CMake Deprecation Warning at CMakeLists.txt:36 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.

-- Using linear algebra: HIGH_PERFORMANCE
-- Using matrix format: PANELMAJ
-- Using external BLAS: 0
-- Testing target GENERIC: assembly compilation [success]
-- Testing target GENERIC: assembly run [success]
-- Testing target GENERIC: intrinsic compilation [success]
-- Testing target GENERIC: intrinsic run [success]
-- Compiling for target: GENERIC
-- Configuring done
-- Generating done
-- Build files have been written to: /disk-samsung/freebsd-ports/math/blasfeo/work/.build
[ 12% 4/8] /usr/bin/cc  -I/disk-samsung/freebsd-ports/math/blasfeo/work/blasfeo-0.1.3/include -O2 -pipe -fno-omit-frame-pointer  -fstack-protector-strong -fno-strict-aliasing -DLA_HIGH_PERFORMANCE -DBLASFEO_REF_API -DMF_PANELMAJ -DK_MAX_STACK=300 -DBLAS_API -DUSE_C99_MATH -DEXT_DEP -DEXTERNAL_BLAS_NONE -O2 -fPIC -DTARGET_GENERIC  -O2 -pipe -fno-omit-frame-pointer  -fstack-protector-strong -fno-strict-aliasing -MD -MT tests/CMakeFiles/test_s_blasfeo_api.dir/test_s_blasfeo_api.c.o -MF tests/CMakeFiles/test_s_blasfeo_api.dir/test_s_blasfeo_api.c.o.d -o tests/CMakeFiles/test_s_blasfeo_api.dir/test_s_blasfeo_api.c.o -c /disk-samsung/freebsd-ports/math/blasfeo/work/blasfeo-0.1.3/tests/test_s_blasfeo_api.c
[ 25% 5/8] : && /usr/bin/cc -O2 -pipe -fno-omit-frame-pointer  -fstack-protector-strong -fno-strict-aliasing -DLA_HIGH_PERFORMANCE -DBLASFEO_REF_API -DMF_PANELMAJ -DK_MAX_STACK=300 -DBLAS_API -DUSE_C99_MATH -DEXT_DEP -DEXTERNAL_BLAS_NONE -O2 -fPIC -DTARGET_GENERIC  -O2 -pipe -fno-omit-frame-pointer  -fstack-protector-strong -fno-strict-aliasing -fstack-protector-strong tests/CMakeFiles/test_s_blasfeo_api.dir/test_s_blasfeo_api.c.o -o tests/test_s_blasfeo_api  -Wl,-rpath,/disk-samsung/freebsd-ports/math/blasfeo/work/.build  libblasfeo.so  -lm && :
FAILED: tests/test_s_blasfeo_api 
: && /usr/bin/cc -O2 -pipe -fno-omit-frame-pointer  -fstack-protector-strong -fno-strict-aliasing -DLA_HIGH_PERFORMANCE -DBLASFEO_REF_API -DMF_PANELMAJ -DK_MAX_STACK=300 -DBLAS_API -DUSE_C99_MATH -DEXT_DEP -DEXTERNAL_BLAS_NONE -O2 -fPIC -DTARGET_GENERIC  -O2 -pipe -fno-omit-frame-pointer  -fstack-protector-strong -fno-strict-aliasing -fstack-protector-strong tests/CMakeFiles/test_s_blasfeo_api.dir/test_s_blasfeo_api.c.o -o tests/test_s_blasfeo_api  -Wl,-rpath,/disk-samsung/freebsd-ports/math/blasfeo/work/.build  libblasfeo.so  -lm && :
ld: error: libblasfeo.so: undefined reference to kernel_dpack_buffer_ft [--no-allow-shlib-undefined]
ld: error: libblasfeo.so: undefined reference to kernel_dpack_buffer_fn [--no-allow-shlib-undefined]
ld: error: libblasfeo.so: undefined reference to kernel_dpack_buffer_ln [--no-allow-shlib-undefined]
ld: error: libblasfeo.so: undefined reference to kernel_dpack_buffer_lt [--no-allow-shlib-undefined]
ld: error: libblasfeo.so: undefined reference to kernel_dpack_buffer_ut [--no-allow-shlib-undefined]
cc: error: linker command failed with exit code 1 (use -v to see invocation)
[ 37% 5/8] /usr/bin/cc  -I/disk-samsung/freebsd-ports/math/blasfeo/work/blasfeo-0.1.3/include -O2 -pipe -fno-omit-frame-pointer  -fstack-protector-strong -fno-strict-aliasing -DLA_HIGH_PERFORMANCE -DBLASFEO_REF_API -DMF_PANELMAJ -DK_MAX_STACK=300 -DBLAS_API -DUSE_C99_MATH -DEXT_DEP -DEXTERNAL_BLAS_NONE -O2 -fPIC -DTARGET_GENERIC  -O2 -pipe -fno-omit-frame-pointer  -fstack-protector-strong -fno-strict-aliasing -MD -MT tests/CMakeFiles/test_d_blasfeo_api.dir/test_d_blasfeo_api.c.o -MF tests/CMakeFiles/test_d_blasfeo_api.dir/test_d_blasfeo_api.c.o.d -o tests/CMakeFiles/test_d_blasfeo_api.dir/test_d_blasfeo_api.c.o -c /disk-samsung/freebsd-ports/math/blasfeo/work/blasfeo-0.1.3/tests/test_d_blasfeo_api.c
[ 50% 5/8] /usr/bin/cc  -I/disk-samsung/freebsd-ports/math/blasfeo/work/blasfeo-0.1.3/include -O2 -pipe -fno-omit-frame-pointer  -fstack-protector-strong -fno-strict-aliasing -DLA_HIGH_PERFORMANCE -DBLASFEO_REF_API -DMF_PANELMAJ -DK_MAX_STACK=300 -DBLAS_API -DUSE_C99_MATH -DEXT_DEP -DEXTERNAL_BLAS_NONE -O2 -fPIC -DTARGET_GENERIC  -O2 -pipe -fno-omit-frame-pointer  -fstack-protector-strong -fno-strict-aliasing -MD -MT tests/CMakeFiles/test_s_blas_api.dir/test_s_blas_api.c.o -MF tests/CMakeFiles/test_s_blas_api.dir/test_s_blas_api.c.o.d -o tests/CMakeFiles/test_s_blas_api.dir/test_s_blas_api.c.o -c /disk-samsung/freebsd-ports/math/blasfeo/work/blasfeo-0.1.3/tests/test_s_blas_api.c
/disk-samsung/freebsd-ports/math/blasfeo/work/blasfeo-0.1.3/tests/test_s_blas_api.c:263:2: warning: implicit declaration of function 'blasfeo_sgemm' is invalid in C99 [-Wimplicit-function-declaration]
        blasfeo_sgemm(c_t, c_t, m0, n0, k0, alpha, B, n, A, n, beta, C2, n, C2, n);
        ^
1 warning generated.
[ 62% 5/8] /usr/bin/cc  -I/disk-samsung/freebsd-ports/math/blasfeo/work/blasfeo-0.1.3/include -O2 -pipe -fno-omit-frame-pointer  -fstack-protector-strong -fno-strict-aliasing -DLA_HIGH_PERFORMANCE -DBLASFEO_REF_API -DMF_PANELMAJ -DK_MAX_STACK=300 -DBLAS_API -DUSE_C99_MATH -DEXT_DEP -DEXTERNAL_BLAS_NONE -O2 -fPIC -DTARGET_GENERIC  -O2 -pipe -fno-omit-frame-pointer  -fstack-protector-strong -fno-strict-aliasing -MD -MT tests/CMakeFiles/test_d_blas_api.dir/test_d_blas_api.c.o -MF tests/CMakeFiles/test_d_blas_api.dir/test_d_blas_api.c.o.d -o tests/CMakeFiles/test_d_blas_api.dir/test_d_blas_api.c.o -c /disk-samsung/freebsd-ports/math/blasfeo/work/blasfeo-0.1.3/tests/test_d_blas_api.c
/disk-samsung/freebsd-ports/math/blasfeo/work/blasfeo-0.1.3/tests/test_d_blas_api.c:259:2: warning: implicit declaration of function 'blas_dsyrk' is invalid in C99 [-Wimplicit-function-declaration]
        blas_dsyrk(&c_u, &c_t, &m0, &k0, &alpha, A, &n, &beta, C2, &n);
        ^
1 warning generated.
giaf commented 2 years ago

Thanks for reporting the issues, the first should have been fixed in the master already when you opened the issue, while the second is now fixed in this commit https://github.com/giaf/blasfeo/commit/4af6c64527344651da1de35511502f970fa3e97e