Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 868465 - media-gfx/potrace-1.16: fails to compile on arm64 with LTO (Error: unknown mnemonic `bsf' -- `bsf x0,x0')
Summary: media-gfx/potrace-1.16: fails to compile on arm64 with LTO (Error: unknown mn...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: ARM64 Linux
: Normal normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: lto
  Show dependency tree
 
Reported: 2022-09-04 17:37 UTC by Sam James
Modified: 2024-03-12 00:26 UTC (History)
3 users (show)

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


Attachments
build.log (file_868465.txt,13.94 KB, text/plain)
2022-09-04 17:37 UTC, Sam James
Details
config.log (file_868465.txt,35.16 KB, text/plain)
2022-09-04 17:38 UTC, Sam James
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-09-04 17:37:33 UTC
Created attachment 803206 [details]
build.log

libtool: link:  aarch64-unknown-linux-gnu-gcc -shared  -fPIC -DPIC  .libs/curve.o .libs/trace.o .libs/decompose.o .libs/potracelib.o   -lm  -O2 -flto -Wl,-O1 -Wl,--as-needed   -Wl,-soname -Wl,libpotrace.so.0 -Wl,-version-script -Wl,.libs/libpotrace.ver -o .libs/libpotrace.so.0.0.6
/var/tmp/portage/media-gfx/potrace-1.16/temp/ccUKmIbA.s: Assembler messages:
/var/tmp/portage/media-gfx/potrace-1.16/temp/ccUKmIbA.s:1710: Error: unknown mnemonic `bsf' -- `bsf x0,x0'
/var/tmp/portage/media-gfx/potrace-1.16/temp/ccUKmIbA.s:1711: Error: unknown mnemonic `jnz' -- `jnz 0f'
/var/tmp/portage/media-gfx/potrace-1.16/temp/ccUKmIbA.s:1712: Error: unknown mnemonic `movl' -- `movl $32,x0'
/var/tmp/portage/media-gfx/potrace-1.16/temp/ccUKmIbA.s:1720: Error: unknown mnemonic `bsf' -- `bsf x0,x0'
/var/tmp/portage/media-gfx/potrace-1.16/temp/ccUKmIbA.s:1721: Error: unknown mnemonic `jnz' -- `jnz 0f'
/var/tmp/portage/media-gfx/potrace-1.16/temp/ccUKmIbA.s:1722: Error: unknown mnemonic `movl' -- `movl $32,x0'
/var/tmp/portage/media-gfx/potrace-1.16/temp/ccUKmIbA.s:1730: Error: unknown mnemonic `bsf' -- `bsf x0,x22'
/var/tmp/portage/media-gfx/potrace-1.16/temp/ccUKmIbA.s:1731: Error: unknown mnemonic `jnz' -- `jnz 0f'
/var/tmp/portage/media-gfx/potrace-1.16/temp/ccUKmIbA.s:1732: Error: unknown mnemonic `movl' -- `movl $32,x22'
make[3]: *** [/var/tmp/portage/media-gfx/potrace-1.16/temp/cc4IZA9R.mk:2: /var/tmp/portage/media-gfx/potrace-1.16/temp/ccoCkcLi.ltrans0.ltrans.o] Error 1
lto-wrapper: fatal error: make returned 2 exit status
compilation terminated.
/usr/lib/gcc/aarch64-unknown-linux-gnu/12.1.0/../../../../aarch64-unknown-linux-gnu/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:539: mkbitmap] Error 1
make[2]: *** Waiting for unfinished jobs....
libtool: link: (cd ".libs" && rm -f "libpotrace.so.0" && ln -s "libpotrace.so.0.0.6" "libpotrace.so.0")
libtool: link: (cd ".libs" && rm -f "libpotrace.so" && ln -s "libpotrace.so.0.0.6" "libpotrace.so")
libtool: link: ( cd ".libs" && rm -f "libpotrace.la" && ln -s "../libpotrace.la" "libpotrace.la" )
make[2]: Leaving directory '/var/tmp/portage/media-gfx/potrace-1.16/work/potrace-1.16/src'
make[1]: *** [Makefile:408: all-recursive] Error 1
make[1]: Leaving directory '/var/tmp/portage/media-gfx/potrace-1.16/work/potrace-1.16'
make: *** [Makefile:340: all] Error 2
 * ERROR: media-gfx/potrace-1.16::gentoo failed (compile phase):
 *   emake failed

----
Portage 3.0.30 (python 3.10.6-final-0, default/linux/arm64/17.0/desktop/plasma/systemd, gcc-12.1.0, glibc-2.34-r13, 5.15.64-gentoo-dist aarch64)
=================================================================
System uname: Linux-5.15.64-gentoo-dist-aarch64-with-glibc2.34
KiB Mem:   262955296 total, 237164436 free
KiB Swap:    9767620 total,   9767620 free
Timestamp of repository gentoo: Sun, 04 Sep 2022 17:16:50 +0000
sh bash 5.1_p16-r1
ld GNU ld (Gentoo 2.37_p1 p2) 2.37
app-misc/pax-utils:        1.3.5::gentoo
app-shells/bash:           5.1_p16-r1::gentoo
dev-java/java-config:      2.3.1::gentoo
dev-lang/perl:             5.34.1-r3::gentoo
dev-lang/python:           3.8.13_p7::gentoo, 3.10.6_p2::gentoo
dev-lang/rust:             1.62.1::gentoo
dev-util/cmake:            3.22.4::gentoo
dev-util/meson:            0.62.2::gentoo
sys-apps/baselayout:       2.8::gentoo
sys-apps/sandbox:          2.29::gentoo
sys-apps/systemd:          251.3::gentoo
sys-devel/autoconf:        2.13-r2::gentoo, 2.71-r1::gentoo
sys-devel/automake:        1.16.5::gentoo
sys-devel/binutils:        2.37_p1-r2::gentoo
sys-devel/binutils-config: 5.4.1::gentoo
sys-devel/clang:           14.0.6-r1::gentoo
sys-devel/gcc:             12.1.0::gentoo
sys-devel/gcc-config:      2.5-r1::gentoo
sys-devel/libtool:         2.4.7::gentoo
sys-devel/lld:             14.0.6::gentoo
sys-devel/llvm:            14.0.6-r2::gentoo
sys-devel/make:            4.3::gentoo
sys-kernel/linux-headers:  5.15-r3::gentoo (virtual/os-headers)
sys-libs/glibc:            2.34-r13::gentoo
Repositories:

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

local
    location: /var/db/repos/local
    masters: gentoo

ACCEPT_KEYWORDS="arm64"
ACCEPT_LICENSE="@FREE"
CBUILD="aarch64-unknown-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="aarch64-unknown-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /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/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--keep-going=y --jobs=6 --complete-graph"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH 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 binpkg-multi-instance buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox multilib-strict network-sandbox news parallel-fetch parallel-install pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="C.UTF8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j80"
PKGDIR="/var/cache/binpkgs"
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"
SHELL="/bin/sh"
USE="X a52 aac acl acpi activities alsa arm64 bluetooth branding bzip2 cairo cdda cdr cli crypt cups dbus declarative dri dts dvdr encode exif flac fortran gdbm gif gpm gtk gui iconv icu ipv6 jpeg kde kwallet lcms libglvnd libnotify libtirpc mad mng mp3 mp4 mpeg ncurses nls nptl ogg opengl openmp pam pango pcre pdf plasma png policykit ppds qml qt5 readline sdl seccomp semantic-desktop spell split-usr ssl startup-notification svg systemd tiff truetype udev udisks unicode upower usb vorbis widgets wxwidgets x264 xattr xcb xml xv xvid zlib" ADA_TARGET="gnat_2020" 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" CPU_FLAGS_ARM="edsp thumb thumb2 v4 v5 v6 v7 v8 vfp vfp-d32 vfpv3 vfpv4" 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" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-4 php8-0" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_10" PYTHON_TARGETS="python3_10" RUBY_TARGETS="ruby27" USERLAND="GNU" VIDEO_CARDS="fbdev dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LEX, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-09-04 17:38:34 UTC
Created attachment 803209 [details]
config.log

configure gets confused with LTO:
```
checking for strncasecmp... yes
checking for Intel 386... yes
checking for inline... inline
```

But we're not on an Intel CPU!
Comment 2 Alexey Korepanov 2024-02-04 00:24:10 UTC
same here
Comment 3 Larry the Git Cow gentoo-dev 2024-03-12 00:26:43 UTC
The bug has been closed via the following commit(s):

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

commit 544223720d50b2f2786bccfb32ab124e86782af4
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-03-12 00:26:30 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-03-12 00:26:30 +0000

    media-gfx/potrace: fix build w/ lto on non-amd64
    
    Closes: https://bugs.gentoo.org/868465
    Signed-off-by: Sam James <sam@gentoo.org>

 media-gfx/potrace/files/potrace-1.16-lto.patch | 18 ++++++++++
 media-gfx/potrace/potrace-1.16-r1.ebuild       | 48 ++++++++++++++++++++++++++
 2 files changed, 66 insertions(+)