Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 526378 - app-antivirus/clamav-0.98.4 on x32 ABI - Assembler messages: tomsfastmath/mont/fp_montgomery_reduce.c:517: Error: incorrect register `%r13d' used with `q' suffix
Summary: app-antivirus/clamav-0.98.4 on x32 ABI - Assembler messages: tomsfastmath/mon...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Antivirus Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-21 21:36 UTC by Stuart Shelton
Modified: 2020-08-04 02:39 UTC (History)
2 users (show)

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


Attachments
emerge--info.txt.gz (emerge--info.txt.gz,6.40 KB, application/gzip)
2014-10-22 21:56 UTC, Stuart Shelton
Details
clamav-0.98.4:20141022-201427.log.gz (clamav-0.98.4:20141022-201427.log.gz,30.44 KB, application/gzip)
2014-10-22 21:57 UTC, Stuart Shelton
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stuart Shelton 2014-10-21 21:36:15 UTC
app-antivirus/clamav-0.97.8-r2 compiled correctly, but app-antivirus/clamav-0.98.4 fails with:

libtool: compile:  x86_64-pc-linux-gnux32-gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I./nsis -DWARN_DLOPEN_FAIL -I/usr/include/libxml2 -DSEARCH_LIBDIR=\"/usr/libx32\" -march=native -Os -pipe -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -c tomsfastmath/mul/fp_mul_comba.c  -fPIC -DPIC -o .libs/libclamav_la-fp_mul_comba.o
tomsfastmath/mont/fp_montgomery_reduce.c: libtool: compile:  x86_64-pc-linux-gnux32-gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I./nsis -DWARN_DLOPEN_FAIL -I/usr/include/libxml2 -DSEARCH_LIBDIR=\"/usr/libx32\" -march=native -Os -pipe -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -c tomsfastmath/mul/fp_mul.c  -fPIC -DPIC -o .libs/libclamav_la-fp_mul.o
Assembler messages:
tomsfastmath/mont/fp_montgomery_reduce.c:517: Error: incorrect register `%r13d' used with `q' suffix
tomsfastmath/mont/fp_montgomery_reduce.c:521: Error: operand type mismatch for `add'
tomsfastmath/mont/fp_montgomery_reduce.c:524: Error: operand type mismatch for `movq'
tomsfastmath/mont/fp_montgomery_reduce.c:527: Error: incorrect register `%r13d' used with `q' suffix
tomsfastmath/mont/fp_montgomery_reduce.c:531: Error: operand type mismatch for `add'
tomsfastmath/mont/fp_montgomery_reduce.c:534: Error: operand type mismatch for `movq'
tomsfastmath/mont/fp_montgomery_reduce.c:537: Error: incorrect register `%r13d' used with `q' suffix
tomsfastmath/mont/fp_montgomery_reduce.c:541: Error: operand type mismatch for `add'
tomsfastmath/mont/fp_montgomery_reduce.c:544: Error: operand type mismatch for `movq'
tomsfastmath/mont/fp_montgomery_reduce.c:547: Error: incorrect register `%r13d' used with `q' suffix
tomsfastmath/mont/fp_montgomery_reduce.c:551: Error: operand type mismatch for `add'
tomsfastmath/mont/fp_montgomery_reduce.c:554: Error: operand type mismatch for `movq'
tomsfastmath/mont/fp_montgomery_reduce.c:557: Error: incorrect register `%r13d' used with `q' suffix
tomsfastmath/mont/fp_montgomery_reduce.c:561: Error: operand type mismatch for `add'
tomsfastmath/mont/fp_montgomery_reduce.c:564: Error: operand type mismatch for `movq'
tomsfastmath/mont/fp_montgomery_reduce.c:567: Error: incorrect register `%r13d' used with `q' suffix
tomsfastmath/mont/fp_montgomery_reduce.c:571: Error: operand type mismatch for `add'
tomsfastmath/mont/fp_montgomery_reduce.c:574: Error: operand type mismatch for `movq'
tomsfastmath/mont/fp_montgomery_reduce.c:577: Error: incorrect register `%r13d' used with `q' suffix
tomsfastmath/mont/fp_montgomery_reduce.c:581: Error: operand type mismatch for `add'
tomsfastmath/mont/fp_montgomery_reduce.c:584: Error: operand type mismatch for `movq'
tomsfastmath/mont/fp_montgomery_reduce.c:586: Error: incorrect register `%r13d' used with `q' suffix
tomsfastmath/mont/fp_montgomery_reduce.c:589: Error: operand type mismatch for `add'
tomsfastmath/mont/fp_montgomery_reduce.c:592: Error: operand type mismatch for `movq'
tomsfastmath/mont/fp_montgomery_reduce.c:521: Error: operand type mismatch for `movq'
tomsfastmath/mont/fp_montgomery_reduce.c:522: Error: incorrect register `%r13d' used with `q' suffix
tomsfastmath/mont/fp_montgomery_reduce.c:523: Error: operand type mismatch for `add'
tomsfastmath/mont/fp_montgomery_reduce.c:527: Error: operand type mismatch for `movq'
tomsfastmath/mont/fp_montgomery_reduce.c:526: Error: incorrect register `%ecx' used with `q' suffix
tomsfastmath/mont/fp_montgomery_reduce.c:528: Error: operand type mismatch for `movzbq'
Makefile:2464: recipe for target 'libclamav_la-fp_montgomery_reduce.lo' failed
make[4]: *** [libclamav_la-fp_montgomery_reduce.lo] Error 1
make[4]: *** Waiting for unfinished jobs....
libtool: compile:  x86_64-pc-linux-gnux32-gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I./nsis -DWARN_DLOPEN_FAIL -I/usr/include/libxml2 -DSEARCH_LIBDIR=\"/usr/libx32\" -march=native -Os -pipe -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -c tomsfastmath/mul/fp_mul_2.c  -fPIC -DPIC -o .libs/libclamav_la-fp_mul_2.o
tomsfastmath/mul/fp_mul_comba.c: Assembler messages:
tomsfastmath/mul/fp_mul_comba.c:351: Error: operand type mismatch for `add'
tomsfastmath/mul/fp_mul_comba.c:352: Error: operand type mismatch for `adc'
tomsfastmath/mul/fp_mul_comba.c:353: Error: incorrect register `%r10d' used with `q' suffix
Makefile:2485: recipe for target 'libclamav_la-fp_mul_comba.lo' failed
make[4]: *** [libclamav_la-fp_mul_comba.lo] Error 1
make[4]: Leaving directory '/var/tmp/portage/app-antivirus/clamav-0.98.4/work/clamav-0.98.4/libclamav'
Makefile:3011: recipe for target 'all-recursive' failed
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory '/var/tmp/portage/app-antivirus/clamav-0.98.4/work/clamav-0.98.4/libclamav'
Makefile:893: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/var/tmp/portage/app-antivirus/clamav-0.98.4/work/clamav-0.98.4/libclamav'
Makefile:649: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/var/tmp/portage/app-antivirus/clamav-0.98.4/work/clamav-0.98.4'
Makefile:477: recipe for target 'all' failed
make: *** [all] Error 2
 * ERROR: app-antivirus/clamav-0.98.4::srcshelton failed (compile phase):
 *   emake failed


