Bug 1380101
Summary: | linbox not available on aarch64 | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Dominik 'Rathann' Mierzejewski <dominik> |
Component: | linbox | Assignee: | Jerry James <loganjerry> |
Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | rawhide | CC: | loganjerry, paulo.cesar.pereira.de.andrade, zbyszek |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | aarch64 | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2016-10-09 21:01:14 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 922257, 1380191 |
Description
Dominik 'Rathann' Mierzejewski
2016-09-28 16:26:58 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. http://koji.fedoraproject.org/koji/taskinfo?taskID=15855078 It built on armv7hl before and the tests passed. Maybe it just doesn't know about aarch64 and assumes x86? 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) ^~~~~~~ ... I mean *without* -O2. ... 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: fflas_ffpack-2.2.2/fflas-ffpack/utils/bit_manipulation.h: #ifdef __FFLASFFPACK_HAVE_INT128 // 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; } #endif The use of x86 assembly should be guarded by appropriate #ifdefs or intrinsics should be used. It looks like the Debian maintainer reported a related bug already: https://github.com/linbox-team/fflas-ffpack/issues/45 However, enabling -O optimization for the tests makes the build complete and tests pass on aarch64: http://koji.fedoraproject.org/koji/taskinfo?taskID=15859942 No issues on other primary arches either, so committed, pushed and new build submitted: http://koji.fedoraproject.org/koji/taskinfo?taskID=15861362 . |