pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: GCC and as



On 05/11/18 15:51, Jason Bacon wrote:

I'm hitting a compile issue on CentOS 6 (yes, I must continue to support this relic for a while).

I have GCC_REQD=5.5 set in mk.conf and this works fine for the vast majority of packages.  I had over 17,000 successful builds under pbulk for 2018Q1.

The problem is the old version of binutils (providing /usr/binas) as described here:

http://www.nwchem-sw.org/index.php/Special:AWCforum/st/id2207/Intel_E5-2640v3_Haswell%3A_No_such....html

I'm wondering if there is a clean way to make gcc use an alternate assembler.  I was hoping it might be as simple as

AS=             ${PREFIX}/bin/gas

Not so, unfortunately.  If not, perhaps the gcc packages should be using pkgsrc binutils on CentOS?

I verified that using a newer as gets around the issue by temporarily hacking pkgsrc as into /usr/bin.

My actual error message below.

Thanks,

    JB

cc -c -O2 -g -DDYNAMIC_ZLIB -I/usr/pkg/include -I/usr/include -std=gnu99 -DNDEBUG -DZSTD_MULTITHREAD -Wall -Wextra -Wshadow -Wformat-security -Wdouble-promotion -Wfloat-conversion -Ihtslib -Ilibdeflate -Ilibdeflate/common -Izstd/lib -Izstd/lib/common -Izstd/zlibWrapper  -o libdeflate/lib/adler32.o libdeflate/lib/adler32.c
/tmp/cc3nKXpg.s: Assembler messages:
/tmp/cc3nKXpg.s:594: Error: suffix or operands invalid for `vpmaddubsw'
/tmp/cc3nKXpg.s:599: Error: suffix or operands invalid for `vpaddd'
/tmp/cc3nKXpg.s:604: Error: suffix or operands invalid for `vpsadbw'
/tmp/cc3nKXpg.s:609: Error: suffix or operands invalid for `vpaddd'
/tmp/cc3nKXpg.s:614: Error: suffix or operands invalid for `vpmaddwd'
/tmp/cc3nKXpg.s:619: Error: suffix or operands invalid for `vpaddd'
/tmp/cc3nKXpg.s:629: Error: suffix or operands invalid for `vphaddd'
/tmp/cc3nKXpg.s:635: Error: suffix or operands invalid for `vphaddd'
/tmp/cc3nKXpg.s:642: Error: no such instruction: `vextracti128 $0x1,%ymm1,%xmm1'
/tmp/cc3nKXpg.s:652: Error: suffix or operands invalid for `vpslld'
/tmp/cc3nKXpg.s:659: Error: suffix or operands invalid for `vpaddd'
/tmp/cc3nKXpg.s:661: Error: suffix or operands invalid for `vphaddd'
/tmp/cc3nKXpg.s:667: Error: suffix or operands invalid for `vphaddd'
/tmp/cc3nKXpg.s:674: Error: no such instruction: `vextracti128 $0x1,%ymm3,%xmm3'
make: *** [libdeflate/lib/adler32.o] Error 1
*** Error code 2

I confirmed that this patch resolves the issue:

cvs diff: Diffing .
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/lang/gcc5/Makefile,v
retrieving revision 1.27
diff -r1.27 Makefile
133a134,139
> .if exists(/etc/redhat-release)
> CONFIGURE_ARGS+=    --with-gnu-as --with-as=${PREFIX}/bin/gas
> CONFIGURE_ARGS+=    --with-gnu-ld --with-ld=${PREFIX}/bin/gld
> .  include "../../devel/binutils/buildlink3.mk"
> .endif
>
cvs diff: Diffing patches

It also fixes a similar failure for archivers/zstd:

cc -O2 -I/usr/pkg/include -I/usr/include -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow -Wstrict-aliasing=1 -Wswitch-enum -Wdeclaration-after-statement -Wstrict-prototypes -Wundef -Wpointer-arith -Wformat-security -Wvla -Wformat=2 -Winit-self -Wfloat-equal -Wwrite-strings -Wredundant-decls -I/usr/pkg/include -I/usr/include -I. -I./common -DXXH_NAMESPACE=ZSTD_ -I./legacy -DZSTD_LEGACY_SUPPORT=4  -c -o compress/huf_compress.o compress/huf_compress.c
/tmp/cc8Ksp5J.s: Assembler messages:
/tmp/cc8Ksp5J.s:275: Error: no such instruction: `shlx %r14,%rsi,%rsi'
/tmp/cc8Ksp5J.s:277: Error: no such instruction: `shlx %rcx,%r14,%rcx'
/tmp/cc8Ksp5J.s:280: Error: no such instruction: `shlx %r15,%r9,%r9'
/tmp/cc8Ksp5J.s:284: Error: no such instruction: `shlx %r10,%r9,%r9'
/tmp/cc8Ksp5J.s:298: Error: no such instruction: `shrx %r11,%rax,%r11'
/tmp/cc8Ksp5J.s:305: Error: no such instruction: `shlx %rcx,%rax,%rax'
/tmp/cc8Ksp5J.s:359: Error: no such instruction: `shlx %rcx,%rax,%rax'
/tmp/cc8Ksp5J.s:367: Error: no such instruction: `shlx %rcx,%rsi,%rsi'
/tmp/cc8Ksp5J.s:380: Error: no such instruction: `shrx %r11,%rax,%r11'
make[1]: *** [compress/huf_compress.o] Error 1
make[1]: Leaving directory `/usr/pkgsrc/archivers/zstd/work/zstd-1.3.4/lib'
make: *** [allzstd] Error 2
*** Error code 2

Stop.
bmake.bin[1]: stopped in /usr/pkgsrc/archivers/zstd
*** Error code 1



Home | Main Index | Thread Index | Old Index