Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 699322 - mail-filter/rspamd-2.1 : /.../ld: ../.../librspamd-kann.so: undefined reference to cblas_sgemm
Summary: mail-filter/rspamd-2.1 : /.../ld: ../.../librspamd-kann.so: undefined referen...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Christian Roessner
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2019-11-04 19:47 UTC by Toralf Förster
Modified: 2021-01-09 19:06 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge-info.txt (emerge-info.txt,16.79 KB, text/plain)
2019-11-04 19:47 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,209.27 KB, text/plain)
2019-11-04 19:47 UTC, Toralf Förster
Details
environment (environment,139.30 KB, text/plain)
2019-11-04 19:47 UTC, Toralf Förster
Details
etc.portage.tbz2 (etc.portage.tbz2,12.57 KB, application/x-bzip)
2019-11-04 19:47 UTC, Toralf Förster
Details
logs.tbz2 (logs.tbz2,13.18 KB, application/x-bzip)
2019-11-04 19:47 UTC, Toralf Förster
Details
mail-filter:rspamd-2.1:20191104-185523.log (mail-filter:rspamd-2.1:20191104-185523.log,785.35 KB, text/plain)
2019-11-04 19:47 UTC, Toralf Förster
Details
temp.tbz2 (temp.tbz2,49.04 KB, application/x-bzip)
2019-11-04 19:47 UTC, Toralf Förster
Details
rspamd-2.1-r1.ebuild (rspamd-2.1-r1.ebuild,2.34 KB, text/plain)
2019-11-07 16:42 UTC, Christian Roessner
Details
Patch 1 (2.1-Minor-Fix-openblas-detection-logic-or-try-to.patch,3.83 KB, application/mbox)
2019-11-07 16:43 UTC, Christian Roessner
Details
Patch 2 (2.1-Minor-Disable-blas-by-default.patch,951 bytes, application/mbox)
2019-11-07 16:43 UTC, Christian Roessner
Details
Patch 3 (2.1-Minor-Add-option-to-enable-openblas-support-to-cmake.patch,1.52 KB, application/mbox)
2019-11-07 16:44 UTC, Christian Roessner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2019-11-04 19:47:12 UTC
/usr/bin/x86_64-pc-linux-gnu-gcc -g -O2 -O2 -pipe -march=native  -Wl,-O1 -Wl,--as-needed CMakeFiles/rspamd.dir/controller.c.o CMakeFiles/rspamd.dir/fuzzy_storage.c.o CMakeFiles/rspamd.dir/rspamd.c.o CMakeFiles/rspamd.dir/worker.c.o CMakeFiles/rspamd.dir/rspamd_proxy.c.o CMakeFiles/rspamd.dir/hs_helper.c.o CMakeFiles/rspamd.dir/workers.c.o  -o rspamd-2.1 -Wl,-rpath,/var/tmp/portage/mail-filter/rspamd-2.1/work/rspamd-2.1_build/src:/var/tmp/portage/mail-filter/rspamd-2.1/work/rspamd-2.1_build/contrib/replxx:/var/tmp/portage/mail-filter/rspamd-2.1/work/rspamd-2.1_build/contrib/aho-corasick:/var/tmp/portage/mail-filter/rspamd-2.1/work/rspamd-2.1_build/contrib/libev:/var/tmp/portage/mail-filter/rspamd-2.1/work/rspamd-2.1_build/contrib/kann: librspamd-server.so ../contrib/http-parser/librspamd-http-parser.a ../contrib/fpconv/librspamd-fpconv.a ../contrib/cdb/librspamd-cdb.a ../contrib/lua-lpeg/librspamd-lpeg.a ../contrib/lc-btrie/liblcbtrie.a ../contrib/zstd/librspamd-zstd.a ../contrib/snowball/libstemmer.a ../contrib/hiredis/librspamd-hiredis.a -lhs -lm -lpcre -lsqlite3 -licui18n -licuuc -licudata -lssl -lcrypto -lz -lsodium -lhs -lm -lpcre -lsqlite3 -licui18n -licuuc -licudata -lssl -lcrypto -lz -lsodium -lrt -ldl -lresolv -lpcre /usr/lib64/libluajit-5.1.so ../contrib/libucl/libucl.a ../contrib/librdns/librdns.a ../contrib/libottery/libottery.a ../contrib/xxhash/libxxhash.a ../contrib/replxx/librspamd-replxx.so ../contrib/aho-corasick/librspamd-actrie.so -lglib-2.0 ../contrib/t1ha/librspamd-t1ha.a ../contrib/libev/librspamd-ev.so ../contrib/kann/librspamd-kann.so /usr/lib64/libblas.so 
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: ../contrib/kann/librspamd-kann.so: undefined reference to `cblas_sgemm'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: librspamd-server.so: undefined reference to `openblas_set_num_threads'
collect2: error: ld returned 1 exit status
make[2]: *** [src/CMakeFiles/rspamd.dir/build.make:196: src/rspamd-2.1] Error 1

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1_desktop_plasma_systemd-libressl-20191030-101524

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-9.2.0 *