$ emerge --info '=app-antivirus/clamav-0.98.4'
Portage 2.2.8-r2 (default/linux/amd64/13.0/x32, gcc-4.7.3, glibc-2.19-r1, 3.17.1-gentoo x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-3.17.1-gentoo-x86_64-Intel-R-_Atom-TM-_CPU_330_@_1.60GHz-with-gentoo-2.2
KiB Mem:     3566296 total,    828520 free
KiB Swap:    4194256 total,   4159640 free
Timestamp of tree: Tue, 21 Oct 2014 05:30:01 +0000
ld GNU ld (Gentoo 2.23.2 p1.0) 2.23.2
distcc 3.1 x86_64-pc-linux-gnux32 [disabled]
app-shells/bash:          4.2_p53
dev-java/java-config:     2.2.0
dev-lang/perl:            5.18.2-r2
dev-lang/python:          2.7.7, 3.3.5-r1
dev-util/cmake:           2.8.12.2-r1
dev-util/pkgconfig:       0.28-r1
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.69
sys-devel/automake:       1.11.6, 1.12.6, 1.13.4
sys-devel/binutils:       2.23.2
sys-devel/gcc:            4.7.3-r1
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2-r1
sys-devel/make:           4.0-r1
sys-kernel/linux-headers: 3.13 (virtual/os-headers)
sys-libs/glibc:           2.19-r1
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2014-10-22 08:12:26 UTC
1) Please attach the entire build log to this bug report.
2) Please post your FULL `emerge --info' output in a comment.
Comment 2 Stuart Shelton 2014-10-22 21:56:41 UTC
Created attachment 387246 [details]
emerge--info.txt.gz


emerge --info output is too long to fit into a comment - added as attachment.
Comment 3 Stuart Shelton 2014-10-22 21:57:10 UTC
Created attachment 387248 [details]
clamav-0.98.4:20141022-201427.log.gz


Build log attached.
Comment 4 Stuart Shelton 2014-11-12 19:27:37 UTC
Okay, I think I've managed to fix this one.  Note the this appears to completely disable the use of inline assembly in the fastmath routines with x32 ABI - but does allow clamav to compile.

https://raw.githubusercontent.com/srcshelton/gentoo-ebuilds/master/app-antivirus/clamav/files/clamav-0.98.4-x32.patch

(A better fix might be to use the existing 32-bit assembly for x32 - but I'm not sure what effect this would have given the comment regarding running out of i686 registers: x32 provides additional registers, but the inline assembly would need to be refactored (in *many* places) to support them...)
Comment 5 Thomas Raschbacher gentoo-dev 2015-12-17 19:00:59 UTC
Is this still an issue with the latest version ?
Comment 6 Thomas Raschbacher gentoo-dev 2016-05-29 19:31:26 UTC
I assume this is not an issue with newer versions anymore.
Closing as OBSOLETE - please re-open if you still have this problem.