Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 608548 - dev-lang/moarvm-2017.01 fails to build: libmoar.so: undefined reference to `mp_set_long'
Summary: dev-lang/moarvm-2017.01 fails to build: libmoar.so: undefined reference to `m...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Patrick Lauer
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: raku
  Show dependency tree
 
Reported: 2017-02-07 18:04 UTC by J.Borme
Modified: 2017-06-27 17:20 UTC (History)
5 users (show)

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


Attachments
Build log (build.log,24.43 KB, text/x-log)
2017-02-07 18:06 UTC, J.Borme
Details
emerge--info (emerge-info.txt,5.67 KB, text/plain)
2017-02-07 18:06 UTC, J.Borme
Details
depend on >=dev-libs/libtommath-1.0 (moarvm-libtommath.patch,403 bytes, patch)
2017-04-25 08:50 UTC, M. B.
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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(-)