Bug 252093 - databases/memcached intrinsics fail with CPUTYPE skylake-avx512 on Intel(R) Xeon(R) Gold 6136
Summary: databases/memcached intrinsics fail with CPUTYPE skylake-avx512 on Intel(R) X...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Steve Wills
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-24 01:09 UTC by Mohammad S. Babaei
Modified: 2020-12-24 17:47 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (swills)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mohammad S. Babaei 2020-12-24 01:09:18 UTC
It works when I set CPUTYPE to nehalem. I have 323 other packages built with skylake-avx512 as CPUTYPE and they all build and work just fine.

$ sysctl -a | egrep -i 'hw.machine|hw.model|hw.ncpu'
hw.machine: amd64
hw.model: Intel(R) Xeon(R) Gold 6136 CPU @ 3.00GHz
hw.ncpu: 2
hw.machine_arch: amd64

$ cat /etc/make.conf
CPUTYPE?=skylake-avx512
#CPUTYPE?=nehalem

$ make
===>  License BSD3CLAUSE accepted by the user
===>   memcached-1.6.9 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by memcached-1.6.9 for building
===>  Extracting for memcached-1.6.9
=> SHA256 Checksum OK for memcached-1.6.9.tar.gz.
===>  Patching for memcached-1.6.9
===>  Applying FreeBSD patches for memcached-1.6.9 from /usr/ports/databases/memcached/files
===>   memcached-1.6.9 depends on executable: as - found
===>   memcached-1.6.9 depends on package: autoconf>=2.69 - found
===>   memcached-1.6.9 depends on package: automake>=1.16.1 - found
===>   memcached-1.6.9 depends on file: /usr/local/bin/ccache - found
===>   memcached-1.6.9 depends on shared library: libevent.so - found (/usr/local/lib/libevent.so)
===>   memcached-1.6.9 depends on shared library: libsasl2.so - found (/usr/local/lib/libsasl2.so)
===>  Configuring for memcached-1.6.9
configure: loading site script /usr/ports/Templates/config.site
checking build system type... amd64-portbld-freebsd12.2
checking host system type... amd64-portbld-freebsd12.2
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... (cached) /bin/mkdir -p
checking for gawk... (cached) /usr/bin/awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for gcc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... unsupported
checking whether cc understands -c and -o together... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of cc... gcc3
checking how to run the C preprocessor... cpp
checking for grep that handles long lines and -e... (cached) /usr/bin/grep
checking for egrep... (cached) /usr/bin/egrep
checking for icc in use... no
checking for clang in use... yes
checking for ANSI C header files... (cached) yes
checking for sys/types.h... (cached) yes
checking for sys/stat.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for memory.h... (cached) yes
checking for strings.h... (cached) yes
checking for inttypes.h... (cached) yes
checking for stdint.h... (cached) yes
checking for unistd.h... (cached) yes
checking whether __SUNPRO_C is declared... no
checking for cc option to accept ISO C99... unsupported
checking sasl/sasl.h usability... yes
checking sasl/sasl.h presence... yes
checking for sasl/sasl.h... yes
checking for SASL_CB_GETCONF... no
checking for SASL_CB_GETCONFPATH... yes
checking for library containing sasl_server_init... -lsasl2
checking for dtrace... /usr/sbin/dtrace
rm: conftest.h: No such file or directory
checking size of void *... 8
checking for library containing clock_gettime... none required
checking for library containing socket... none required
checking for library containing gethostbyname... none required
checking for libevent directory... /usr/local
checking for libssl directory... (system)
checking for library containing gethugepagesizes... no
checking for stdbool.h that conforms to C99... (cached) yes
checking for _Bool... (cached) yes
checking for inttypes.h... (cached) yes
checking for sasl_callback_ft... yes
checking for print macros for integers (C99 section 7.8.1)... yes
checking for an ANSI C-conforming const... yes
checking for socklen_t... yes
checking whether byte ordering is bigendian... no
checking for htonll... no
checking for library containing pthread_create... -lpthread
checking for mlockall... yes
checking for getpagesizes... yes
checking for sysconf... (cached) yes
checking for memcntl... no
checking for clock_gettime... (cached) yes
checking for preadv... yes
checking for pread... (cached) yes
checking for accept4... (cached) yes
checking for getopt_long... yes
checking for alignment... none
checking for GCC atomics... yes
checking for GCC 64bit atomics... yes
checking for setppriv... no
checking for pledge... no
checking for cap_enter... yes
checking sys/capsicum.h usability... yes
checking sys/capsicum.h presence... yes
checking for sys/capsicum.h... yes
checking for xml2rfc... no
checking for xsltproc... /usr/local/bin/xsltproc
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating doc/Makefile
config.status: creating config.h
config.status: executing depfiles commands
===>  Building for memcached-1.6.9
/usr/sbin/dtrace -h -s memcached_dtrace.d
sed -e 's,void \*,const void \*,g' memcached_dtrace.h |  sed -e 's,char \*,const char \*,g' | tr '\t' ' ' > mmc_dtrace.tmp
mv mmc_dtrace.tmp memcached_dtrace.h
/usr/bin/make  all-recursive
Making all in doc
/usr/bin/make  all-am
cc -DHAVE_CONFIG_H -I.  -DNDEBUG -I/usr/local/include -O2 -pipe -march=skylake-avx512  -I/usr/local/include -no-integrated-as -fstack-protector-strong -fno-strict-aliasing -std=c99  -m64 -O2 -pipe -march=skylake-avx512  -I/usr/local/include -no-integrated-as -fstack-protector-strong -fno-strict-aliasing -std=c99  -Wno-language-extension-token -Wall -pedantic -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -MT memcached-memcached.o -MD -MP -MF .deps/memcached-memcached.Tpo -c -o memcached-memcached.o `test -f 'memcached.c' || echo './'`memcached.c
/tmp/memcached-9c2a55.s: Assembler messages:
/tmp/memcached-9c2a55.s:57: Error: no such instruction: `vxorps %xmm0,%xmm0,%xmm0'
/tmp/memcached-9c2a55.s:58: Error: no such instruction: `vmovups %ymm0,stats+192(%rip)'
/tmp/memcached-9c2a55.s:59: Error: no such instruction: `vmovups %ymm0,stats+160(%rip)'
/tmp/memcached-9c2a55.s:60: Error: no such instruction: `vmovups %ymm0,stats+128(%rip)'
/tmp/memcached-9c2a55.s:61: Error: no such instruction: `vmovups %ymm0,stats+96(%rip)'
/tmp/memcached-9c2a55.s:62: Error: no such instruction: `vmovups %ymm0,stats+64(%rip)'
/tmp/memcached-9c2a55.s:63: Error: no such instruction: `vmovups %ymm0,stats+32(%rip)'
/tmp/memcached-9c2a55.s:64: Error: no such instruction: `vmovups %ymm0,stats(%rip)'
/tmp/memcached-9c2a55.s:65: Error: no such instruction: `vzeroupper'
/tmp/memcached-9c2a55.s:477: Error: no such instruction: `movbel %eax,420(%r14)'
/tmp/memcached-9c2a55.s:663: Error: no such instruction: `vxorps %xmm0,%xmm0,%xmm0'
/tmp/memcached-9c2a55.s:664: Error: no such instruction: `vmovups %ymm0,112(%rsp)'
/tmp/memcached-9c2a55.s:665: Error: no such instruction: `vmovaps %ymm0,96(%rsp)'
/tmp/memcached-9c2a55.s:671: Error: no such instruction: `vzeroupper'
/tmp/memcached-9c2a55.s:980: Error: no such instruction: `vxorps %xmm0,%xmm0,%xmm0'
/tmp/memcached-9c2a55.s:981: Error: no such instruction: `vmovups %ymm0,112(%rsp)'
/tmp/memcached-9c2a55.s:982: Error: no such instruction: `vmovaps %ymm0,96(%rsp)'
/tmp/memcached-9c2a55.s:1003: Error: no such instruction: `rorxl $3,%eax,%edx'
/tmp/memcached-9c2a55.s:1014: Error: no such instruction: `movbew %cx,16664(%rsp)'
/tmp/memcached-9c2a55.s:1027: Error: no such instruction: `vzeroupper'
/tmp/memcached-9c2a55.s:1534: Error: no such instruction: `vxorps %xmm0,%xmm0,%xmm0'
/tmp/memcached-9c2a55.s:1535: Error: no such instruction: `vmovups %xmm0,(%rax)'
/tmp/memcached-9c2a55.s:1632: Error: no such instruction: `vxorps %xmm0,%xmm0,%xmm0'
/tmp/memcached-9c2a55.s:1633: Error: no such instruction: `vmovups %xmm0,(%rax)'
/tmp/memcached-9c2a55.s:2228: Error: no such instruction: `vxorps %xmm0,%xmm0,%xmm0'
/tmp/memcached-9c2a55.s:2230: Error: no such instruction: `vmovups %xmm0,(%rax)'
/tmp/memcached-9c2a55.s:2580: Error: no such instruction: `vxorps %xmm0,%xmm0,%xmm0'
/tmp/memcached-9c2a55.s:2581: Error: no such instruction: `vmovups %xmm0,560(%rbx)'
/tmp/memcached-9c2a55.s:2714: Error: no such instruction: `vxorps %xmm0,%xmm0,%xmm0'
/tmp/memcached-9c2a55.s:2715: Error: no such instruction: `vmovups %xmm0,24(%rbx)'
/tmp/memcached-9c2a55.s:2730: Error: no such instruction: `vxorps %xmm0,%xmm0,%xmm0'
/tmp/memcached-9c2a55.s:2731: Error: no such instruction: `vmovups %ymm0,260(%rbx)'
/tmp/memcached-9c2a55.s:2732: Error: no such instruction: `vmovups %ymm0,292(%rbx)'
/tmp/memcached-9c2a55.s:2733: Error: no such instruction: `vmovups %ymm0,324(%rbx)'
/tmp/memcached-9c2a55.s:2734: Error: no such instruction: `vmovups %ymm0,356(%rbx)'
/tmp/memcached-9c2a55.s:2735: Error: no such instruction: `vmovups %ymm0,376(%rbx)'
/tmp/memcached-9c2a55.s:2746: Error: no such instruction: `vzeroupper'
/tmp/memcached-9c2a55.s:2795: Error: no such instruction: `vzeroupper'
/tmp/memcached-9c2a55.s:2834: Error: no such instruction: `vxorps %xmm0,%xmm0,%xmm0'
/tmp/memcached-9c2a55.s:2835: Error: no such instruction: `vmovups %xmm0,12(%r12)'
/tmp/memcached-9c2a55.s:2836: Error: no such instruction: `vmovups %xmm0,(%r12)'
/tmp/memcached-9c2a55.s:3025: Error: no such instruction: `vxorps %xmm0,%xmm0,%xmm0'
/tmp/memcached-9c2a55.s:3026: Error: no such instruction: `vmovups %xmm0,216(%rbx)'
/tmp/memcached-9c2a55.s:3335: Error: no such instruction: `vxorps %xmm0,%xmm0,%xmm0'
/tmp/memcached-9c2a55.s:3336: Error: no such instruction: `vmovups %xmm0,216(%rbx)'
/tmp/memcached-9c2a55.s:3344: Error: no such instruction: `vxorps %xmm0,%xmm0,%xmm0'
/tmp/memcached-9c2a55.s:3345: Error: no such instruction: `vmovups %xmm0,(%r14)'
/tmp/memcached-9c2a55.s:3723: Error: no such instruction: `vxorps %xmm0,%xmm0,%xmm0'
/tmp/memcached-9c2a55.s:3724: Error: no such instruction: `vmovups %xmm0,8(%rbx)'
/tmp/memcached-9c2a55.s:3766: Error: no such instruction: `vmovups 436(%r14),%xmm0'
/tmp/memcached-9c2a55.s:3767: Error: no such instruction: `vmovups %xmm0,140(%rcx)'
/tmp/memcached-9c2a55.s:3768: Error: no such instruction: `vmovups 424(%r14),%xmm0'
/tmp/memcached-9c2a55.s:3769: Error: no such instruction: `vmovups %xmm0,128(%rcx)'
/tmp/memcached-9c2a55.s:4060: Error: no such instruction: `vxorps %xmm0,%xmm0,%xmm0'
/tmp/memcached-9c2a55.s:4061: Error: no such instruction: `vmovups %xmm0,(%rsi)'
/tmp/memcached-9c2a55.s:4068: Error: no such instruction: `vxorps %xmm0,%xmm0,%xmm0'
/tmp/memcached-9c2a55.s:4069: Error: no such instruction: `vmovups %xmm0,(%rax)'
/tmp/memcached-9c2a55.s:4166: Error: no such instruction: `movbew %r15w,2(%rax,%rdi)'
/tmp/memcached-9c2a55.s:4168: Error: no such instruction: `movbel %r14d,8(%rax,%rdi)'
/tmp/memcached-9c2a55.s:4797: Error: no such instruction: `vmovaps %xmm0,-336(%rbp)'
/tmp/memcached-9c2a55.s:4798: Error: no such instruction: `vmovaps %xmm1,-320(%rbp)'
/tmp/memcached-9c2a55.s:4799: Error: no such instruction: `vmovaps %xmm2,-304(%rbp)'
/tmp/memcached-9c2a55.s:4800: Error: no such instruction: `vmovaps %xmm3,-288(%rbp)'
/tmp/memcached-9c2a55.s:4801: Error: no such instruction: `vmovaps %xmm4,-272(%rbp)'
/tmp/memcached-9c2a55.s:4802: Error: no such instruction: `vmovaps %xmm5,-256(%rbp)'
/tmp/memcached-9c2a55.s:4803: Error: no such instruction: `vmovaps %xmm6,-240(%rbp)'
/tmp/memcached-9c2a55.s:4804: Error: no such instruction: `vmovaps %xmm7,-224(%rbp)'
/tmp/memcached-9c2a55.s:5631: Error: no such instruction: `vmovsd settings+80(%rip),%xmm0'
/tmp/memcached-9c2a55.s:5772: Error: no such instruction: `vmovsd settings+160(%rip),%xmm0'
/tmp/memcached-9c2a55.s:5880: Error: no such instruction: `vmovsd settings+216(%rip),%xmm0'
/tmp/memcached-9c2a55.s:5887: Error: no such instruction: `vmovsd settings+224(%rip),%xmm0'
/tmp/memcached-9c2a55.s:6013: Error: no such instruction: `vmovsd settings+304(%rip),%xmm0'
/tmp/memcached-9c2a55.s:6020: Error: no such instruction: `vmovsd settings+312(%rip),%xmm0'
/tmp/memcached-9c2a55.s:7120: Error: no such instruction: `vmovups .L__const.maxconns_handler.t(%rip),%xmm0'
/tmp/memcached-9c2a55.s:7121: Error: no such instruction: `vmovaps %xmm0,-64(%rbp)'
/tmp/memcached-9c2a55.s:7167: Error: no such instruction: `vmovups .L__const.maxconns_handler.t(%rip),%xmm0'
/tmp/memcached-9c2a55.s:7168: Error: no such instruction: `vmovaps %xmm0,-32(%rbp)'
/tmp/memcached-9c2a55.s:7299: Error: no such instruction: `vxorps %xmm0,%xmm0,%xmm0'
/tmp/memcached-9c2a55.s:7300: Error: no such instruction: `vmovups %xmm0,settings+584(%rip)'
/tmp/memcached-9c2a55.s:7301: Error: no such instruction: `vmovups %xmm0,settings+596(%rip)'
/tmp/memcached-9c2a55.s:7303: Error: no such instruction: `vmovups %xmm0,settings+616(%rip)'
/tmp/memcached-9c2a55.s:7312: Error: no such instruction: `vmovups %xmm0,settings+32(%rip)'
/tmp/memcached-9c2a55.s:7314: Error: no such instruction: `vmovups %xmm0,settings+56(%rip)'
/tmp/memcached-9c2a55.s:7324: Error: no such instruction: `vmovaps .LCPI42_0(%rip),%xmm0'
/tmp/memcached-9c2a55.s:7325: Error: no such instruction: `vmovups %xmm0,settings+116(%rip)'
/tmp/memcached-9c2a55.s:7328: Error: no such instruction: `vmovaps .LCPI42_1(%rip),%xmm0'
/tmp/memcached-9c2a55.s:7329: Error: no such instruction: `vmovups %xmm0,settings+200(%rip)'
/tmp/memcached-9c2a55.s:7330: Error: no such instruction: `vmovaps .LCPI42_2(%rip),%xmm0'
/tmp/memcached-9c2a55.s:7331: Error: no such instruction: `vmovups %xmm0,settings+216(%rip)'
/tmp/memcached-9c2a55.s:7341: Error: no such instruction: `vmovapd .LCPI42_3(%rip),%xmm0'
/tmp/memcached-9c2a55.s:7342: Error: no such instruction: `vmovupd %xmm0,settings+240(%rip)'
/tmp/memcached-9c2a55.s:7461: Error: no such instruction: `vmovsd %xmm0,settings+80(%rip)'
/tmp/memcached-9c2a55.s:7462: Error: no such instruction: `vmovsd .LCPI42_4(%rip),%xmm1'
/tmp/memcached-9c2a55.s:7463: Error: no such instruction: `vucomisd %xmm0,%xmm1'
/tmp/memcached-9c2a55.s:8013: Error: no such instruction: `vmovsd %xmm0,settings+216(%rip)'
/tmp/memcached-9c2a55.s:8014: Error: no such instruction: `vxorpd %xmm1,%xmm1,%xmm1'
/tmp/memcached-9c2a55.s:8015: Error: no such instruction: `vucomisd %xmm0,%xmm1'
/tmp/memcached-9c2a55.s:8024: Error: no such instruction: `vmovsd %xmm0,settings+160(%rip)'
/tmp/memcached-9c2a55.s:8025: Error: no such instruction: `vxorpd %xmm1,%xmm1,%xmm1'
/tmp/memcached-9c2a55.s:8026: Error: no such instruction: `vucomisd %xmm0,%xmm1'
/tmp/memcached-9c2a55.s:8029: Error: no such instruction: `vucomisd .LCPI42_4(%rip),%xmm0'
/tmp/memcached-9c2a55.s:8068: Error: no such instruction: `vmovsd %xmm0,settings+224(%rip)'
/tmp/memcached-9c2a55.s:8069: Error: no such instruction: `vxorpd %xmm1,%xmm1,%xmm1'
/tmp/memcached-9c2a55.s:8070: Error: no such instruction: `vucomisd %xmm0,%xmm1'
/tmp/memcached-9c2a55.s:8408: Error: no such instruction: `vmovapd .LCPI42_5(%rip),%xmm0'
/tmp/memcached-9c2a55.s:8409: Error: no such instruction: `vmovapd %xmm0,2176(%rsp)'
/tmp/memcached-9c2a55.s:8566: Error: no such instruction: `vxorpd %xmm0,%xmm0,%xmm0'
/tmp/memcached-9c2a55.s:8567: Error: no such instruction: `vmovupd %ymm0,stats+192(%rip)'
/tmp/memcached-9c2a55.s:8568: Error: no such instruction: `vmovupd %ymm0,stats+160(%rip)'
/tmp/memcached-9c2a55.s:8569: Error: no such instruction: `vmovupd %ymm0,stats+128(%rip)'
/tmp/memcached-9c2a55.s:8570: Error: no such instruction: `vmovupd %ymm0,stats+96(%rip)'
/tmp/memcached-9c2a55.s:8571: Error: no such instruction: `vmovupd %ymm0,stats+64(%rip)'
/tmp/memcached-9c2a55.s:8572: Error: no such instruction: `vmovupd %ymm0,stats+32(%rip)'
/tmp/memcached-9c2a55.s:8573: Error: no such instruction: `vmovupd %ymm0,stats(%rip)'
/tmp/memcached-9c2a55.s:8574: Error: no such instruction: `vmovupd %ymm0,stats_state+16(%rip)'
/tmp/memcached-9c2a55.s:8575: Error: no such instruction: `vmovupd %ymm0,stats_state(%rip)'
/tmp/memcached-9c2a55.s:8578: Error: no such instruction: `vzeroupper'
/tmp/memcached-9c2a55.s:8663: Error: no such instruction: `vmovsd settings+80(%rip),%xmm0'
/tmp/memcached-9c2a55.s:8911: Error: no such instruction: `vxorpd %xmm0,%xmm0,%xmm0'
/tmp/memcached-9c2a55.s:8912: Error: no such instruction: `vmovapd %ymm0,2048(%rsp)'
/tmp/memcached-9c2a55.s:8913: Error: no such instruction: `vmovapd %ymm0,2080(%rsp)'
/tmp/memcached-9c2a55.s:8914: Error: no such instruction: `vmovapd %ymm0,2112(%rsp)'
/tmp/memcached-9c2a55.s:8915: Error: no such instruction: `vmovupd %ymm0,2122(%rsp)'
/tmp/memcached-9c2a55.s:8920: Error: no such instruction: `vzeroupper'
/tmp/memcached-9c2a55.s:10086: Error: no such instruction: `vmovsd settings+80(%rip),%xmm0'
/tmp/memcached-9c2a55.s:10169: Error: no such instruction: `vmovsd settings+216(%rip),%xmm0'
/tmp/memcached-9c2a55.s:10170: Error: no such instruction: `vmovsd settings+224(%rip),%xmm1'
/tmp/memcached-9c2a55.s:10216: Error: no such instruction: `vmovsd settings+304(%rip),%xmm0'
/tmp/memcached-9c2a55.s:10217: Error: no such instruction: `vmovsd settings+312(%rip),%xmm1'
/tmp/memcached-9c2a55.s:10341: Error: no such instruction: `vxorps %xmm0,%xmm0,%xmm0'
/tmp/memcached-9c2a55.s:10342: Error: no such instruction: `vmovups %xmm0,24(%rdx)'
/tmp/memcached-9c2a55.s:10989: Error: no such instruction: `vmovups .L__const.clock_handler.t(%rip),%xmm0'
/tmp/memcached-9c2a55.s:10990: Error: no such instruction: `vmovaps %xmm0,-32(%rbp)'
/tmp/memcached-9c2a55.s:11504: Error: no such instruction: `movbew 2(%rbx),%r13w'
/tmp/memcached-9c2a55.s:11533: Error: no such instruction: `movbew 2(%rbx),%r13w'
/tmp/memcached-9c2a55.s:12088: Error: no such instruction: `vxorps %xmm0,%xmm0,%xmm0'
/tmp/memcached-9c2a55.s:12089: Error: no such instruction: `vmovaps %ymm0,64(%rsp)'
/tmp/memcached-9c2a55.s:12090: Error: no such instruction: `vmovups %ymm0,80(%rsp)'
/tmp/memcached-9c2a55.s:12106: Error: no such instruction: `vzeroupper'
/tmp/memcached-9c2a55.s:12358: Error: no such instruction: `movbew 162(%rsp),%ax'
cc: error: assembler command failed with exit code 1 (use -v to see invocation)
*** Error code 1

