From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1VhKV0-0001RG-Nc for mharc-grub-devel@gnu.org; Fri, 15 Nov 2013 09:35:54 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60342) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VhKUu-0001Jv-CB for grub-devel@gnu.org; Fri, 15 Nov 2013 09:35:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VhKUp-00084O-2O for grub-devel@gnu.org; Fri, 15 Nov 2013 09:35:48 -0500 Received: from mail-lb0-x235.google.com ([2a00:1450:4010:c04::235]:43795) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VhKUo-00083o-LX for grub-devel@gnu.org; Fri, 15 Nov 2013 09:35:43 -0500 Received: by mail-lb0-f181.google.com with SMTP id q8so1593870lbi.12 for ; Fri, 15 Nov 2013 06:35:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:in-reply-to:references:mime-version :content-type; bh=onw+JahU4/OYaw+4ww/zCT12dN1NAgvo/OM5F2+T2p8=; b=haS3GABUJMuvXLXV2FLM8797SC6oNLWcJ0drekzkcue0FGPnOqryoVD1pNpLZ/xN7M hRgLmiCVzGdOotp35XlOAcdL4YFu7YkLhntxd1qsV1WLAqh758IPJ9w+AXAY54+3gWoy CBuGeLUw2u0XD0FY0zo630jqrSzcSFTXVzGWPYcYBcXY4TQgny6T+/3bJDF6YlHrkwd2 W+spaCdItAca287T5kcB0cnYZjVJXmfB6H9Iwb5PMqp2AG6iL7dCekiIgB5dWd7LKRHn Jw5N0kJNgjJiS9tJZmDKF5c7Ho6A+wE5kMUXVbsyhQ5ETQ4HPzUo11VH9i+IHUTF+s8C vMcQ== X-Received: by 10.152.22.228 with SMTP id h4mr57511laf.71.1384526141216; Fri, 15 Nov 2013 06:35:41 -0800 (PST) Received: from opensuse.site (ppp91-76-174-89.pppoe.mtu-net.ru. [91.76.174.89]) by mx.google.com with ESMTPSA id 8sm3318665laq.5.2013.11.15.06.35.40 for (version=SSLv3 cipher=RC4-SHA bits=128/128); Fri, 15 Nov 2013 06:35:40 -0800 (PST) Date: Fri, 15 Nov 2013 18:35:39 +0400 From: Andrey Borzenkov To: grub-devel@gnu.org Subject: Re: PPC build failure with undefined symbols __ashldi3, _restgpr_14_x, ... Message-ID: <20131115183539.1f4ddc75@opensuse.site> In-Reply-To: <52862963.2060409@gmail.com> References: <20131115091954.2b642e0b@opensuse.site> <5285FEE1.3030601@gmail.com> <20131115162200.2c18d0d0@opensuse.site> <52861483.70807@gmail.com> <20131115174346.3360ac1e@opensuse.site> <52862963.2060409@gmail.com> X-Mailer: Claws Mail 3.9.2 (GTK+ 2.24.18; x86_64-suse-linux-gnu) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/I411Ihs1Ok3fqwpcLeoEb4F"; protocol="application/pgp-signature" X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c04::235 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Nov 2013 14:35:53 -0000 --Sig_/I411Ihs1Ok3fqwpcLeoEb4F Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable =D0=92 Fri, 15 Nov 2013 15:02:11 +0100 Vladimir '=CF=86-coder/phcoder' Serbinenko =D0=BF=D0=B8= =D1=88=D0=B5=D1=82: > On 15.11.2013 14:43, Andrey Borzenkov wrote: > > =D0=92 Fri, 15 Nov 2013 13:33:07 +0100 > > Vladimir '=CF=86-coder/phcoder' Serbinenko =D0=BF= =D0=B8=D1=88=D0=B5=D1=82: > >=20 > >> On 15.11.2013 13:22, Andrey Borzenkov wrote: > >>> =D0=92 Fri, 15 Nov 2013 12:00:49 +0100 > >>> Vladimir '=CF=86-coder/phcoder' Serbinenko =D0=BF= =D0=B8=D1=88=D0=B5=D1=82: > >>> > >>>> On 15.11.2013 06:19, Andrey Borzenkov wrote: > >>>>> Sources at 6fcec439545c817fbc8e2f51c667a70037a34a76 > >>>>> > >>>>> Building RPM for PPC (32 or 64 bits) I get > >>>>> > >>>>> [ 187s] cat syminfo.lst | sort | gawk -f ../../grub-core/genmoddep= .awk > moddep.lst || (rm -f moddep.lst; exit 1) > >>>>> [ 187s] __ashldi3 in affs is not defined > >>>>> [ 187s] _restgpr_14_x in affs is not defined > >>>>> [ 187s] _restgpr_20_x in affs is not defined > >>>>> [ 187s] _restgpr_25_x in affs is not defined > >>>>> [ 187s] _restgpr_27_x in affs is not defined > >>>>> [ 187s] _restgpr_28_x in affs is not defined > >>>>> [ 187s] _restgpr_30_x in affs is not defined > >>>>> ... > >>>>> > >>>>> for a long list of them. > >>>>> > >>>>> Full build logs are available as > >>>>> https://build.opensuse.org/build/home:arvidjaar:grub2-next/openSUSE= _Factory_PowerPC/ppc/grub2/_log > >>>>> https://build.opensuse.org/build/home:arvidjaar:grub2-next/openSUSE= _Factory_PowerPC/ppc64/grub2/_log > >>>>> > >>>>> I do not myself have access to any PPC system nor any experience wi= th > >>>>> them. > >>>>> > >>>> You don't have multilib installed. > >>> > >>> Could you elaborate? This is native build on PPC system. It has both = 64 > >>> and 32 bit of gcc and libgcc installed: > >>> > >>> [ 12s] libgcc_s1-32bit-4.8.1_20130909-5.1 ######################= ################## > >>> [ 10s] libgcc_s1-4.8.1_20130909-5.1 ######################= ################## > >>> [ 17s] gcc48-4.8.1_20130909-5.1 ######################= ################## > >>> [ 17s] gcc48-32bit-4.8.1_20130909-5.1 ######################= ################## > >>> > >>> This did build successfully until some recent changes (grub2 *is* part > >>> of openSUSE for PPC). I compared logs for x86 and ppc and both say > >>> > >>> [ 119s] checking for __bswapsi2... no > >>> [ 119s] checking for __bswapdi2... no > >>> [ 119s] checking for __ashldi3... no > >>> [ 120s] checking for __ashrdi3... no > >>> [ 120s] checking for __lshrdi3... no > >>> [ 120s] checking for __ucmpdi2... no > >>> [ 120s] checking for _restgpr_14_x... no > >>> > >>> unfortunately I'm stuck here. For all I can tell it should either fail > >>> or succeed in both cases. > >>> > >> It should say all "no" on x86 and almost all "yes" on ppc. This output > >> indicates that link with libgcc failed. You can look how exactly the > >> test failed in config.log. Can you send me config.log ? > >=20 > > Initially it failed due to missing -lc. After adding glibc-devel-static > > to buildrequires it now fails due to redefined abort: > >=20 > > [ 121s] configure:25260: checking for __bswapsi2 > > [ 121s] configure:25260: gcc -o conftest -Os -Wall -W -Wshadow -Wold-= style-definition -Wpointer-arith -Wundef -Wextra -Wattributes -Wchar-subscr= ipts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-z= ero -Wendif-labels -Wfloat-equal -Wformat-extra-args -Wformat-security -Wfo= rmat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Winit-s= elf -Wint-to-pointer-cast -Winvalid-pch -Wmain -Wmissing-braces -Wmissing-f= ield-initializers -Wmissing-format-attribute -Wmultichar -Wnonnull -Woverfl= ow -Wparentheses -Wpointer-arith -Wpointer-to-int-cast -Wreturn-type -Wsequ= ence-point -Wshadow -Wsign-compare -Wstrict-aliasing -Wswitch -Wtrigraphs -= Wundef -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused= -parameter -Wunused-value -Wunused-variable -Wvariadic-macros -Wvolatile-r= egister-var -Wwrite-strings -Wnested-externs -Wstrict-prototypes -Wpointer-= sign -g -Wredundant-decls -Wmissing-prototypes -Wmissing-declarations -Wcas= t-align -m32 -freg-struct- > return -fno-dwarf2-cfi-asm -fno-asynchronous-unwind-tables -fno-stack-pro= tector -Wl,--defsym,abort=3Dmain -Wall -W -I$(top_srcdir)/include -I$(top_= builddir)/include -DGRUB_MACHINE_IEEE1275=3D1 -DGRUB_MACHINE=3DPOWERPC_IEE= E1275 -DGRUB_TARGET_CPU_POWERPC=3D1 -m32 -static -m32 conftest.c -lgcc >&5 > > [ 121s] conftest.c:385:1: warning: function declaration isn't a protot= ype [-Wstrict-prototypes] > > [ 121s] char __bswapsi2 (); > > [ 121s] conftest.c:385:1: warning: function declaration isn't a protot= ype [-Wstrict-prototypes] > > [ 121s] char __bswapsi2 (); > > [ 121s] ^ > > [ 121s] /usr/lib/gcc/powerpc64-suse-linux/4.8/../../../../lib/libc.a(a= bort.o): In function `abort': > > [ 121s] /home/abuild/rpmbuild/BUILD/glibc-2.18/stdlib/abort.c:51: mult= iple definition of `abort' > > [ 121s] collect2: error: ld returned 1 exit status > >=20 > Try this: > diff --git a/configure.ac b/configure.ac > index 2c4f019..cd96588 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -821,6 +821,8 @@ CFLAGS=3D"$TARGET_CFLAGS -Wl,--defsym,abort=3Dmain" > fi > fi >=20 > +CFLAGS=3D"$CFLAGS -nostdlib" > + > # Check for libgcc symbols > AC_CHECK_FUNCS(__bswapsi2 __bswapdi2 __ashldi3 __ashrdi3 __lshrdi3 > __ucmpdi2 _restgpr_14_x) >=20 >=20 > >=20 > > -static is added by grub2.spec. I'm not sure, why - is it really needed? > >=20 Actually removing explicit TARGET_LDFLAGS=3D-static in grub2.spec fixed it. I now wonder why it was added in the first place. --Sig_/I411Ihs1Ok3fqwpcLeoEb4F Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iEYEARECAAYFAlKGMTsACgkQR6LMutpd94ydOQCeL++db6THUounIX+8lODbs/lZ PYsAn0FAcLGPzGLF9VWYM+84XiuJ4jeF =0U/q -----END PGP SIGNATURE----- --Sig_/I411Ihs1Ok3fqwpcLeoEb4F--