Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at
Bug 1380101 - linbox not available on aarch64
Summary: linbox not available on aarch64
Alias: None
Product: Fedora
Classification: Fedora
Component: linbox
Version: rawhide
Hardware: aarch64
OS: Unspecified
Target Milestone: ---
Assignee: Jerry James
QA Contact: Fedora Extras Quality Assurance
Depends On:
Blocks: ARM64, F-ExcludeArch-aarch64 1380191
TreeView+ depends on / blocked
Reported: 2016-09-28 16:26 UTC by Dominik 'Rathann' Mierzejewski
Modified: 2016-10-09 21:01 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2016-10-09 21:01:14 UTC
Type: Bug

Attachments (Terms of Use)

Description Dominik 'Rathann' Mierzejewski 2016-09-28 16:26:58 UTC
Description of problem:
linbox package is not available in aarch64 repositories, causing builds to fail.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Try building sagemath from master branch HEAD (fedpkg build --scratch --nowait --arch=aarch64)

Actual results:
No matching package to install: 'linbox-devel'

Expected results:
No uninstallable dependencies.

Additional information:

Comment 1 Zbigniew Jędrzejewski-Szmek 2016-09-29 06:52:34 UTC
I tried building linbox, but it fails when compiling tests:

In file included from /usr/include/fflas-ffpack/fflas/fflas_freduce.inl:38:0,
                 from /usr/include/fflas-ffpack/fflas/fflas_freduce.h:56,
                 from /usr/include/fflas-ffpack/fflas/fflas.h:104,
                 from /usr/include/fflas-ffpack/ffpack/ffpack.h:46,
                 from ../linbox/matrix/matrixdomain/blas-matrix-domain.h:45,
                 from ../linbox/matrix/matrix-domain.h:68,
                 from ../linbox/matrix/sparsematrix/sparse-generic.h:80,
                 from ../linbox/matrix/sparse-matrix.h:70,
                 from test-solve.C:45:
/usr/include/fflas-ffpack/utils/bit_manipulation.h: In function 'uint64_t divide_128(uint64_t, uint64_t, uint64_t, uint64_t*)':
/usr/include/fflas-ffpack/utils/bit_manipulation.h:114:10: error: impossible constraint in 'asm'
This seems to be an error in fflas-ffpack, it seems to assume that amd64 register names are available.

Comment 2 Dominik 'Rathann' Mierzejewski 2016-09-29 12:14:31 UTC
It built on armv7hl before and the tests passed. Maybe it just doesn't know about aarch64 and assumes x86?

Comment 3 Dominik 'Rathann' Mierzejewski 2016-09-29 12:16:37 UTC
Also, it looks like it's being built with -O2 in CFLAGS:

g++ -DHAVE_CONFIG_H -I. -I..  -DLinBoxTestOnly  -Wall -g -DNDEBUG -U_LB_DEBUG -g -DNDEBUG -U_LB_DEBUG -I../linbox -Wall -DNDEBUG -UFFLASFFPACK_DEBUG -D__FFLASFFPACK_HAVE_CBLAS  -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fno-strict-aliasing -fopenmp  -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -I/usr/include/atlas      -I/usr/include/m4rie -I/usr/include/saclib  -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1  -c -o test-rational-solver.o test-rational-solver.C
In file included from /usr/include/bits/libc-header-start.h:33:0,
                 from /usr/include/stdint.h:26,
                 from /usr/lib/gcc/aarch64-redhat-linux/6.2.1/include/stdint.h:9,
                 from /usr/include/givaro/givconfig.h:86,
                 from /usr/include/fflas-ffpack/fflas-ffpack-config.h:119,
                 from ../linbox/linbox-config.h:30,
                 from test-rational-solver.C:31:
/usr/include/features.h:360:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp]
 #  warning _FORTIFY_SOURCE requires compiling with optimization (-O)

Comment 4 Dominik 'Rathann' Mierzejewski 2016-09-29 12:16:57 UTC
... I mean *without* -O2.

Comment 5 Dominik 'Rathann' Mierzejewski 2016-09-29 12:29:25 UTC
... but that's on purpose:

# Don't try to optimize the tests; the build takes gargantuan amounts of memory
sed -i 's|-O2||g' tests/Makefile

It's rather a bug in fflas-ffpack:
// division 128bits by 64 bits
// int128_t(u1,u0) = u1*2^64+u0, div v, rem r
// return quo
static uint64_t divide_128(uint64_t u1, uint64_t u0, uint64_t v, uint64_t *r)
        // u0 -> rax
        // u1 -> rdx
        // divq
        uint64_t result;
        __asm__("divq %[v]"
                        : "=a"(result), "=d"(*r)
                        : [v] "r"(v), "a"(u0), "d"(u1)
        return result;

The use of x86 assembly should be guarded by appropriate #ifdefs or intrinsics should be used.

Comment 6 Dominik 'Rathann' Mierzejewski 2016-09-29 12:32:01 UTC
It looks like the Debian maintainer reported a related bug already:

Comment 7 Dominik 'Rathann' Mierzejewski 2016-09-29 13:02:21 UTC
However, enabling -O optimization for the tests makes the build complete and tests pass on aarch64:

Comment 8 Dominik 'Rathann' Mierzejewski 2016-09-29 15:50:03 UTC
No issues on other primary arches either, so committed, pushed and new build submitted: .

Note You need to log in before you can comment on or make changes to this bug.