Created attachment 471558 [details] build.log libtool: compile: armv7a-hardfloat-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I/usr/armv7a-hardfloat-linux-gnueabi/tmp/portage /media-libs/speex-1.2.0-r1/work/speex-1.2.0/libspeex -I.. -I/usr/armv7a-hardfloat-linux-gnueabi/tmp/portage/media-libs/spee x-1.2.0-r1/work/speex-1.2.0/include -I../include/speex -I.. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURC E -O2 -pipe -fomit-frame-pointer -fvisibility=hidden -Wall -c /usr/armv7a-hardfloat-linux-gnueabi/tmp/portage/media-libs/sp eex-1.2.0-r1/work/speex-1.2.0/libspeex/filters.c -fPIC -DPIC -o .libs/filters.o In file included from /usr/armv7a-hardfloat-linux-gnueabi/tmp/portage/media-libs/speex-1.2.0-r1/work/speex-1.2.0/libspeex/f ilters.h:38:0, from /usr/armv7a-hardfloat-linux-gnueabi/tmp/portage/media-libs/speex-1.2.0-r1/work/speex-1.2.0/libspeex/f ilters.c:37: /usr/armv7a-hardfloat-linux-gnueabi/tmp/portage/media-libs/speex-1.2.0-r1/work/speex-1.2.0/libspeex/arch.h:68:2: error: #error I suppose you can have a [ARM4/ARM5E/Blackfin] that has float instructions? #error I suppose you can have a [ARM4/ARM5E/Blackfin] that has float instructions? ^ In file included from /usr/armv7a-hardfloat-linux-gnueabi/tmp/portage/media-libs/speex-1.2.0-r1/work/speex-1.2.0/libspeex/filters.c:47:0: /usr/armv7a-hardfloat-linux-gnueabi/tmp/portage/media-libs/speex-1.2.0-r1/work/speex-1.2.0/libspeex/filters_arm4.h: In function ‘normalize16’: /usr/armv7a-hardfloat-linux-gnueabi/tmp/portage/media-libs/speex-1.2.0-r1/work/speex-1.2.0/libspeex/filters_arm4.h:69:15: error: invalid operands to binary >> (have ‘spx_sig_t {aka float}’ and ‘int’) max_val >>= 1; ^ # armv7a-hardfloat-linux-gnueabi-emerge --info Portage 2.3.5 (python 3.4.6-final-0, default/linux/arm/13.0/armv7a, gcc-5.4.0, glibc-2.24-r1, 4.9.16-gentoo x86_64) ================================================================= System uname: Linux-4.9.16-gentoo-x86_64-Intel-R-_Core-TM-_i3-5005U_CPU_@_2.00GHz-with-gentoo-2.3 KiB Mem: 3959228 total, 43468 free KiB Swap: 20971516 total, 20971388 free Timestamp of repository gentoo: Wed, 03 May 2017 10:00:01 +0000 sh bash 4.4_p12 ld GNU ld (Gentoo 2.27 p1.0) 2.27 app-shells/bash: 4.4_p12::gentoo dev-lang/python: 2.7.13::gentoo, 3.4.6::gentoo sys-apps/baselayout: 2.3::gentoo sys-apps/openrc: 0.25::gentoo sys-apps/sandbox: 2.10-r4::gentoo sys-devel/binutils: 2.27::gentoo sys-devel/gcc: 5.4.0-r3::gentoo sys-devel/gcc-config: 1.8-r1::gentoo sys-devel/make: 4.2.1-r1::gentoo sys-kernel/linux-headers: 4.10::gentoo (virtual/os-headers) sys-libs/glibc: 2.24-r1::gentoo Repositories: gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 ACCEPT_KEYWORDS="arm ~arm" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -fomit-frame-pointer" CHOST="armv7a-hardfloat-linux-gnueabi" 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/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-O2 -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FCFLAGS="-O2 -pipe -march=armv7-a" FEATURES="assume-digests binpkg-logs buildpkg config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news nodoc noinfo noman parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe -march=armv7-a" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="en_US.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j5" PKGDIR="/usr/armv7a-hardfloat-linux-gnueabi/packages/" PORTAGE_CONFIGROOT="/usr/armv7a-hardfloat-linux-gnueabi/" 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="/usr/armv7a-hardfloat-linux-gnueabi/tmp/" USE="X acl arm armv5te armv6 armv6t2 berkdb bzip2 cli cracklib crypt cxx dri fortran gdbm iconv icu ipv6 minizip modules ncurses nls nptl openmp pcre readline seccomp session ssl tcpd unicode zlib" 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="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_ARM="edsp thumb thumb2 v4 v5 v6 v7 vfp" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock 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="php5-6" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby21 ruby22" USERLAND="GNU" VIDEO_CARDS="exynos fbdev omap 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, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
speex-1.2_rc2 added neon optimization which is what will ultimately fix this bug. rc3 is released and should be added to the tree
Created attachment 476720 [details, diff] configure.ac patch for 1.2_rc3
(In reply to Jory A. Pratt from comment #2) > Created attachment 476720 [details, diff] [details, diff] > configure.ac patch for 1.2_rc3 But version is portage is 1.2.0, shoudn't be this never than 1.2_rc3? I am also having this problem here.
(In reply to Conrad Kostecki from comment #3) > (In reply to Jory A. Pratt from comment #2) > > Created attachment 476720 [details, diff] [details, diff] [details, diff] > > configure.ac patch for 1.2_rc3 > > But version is portage is 1.2.0, shoudn't be this never than 1.2_rc3? > I am also having this problem here. No 1.2.0 is not newer, you will see if you try and compile 1.2_rc1 which is in the tree right now it will compile just fine.
(In reply to Jory A. Pratt from comment #4) > (In reply to Conrad Kostecki from comment #3) > > (In reply to Jory A. Pratt from comment #2) > > > Created attachment 476720 [details, diff] [details, diff] [details, diff] [details, diff] > > > configure.ac patch for 1.2_rc3 > > > > But version is portage is 1.2.0, shoudn't be this never than 1.2_rc3? > > I am also having this problem here. > > No 1.2.0 is not newer, you will see if you try and compile 1.2_rc1 which is > in the tree right now it will compile just fine. Thanks, it worked for me :)
Created attachment 490648 [details, diff] Patch to use CPU_FLAGS_ARM and fix logic on armv6+ (In reply to Jory A. Pratt from comment #4) > (In reply to Conrad Kostecki from comment #3) > > (In reply to Jory A. Pratt from comment #2) > > > Created attachment 476720 [details, diff] [details, diff] [details, diff] [details, diff] > > > configure.ac patch for 1.2_rc3 > > > > But version is portage is 1.2.0, shoudn't be this never than 1.2_rc3? > > I am also having this problem here. > > No 1.2.0 is not newer, you will see if you try and compile 1.2_rc1 which is > in the tree right now it will compile just fine. Errr... what? 1.2.0 is newer. You seem to be confused with the speexdsp package that was split out in 1.2.0. This has the new NEON handling. The problem is that armv5te is forced on the later ARM profiles but --enable-arm5e-asm means use armv5-specific (i.e. fixed point) ASM that is not suitable on newer hardware. Here is a patch that fixes the logic and uses CPU_FLAGS_ARM instead. The old armv6* flags are a bit confusing and these new flags seem to be the way to go now. I'll merge this in a few days if no one has any objections.
Fixed in 88db124b3f3ed7eaaead23a888fbb01dad93eeab.
Reopening: This is only a partial fix: libtool: compile: armv5tel-softfloat-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I/mnt/distfiles/tmp/portage/media-libs/speex-1.2.0-r1/work/speex-1.2.0/libspeex -I.. -I/mnt/distfiles/tmp/portage/media-libs/speex-1.2.0-r1/work/speex-1.2.0/include -I../include/speex -I.. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -O2 -march=armv5te -pipe -fvisibility=hidden -Wall -c /mnt/distfiles/tmp/portage/media-libs/speex-1.2.0-r1/work/speex-1.2.0/libspeex/cb_search.c -fPIC -DPIC -o .libs/cb_search.o In file included from /mnt/distfiles/tmp/portage/media-libs/speex-1.2.0-r1/work/speex-1.2.0/libspeex/cb_search.h:39:0, from /mnt/distfiles/tmp/portage/media-libs/speex-1.2.0-r1/work/speex-1.2.0/libspeex/cb_search.c:36: /mnt/distfiles/tmp/portage/media-libs/speex-1.2.0-r1/work/speex-1.2.0/libspeex/arch.h:68:2: error: #error I suppose you can have a [ARM4/ARM5E/Blackfin] that has float instructions? #error I suppose you can have a [ARM4/ARM5E/Blackfin] that has float instructions? ^~~~~ For armv4/5 the --enable-fixed-point configure argument needs to be passed. Maybe the cleanest solution would be to use tc-is-softfloat() (and check for != "no").
Created attachment 524760 [details, diff] Patch to fix fixed point Sorry about that, I don't have any ARM hardware that old. I don't believe fixed point and softfloat are the same thing. It's a simple fix in any case. I could commit the fix against the stable ebuild but please test the patch first.
(In reply to James Le Cuirot from comment #9) > Created attachment 524760 [details, diff] [details, diff] > Patch to fix fixed point > > Sorry about that, I don't have any ARM hardware that old. I don't believe > fixed point and softfloat are the same thing. It's a simple fix in any case. > I could commit the fix against the stable ebuild but please test the patch > first. your patch works perfectly, thanks!
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=755506b85255d86236beea42d56da56b6c85277f commit 755506b85255d86236beea42d56da56b6c85277f Author: James Le Cuirot <chewi@gentoo.org> AuthorDate: 2018-03-22 20:47:53 +0000 Commit: James Le Cuirot <chewi@gentoo.org> CommitDate: 2018-03-22 20:47:53 +0000 media-libs/speex: Fix fixed point arithmetic on old ARM Closes: https://bugs.gentoo.org/617322 Package-Manager: Portage-2.3.24, Repoman-2.3.6 media-libs/speex/speex-1.2.0-r1.ebuild | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)