Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 718136 - net-misc/memcached-1.6.5 fails to build on ia64: crc32c.c:385:9: error: unknown register name '%edx' in 'asm'
Summary: net-misc/memcached-1.6.5 fails to build on ia64: crc32c.c:385:9: error: unkno...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Robin Johnson
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: 717946
  Show dependency tree
 
Reported: 2020-04-19 08:54 UTC by Sergei Trofimovich (RETIRED)
Modified: 2020-05-05 21:53 UTC (History)
1 user (show)

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


Attachments
build.log (=dev-python:pylibmc-1.6.1-r1.FAIL,21.57 KB, text/plain)
2020-04-19 08:54 UTC, Sergei Trofimovich (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sergei Trofimovich (RETIRED) gentoo-dev 2020-04-19 08:54:18 UTC
Created attachment 633674 [details]
build.log

ia64 has no crc32 instruction extension:

ia64-unknown-linux-gnu-gcc -DHAVE_CONFIG_H -I.  -UNDEBUG  -fprofile-arcs -ftest-coverage -DMEMCACHED_DEBUG -O2 -pipe -g -fdiagnostics-show-option -frecord-gcc-switches -UNDEBUG -pthread -c -o memcached_debug-crc32c.o `test -f 'crc32c.c' || echo './'`crc32c.c
ia64-unknown-linux-gnu-gcc -DHAVE_CONFIG_H -I.  -UNDEBUG  -fprofile-arcs -ftest-coverage -DMEMCACHED_DEBUG -O2 -pipe -g -fdiagnostics-show-option -frecord-gcc-switches -UNDEBUG -pthread -c -o memcached_debug-storage.o `test -f 'storage.c' || echo './'`storage.c
ia64-unknown-linux-gnu-gcc -DHAVE_CONFIG_H -I.  -UNDEBUG  -fprofile-arcs -ftest-coverage -DMEMCACHED_DEBUG -O2 -pipe -g -fdiagnostics-show-option -frecord-gcc-switches -UNDEBUG -pthread -c -o memcached_debug-slab_automove_extstore.o `test -f 'slab_automove_extstore.c' || echo './'`slab_automove_extstore.c
ia64-unknown-linux-gnu-gcc  -O2 -pipe -g -fdiagnostics-show-option -frecord-gcc-switches -UNDEBUG -pthread  -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -Wl,--as-needed -o testapp testapp-testapp.o testapp-util.o testapp-stats_prefix.o testapp-jenkins_hash.o testapp-murmur3_hash.o testapp-cache.o  -levent
crc32c.c: In function 'crc32c_init':
crc32c.c:385:9: error: unknown register name '%edx' in 'asm'
  385 |         __asm__("cpuid" \
      |         ^~~~~~~
crc32c.c:398:5: note: in expansion of macro 'SSE42'
  398 |     SSE42(sse42);
      |     ^~~~~
crc32c.c:385:9: error: unknown register name '%ebx' in 'asm'
  385 |         __asm__("cpuid" \
      |         ^~~~~~~
crc32c.c:398:5: note: in expansion of macro 'SSE42'
  398 |     SSE42(sse42);
      |     ^~~~~
{standard input}: Assembler messages:
{standard input}:191: Error: Unknown opcode `crc32b (r3),r8'
{standard input}:332: Error: Unknown opcode `crc32q (r3),r8'
{standard input}:333: Error: Unknown opcode `crc32q 8192(r3),r14'
{standard input}:334: Error: Unknown opcode `crc32q 16384(r3),r16'
{standard input}:352: Error: Unknown opcode `crc32q (r17),r8'
{standard input}:353: Error: Unknown opcode `crc32q 8192(r17),r14'
{standard input}:354: Error: Unknown opcode `crc32q 16384(r17),r16'
{standard input}:638: Error: Unknown opcode `crc32q (r3),r8'
{standard input}:639: Error: Unknown opcode `crc32q 256(r3),r14'
{standard input}:640: Error: Unknown opcode `crc32q 512(r3),r16'
{standard input}:668: Error: Unknown opcode `crc32q (r17),r8'
{standard input}:669: Error: Unknown opcode `crc32q 256(r17),r14'
{standard input}:670: Error: Unknown opcode `crc32q 512(r17),r16'
{standard input}:926: Error: Unknown opcode `crc32q (r14),r8'
{standard input}:991: Error: Unknown opcode `crc32b (r3),r8'
make: *** [Makefile:1551: memcached_debug-crc32c.o] Error 1
Comment 1 Sergei Trofimovich (RETIRED) gentoo-dev 2020-04-19 08:54:57 UTC
# emerge --info
Portage 2.3.96 (python 3.6.10-final-0, default/linux/ia64/17.0, gcc-9.3.0, glibc-2.30-r6, 4.19.86-gentoo ia64)
=================================================================
System uname: Linux-4.19.86-gentoo-ia64-Dual-Core_Intel-R-_Itanium-R-_Processor_9040-with-gentoo-2.7
KiB Mem:    16659840 total,   3787088 free
KiB Swap:    1999184 total,   1974608 free
Timestamp of repository gentoo: Sun, 19 Apr 2020 07:13:36 +0000
sh bash 5.0_p16
ld GNU ld (Gentoo 2.34 p1) 2.34.0
ccache version 3.7.8 [enabled]
app-shells/bash:          5.0_p16::gentoo
dev-lang/perl:            5.30.1::gentoo
dev-lang/python:          2.7.17-r1::gentoo, 3.6.10::gentoo
dev-util/ccache:          3.7.8-r1::gentoo
dev-util/cmake:           3.17.0::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.7::gentoo
sys-apps/sandbox:         2.18::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r5::gentoo
sys-devel/automake:       1.13.4-r2::gentoo, 1.16.2::gentoo
sys-devel/binutils:       2.34::gentoo
sys-devel/gcc:            9.3.0::gentoo
sys-devel/gcc-config:     2.2.1::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.5::gentoo (virtual/os-headers)
sys-libs/glibc:           2.30-r6::gentoo
Repositories:

gentoo
    location: /bound/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-metamanifest: yes
    sync-rsync-extra-opts:
    sync-rsync-verify-max-age: 24

ACCEPT_KEYWORDS="ia64 ~ia64"
ACCEPT_LICENSE="@FREE"
CBUILD="ia64-unknown-linux-gnu"
CFLAGS="-O2 -pipe -g -fdiagnostics-show-option -frecord-gcc-switches"
CHOST="ia64-unknown-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php7.2/ext-active/ /etc/php/apache2-php7.4/ext-active/ /etc/php/cgi-php7.2/ext-active/ /etc/php/cgi-php7.4/ext-active/ /etc/php/cli-php7.2/ext-active/ /etc/php/cli-php7.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -g"
DISTDIR="/bound/distfiles"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs ccache config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict stricter test unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="ru_RU.UTF-8"
LC_ALL=""
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -Wl,--as-needed"
MAKEOPTS="-j5 -l5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X acl alsa apng berkdb bzip2 cairo cli client corefonts crypt cups dbus dri eds fortran gdbm glamor gnome-keyring gtk gtk3 http2 ia64 iconv icu ipv6 jpeg libtirpc minizip ncurses nls nptl openmp pam pcre playlist png policykit pulseaudio python readline sound split-usr sqlite ssl svg systemd tcpd test text threads truetype udev unicode webp xattr xkb xvfb zlib" ADA_TARGET="gnat_2018" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" RUBY_TARGETS="ruby24 ruby25" USERLAND="GNU" VIDEO_CARDS="fbdev glint mga nv r128 radeon dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 2 Sergei Trofimovich (RETIRED) gentoo-dev 2020-04-19 09:13:05 UTC
Proposed fix upstream as https://github.com/memcached/memcached/pull/655
Comment 3 Sergei Trofimovich (RETIRED) gentoo-dev 2020-04-19 09:20:55 UTC
https://github.com/memcached/memcached/commit/73633d31b22068dfda5ef969c08139c083d96d71.patch should be enough:

--- a/crc32c.c
+++ b/crc32c.c
@@ -167,7 +167,7 @@ static uint32_t crc32c_hw_aarch64(uint32_t crc, const void* buf, size_t len)
 #endif
 
 /* Apply if the platform is intel */
-#if defined(__X86_64__)||defined(__x86_64__)||defined(__ia64__)
+#if defined(__X86_64__)||defined(__x86_64__)
 
 /* Multiply a matrix times a vector over the Galois field of two elements,
    GF(2).  Each element is a bit in an unsigned integer.  mat must have at
@@ -388,12 +388,11 @@ static uint32_t crc32c_hw(uint32_t crc, const void *buf, size_t len)
                 : "%ebx", "%edx"); \
         (have) = (ecx >> 20) & 1; \
     } while (0)
-
 #endif
 /* Compute a CRC-32C.  If the crc32 instruction is available, use the hardware
    version.  Otherwise, use the software version. */
 void crc32c_init(void) {
-    #if defined(__X86_64__)||defined(__x86_64__)||defined(__ia64__)
+    #if defined(__X86_64__)||defined(__x86_64__)
     int sse42;
     SSE42(sse42);
Comment 4 Larry the Git Cow gentoo-dev 2020-05-05 21:53:34 UTC
The bug has been closed via the following commit(s):

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

commit 73d30f360cfcfeb20e7a634407310fe04a112336
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2020-05-05 21:53:19 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2020-05-05 21:53:19 +0000

    net-misc/memcached: tweak crc32c build on ia64, bug #718136
    
    Closes: https://bugs.gentoo.org/718136
    Package-Manager: Portage-2.3.99, Repoman-2.3.22
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 .../memcached/files/memcached-1.6.5-ia64.patch     | 51 ++++++++++++++++++++++
 net-misc/memcached/memcached-1.6.5.ebuild          |  1 +
 2 files changed, 52 insertions(+)