From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1VhKaz-0003QY-Ki for mharc-grub-devel@gnu.org; Fri, 15 Nov 2013 09:42:05 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33618) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VhKat-0003QR-Q3 for grub-devel@gnu.org; Fri, 15 Nov 2013 09:42:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VhKao-0001dY-KA for grub-devel@gnu.org; Fri, 15 Nov 2013 09:41:59 -0500 Received: from mail-ee0-x231.google.com ([2a00:1450:4013:c00::231]:53146) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VhKao-0001dU-8E for grub-devel@gnu.org; Fri, 15 Nov 2013 09:41:54 -0500 Received: by mail-ee0-f49.google.com with SMTP id b15so1117561eek.36 for ; Fri, 15 Nov 2013 06:41:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type; bh=y8VcX4YE9Y1J79kbPqAV+GONZCnz8gpVZD556V8AQbw=; b=vE0qe6MmqVSkf5ln2KA4kPqE5l8RYCoouByVGgd4dPDplRAPblq1jmC/lQXyHGi7ed zosHCfvkBJTDhaFqLYSCcTQDWhfWTl+XRiL3zxc+6B2dMHGkkH6Cld5a5P/ncNq/p2vO FOpXpgqA1NiMKKJGInUWe4IxHYoC5iWz7xuk5R9NHfmPcOFD8yYMTSOl6++g3MezCdim E4bJQyqWXXUkOEhK43UwPjyY4PSY1Hcx8nvj9/t3WjTWx2mczoKXc9NRn2QneliS5IV8 xzmmhiqy2I/xfRKkxV53LkgTlDgtoBqmfyqRTJDikKm6Flhtm1qpsi/iNGZYvBgX3sO0 DDBg== X-Received: by 10.15.10.6 with SMTP id f6mr3772349eet.57.1384526513270; Fri, 15 Nov 2013 06:41:53 -0800 (PST) Received: from [192.168.1.16] (31-249.1-85.cust.bluewin.ch. [85.1.249.31]) by mx.google.com with ESMTPSA id l9sm7013585eew.6.2013.11.15.06.41.52 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 15 Nov 2013 06:41:52 -0800 (PST) Message-ID: <528632AF.8090303@gmail.com> Date: Fri, 15 Nov 2013 15:41:51 +0100 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131005 Icedove/17.0.9 MIME-Version: 1.0 To: grub-devel@gnu.org Subject: Re: PPC build failure with undefined symbols __ashldi3, _restgpr_14_x, ... 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> <20131115183539.1f4ddc75@opensuse.site> In-Reply-To: <20131115183539.1f4ddc75@opensuse.site> X-Enigmail-Version: 1.5.1 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="----enig2FXRSMMACFTHORCGERPUB" X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4013:c00::231 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:42:05 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2FXRSMMACFTHORCGERPUB Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 15.11.2013 15:35, Andrey Borzenkov wrote: > =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: >=20 >> 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: >>> >>>> 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/genmodd= ep.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/openSU= SE_Factory_PowerPC/ppc/grub2/_log >>>>>>> https://build.opensuse.org/build/home:arvidjaar:grub2-next/openSU= SE_Factory_PowerPC/ppc64/grub2/_log >>>>>>> >>>>>>> I do not myself have access to any PPC system nor any experience = with >>>>>>> them. >>>>>>> >>>>>> You don't have multilib installed. >>>>> >>>>> Could you elaborate? This is native build on PPC system. It has bot= h 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* p= art >>>>> 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 f= ail >>>>> or succeed in both cases. >>>>> >>>> It should say all "no" on x86 and almost all "yes" on ppc. This outp= ut >>>> indicates that link with libgcc failed. You can look how exactly the= >>>> test failed in config.log. Can you send me config.log ? >>> >>> Initially it failed due to missing -lc. After adding glibc-devel-stat= ic >>> to buildrequires it now fails due to redefined abort: >>> >>> [ 121s] configure:25260: checking for __bswapsi2 >>> [ 121s] configure:25260: gcc -o conftest -Os -Wall -W -Wshadow -Wol= d-style-definition -Wpointer-arith -Wundef -Wextra -Wattributes -Wchar-su= bscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdi= v-by-zero -Wendif-labels -Wfloat-equal -Wformat-extra-args -Wformat-secur= ity -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-in= t -Winit-self -Wint-to-pointer-cast -Winvalid-pch -Wmain -Wmissing-braces= -Wmissing-field-initializers -Wmissing-format-attribute -Wmultichar -Wno= nnull -Woverflow -Wparentheses -Wpointer-arith -Wpointer-to-int-cast -Wre= turn-type -Wsequence-point -Wshadow -Wsign-compare -Wstrict-aliasing -Wsw= itch -Wtrigraphs -Wundef -Wunknown-pragmas -Wunused -Wunused-function -Wu= nused-label -Wunused-parameter -Wunused-value -Wunused-variable -Wvariad= ic-macros -Wvolatile-register-var -Wwrite-strings -Wnested-externs -Wstri= ct-prototypes -Wpointer-sign -g -Wredundant-decls -Wmissing-prototypes -W= missing-declarations -Wcast-align -m32 -freg-struc t- >> return -fno-dwarf2-cfi-asm -fno-asynchronous-unwind-tables -fno-stack-= protector -Wl,--defsym,abort=3Dmain -Wall -W -I$(top_srcdir)/include -I$= (top_builddir)/include -DGRUB_MACHINE_IEEE1275=3D1 -DGRUB_MACHINE=3DPOWE= RPC_IEEE1275 -DGRUB_TARGET_CPU_POWERPC=3D1 -m32 -static -m32 conftest.c -= lgcc >&5 >>> [ 121s] conftest.c:385:1: warning: function declaration isn't a prot= otype [-Wstrict-prototypes] >>> [ 121s] char __bswapsi2 (); >>> [ 121s] conftest.c:385:1: warning: function declaration isn't a prot= otype [-Wstrict-prototypes] >>> [ 121s] char __bswapsi2 (); >>> [ 121s] ^ >>> [ 121s] /usr/lib/gcc/powerpc64-suse-linux/4.8/../../../../lib/libc.a= (abort.o): In function `abort': >>> [ 121s] /home/abuild/rpmbuild/BUILD/glibc-2.18/stdlib/abort.c:51: mu= ltiple definition of `abort' >>> [ 121s] collect2: error: ld returned 1 exit status >>> >> 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 >> >> +CFLAGS=3D"$CFLAGS -nostdlib" >> + >> # Check for libgcc symbols >> AC_CHECK_FUNCS(__bswapsi2 __bswapdi2 __ashldi3 __ashrdi3 __lshrdi3 >> __ucmpdi2 _restgpr_14_x) >> >> >>> >>> -static is added by grub2.spec. I'm not sure, why - is it really need= ed? >>> >=20 > Actually removing explicit TARGET_LDFLAGS=3D-static in grub2.spec fixed= > it. I now wonder why it was added in the first place. >=20 -static shouldn't create problems. Adding -nostdlib like I proposed should solve the problem. >=20 >=20 > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > https://lists.gnu.org/mailman/listinfo/grub-devel >=20 ------enig2FXRSMMACFTHORCGERPUB Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.15 (GNU/Linux) Comment: Using GnuPG with Icedove - http://www.enigmail.net/ iF4EAREKAAYFAlKGMq8ACgkQmBXlbbo5nOvpBQEAgEh0P52wqFTWbEkPHIlbsEZO MPL1p5aP28N+LzKJfrwA+wcCeDfSFMY20SaJ1fV76PZx1ENoA5C7AXOImKRDgO58 =qJJc -----END PGP SIGNATURE----- ------enig2FXRSMMACFTHORCGERPUB--