Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 608214 - =dev-perl/Digest-GOST-0.60.0 - src_test(): .../work/Digest-GOST-0.06/blib/arch/auto/Digest/GOST/GOST.so: undefined symbol: rhash_u32_swap_copy at /usr/lib/perl5/5.2{2,4}
Summary: =dev-perl/Digest-GOST-0.60.0 - src_test(): .../work/Digest-GOST-0.06/blib/arc...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Perl team
URL: https://rt.cpan.org/Ticket/Display.ht...
Whiteboard:
Keywords: PATCH, TESTFAILURE
Depends on:
Blocks: 605004
  Show dependency tree
 
Reported: 2017-02-04 13:55 UTC by Jeroen Roovers (RETIRED)
Modified: 2017-10-16 22:39 UTC (History)
1 user (show)

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


Attachments
dev-perl:Digest-GOST-0.60.0:20170204-134408.log (dev-perl:Digest-GOST-0.60.0:20170204-134408.log,16.93 KB, text/plain)
2017-02-04 13:55 UTC, Jeroen Roovers (RETIRED)
Details
0001-Fix-link-failure-on-big-endian-platforms.patch (0001-Fix-link-failure-on-big-endian-platforms.patch,1.15 KB, patch)
2017-10-16 09:30 UTC, Sergei Trofimovich (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jeroen Roovers (RETIRED) gentoo-dev 2017-02-04 13:55:23 UTC
Created attachment 462436 [details]
dev-perl:Digest-GOST-0.60.0:20170204-134408.log

>>> Test phase: dev-perl/Digest-GOST-0.60.0
 * Test::Harness Jobs=3
make -j3 test TEST_VERBOSE=0
Running Mkbootstrap for Digest::GOST ()
chmod 644 "GOST.bs"
PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t
/*.t
^M===(       1;0  1/?  0/?  0/? )=========================================
#   Failed test 'use Digest::GOST;'
#   at t/00_load.t line 5.
#     Tried to use 'Digest::GOST'.
#     Error:  Can't load '/var/tmp/portage/dev-perl/Digest-GOST-0.60.0/work/Digest-GOST-0.06/blib/arch/auto/Digest/GOST/GOST.so' for module Digest::GOST: /var/
tmp/portage/dev-perl/Digest-GOST-0.60.0/work/Digest-GOST-0.06/blib/arch/auto/Digest/GOST/GOST.so: undefined symbol: rhash_u32_swap_copy at /usr/lib/perl5/5.22.
3/hppa2.0-linux-thread-multi/DynaLoader.pm line 193.
# ^@ at t/00_load.t line 5.
# Compilation failed in require at t/00_load.t line 5.
# BEGIN failed--compilation aborted at t/00_load.t line 5.

#   Failed test 'use Digest::GOST::CryptoPro;'
#   at t/00_load.t line 6.
#     Tried to use 'Digest::GOST::CryptoPro'.
#     Error:  Attempt to reload Digest/GOST.pm aborted.
# Compilation failed in require at /usr/lib/perl5/5.22.3/parent.pm line 20.
# BEGIN failed--compilation aborted at /var/tmp/portage/dev-perl/Digest-GOST-0.60.0/work/Digest-GOST-0.06/blib/lib/Digest/GOST/CryptoPro.pm line 5.
# Compilation failed in require at t/00_load.t line 6.
# BEGIN failed--compilation aborted at t/00_load.t line 6.
# Testing Digest::GOST 0.06
# Looks like you failed 2 tests of 2.

and so on.
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2017-02-04 13:56:16 UTC
[ebuild   R   *] dev-perl/Digest-GOST-0.60.0::gentoo  USE="{test}" 0 KiB
Comment 2 Matt Turner gentoo-dev 2017-03-10 21:51:01 UTC
I reproduced this on big endian ppc and ppc64 as well.
Comment 3 Michael Weber (RETIRED) gentoo-dev 2017-04-05 10:59:13 UTC
confirmed with upcoming perl-5.24 on ppc64
Comment 4 Sergei Trofimovich (RETIRED) gentoo-dev 2017-10-16 09:20:01 UTC
Tripped over it on ppc64 again:

Failed 2/2 subtests                                                                               
===(       2;0  0/?  0/?  0/? )=========================================Can't load '/dev/shm/portage/dev-perl/Digest-GOST-0.60.0/work/Digest-GOST-0.06/blib/arch/auto/Digest/GOST/GOST.so' for
module Digest::GOST: /dev/shm/portage/dev-perl/Digest-GOST-0.60.0/work/Digest-GOST-0.06/blib/arch/auto/Digest/GOST/GOST.so: undefined symbol: rhash_u32_swap_copy at /usr/lib64/perl5/5.24.3/po
werpc64-linux/DynaLoader.pm line 193.

rhash_u32_swap_copy() is a function local to this package:

# LANG=C fgrep -R rhash_u32_swap_copy '/dev/shm/portage/dev-perl/Digest-GOST-0.60.0/work/Digest-GOST-0.06' | sed -e 's@/dev/shm/portage/dev-perl/Digest-GOST-0.60.0/work/Digest-GOST-0.06/@@g'
Binary file GOST.o matches
Binary file blib/arch/auto/Digest/GOST/GOST.so matches
src/byte_order.h:void rhash_u32_swap_copy(void* to, int index, const void* from, size_t length);
src/byte_order.h:# define le32_copy(to, index, from, length) rhash_u32_swap_copy((to), (index), (from), (length))
src/byte_order.h:# define be32_copy(to, index, from, length) rhash_u32_swap_copy((to), (index), (from), (length))
src/byte_order.c:void rhash_u32_swap_copy(void* to, int index, const void* from, size_t length)

Does plugin fail to build byte_order.c and link it into final GOST.so?
Comment 5 Sergei Trofimovich (RETIRED) gentoo-dev 2017-10-16 09:25:24 UTC
It looks like module does include ".c" files directly into GOST.c:

    GOST.c:#include "src/gost.c"
    GOST.xs:#include "src/gost.c"

but not "byte_order.c".

The following workaround makes dev-perl/Digest-GOST build and pass tests on ppc64:

# cat /etc/portage/patches/dev-perl/Digest-GOST/Digest-GOST-0.06.patch
diff --git a/GOST.xs b/GOST.xs
index 1dfd33c..4ea6f35 100644
--- a/GOST.xs
+++ b/GOST.xs
@@ -7,4 +7,5 @@

 #include "src/gost.c"
+#include "src/byte_order.c"
Comment 6 Sergei Trofimovich (RETIRED) gentoo-dev 2017-10-16 09:30:35 UTC
Created attachment 498826 [details, diff]
0001-Fix-link-failure-on-big-endian-platforms.patch

Attaching the patch with commit message.
Comment 7 Sergei Trofimovich (RETIRED) gentoo-dev 2017-10-16 09:34:11 UTC
Sent pull request upstream as: https://github.com/gray/digest-gost/pull/1
Comment 8 Larry the Git Cow gentoo-dev 2017-10-16 22:39:30 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a63a99f38ca651a6a266369a360eda0189f1d116

commit a63a99f38ca651a6a266369a360eda0189f1d116
Author:     Kent Fredric <kentnl@gentoo.org>
AuthorDate: 2017-10-16 22:30:54 +0000
Commit:     Kent Fredric <kentnl@gentoo.org>
CommitDate: 2017-10-16 22:34:08 +0000

    dev-perl/Digest-GOST: Fix broken linking on BigEndian bug #608214
    
    -r1 bump because people who previously built this withour running tests
    have a silently broken install.
    
    Closes: https://bugs.gentoo.org/608214
    Package-Manager: Portage-2.3.8, Repoman-2.3.3

 ...-0.60.0.ebuild => Digest-GOST-0.60.0-r1.ebuild} |  1 +
 .../files/Digest-GOST-0.60.0-bigendian-link.patch  | 43 ++++++++++++++++++++++
 2 files changed, 44 insertions(+)