From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from devianza.investici.org (devianza.investici.org [198.167.222.108]) by sourceware.org (Postfix) with ESMTPS id 0F8873858D32 for ; Sat, 11 Feb 2023 23:40:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0F8873858D32 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=autistici.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=autistici.org Received: from 1.mail-backend.investici.org (unknown [10.0.0.11]) by devianza.investici.org (Postfix) with ESMTP id 4PDnC81NDMz6xTS; Sat, 11 Feb 2023 23:40:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1676158804; bh=sq7G8iaid5pzT/J3KCP6dTIvVTISqrvZJ08xkUrvtNc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ngK1zlrAyih+mOFjWBh04sBDnPUCfNJAQKF/mCL3ppNncUbceU2vB2xS77UYHMFaX U7ApqwgQNFU7bsHPI/8YG8ooT1v1Ta1tL96flzCKLpiVT6WfE47ImXG5NrYhmpx3uA 5HiGf9zRzVVkU6tvpfRMZhNS+UsDjG6ABt3fZDgU= Received: from 1.webmail.investici.org (localhost [127.0.0.1]) (Authenticated sender: i.nixman@autistici.org) by 1.mail-backend.investici.org (Postfix) with ESMTPA id 4PDnC773h8z5snH; Sat, 11 Feb 2023 23:40:03 +0000 (UTC) MIME-Version: 1.0 Date: Sat, 11 Feb 2023 23:40:03 +0000 From: i.nixman@autistici.org To: i.nixman@autistici.org Cc: Jonathan Wakely , Gcc Help Subject: Re: Can't build gcc-trunk on Linux In-Reply-To: <2e5c31404e04dda35869c9ed1f31a5ff@autistici.org> References: <2e5c31404e04dda35869c9ed1f31a5ff@autistici.org> User-Agent: Roundcube Webmail Message-ID: <264d17b2a3d31c5743b3f6b575731085@autistici.org> X-Sender: i.nixman@autistici.org Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 2023-02-11 22:57, i.nixman@autistici.org wrote: > On 2023-02-11 20:39, Jonathan Wakely wrote: >> On Sat, 11 Feb 2023, 18:45 i.nixman--- via Gcc-help, >> >> wrote: >> >>> hi, >>> >>> im trying to build gcc trunk branch on x86_64-linux using that >>> cmdline: >>> >>> ../gcc-trunk-master/configure >>> --enable-bootstrap >>> --enable-languages=c,c++ >>> --prefix=/home/nixman/gcc-13 >>> --with-gcc-major-version-only >>> --program-suffix=-13 >>> --program-prefix=x86_64-linux-gnu- >>> --disable-shared >>> --enable-static >>> --enable-linker-build-id >>> --enable-threads=posix >>> --disable-nls >>> --enable-libstdcxx-debug >>> --enable-libstdcxx-time=yes >>> --with-default-libstdcxx-abi=new >>> --disable-vtable-verify >>> --enable-plugin >>> --disable-werror >>> --disable-multilib >>> --with-tune=generic >>> --enable-checking=release >>> --target=x86_64-linux-gnu >>> >>> >>> but on stage 3 I got this error: >>> >>> /usr/bin/x86_64-linux-gnu-ld: >>> /home/nixman/gcc-trunk-master-build/x86_64-linux-gnu/libstdc++-v3/src/.libs/libstdc++.a(class_type_info.o): >>> >>> relocation R_X86_64_32S against symbol >>> `_ZTVN10__cxxabiv117__class_type_infoE' can not be used when making a >>> shared object; recompile with -fPIC >>> /usr/bin/x86_64-linux-gnu-ld: failed to set dynamic section sizes: >>> bad >>> value >>> collect2: error: ld returned 1 exit status >>> >>> >>> >>> but the `-fPIC` option is there: >>> >>> libtool: link: /home/nixman/gcc-trunk-master-build/./gcc/xg++ >>> -B/home/nixman/gcc-trunk-master-build/./gcc/ -nostdinc++ -nostdinc++ >>> -I/home/nixman/gcc-trunk-master-build/x86_64-linux-gnu/libstdc++-v3/include/x86_64-linux-gnu >>> >>> -I/home/nixman/gcc-trunk-master-build/x86_64-linux-gnu/libstdc++-v3/include >>> >>> -I/home/nixman/gcc-trunk-master/libstdc++-v3/libsupc++ >>> -I/home/nixman/gcc-trunk-master/libstdc++-v3/include/backward >>> -I/home/nixman/gcc-trunk-master/libstdc++-v3/testsuite/util >>> -L/home/nixman/gcc-trunk-master-build/x86_64-linux-gnu/libstdc++-v3/src >>> -L/home/nixman/gcc-trunk-master-build/x86_64-linux-gnu/libstdc++-v3/src/.libs >>> >>> -L/home/nixman/gcc-trunk-master-build/x86_64-linux-gnu/libstdc++-v3/libsupc++/.libs >>> >>> -B/home/nixman/gcc-trunk-master-build/x86_64-linux-gnu/libstdc++-v3/src/.libs >>> >>> -B/home/nixman/gcc-trunk-master-build/x86_64-linux-gnu/libstdc++-v3/libsupc++/.libs >>> >>> -B/home/nixman/gcc-13/x86_64-linux-gnu/bin/ >>> -B/home/nixman/gcc-13/x86_64-linux-gnu/lib/ -isystem >>> /home/nixman/gcc-13/x86_64-linux-gnu/include -isystem >>> /home/nixman/gcc-13/x86_64-linux-gnu/sys-include -fPIC -DPIC >>> -shared >>> -nostdlib /lib/x86_64-linux-gnu/crti.o >>> /home/nixman/gcc-trunk-master-build/./gcc/crtbeginS.o >>> .libs/findcomp.o >>> .libs/libcc1.o .libs/libcp1.o .libs/compiler.o .libs/names.o >>> .libs/callbacks.o .libs/connection.o .libs/marshall.o >>> -L/home/nixman/gcc-trunk-master-build/x86_64-linux-gnu/libstdc++-v3/src/.libs >>> >>> -L/home/nixman/gcc-trunk-master-build/x86_64-linux-gnu/libstdc++-v3/src >>> -L/home/nixman/gcc-trunk-master-build/x86_64-linux-gnu/libstdc++-v3/libsupc++/.libs >>> >>> -L/home/nixman/gcc-trunk-master-build/./gcc -L/lib/x86_64-linux-gnu >>> -L/lib/../lib64 -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib64 >>> /home/nixman/gcc-trunk-master-build/x86_64-linux-gnu/libstdc++-v3/src/.libs/libstdc++.a >>> >>> -lm -lc -lgcc /home/nixman/gcc-trunk-master-build/./gcc/crtendS.o >>> /lib/x86_64-linux-gnu/crtn.o -static-libstdc++ -static-libgcc >>> ../libiberty/pic/libiberty.a -Wl,-soname -Wl,libcc1.so.0 >>> -Wl,-retain-symbols-file -Wl,../../gcc-trunk-master/libcc1/libcc1.sym >>> -o >>> .libs/libcc1.so.0.0.0 >>> >>> >>> >>> any ideas? >>> >> >> The problem is that one of the objects in that linker command was not >> built >> as PIC. I think it will work with either --with-pic or (if you don't >> need >> libcc1) --disable-libcc1 >> > > thank you Jonathan, but with `--with-pic` I got the same error. > will try to build `--disable-libcc1` ... > but with `--disable-libcc1` it built successfully. hmm... best! > > > best! > > >> >> >>> >>> thanks! >>> >>> >>> ps >>> Google did not help me, but I found Jonathan's Wakely project >>> (https://github.com/jwakely/pkg-gcc-latest) and now I will try to >>> install the deb. >>>