Stop.
make[4]: stopped in /usr/ports/databases/memcached/work/memcached-1.6.9
*** Error code 1
*** Error code 1
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/databases/memcached
*** Error code 1

Stop.
make: stopped in /usr/ports/databases/memcached
Comment 1 Mohammad S. Babaei 2020-12-24 01:12:49 UTC
I also opened an issue on the upstream at https://github.com/memcached/memcached/issues/753
Comment 2 Steve Wills freebsd_committer freebsd_triage 2020-12-24 16:05:43 UTC
I think the problem may be that /usr/bin/as is an older version, can you confirm the version by providing the output of /usr/bin/as --version? I think you might avoid the issue by adding -fintegrated-as to your CFLAGS.
Comment 3 Mohammad S. Babaei 2020-12-24 16:16:14 UTC
$ /usr/bin/as --version
GNU assembler 2.17.50 [FreeBSD] 2007-07-03
Copyright 2007 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License.  This program has absolutely no warranty.
This assembler was configured for a target of `x86_64-unknown-freebsd'.

This was a fresh FreeBSD 12.1-RELEASE install upgrade to 12.2-RELEASE. I ussually build from source. Is that the source of the problem?
Comment 4 Mohammad S. Babaei 2020-12-24 16:18:57 UTC
Here are the instructions, I kept to myself:

cd /usr/
svnlite checkout http://svn.freebsd.org/base/releng/12.2 /usr/src/

nvim /usr/src/sys/amd64/conf/CUSTOM
########
include         GENERIC
ident           CUSTOM
########

nvim /etc/make.conf
########
KERNCONF=CUSTOM
########

nvim /etc/src.conf
########
WITHOUT_ASSERT_DEBUG=yes
WITHOUT_BHYVE=yes
WITHOUT_BLUETOOTH=yes
WITHOUT_BSDINSTALL=yes
WITH_CCACHE_BUILD=yes
WITHOUT_CROSS_COMPILER=yes
WITHOUT_DEBUG_FILES=yes
WITHOUT_DICT=yes
WITHOUT_EXAMPLES=yes
WITHOUT_FLOPPY=yes
WITHOUT_FREEBSD_UPDATE=yes
WITHOUT_GAMES=yes
WITHOUT_GPIO=yes
WITHOUT_HTML=yes
WITHOUT_HYPERV=yes
WITHOUT_IPFILTER=yes
WITHOUT_ISCSI=yes
WITHOUT_JAIL=yes
WITHOUT_KDUMP=yes
WITHOUT_KERNEL_SYMBOLS=yes
WITHOUT_KVM=yes
WITHOUT_KVM_SUPPORT=yes
WITHOUT_LEGACY_CONSOLE=yes
WITHOUT_LIB32=yes
WITHOUT_LLVM_TARGET_AARCH64=yes
WITHOUT_LLVM_TARGET_ALL=yes
WITHOUT_LLVM_TARGET_ARM=yes
WITHOUT_LLVM_TARGET_MIPS=yes
WITHOUT_LLVM_TARGET_POWERPC=yes
WITHOUT_LLVM_TARGET_SPARC=yes
WITH_LLVM_TARGET_X86=yes
WITHOUT_MAN=yes
WITHOUT_MAN_UTILS=yes
WITHOUT_PC_SYSINSTALL=yes
WITHOUT_PF=yes
WITHOUT_RADIUS_SUPPORT=yes
WITHOUT_SENDMAIL=yes
WITHOUT_SHAREDOCS=yes
WITHOUT_TESTS=yes
WITHOUT_TESTS_SUPPORT=yes
WITHOUT_USB=yes
WITHOUT_USB_GADGET_EXAMPLES=yes
WITHOUT_VI=yes
WITHOUT_WIRELESS=yes
WITHOUT_WIRELESS_SUPPORT=yes
WITHOUT_WPA_SUPPLICANT_EAPOL=yes
########


cd /usr/src/ && make clean
cd /usr/obj/ && rm -rf *
cd /usr/src/ && make buildworld -j3 && make buildkernel -j3 KERNCONF=CUSTOM

make installkernel KERNCONF=CUSTOM
reboot

# In single-user mode

zfs mount -a
zfs set readonly=off zroot
adjkerntz -i
# -Ui speeds mergemaster usage. Set IGNORE_FILES= in /etc/mergemaster.rc to skip files that don’t need to be merged.
mergemaster -p
cd /usr/src/
make installworld
mergemaster
reboot

# After normal boot

tail /var/log/messages
cd /usr/src
make check-old
# if it found anything
make -DBATCH_DELETE_OLD_FILES delete-old
make -DBATCH_DELETE_OLD_FILES delete-old-libs

cd /usr/src/ && make clean
cd /usr/obj/ && rm -rf *

# then rebuild all ports and packages for major/minor upgrades

# recommended to do after major upgrades:
pkg-static install -f pkg
Comment 5 Mohammad S. Babaei 2020-12-24 16:20:09 UTC
Also, here is my full /etc/make.conf:

CPUTYPE?=skylake-avx512
#CPUTYPE?=nehalem

MAKE_JOBS_SAFE=yes
MAKE_JOBS_NUMBER=3

WITH_CCACHE_BUILD=yes
CCACHE_DIR=/var/cache/ccache

KERNCONF=CUSTOM

# cat/usr/ports/Mk/bsd.default-versions.mk
DEFAULT_VERSIONS+=gcc=10
DEFAULT_VERSIONS+=linux=c7_64
DEFAULT_VERSIONS+=llvm=11
DEFAULT_VERSIONS+=mysql=10.5m
DEFAULT_VERSIONS+=pgsql=13
DEFAULT_VERSIONS+=php=7.4
DEFAULT_VERSIONS+=rust=rust
DEFAULT_VERSIONS+=ssl=libressl

OPTIONS_UNSET+=\
    BASH \
    DEBUG \
    DEBUGLOG \
    DOCS \
    DOXYGEN \
    EXAMPLES \
    HTMLDOCS \
    MAN3 \
    MANPAGES \
    MEM_DEBUG \
    RDOC \
    TEST \
    TESTS \
    X11 \
    ZSH

OPTIONS_SET+=\
    CPU_OPTS \
    LTO \
    OPENMP \
    OPTIMIZED_CFLAGS \
    SIMD \
    SSE \
    THREADS

devel_git_UNSET+=\
    CVS \
    GITWEB \
    GUI \
    P4 \
    SEND_EMAIL \
    SVN

devel_llvm80_SET+=BE_NATIVE
devel_llvm11_SET+=BE_STANDARD

devel_sope4_UNSET+=MYSQL
devel_sope4_SET+=\
    LDAP \
    MEMCACHED \
    PGSQL

editors_neovim_SET+=PYNVIM

ftp_curl_UNSET+=TLS_SRP

mail_dovecot_SET+=\
    GSSAPI_NONE \
    LDAP \
    LIBWRAP
mail_postfix_SET+=\
    BLACKLISTD \
    EAI \
    PCRE \
    TLS

mail_spamassassin_UNSET+=\
    DKIM \
    SPF_QUERY
mail_spamassassin_SET+=\
    AS_ROOT \
    GNUPG2 \
    SSL

net_openldap24-server_SET+=\
    DYNAMIC_BACKENDS \
    MDB \
    MEMBEROF \
    SHA2 \
    SYNCPROV

security_libgsasl_SET+=GSSAPI_HEIMDAL

security_sudo_SET+=\
    AUDIT \
    INSULTS \
    NLS \
    PAM

www_miniflux_SET+=PGSQL_SERVER

www_nginx_UNSET+=\
    AJP \
    ARRAYVAR \
    AWS_AUTH \
    BROTLI \
    CACHE_PURGE \
    CLOJURE \
    CT \
    DEVEL_KIT \
    DRIZZLE \
    DSO \
    DYNAMIC_TLS \
    DYNAMIC_UPSTREAM \
    ECHO \
    ENCRYPTSESSION \
    FILE_AIO \
    FORMINPUT \
    GOOGLE_PERFTOOLS \
    GRIDFS \
    GSSAPI_BASE \
    GSSAPI_HEIMDAL \
    GSSAPI_MIT \
    HEADERS_MORE \
    HTTP_ACCEPT_LANGUAGE \
    HTTP_ADDITION \
    HTTP_AUTH_DIGEST \
    HTTP_AUTH_JWT \
    HTTP_AUTH_KRB5 \
    HTTP_AUTH_LDAP \
    HTTP_AUTH_PAM \
    HTTP_AUTH_REQ \
    HTTP_DAV \
    HTTP_DAV_EXT \
    HTTP_EVAL \
    HTTP_FANCYINDEX \
    HTTP_FLV \
    HTTP_FOOTER \
    HTTP_GEOIP2 \
    HTTP_GUNZIP_FILTER \
    HTTP_IMAGE_FILTER \
    HTTP_IP2LOCATION \
    HTTP_IP2PROXY \
    HTTP_JSON_STATUS \
    HTTP_MOGILEFS \
    HTTP_MP4 \
    HTTP_MP4_H264 \
    HTTP_NOTICE \
    HTTP_PERL \
    HTTP_PUSH \
    HTTP_PUSH_STREAM \
    HTTP_RANDOM_INDEX \
    HTTP_REDIS \
    HTTP_RESPONSE \
    HTTP_SECURE_LINK \
    HTTP_SLICE \
    HTTP_SLICE_AHEAD \
    HTTP_STATUS \
    HTTP_SUB \
    HTTP_SUBS_FILTER \
    HTTP_TARANTOOL \
    HTTP_UPLOAD \
    HTTP_UPLOAD_PROGRESS \
    HTTP_UPSTREAM_CHECK \
    HTTP_UPSTREAM_FAIR \
    HTTP_UPSTREAM_STICKY \
    HTTP_VIDEO_THUMBEXTR \
    HTTP_XSLT \
    HTTP_ZIP \
    ICONV \
    LET \
    LINK \
    LUA \
    MAIL \
    MAIL_IMAP \
    MAIL_POP3 \
    MAIL_SMTP \
    MAIL_SSL \
    MEMC \
    MODSECURITY3 \
    NJS \
    OPENTRACING \
    PASSENGER \
    POSTGRES \
    RDS_CSV \
    RDS_JSON \
    REDIS2 \
    RTMP \
    SET_MISC \
    SFLOW \
    SHIBBOLETH \
    SLOWFS_CACHE \
    SMALL_LIGHT \
    SRCACHE \
    STREAM \
    STREAM_SSL \
    STREAM_SSL_PREREAD \
    VOD \
    VTS \
    WEBSOCKIFY \
    WWW \
    XSS
www_nginx_SET+=\
    HTTP \
    HTTP_CACHE \
    HTTP_GZIP_STATIC \
    HTTP_REALIP \
    HTTP_REWRITE \
    HTTP_SSL \
    HTTPV2 \
    HTTPV2_AUTOTUNE \
    IPV6 \
    NAXSI \
    THREADS

www_node_SET+=BUNDLED_SSL

www_wt3_UNSET+=\
    EXT \
    FCGI \
    FIREBIRD \
    LIBWTTEST \
    MYSQL \
    NO_STD_LOCALE \
    NO_STD_WSTRING \
    POSTGRES \
    SQLITE3 \
    UNWIND
www_wt3_SET+=\
    RESOURCESS \
    CMAKE_MODULE \
    CPP11 \
    HARU \
    PANGO \
    OPENGL \
    WTHTTP
Comment 6 Steve Wills freebsd_committer freebsd_triage 2020-12-24 16:28:45 UTC
(In reply to Steve Wills from comment #2)
Sorry, I should have said to simply try commenting line 77 which has:

CFLAGS+=        -no-integrated-as

It's no longer needed, the dtrace bug that prompted adding it was fixed ages ago. I'll remove it from the port, and probably the binutils dependency too.
Comment 7 Mohammad S. Babaei 2020-12-24 16:42:55 UTC
(In reply to Steve Wills from comment #6)

Thank you! I can confirm it did the trick.
Comment 8 commit-hook freebsd_committer freebsd_triage 2020-12-24 17:27:07 UTC
A commit references this bug:

Author: swills
Date: Thu Dec 24 17:26:42 UTC 2020
New revision: 559173
URL: https://svnweb.freebsd.org/changeset/ports/559173

Log:
  databases/memcached: remove no longer needed workaround

  PR:		252093
  Reported by:	Mohammad S. Babaei <info@babaei.net>

Changes:
  head/databases/memcached/Makefile