Bug 241232 - math/libtommath: libtomcrypt.so: undefined reference to `mp-*` symbols (affects all libtommath consumers)
Summary: math/libtommath: libtomcrypt.so: undefined reference to `mp-*` symbols (affec...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Pietro Cerutti
URL:
Keywords: needs-patch, needs-qa
Depends on:
Blocks:
 
Reported: 2019-10-13 19:04 UTC by Oleksii Samorukov
Modified: 2019-11-24 12:46 UTC (History)
4 users (show)

See Also:
gahr: maintainer-feedback+
koobs: merge-quarterly?


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Oleksii Samorukov freebsd_committer freebsd_triage 2019-10-13 19:04:16 UTC
I found a build error on security/stoken port. When i was looking for the root cause - i found that usability check of the libtomcrypt failed due to unsatisfied dependency:

configure:13576: checking if libtomcrypt is usable
configure:13592: cc -o conftest -O2 -pipe  -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -DLTM_DESC -isystem /usr/local/include
-fstack-protector-strong  conftest.c -L/usr/local/lib -L/usr/local/lib -ltomcrypt  >&5
/usr/bin/ld: warning: libtommath.so.1, needed by /usr/local/lib/libtomcrypt.so, not found (try using -rpath or -rpath-link)
/usr/local/lib/libtomcrypt.so: undefined reference to `mp_prime_is_prime'
/usr/local/lib/libtomcrypt.so: undefined reference to `mp_mulmod'
/usr/local/lib/libtomcrypt.so: undefined reference to `mp_mul_d'
/usr/local/lib/libtomcrypt.so: undefined reference to `mp_div_2'
/usr/local/lib/libtomcrypt.so: undefined reference to `mp_sqrmod'
/usr/local/lib/libtomcrypt.so: undefined reference to `mp_copy'
/usr/local/lib/libtomcrypt.so: undefined reference to `mp_cnt_lsb'
/usr/local/lib/libtomcrypt.so: undefined reference to `mp_sqr'
/usr/local/lib/libtomcrypt.so: undefined reference to `mp_to_unsigned_bin'
/usr/local/lib/libtomcrypt.so: undefined reference to `mp_invmod'
/usr/local/lib/libtomcrypt.so: undefined reference to `mp_exptmod'
/usr/local/lib/libtomcrypt.so: undefined reference to `mp_mul'
/usr/local/lib/libtomcrypt.so: undefined reference to `mp_add_d'
/usr/local/lib/libtomcrypt.so: undefined reference to `mp_montgomery_reduce'
/usr/local/lib/libtomcrypt.so: undefined reference to `mp_submod'
/usr/local/lib/libtomcrypt.so: undefined reference to `mp_mod_d'
/usr/local/lib/libtomcrypt.so: undefined reference to `mp_sub'
/usr/local/lib/libtomcrypt.so: undefined reference to `mp_gcd'
/usr/local/lib/libtomcrypt.so: undefined reference to `mp_div'
/usr/local/lib/libtomcrypt.so: undefined reference to `mp_clear'
/usr/local/lib/libtomcrypt.so: undefined reference to `mp_get_int'
/usr/local/lib/libtomcrypt.so: undefined reference to `mp_montgomery_setup'
/usr/local/lib/libtomcrypt.so: undefined reference to `mp_cmp'
/usr/local/lib/libtomcrypt.so: undefined reference to `mp_read_radix'
/usr/local/lib/libtomcrypt.so: undefined reference to `mp_count_bits'
/usr/local/lib/libtomcrypt.so: undefined reference to `mp_add'
/usr/local/lib/libtomcrypt.so: undefined reference to `mp_addmod'
/usr/local/lib/libtomcrypt.so: undefined reference to `mp_lcm'
/usr/local/lib/libtomcrypt.so: undefined reference to `mp_rand'
/usr/local/lib/libtomcrypt.so: undefined reference to `mp_unsigned_bin_size'
/usr/local/lib/libtomcrypt.so: undefined reference to `mp_read_unsigned_bin'
/usr/local/lib/libtomcrypt.so: undefined reference to `mp_toradix'
/usr/local/lib/libtomcrypt.so: undefined reference to `mp_set_int'


I think that libtomcrypt port should set dependency on libtommath to avoid such errors
Comment 1 Oleksii Samorukov freebsd_committer freebsd_triage 2019-10-13 19:06:41 UTC
Okay, while looking into the port i think it should be lib dependency, not a build one
Comment 2 Oleksii Samorukov freebsd_committer freebsd_triage 2019-10-14 04:38:05 UTC
Related review request - https://reviews.freebsd.org/D22015
Comment 3 Pietro Cerutti freebsd_committer freebsd_triage 2019-10-14 06:56:27 UTC
Thanks, I’ll fix it later today
Comment 4 commit-hook freebsd_committer freebsd_triage 2019-10-14 09:30:17 UTC
A commit references this bug:

Author: gahr
Date: Mon Oct 14 09:29:45 UTC 2019
New revision: 514444
URL: https://svnweb.freebsd.org/changeset/ports/514444

Log:
  security/libtomcrypt: lib-depend on libtommath

  PR:		241232
  Submitted by:	samm@os2.kiev.ua
  Differential Revision:	https://reviews.freebsd.org/D22015

Changes:
  head/security/libtomcrypt/Makefile
Comment 5 Rubin Simons 2019-11-24 12:46:27 UTC
Is there a reason this did not go to the 2019Q4 branch (if I read the svnweb link correctly)? Am I right in understanding that the quarterly pkg build, which builds from the 2019Q4 branch, would fail packages depending on libtomcrypt, if this fix is not merged to 2019Q4?