Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 701308 - media-libs/flac-1.3.3: ../src/libFLAC/lpc_intrin_vsx.c:94:7: error: incompatible types when assigning to type '__vector float' {aka '__vector(4) float'} from type 'int'
Summary: media-libs/flac-1.3.3: ../src/libFLAC/lpc_intrin_vsx.c:94:7: error: incompati...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: PPC64 Linux
: Normal normal (vote)
Assignee: Gentoo Sound Team
URL: https://github.com/xiph/flac/issues/199
Whiteboard:
Keywords: REGRESSION
Depends on:
Blocks: 700132 CPU_FLAGS_PPC
  Show dependency tree
 
Reported: 2019-11-27 09:43 UTC by ernsteiswuerfel
Modified: 2020-04-05 17:24 UTC (History)
0 users

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


Attachments
build.log (flac-1.3.3:20191127-093602.log,71.70 KB, text/plain)
2019-11-27 09:43 UTC, ernsteiswuerfel
Details
emerge --info (file_701308.txt,5.94 KB, text/plain)
2019-11-27 09:43 UTC, ernsteiswuerfel
Details
emerge --info (file_701308.txt,5.93 KB, text/plain)
2019-11-27 11:00 UTC, ernsteiswuerfel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ernsteiswuerfel archtester 2019-11-27 09:43:14 UTC
Created attachment 597586 [details]
build.log

[...]
/var/tmp/portage/media-libs/flac-1.3.3/work/flac-1.3.3/src/libFLAC/lpc_intrin_vsx.c: In function 'FLAC__lpc_compute_autocorrelation_intrin_power9_vsx_lag_4':
/var/tmp/portage/media-libs/flac-1.3.3/work/flac-1.3.3/src/libFLAC/lpc_intrin_vsx.c:885:7: error: incompatible types when assigning to type '__vector float' {aka '__vector(4) float'} from type 'int'
  885 |  d0 = vec_vsx_ld(0, base);
      |       ^~~~~~~~~~
/var/tmp/portage/media-libs/flac-1.3.3/work/flac-1.3.3/src/libFLAC/lpc_intrin_vsx.c:892:8: error: incompatible types when assigning to type '__vector float' {aka '__vector(4) float'} from type 'int'
  892 |   d1 = vec_vsx_ld(0, base);
      |        ^~~~~~~~~~
/var/tmp/portage/media-libs/flac-1.3.3/work/flac-1.3.3/src/libFLAC/lpc_intrin_vsx.c:922:8: error: incompatible types when assigning to type '__vector float' {aka '__vector(4) float'} from type 'int'
  922 |   d0 = vec_vsx_ld(0, data+i);
      |        ^~~~~~~~~~
/var/tmp/portage/media-libs/flac-1.3.3/work/flac-1.3.3/src/libFLAC/lpc_intrin_vsx.c:928:2: error: AltiVec argument passed to unprototyped function
  928 |  vec_vsx_st(sum0, 0, autoc);
      |  ^~~~~~~~~~
make[4]: *** [Makefile:737: lpc_intrin_vsx.lo] Error 1
make[4]: Leaving directory '/var/tmp/portage/media-libs/flac-1.3.3/work/flac-1.3.3-.ppc64/src/libFLAC'
make[3]: *** [Makefile:794: all-recursive] Error 1
make[3]: Leaving directory '/var/tmp/portage/media-libs/flac-1.3.3/work/flac-1.3.3-.ppc64/src/libFLAC'
make[2]: *** [Makefile:433: all-recursive] Error 1
make[2]: Leaving directory '/var/tmp/portage/media-libs/flac-1.3.3/work/flac-1.3.3-.ppc64/src'
make[1]: *** [Makefile:492: all-recursive] Error 1
make[1]: Leaving directory '/var/tmp/portage/media-libs/flac-1.3.3/work/flac-1.3.3-.ppc64'
make: *** [Makefile:424: all] Error 2
 * ERROR: media-libs/flac-1.3.3::gentoo failed (compile phase):
 *   emake failed
Comment 1 ernsteiswuerfel archtester 2019-11-27 09:43:59 UTC
Created attachment 597588 [details]
emerge --info
Comment 2 ernsteiswuerfel archtester 2019-11-27 09:51:32 UTC
flac-1.3.2-r1 builds fine.
Comment 3 ernsteiswuerfel archtester 2019-11-27 11:00:57 UTC
Created attachment 597590 [details]
emerge --info

After an enlightening discussion on #gentoo-powerpc I did a few more tests.

On a Talos 2:
-mcpu=power9 w. CPU_FLAGS_PPC="altivec vsx vsx3" USE='altivec' ... WORKS
-mcpu=power9 w. CPU_FLAGS_PPC="" USE='-altivec'                ... WORKS
-mcpu=970    w. CPU_FLAGS_PPC="altivec" USE='altivec'          ... FAILS
-mcpu=970    w. CPU_FLAGS_PPC="" USE='-altivec'                ... FAILS

On a PowerMac G5:
-mcpu=970    w. CPU_FLAGS_PPC="altivec" USE='altivec'          ... FAILS
-mcpu=970    w. CPU_FLAGS_PPC="" USE='-altivec'                ... FAILS
Comment 4 ernsteiswuerfel archtester 2019-12-04 22:58:53 UTC
Got the same error with vanilla 1.3.3 from git. So I took upsteam.
Comment 5 ernsteiswuerfel archtester 2020-04-04 15:17:39 UTC
Re-posted the bug report to the github issues tracker. Hope it gets some more attention there.
Comment 6 Larry the Git Cow gentoo-dev 2020-04-05 00:12:18 UTC
The bug has been closed via the following commit(s):

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

commit b3686ff7aee4ece15744169e0feda1ca0578e019
Author:     Georgy Yakovlev <gyakovlev@gentoo.org>
AuthorDate: 2020-04-04 23:57:34 +0000
Commit:     Georgy Yakovlev <gyakovlev@gentoo.org>
CommitDate: 2020-04-05 00:12:03 +0000

    media-libs/flac: switch to CPU_FLAGS_PPC
    
    --enable-altivec prevented flac from compiling on G4/G5
    due to misdetection of vsx
    Adding proper flag allows to compile with altivec but without vsx.
    
    Closes: https://bugs.gentoo.org/701308
    Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>

 media-libs/flac/flac-1.3.3.ebuild | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)