clang:
clang version 9.0.0 (tags/RELEASE_900/final)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/9/bin
llvm:
9.0.0
Available Python interpreters, in order of preference:
  [1]   python3.6
  [2]   python2.7 (fallback)
  [3]   pypy3 (fallback)
  [4]   pypy (fallback)
Available Ruby profiles:
  [1]   ruby24 (with Rubygems)
  [2]   ruby25 (with Rubygems) *
Available Rust versions:
  [1]   rust-1.38.0 *
java-config:
The following VMs are available for generation-2:
1)	IcedTea JDK 3.13.0 [icedtea-8]
*)	IcedTea JDK 3.13.0 [icedtea-bin-8]
Available Java Virtual Machines:
  [1]   icedtea-8 
  [2]   icedtea-bin-8  system-vm

repository:
==> /var/db/repos/gentoo/metadata/timestamp.chk <==
Mon, 04 Nov 2019 18:06:14 +0000

emerge -qpvO mail-filter/rspamd
[ebuild  N    ] mail-filter/rspamd-2.1  USE="jit libressl -blas -jemalloc -pcre2" CPU_FLAGS_X86="ssse3"
Comment 1 Toralf Förster gentoo-dev 2019-11-04 19:47:15 UTC
Created attachment 595020 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2019-11-04 19:47:20 UTC
Created attachment 595022 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2019-11-04 19:47:23 UTC
Created attachment 595024 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2019-11-04 19:47:27 UTC
Created attachment 595026 [details]
etc.portage.tbz2
Comment 5 Toralf Förster gentoo-dev 2019-11-04 19:47:29 UTC
Created attachment 595028 [details]
logs.tbz2
Comment 6 Toralf Förster gentoo-dev 2019-11-04 19:47:33 UTC
Created attachment 595030 [details]
mail-filter:rspamd-2.1:20191104-185523.log
Comment 7 Toralf Förster gentoo-dev 2019-11-04 19:47:36 UTC
Created attachment 595032 [details]
temp.tbz2
Comment 8 Christian Roessner 2019-11-05 16:56:33 UTC
Do yo have installed this package: sci-libs/openblas

I see that you used the default "-blas", so there should be no dependency. So I wonder why the build process has exited with unresolved symbols to:

libblas.so

If you _have_ installed the package by hand, can you please set the USE flag for blas, too. It might be an upstream error, where the CMake file does not work correctly if the blas lib is installed but not specified.

I have Rspamd-2.1 working here with blas enabled, so I can not test your setup on my system.
Comment 9 Kim B. Sindalsen 2019-11-05 18:44:04 UTC
Builds for me with -blas
mail ~ # emerge -qpvO mail-filter/rspamd
[ebuild   R   ] mail-filter/rspamd-2.1  USE="jemalloc jit -blas -libressl -pcre2" CPU_FLAGS_X86="ssse3"

mail ~ # gcc-config -l
 [1] x86_64-pc-linux-gnu-9.2.0 *
Comment 10 Christian Roessner 2019-11-07 16:42:33 UTC
Created attachment 595232 [details]
rspamd-2.1-r1.ebuild
Comment 11 Christian Roessner 2019-11-07 16:43:33 UTC
Created attachment 595234 [details]
Patch 1

Please put this under mail-filter/rspamd/files/
Comment 12 Christian Roessner 2019-11-07 16:43:55 UTC
Created attachment 595236 [details]
Patch 2

Please put this under mail-filter/rspamd/files/
Comment 13 Christian Roessner 2019-11-07 16:44:44 UTC
Created attachment 595238 [details]
Patch 3

Please put this under mail-filter/rspamd/files/

Can you please test the -r1 ebuild with the three patches and report back?
Comment 14 Robert Förster 2020-08-28 14:59:47 UTC
https://github.com/rspamd/rspamd/commit/969e2584dbd7a45531eac6b31159f84a9d97ca72 - seems related?
Comment 15 Petr Vaněk gentoo-dev 2020-08-31 13:38:41 UTC
This issues does not affect any version present in the overlay. It was fixed in version 2.2 ebuild in https://github.com/gentoo/gentoo/pull/13770.