Bug 192637 - graphics/webp build failure with a compiler error
Summary: graphics/webp build failure with a compiler error
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Po-Chuan Hsieh
URL:
Keywords:
: 192600 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-08-13 11:20 UTC by vladimir.chukharev
Modified: 2014-08-17 18:57 UTC (History)
2 users (show)

See Also:


Attachments
emmintrin.h fix for gcc 4.2 by dim@ (464 bytes, patch)
2014-08-13 18:11 UTC, Po-Chuan Hsieh
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description vladimir.chukharev 2014-08-13 11:20:02 UTC
Doing:
# sudo MAKE_JOBS_UNSAFE=yes make -C /usr/ports/graphics/webp clean all install

I get:

...
  CC     libwebpdsp_avx2_la-enc_avx2.lo
  CCLD   libwebpdsp_avx2.la
  CC     libwebpdsp_sse2_la-enc_sse2.lo
  CC     libwebpdspdecode_sse2_la-dec_sse2.lo
  CC     libwebpdspdecode_sse2_la-lossless_sse2.lo
lossless_sse2.c: In function 'ConvertBGRAToBGR':
lossless_sse2.c:403: note: use -flax-vector-conversions to permit conversions between vectors with differing element types or numbers of subparts
lossless_sse2.c:403: error: incompatible type for argument 1 of '__builtin_ia32_psrlqi128'
lossless_sse2.c:404: error: incompatible type for argument 1 of '__builtin_ia32_psrlqi128'
*** [libwebpdspdecode_sse2_la-lossless_sse2.lo] Error code 1

Stop in /usr/ports/graphics/webp/work/libwebp-0.4.1/src/dsp.
*** [all-recursive] Error code 1

Stop in /usr/ports/graphics/webp/work/libwebp-0.4.1/src.
*** [all-recursive] Error code 1

Stop in /usr/ports/graphics/webp/work/libwebp-0.4.1.
*** [do-build] Error code 1

Stop in /usr/ports/graphics/webp.
*** [stage] Error code 1

Stop in /usr/ports/graphics/webp.


My system has packages related to CC:
# pkg info -x cc
accerciser-1.12.1_2
gcc-4.7.4
gcc-ecj-4.5
gcc48-4.8.4.s20140807
gccmakedep-1.0.2_1
libpciaccess-0.13.2_2
qt4-rcc-4.8.6

# uname -a
FreeBSD vovaasus 9.3-STABLE FreeBSD 9.3-STABLE #27 r269484M: Mon Aug  4 16:48:05 EEST 2014     root@vovaasus:/usr/obj/usr/src/sys/VOVA  amd64
Comment 1 John Marino freebsd_committer freebsd_triage 2014-08-13 11:21:26 UTC
over to maintainer
Comment 2 Jimmy Olgeni freebsd_committer freebsd_triage 2014-08-13 15:40:04 UTC
Hi,

It only seems to happen on 9.3 (I first noticed it in poudriere)

https://redports.org/buildarchive/20140813152701-50411/

The only difference I could see is that 9.3 has this line in the configure log:

"checking whether cc supports -Wvla... yes"

while 9.2 has:

"checking whether cc supports -Wvla... no"
Comment 3 Po-Chuan Hsieh freebsd_committer freebsd_triage 2014-08-13 18:11:12 UTC
Created attachment 145759 [details]
emmintrin.h fix for gcc 4.2 by dim@
Comment 4 Po-Chuan Hsieh freebsd_committer freebsd_triage 2014-08-13 18:15:18 UTC
dim@ said:

This is a bug in gcc's emmintrin.h header.  I have committed a fix to
head in r269948, and I will merge it to stable/10 and stable/9 in three
days.  Meanwhile, please apply the attached diff to emmintrin.h in
/usr/include/gcc/4.2 manually.
Comment 5 Matthias Andree freebsd_committer freebsd_triage 2014-08-13 21:02:12 UTC
*** Bug 192600 has been marked as a duplicate of this bug. ***
Comment 6 Matthias Andree freebsd_committer freebsd_triage 2014-08-13 21:03:42 UTC
Sunpoet, since I'm not sure if we'll have an erratum,
and how fast they propagate to systems, may I propose:

- please use either clang or a newer GCC version on the affected systems (9.3-RELEASE on amd64 for me). That avoids the broken header of gcc 4.2.
Comment 7 vladimir.chukharev 2014-08-14 06:07:03 UTC
Manual patching the header file as proposed helps me to build the port, thanks. Awaiting for MFC.
Comment 8 Matthias Andree freebsd_committer freebsd_triage 2014-08-15 20:56:56 UTC
sunpoet, can you see if it helps to copy the *patched* emmintrin.h header in the right WRKSRC directory?
Comment 9 Po-Chuan Hsieh freebsd_committer freebsd_triage 2014-08-16 16:21:36 UTC
(In reply to Matthias Andree from comment #8)
> sunpoet, can you see if it helps to copy the *patched* emmintrin.h header in
> the right WRKSRC directory?

Instead of shipping a patched emmintrin.h, we could:
1) Add CPPFLAGS+=-flax-vector-conversions
2) Add USES=compiler:c11

I would choose the latter. It works on 9.3-RELEASE, 10.0-RELEASE and 11-CURRENT.
Comment 10 Matthias Andree freebsd_committer freebsd_triage 2014-08-16 16:23:22 UTC
Either is fine for me.
Comment 11 Po-Chuan Hsieh freebsd_committer freebsd_triage 2014-08-17 18:57:48 UTC
It should be fixed in r365223. Thanks!