Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 608548

Summary: dev-lang/moarvm-2017.01 fails to build: libmoar.so: undefined reference to `mp_set_long'
Product: Gentoo Linux Reporter: J.Borme <gentoo_bugs.nu_q5v>
Component: Current packagesAssignee: Patrick Lauer <patrick>
Status: RESOLVED FIXED    
Severity: normal CC: bwoods288, gentoo_bugs.nu_q5v, kentnl, perl, tomboy64
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 604346    
Attachments: Build log
emerge--info
depend on >=dev-libs/libtommath-1.0

Description J.Borme 2017-02-07 18:04:30 UTC
dev-lang/moarvm fails to build during the linking step. Message is:

linking 3rdparty/sha1/libsha1.a
linking libmoar.so
./libmoar.so: undefined reference to `mp_set_long'
x86_64-pc-linux-gnu-clang-3.7: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Makefile:497: moar] Error 1

Problem happens with all portage versions of moarvm (2016.10, 2016.11, 2016.12, 2017.01).
Problem happens with both gcc-5.3.0 and clang-3.7.1-r100 (USE=clang emerge rakudo).

The log of the perl6 IRC channel shows someone else had the problem with moarvm-2016.11 on gentoo (see the conversation with user protium right at the beginning of the log): https://irclog.perlgeek.de/perl6/2016-11-06/text

[ebuild  N    ] dev-lang/moarvm-2017.01  USE="clang jit (-asan) -debug -doc -optimize -static-libs -ubsan"

Reproducible: Always
Comment 1 J.Borme 2017-02-07 18:06:08 UTC
Created attachment 462816 [details]
Build log

The build log, in this case for "USE=clang emerge =dev-lang/moarvm-2017.01"
Comment 2 J.Borme 2017-02-07 18:06:51 UTC
Created attachment 462818 [details]
emerge--info
Comment 3 bwoods288 2017-04-15 00:54:58 UTC
This has to do with the version of libtommath.   The version that is required doesn't include mp_{get,set}_long.  You can fgrep the includes for library and even confirm it.  I used libtommath-1.0 in the gentoo repos and it worked (rakudo and all). 

After upgrading libtommath
fgrep mp_set_long /usr/include/tommath.h /usr/include/tommath_class.h /usr/include/tommath_superclass.h
/usr/include/tommath.h:int mp_set_long(mp_int *a, unsigned long b);
/usr/include/tommath.h:int mp_set_long_long(mp_int *a, unsigned long long b);
Comment 4 M. B. 2017-04-25 08:50:25 UTC
Created attachment 470842 [details, diff]
depend on >=dev-libs/libtommath-1.0

Could you apply this patch for 2017.04 and close this bug please?
Thanks.
Comment 5 Joost Ruis 2017-05-31 12:00:14 UTC
(In reply to M. B. from comment #4)
> Created attachment 470842 [details, diff] [details, diff]
> depend on >=dev-libs/libtommath-1.0
> 
> Could you apply this patch for 2017.04 and close this bug please?
> Thanks.

Confirmed here. That solves it.
Comment 6 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2017-06-27 17:20:42 UTC
commit:  29d4814a066c0b99fbcd7c6f44d0645570d6ccaa
author:  2017-06-28 05:06:34 +1200 Kent Fredric <kentnl@gentoo.org>
commit:  2017-06-28 05:19:58 +1200 Kent Fredric <kentnl@gentoo.org>
gpg-key: E854324B1366A820

    dev-lang/moarvm: Fix dependency on libtommath-1.0 re bugs #608548 and #576284

    Upstream has used a bundled copy of libtommath at version 1.0 since
    version 2016.02, but we use system copies, and so, which end users
    who are running full ~arch would have gotten a working version by
    fortunate accident.
    
    An -r1 bump is required here, as dependency propagation must replicate,
    even for people who already have compile working, as users must be
    discouraged fron downgrading libtommath if they try to do partial
    reversion to 'arch'
    
    Thanks to the patient reporters and commenters on the related bugs.
    
    Bug: https://bugs.gentoo.org/576284
    Bug: https://bugs.gentoo.org/608548
    Package-Manager: Portage-2.3.6, Repoman-2.3.2


 dev-lang/moarvm/moarvm-2016.10-r1.ebuild | 61 +++++
 dev-lang/moarvm/moarvm-2016.10.ebuild    | 61 -----
 dev-lang/moarvm/moarvm-2016.11-r1.ebuild | 61 +++++
 dev-lang/moarvm/moarvm-2016.11.ebuild    | 61 -----
 dev-lang/moarvm/moarvm-2016.12-r1.ebuild | 61 +++++
 dev-lang/moarvm/moarvm-2016.12.ebuild    | 61 -----
 dev-lang/moarvm/moarvm-2017.01-r1.ebuild | 61 +++++
 dev-lang/moarvm/moarvm-2017.01.ebuild    | 61 -----
 dev-lang/moarvm/moarvm-2017.02-r1.ebuild | 61 +++++
 dev-lang/moarvm/moarvm-2017.02.ebuild    | 61 -----
 dev-lang/moarvm/moarvm-2017.03-r1.ebuild | 61 +++++
 dev-lang/moarvm/moarvm-2017.03.ebuild    | 61 -----
 dev-lang/moarvm/moarvm-2017.04-r1.ebuild | 61 +++++
 dev-lang/moarvm/moarvm-2017.04.ebuild    | 61 -----
 dev-lang/moarvm/moarvm-2017.05-r1.ebuild | 61 +++++
 dev-lang/moarvm/moarvm-2017.05.ebuild    | 61 -----
 dev-lang/moarvm/moarvm-2017.06-r1.ebuild | 61 +++++
 dev-lang/moarvm/moarvm-2017.06.ebuild    | 61 -----
 dev-lang/moarvm/moarvm-9999.ebuild       |  4 +-
 19 files changed, 551 insertions(+), 551 deletions(-)