From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from xry111.site (xry111.site [IPv6:2001:470:683e::1]) by sourceware.org (Postfix) with ESMTPS id 32B5E385354A for ; Tue, 6 Sep 2022 12:54:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 32B5E385354A Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=xry111.site Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=xry111.site DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xry111.site; s=default; t=1662468869; bh=5YC8a0JXSThoxl0RtfKjC1i2akMBVI45xfXEAEKDmXE=; h=Subject:From:To:Date:In-Reply-To:References:From; b=blwvZMNOGAZ9A980zUNEihoCV1KJWKUMFEm8PwPXCJE3WWBpU8GBXaunvm/ZX/e2e Hn8XdWndvb5tSuZZUh94YyB2nbW7ioTlIYK5ZVx32/HI0pbDhyVRVTnQG7EMLOCAHt 4VLsXVIm6lqEbgFsvsWSHI6EcAdpFuxMBCC2arP0= Received: from localhost.localdomain (xry111.site [IPv6:2001:470:683e::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id 7E905667D6; Tue, 6 Sep 2022 08:54:28 -0400 (EDT) Message-ID: <8926f972a5996428f7ab4bca40d2294f600cea6b.camel@xry111.site> Subject: Re: undefined reference when building GCC-4.8.1 MinGW-W64 From: Xi Ruoyao To: i.nixman@autistici.org, Gcc Help Date: Tue, 06 Sep 2022 20:54:26 +0800 In-Reply-To: <549e47ef08ec0b3976ae07b72e8780de@autistici.org> References: <5d8346f35eaabcc1ba6acd4ccfd7b9b5@autistici.org> <549e47ef08ec0b3976ae07b72e8780de@autistici.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.45.3 MIME-Version: 1.0 X-Spam-Status: No, score=1.3 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FROM_SUSPICIOUS_NTLD,KAM_NUMSUBJECT,LIKELY_SPAM_FROM,PDS_OTHER_BAD_TLD,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Tue, 2022-09-06 at 11:36 +0000, i.nixman--- via Gcc-help wrote: > On 2022-09-06 11:23, i.nixman--- via Gcc-help wrote: > > Hello guys! > >=20 > > a long time ago I successfully built this version of the GCC-4.8.1, > > and I'm pretty sure I used the same options. > >=20 > > but now, on stage3 I get a linking error: > >=20 > > x86_64-w64-mingw32-g++=C2=A0=C2=A0 -g -DIN_GCC=C2=A0=C2=A0 -fno-excepti= ons -fno-rtti > > -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings > > -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long > > -Wno-variadic-macros -Wno-overlength-strings=C2=A0=C2=A0 -DHAVE_CONFIG_= H > > -static-libstdc++ -static-libgcc -pipe -fno-ident > > -L/home/Raj/mingw-gcc-4.8.1/x86_64-481-posix-sjlj- > > rt_v9/mingw64/opt/lib > > -L/home/Raj/mingw-gcc-4.8.1/prerequisites/x86_64-zlib-static/lib > > -L/home/Raj/mingw-gcc-4.8.1/prerequisites/x86_64-w64-mingw32- > > static/lib > > =C2=A0-Wl,--stack,12582912 -o cc1plus.exe \ > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 cp/cp-lang.o c-family/stub-objc.o cp/cal= l.o cp/decl.o > > cp/expr.o > > cp/pt.o cp/typeck2.o cp/class.o cp/decl2.o cp/error.o cp/lex.o > > cp/parser.o cp/ptree.o cp/rtti.o cp/typeck.o cp/cvt.o cp/except.o > > cp/friend.o cp/init.o cp/method.o cp/search.o cp/semantics.o > > cp/tree.o > > cp/repo.o cp/dump.o cp/optimize.o cp/mangle.o cp/cp-objcp-common.o > > cp/name-lookup.o cp/cxx-pretty-print.o cp/cp-gimplify.o attribs.o > > incpath.o c-family/c-common.o c-family/c-cppbuiltin.o > > c-family/c-dump.o c-family/c-format.o c-family/c-gimplify.o > > c-family/c-lex.o c-family/c-omp.o c-family/c-opts.o c-family/c-pch.o > > c-family/c-ppoutput.o c-family/c-pragma.o c-family/c-pretty-print.o > > c-family/c-semantics.o c-family/c-ada-spec.o tree-mudflap.o i386-c.o > > winnt-cxx.o msformat-c.o default-c.o cc1plus-checksum.o libbackend.a > > main.o=C2=A0 libcommon-target.a libcommon.a ../libcpp/libcpp.a > > ../libdecnumber/libdecnumber.a libcommon.a ../libcpp/libcpp.a=C2=A0 - > > liconv > > ../libbacktrace/.libs/libbacktrace.a ../libiberty/libiberty.a > > ../libdecnumber/libdecnumber.a > > -L/home/Raj/mingw-gcc-4.8.1/prerequisites/x86_64-w64-mingw32- > > static/lib > > -lcloog-isl > > -L/home/Raj/mingw-gcc-4.8.1/prerequisites/x86_64-w64-mingw32- > > static/lib > > -lisl > > -L/home/Raj/mingw-gcc-4.8.1/prerequisites/x86_64-w64-mingw32- > > static/lib > > -L/home/Raj/mingw-gcc-4.8.1/prerequisites/x86_64-w64-mingw32- > > static/lib > > -L/home/Raj/mingw-gcc-4.8.1/prerequisites/x86_64-w64-mingw32- > > static/lib > > -lmpc -lmpfr -lgmp=C2=A0=C2=A0 -lz > > cp/except.o: In function `nothrow_libfn_p(tree_node const*)': > > C:\msys64\home\Raj\mingw-gcc-4.8.1\x86_64-481-posix-sjlj- > > rt_v9\build\gcc-4.8.1\gcc/../../../../src/gcc- > > 4.8.1/gcc/cp/except.c:1025: > > undefined reference to `libc_name_p(char const*, unsigned int)' > > collect2.exe: error: ld returned 1 exit status > >=20 > >=20 > > any ideas? > >=20 > >=20 > >=20 > > thanks! >=20 > I think this problem may occur due to the use of this patch: >=20 > https://github.com/niXman/mingw-builds/blob/develop/patches/gcc/gcc-4.6-f= ix_mismatch_in_gnu_inline_attributes.patch This patch has never been in mainline GCC. And it's 2022 so you should not use gcc-4.8 or 4.6 anymore. --=20 Xi Ruoyao School of Aerospace Science and Technology, Xidian University