From owner-freebsd-current@freebsd.org Thu Jun 20 04:57:24 2019 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0925615D3EFC for ; Thu, 20 Jun 2019 04:57:24 +0000 (UTC) (envelope-from rhurlin@gwdg.de) Received: from gmailer.gwdg.de (gmailer.gwdg.de [134.76.11.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A4AC76B00C; Thu, 20 Jun 2019 04:57:22 +0000 (UTC) (envelope-from rhurlin@gwdg.de) Received: from excmbx-24.um.gwdg.de ([134.76.9.234] helo=email.gwdg.de) by mailer.gwdg.de with esmtp (Exim 4.90_1) (envelope-from ) id 1hdp8M-0001oC-LL; Thu, 20 Jun 2019 06:57:14 +0200 Received: from krabat.raven.hur (79.201.117.152) by EXCMBX-24.um.gwdg.de (134.76.9.234) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P521) id 15.1.1713.5; Thu, 20 Jun 2019 06:57:14 +0200 Subject: Re: r349100: buildworld does not compile (ld: error: duplicate symbol: sse42_crc32c) To: Bryan Drewery CC: FreeBSD Current References: <35afacf4-a52b-2b82-144c-4d40cbe58d74@FreeBSD.org> <6a5f0886-3ee8-df4d-0cb4-65a3e89bc4a0@FreeBSD.org> From: Rainer Hurling Message-ID: Date: Thu, 20 Jun 2019 06:56:57 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.7.1 MIME-Version: 1.0 In-Reply-To: <6a5f0886-3ee8-df4d-0cb4-65a3e89bc4a0@FreeBSD.org> Content-Type: text/plain; charset="utf-8" Content-Language: de-DE Content-Transfer-Encoding: 7bit X-Originating-IP: [79.201.117.152] X-ClientProxiedBy: EXCMBX-02.um.gwdg.de (134.76.9.217) To EXCMBX-24.um.gwdg.de (134.76.9.234) X-Virus-Scanned: (clean) by clamav X-Rspamd-Queue-Id: A4AC76B00C X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of rhurlin@gwdg.de designates 134.76.11.17 as permitted sender) smtp.mailfrom=rhurlin@gwdg.de X-Spamd-Result: default: False [-3.98 / 15.00]; HAS_XOIP(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:134.76.10.0/23]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_ALL(0.00)[]; RCVD_IN_DNSWL_MED(-0.20)[17.11.76.134.list.dnswl.org : 127.0.11.2]; RCPT_COUNT_TWO(0.00)[2]; MX_GOOD(-0.01)[c1233.mx.srv.dfn.de,b1233.mx.srv.dfn.de,a1233.mx.srv.dfn.de]; NEURAL_HAM_SHORT(-0.54)[-0.541,0]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:680, ipnet:134.76.0.0/16, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[152.117.201.79.zen.spamhaus.org : 127.0.0.10]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[gwdg.de]; IP_SCORE(-0.93)[ipnet: 134.76.0.0/16(-4.62), asn: 680(-0.02), country: DE(-0.01)] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Jun 2019 04:57:24 -0000 Am 19.06.19 um 21:20 schrieb Bryan Drewery: > On 6/19/19 11:05 AM, Bryan Drewery wrote: >> On 6/19/19 11:02 AM, Bryan Drewery wrote: >>> On 6/16/19 9:33 AM, Warner Losh wrote: >>>> On Sun, Jun 16, 2019, 9:51 AM Rainer Hurling wrote: >>>> >>>>> If I try to build world almost recent sources (r349100) on HEAD amd64 >>>>> (r348775), it stops with the following error: >>>>> >>>>> >>>>> [..snip..] >>>>> (cd /usr/src/tests/sys/kern && DEPENDFILE=.depend.libkern_crc32 >>>>> NO_SUBDIR=1 make -f /usr/src/tests/sys/kern/Makefile _RECURSING_PROGS=t >>>>> PROG=libkern_crc32 ) >>>>> echo libkern_crc32: /usr/obj/usr/src/amd64.amd64/tmp/usr/lib/libc.a >>>>> /usr/obj/usr/src/amd64.amd64/tmp/usr/lib/libprivateatf-c.a >> >>>>> .depend.libkern_crc32 >>>>> cc -target x86_64-unknown-freebsd13.0 >>>>> --sysroot=/usr/obj/usr/src/amd64.amd64/tmp >>>>> -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin -O2 -pipe >>>>> -DUSERSPACE_TESTING -MD -MF.depend.libkern_crc32.libkern_crc32.o >>>>> -MTlibkern_crc32.o -std=gnu99 -fstack-protector-strong -Wsystem-headers >>>>> -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter >>>>> -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith >>>>> -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body >>>>> -Wno-string-plus-int -Wno-unused-const-variable >>>>> -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality >>>>> -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef >>>>> -Wno-address-of-packed-member -Qunused-arguments -c >>>>> /usr/src/tests/sys/kern/libkern_crc32.c -o libkern_crc32.o >>>>> cc -target x86_64-unknown-freebsd13.0 >>>>> --sysroot=/usr/obj/usr/src/amd64.amd64/tmp >>>>> -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin -O2 -pipe -DUSERSPACE_TESTING >>>>> -std=gnu99 -fstack-protector-strong -Wsystem-headers -Werror -Wall >>>>> -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes >>>>> -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized >>>>> -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int >>>>> -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value >>>>> -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion >>>>> -Wno-unused-local-typedef -Wno-address-of-packed-member >>>>> -Qunused-arguments -DUSERSPACE_TESTING -o libkern_crc32 >>>>> libkern_crc32.o /usr/src/sys/libkern/x86/crc32_sse42.c -lprivateatf-c >>>>> /usr/src/sys/libkern/x86/crc32_sse42.c -lprivateatf-c >>>>> ld: error: duplicate symbol: sse42_crc32c >>>>>>>> defined at crc32_sse42.c >>>>>>>> /tmp/crc32_sse42-2988bd.o:(sse42_crc32c) >>>>>>>> defined at crc32_sse42.c >>>>>>>> /tmp/crc32_sse42-bcf3d2.o:(.text+0x3C0) >>>>> cc: error: linker command failed with exit code 1 (use -v to see >>>>> invocation) >>>>> *** [libkern_crc32] Error code 1 >>>>> make[6]: stopped in /usr/src/tests/sys/kern >>>>> 1 error >>>>> make[6]: stopped in /usr/src/tests/sys/kern >>>>> *** [libkern_crc32] Error code 2 >>>>> >>>>> >>>>> This happens with two older cpus, Intel (Core 17-4770) and AMD (Phenom >>>>> II X6 1090T). >>>>> >>>>> Am I the only one, who observes this breakage? Thanks for any hint. >>>>> >>>> >>>> Try adding -DWITHOUT_TESTS to buildworld... >>>> >>>> Warner >>>> >>> >>> ~/git/freebsd2/tests/sys/kern # env|grep TEST >>> MK_TESTS=no >>> >>> >>> Doh. Turns out I've had TESTS disabled in some of my recent build tests >>> / commits. This is likely my fault. >>> >> >> Yup it is from my r349065. >> >> It's an ambiguity between LDADD. and my newly added >> LDADD.. >> >> LDADD.libkern_crc32+= ${SRCTOP}/sys/libkern/x86/crc32_sse42.c >> >> So it's added in twice. >> >> > > This should be fixed in r349202. Sorry for the trouble. > Many thanks for this fix. It works fine for me on the box with Intel Core 17-4770, but it fails on AMD Phenom II X6 1090T (both systems mentioned in the initial mail): [..snip..] c++ -target x86_64-unknown-freebsd13.0 --sysroot=/usr/obj/usr/src/amd64.amd64/tmp -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin -O2 -pipe -I/usr/src/contrib/llvm/tools/lldb/include -I/usr/src/contrib/llvm/tools/lldb/source -I/usr/src/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD -I/usr/src/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX -I/usr/src/contrib/llvm/tools/lldb/source/Plugins/Process/Utility -I/usr/obj/usr/src/amd64.amd64/lib/clang/libllvm -I/usr/obj/usr/src/amd64.amd64/lib/clang/libclang -DLLDB_DISABLE_PYTHON -I/usr/src/contrib/llvm/tools/clang/include -DCLANG_ENABLE_ARCMT -DCLANG_ENABLE_STATIC_ANALYZER -I/usr/src/lib/clang/include -I/usr/src/contrib/llvm/include -DLLVM_BUILD_GLOBAL_ISEL -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -DLLVM_DEFAULT_TARGET_TRIPLE=\"x86_64-unknown-freebsd13.0\" -DLLVM_HOST_TRIPLE=\"x86_64-unknown-freebsd13.0\" -DDEFAULT_SYSROOT=\"\" -DLLVM_TARGET_ENABLE_X86 -DLLVM_NATIVE_ASMPARSER=LLVMInitializeX86AsmParser -DLLVM_NATIVE_ASMPRINTER=LLVMInitializeX86AsmPrinter -DLLVM_NATIVE_DISASSEMBLER=LLVMInitializeX86Disassembler -DLLVM_NATIVE_TARGET=LLVMInitializeX86Target -DLLVM_NATIVE_TARGETINFO=LLVMInitializeX86TargetInfo -DLLVM_NATIVE_TARGETMC=LLVMInitializeX86TargetMC -ffunction-sections -fdata-sections -MD -MF.depend.Plugins_SymbolFile_DWARF_DWARFDebugRanges.o -MTPlugins/SymbolFile/DWARF/DWARFDebugRanges.o -fstack-protector-strong -Qunused-arguments -fno-exceptions -fno-rtti -std=c++11 -stdlib=libc++ -Wno-c++11-extensions -c /usr/src/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugRanges.cpp -o Plugins/SymbolFile/DWARF/DWARFDebugRanges.o Value still in symbol table! Type = 'c++: error: unable to execute command: Segmentation fault (core dumped) c++: error: clang frontend command failed due to signal (use -v to see invocation) FreeBSD clang version 8.0.1 (branches/release_80 363030) (based on LLVM 8.0.1) Target: x86_64-unknown-freebsd13.0 Thread model: posix InstalledDir: /usr/bin c++: note: diagnostic msg: PLEASE submit a bug report to https://bugs.freebsd.org/submit/ and include the crash backtrace, preprocessed source, and associated run script. c++: note: diagnostic msg: ******************** PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: Preprocessed source(s) and associated run script(s) are located at: c++: note: diagnostic msg: /tmp/DWARFDebugRanges-baf338.cpp c++: note: diagnostic msg: /tmp/DWARFDebugRanges-baf338.sh c++: note: diagnostic msg: ******************** *** [Plugins/SymbolFile/DWARF/DWARFDebugRanges.o] Error code 254 make[6]: stopped in /usr/src/lib/clang/liblldb 1 error make[6]: stopped in /usr/src/lib/clang/liblldb *** [all_subdir_lib/clang/liblldb] Error code 2 This seems to be not a problem with the test builds, but more likely something with lldb? If someone is interested, I also could send the /tmp/DWARFDebugRanges-baf338.* files.