grub-devel.gnu.org archive mirror
 help / color / mirror / Atom feed
* PPC build failure with undefined symbols __ashldi3, _restgpr_14_x, ...
@ 2013-11-15  5:19 Andrey Borzenkov
  2013-11-15 11:00 ` Vladimir 'φ-coder/phcoder' Serbinenko
  0 siblings, 1 reply; 11+ messages in thread
From: Andrey Borzenkov @ 2013-11-15  5:19 UTC (permalink / raw)
  To: grub-devel

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 with
them.

x86 builds OK.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: PPC build failure with undefined symbols __ashldi3, _restgpr_14_x, ...
  2013-11-15  5:19 PPC build failure with undefined symbols __ashldi3, _restgpr_14_x, Andrey Borzenkov
@ 2013-11-15 11:00 ` Vladimir 'φ-coder/phcoder' Serbinenko
  2013-11-15 12:22   ` Andrey Borzenkov
  0 siblings, 1 reply; 11+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2013-11-15 11:00 UTC (permalink / raw)
  To: grub-devel

[-- Attachment #1: Type: text/plain, Size: 1206 bytes --]

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 with
> them.
> 
You don't have multilib installed.
> x86 builds OK.
> 
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
> 



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 291 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: PPC build failure with undefined symbols __ashldi3, _restgpr_14_x, ...
  2013-11-15 11:00 ` Vladimir 'φ-coder/phcoder' Serbinenko
@ 2013-11-15 12:22   ` Andrey Borzenkov
  2013-11-15 12:33     ` Vladimir 'φ-coder/phcoder' Serbinenko
  0 siblings, 1 reply; 11+ messages in thread
From: Andrey Borzenkov @ 2013-11-15 12:22 UTC (permalink / raw)
  To: grub-devel

[-- Attachment #1: Type: text/plain, Size: 2386 bytes --]

В Fri, 15 Nov 2013 12:00:49 +0100
Vladimir 'φ-coder/phcoder' Serbinenko <phcoder@gmail.com> пишет:

> 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 with
> > 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.

> > x86 builds OK.
> > 
> > _______________________________________________
> > Grub-devel mailing list
> > Grub-devel@gnu.org
> > https://lists.gnu.org/mailman/listinfo/grub-devel
> > 
> 
> 


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: PPC build failure with undefined symbols __ashldi3, _restgpr_14_x, ...
  2013-11-15 12:22   ` Andrey Borzenkov
@ 2013-11-15 12:33     ` Vladimir 'φ-coder/phcoder' Serbinenko
  2013-11-15 13:43       ` Andrey Borzenkov
  0 siblings, 1 reply; 11+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2013-11-15 12:33 UTC (permalink / raw)
  To: grub-devel

[-- Attachment #1: Type: text/plain, Size: 2848 bytes --]

On 15.11.2013 13:22, Andrey Borzenkov wrote:
> В Fri, 15 Nov 2013 12:00:49 +0100
> Vladimir 'φ-coder/phcoder' Serbinenko <phcoder@gmail.com> пишет:
> 
>> 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 with
>>> 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 ?
>>> x86 builds OK.
>>>
>>> _______________________________________________
>>> Grub-devel mailing list
>>> Grub-devel@gnu.org
>>> https://lists.gnu.org/mailman/listinfo/grub-devel
>>>
>>
>>
> 
> 
> 
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
> 



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 291 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: PPC build failure with undefined symbols __ashldi3, _restgpr_14_x, ...
  2013-11-15 12:33     ` Vladimir 'φ-coder/phcoder' Serbinenko
@ 2013-11-15 13:43       ` Andrey Borzenkov
  2013-11-15 14:02         ` Vladimir 'φ-coder/phcoder' Serbinenko
  0 siblings, 1 reply; 11+ messages in thread
From: Andrey Borzenkov @ 2013-11-15 13:43 UTC (permalink / raw)
  To: grub-devel

[-- Attachment #1: Type: text/plain, Size: 4770 bytes --]

В Fri, 15 Nov 2013 13:33:07 +0100
Vladimir 'φ-coder/phcoder' Serbinenko <phcoder@gmail.com> пишет:

> On 15.11.2013 13:22, Andrey Borzenkov wrote:
> > В Fri, 15 Nov 2013 12:00:49 +0100
> > Vladimir 'φ-coder/phcoder' Serbinenko <phcoder@gmail.com> пишет:
> > 
> >> 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 with
> >>> 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 ?

Initially it failed due to missing -lc. After adding glibc-devel-static
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 -Wold-style-definition -Wpointer-arith -Wundef -Wextra -Wattributes -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wendif-labels -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Winit-self -Wint-to-pointer-cast -Winvalid-pch -Wmain -Wmissing-braces -Wmissing-field-initializers -Wmissing-format-attribute -Wmultichar -Wnonnull -Woverflow -Wparentheses -Wpointer-arith -Wpointer-to-int-cast -Wreturn-type -Wsequence-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-register-var -Wwrite-strings -Wnested-externs -Wstrict-prototypes -Wpointer-sign -g -Wredundant-decls -Wmissing-prototypes -Wmissing-declarations -Wcast-align -m32 -freg-struct-return -fno-dwarf2-cfi-asm -fno-asynchronous-unwind-tables -fno-stack-protector -Wl,--defsym,abort=main  -Wall -W -I$(top_srcdir)/include -I$(top_builddir)/include  -DGRUB_MACHINE_IEEE1275=1 -DGRUB_MACHINE=POWERPC_IEEE1275 -DGRUB_TARGET_CPU_POWERPC=1 -m32 -static -m32 conftest.c -lgcc >&5
[  121s] conftest.c:385:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
[  121s]  char __bswapsi2 ();
[  121s] conftest.c:385:1: warning: function declaration isn't a prototype [-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: multiple definition of `abort'
[  121s] collect2: error: ld returned 1 exit status


-static is added by grub2.spec. I'm not sure, why - is it really needed?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: PPC build failure with undefined symbols __ashldi3, _restgpr_14_x, ...
  2013-11-15 13:43       ` Andrey Borzenkov
@ 2013-11-15 14:02         ` Vladimir 'φ-coder/phcoder' Serbinenko
  2013-11-15 14:35           ` Andrey Borzenkov
  0 siblings, 1 reply; 11+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2013-11-15 14:02 UTC (permalink / raw)
  To: grub-devel

[-- Attachment #1: Type: text/plain, Size: 5393 bytes --]

On 15.11.2013 14:43, Andrey Borzenkov wrote:
> В Fri, 15 Nov 2013 13:33:07 +0100
> Vladimir 'φ-coder/phcoder' Serbinenko <phcoder@gmail.com> пишет:
> 
>> On 15.11.2013 13:22, Andrey Borzenkov wrote:
>>> В Fri, 15 Nov 2013 12:00:49 +0100
>>> Vladimir 'φ-coder/phcoder' Serbinenko <phcoder@gmail.com> пишет:
>>>
>>>> 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 with
>>>>> 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 ?
> 
> Initially it failed due to missing -lc. After adding glibc-devel-static
> 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 -Wold-style-definition -Wpointer-arith -Wundef -Wextra -Wattributes -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wendif-labels -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Winit-self -Wint-to-pointer-cast -Winvalid-pch -Wmain -Wmissing-braces -Wmissing-field-initializers -Wmissing-format-attribute -Wmultichar -Wnonnull -Woverflow -Wparentheses -Wpointer-arith -Wpointer-to-int-cast -Wreturn-type -Wsequence-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-register-var -Wwrite-strings -Wnested-externs -Wstrict-prototypes -Wpointer-sign -g -Wredundant-decls -Wmissing-prototypes -Wmissing-declarations -Wcast-align -m32 -freg-struct-
return -fno-dwarf2-cfi-asm -fno-asynchronous-unwind-tables -fno-stack-protector -Wl,--defsym,abort=main  -Wall -W -I$(top_srcdir)/include -I$(top_builddir)/include  -DGRUB_MACHINE_IEEE1275=1 -DGRUB_MACHINE=POWERPC_IEEE1275 -DGRUB_TARGET_CPU_POWERPC=1 -m32 -static -m32 conftest.c -lgcc >&5
> [  121s] conftest.c:385:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
> [  121s]  char __bswapsi2 ();
> [  121s] conftest.c:385:1: warning: function declaration isn't a prototype [-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: multiple 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="$TARGET_CFLAGS -Wl,--defsym,abort=main"
 fi
 fi

+CFLAGS="$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 needed?
> 
> 
> 
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
> 



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 291 bytes --]

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: PPC build failure with undefined symbols __ashldi3, _restgpr_14_x, ...
  2013-11-15 14:02         ` Vladimir 'φ-coder/phcoder' Serbinenko
@ 2013-11-15 14:35           ` Andrey Borzenkov
  2013-11-15 14:41             ` Vladimir 'φ-coder/phcoder' Serbinenko
  0 siblings, 1 reply; 11+ messages in thread
From: Andrey Borzenkov @ 2013-11-15 14:35 UTC (permalink / raw)
  To: grub-devel

[-- Attachment #1: Type: text/plain, Size: 5652 bytes --]

В Fri, 15 Nov 2013 15:02:11 +0100
Vladimir 'φ-coder/phcoder' Serbinenko <phcoder@gmail.com> пишет:

> On 15.11.2013 14:43, Andrey Borzenkov wrote:
> > В Fri, 15 Nov 2013 13:33:07 +0100
> > Vladimir 'φ-coder/phcoder' Serbinenko <phcoder@gmail.com> пишет:
> > 
> >> On 15.11.2013 13:22, Andrey Borzenkov wrote:
> >>> В Fri, 15 Nov 2013 12:00:49 +0100
> >>> Vladimir 'φ-coder/phcoder' Serbinenko <phcoder@gmail.com> пишет:
> >>>
> >>>> 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 with
> >>>>> 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 ?
> > 
> > Initially it failed due to missing -lc. After adding glibc-devel-static
> > 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 -Wold-style-definition -Wpointer-arith -Wundef -Wextra -Wattributes -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wendif-labels -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Winit-self -Wint-to-pointer-cast -Winvalid-pch -Wmain -Wmissing-braces -Wmissing-field-initializers -Wmissing-format-attribute -Wmultichar -Wnonnull -Woverflow -Wparentheses -Wpointer-arith -Wpointer-to-int-cast -Wreturn-type -Wsequence-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-register-var -Wwrite-strings -Wnested-externs -Wstrict-prototypes -Wpointer-sign -g -Wredundant-decls -Wmissing-prototypes -Wmissing-declarations -Wcast-align -m32 -freg-struct-
> return -fno-dwarf2-cfi-asm -fno-asynchronous-unwind-tables -fno-stack-protector -Wl,--defsym,abort=main  -Wall -W -I$(top_srcdir)/include -I$(top_builddir)/include  -DGRUB_MACHINE_IEEE1275=1 -DGRUB_MACHINE=POWERPC_IEEE1275 -DGRUB_TARGET_CPU_POWERPC=1 -m32 -static -m32 conftest.c -lgcc >&5
> > [  121s] conftest.c:385:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
> > [  121s]  char __bswapsi2 ();
> > [  121s] conftest.c:385:1: warning: function declaration isn't a prototype [-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: multiple 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="$TARGET_CFLAGS -Wl,--defsym,abort=main"
>  fi
>  fi
> 
> +CFLAGS="$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 needed?
> > 

Actually removing explicit TARGET_LDFLAGS=-static in grub2.spec fixed
it. I now wonder why it was added in the first place.


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: PPC build failure with undefined symbols __ashldi3, _restgpr_14_x, ...
  2013-11-15 14:35           ` Andrey Borzenkov
@ 2013-11-15 14:41             ` Vladimir 'φ-coder/phcoder' Serbinenko
  2013-11-15 14:53               ` Andrey Borzenkov
  2013-11-16  4:49               ` [PATCH] restore -nostdlib for libgcc symbols tests Andrey Borzenkov
  0 siblings, 2 replies; 11+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2013-11-15 14:41 UTC (permalink / raw)
  To: grub-devel

[-- Attachment #1: Type: text/plain, Size: 5988 bytes --]

On 15.11.2013 15:35, Andrey Borzenkov wrote:
> В Fri, 15 Nov 2013 15:02:11 +0100
> Vladimir 'φ-coder/phcoder' Serbinenko <phcoder@gmail.com> пишет:
> 
>> On 15.11.2013 14:43, Andrey Borzenkov wrote:
>>> В Fri, 15 Nov 2013 13:33:07 +0100
>>> Vladimir 'φ-coder/phcoder' Serbinenko <phcoder@gmail.com> пишет:
>>>
>>>> On 15.11.2013 13:22, Andrey Borzenkov wrote:
>>>>> В Fri, 15 Nov 2013 12:00:49 +0100
>>>>> Vladimir 'φ-coder/phcoder' Serbinenko <phcoder@gmail.com> пишет:
>>>>>
>>>>>> 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 with
>>>>>>> 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 ?
>>>
>>> Initially it failed due to missing -lc. After adding glibc-devel-static
>>> 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 -Wold-style-definition -Wpointer-arith -Wundef -Wextra -Wattributes -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wendif-labels -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Winit-self -Wint-to-pointer-cast -Winvalid-pch -Wmain -Wmissing-braces -Wmissing-field-initializers -Wmissing-format-attribute -Wmultichar -Wnonnull -Woverflow -Wparentheses -Wpointer-arith -Wpointer-to-int-cast -Wreturn-type -Wsequence-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-register-var -Wwrite-strings -Wnested-externs -Wstrict-prototypes -Wpointer-sign -g -Wredundant-decls -Wmissing-prototypes -Wmissing-declarations -Wcast-align -m32 -freg-struc
t-
>> return -fno-dwarf2-cfi-asm -fno-asynchronous-unwind-tables -fno-stack-protector -Wl,--defsym,abort=main  -Wall -W -I$(top_srcdir)/include -I$(top_builddir)/include  -DGRUB_MACHINE_IEEE1275=1 -DGRUB_MACHINE=POWERPC_IEEE1275 -DGRUB_TARGET_CPU_POWERPC=1 -m32 -static -m32 conftest.c -lgcc >&5
>>> [  121s] conftest.c:385:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
>>> [  121s]  char __bswapsi2 ();
>>> [  121s] conftest.c:385:1: warning: function declaration isn't a prototype [-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: multiple 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="$TARGET_CFLAGS -Wl,--defsym,abort=main"
>>  fi
>>  fi
>>
>> +CFLAGS="$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 needed?
>>>
> 
> Actually removing explicit TARGET_LDFLAGS=-static in grub2.spec fixed
> it. I now wonder why it was added in the first place.
> 
-static shouldn't create problems. Adding -nostdlib like I proposed
should solve the problem.
> 
> 
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
> 



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 291 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: PPC build failure with undefined symbols __ashldi3, _restgpr_14_x, ...
  2013-11-15 14:41             ` Vladimir 'φ-coder/phcoder' Serbinenko
@ 2013-11-15 14:53               ` Andrey Borzenkov
  2013-11-16  4:49               ` [PATCH] restore -nostdlib for libgcc symbols tests Andrey Borzenkov
  1 sibling, 0 replies; 11+ messages in thread
From: Andrey Borzenkov @ 2013-11-15 14:53 UTC (permalink / raw)
  To: grub-devel

[-- Attachment #1: Type: text/plain, Size: 668 bytes --]

В Fri, 15 Nov 2013 15:41:51 +0100
Vladimir 'φ-coder/phcoder' Serbinenko <phcoder@gmail.com> пишет:

> > 
> > Actually removing explicit TARGET_LDFLAGS=-static in grub2.spec fixed
> > it. I now wonder why it was added in the first place.
> > 
> -static shouldn't create problems. Adding -nostdlib like I proposed
> should solve the problem.

-static does cause problem at least with current packaging here. I
prefer to remove flags that apparently are not needed than add yet
another build requires which at the end will have the same result
(more BR - longer build time, increased load).

Thank you for helping to find root cause for the issue!

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH] restore -nostdlib for libgcc symbols tests
  2013-11-15 14:41             ` Vladimir 'φ-coder/phcoder' Serbinenko
  2013-11-15 14:53               ` Andrey Borzenkov
@ 2013-11-16  4:49               ` Andrey Borzenkov
  2013-11-16 12:51                 ` Vladimir 'φ-coder/phcoder' Serbinenko
  1 sibling, 1 reply; 11+ messages in thread
From: Andrey Borzenkov @ 2013-11-16  4:49 UTC (permalink / raw)
  To: grub-devel

> -static shouldn't create problems. Adding -nostdlib like I proposed
> should solve the problem.

Right, it was fallout of "plug the leakage" patch. I think below
patch is more aligned with the rest of code.

Commit 24f4e57c4684471da088c504dec0380886eece0c plugged leakage
of CFLAGS between individual tests, which broke test for libgcc
symbols. It needs -nostdlib which was set in previous test and
inherited before. Set it explicitly.

---
 configure.ac | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 2c4f019..1842910 100644
--- a/configure.ac
+++ b/configure.ac
@@ -815,9 +815,9 @@ LIBS="$TARGET_LIBGCC"
 grub_ASM_USCORE
 if test "x$TARGET_APPLE_LINKER" = x0 ; then
 if test x$grub_cv_asm_uscore = xyes; then
-CFLAGS="$TARGET_CFLAGS -Wl,--defsym,_abort=_main"
+CFLAGS="$TARGET_CFLAGS -nostdlib -Wl,--defsym,_abort=_main"
 else
-CFLAGS="$TARGET_CFLAGS -Wl,--defsym,abort=main"
+CFLAGS="$TARGET_CFLAGS -nostdlib -Wl,--defsym,abort=main"
 fi
 fi
 
-- 
tg: (59ba9d1..) u/configure_nostdlib (depends on: master)


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH] restore -nostdlib for libgcc symbols tests
  2013-11-16  4:49               ` [PATCH] restore -nostdlib for libgcc symbols tests Andrey Borzenkov
@ 2013-11-16 12:51                 ` Vladimir 'φ-coder/phcoder' Serbinenko
  0 siblings, 0 replies; 11+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2013-11-16 12:51 UTC (permalink / raw)
  To: The development of GNU GRUB

[-- Attachment #1: Type: text/plain, Size: 1163 bytes --]

On 16.11.2013 05:49, Andrey Borzenkov wrote:
>> -static shouldn't create problems. Adding -nostdlib like I proposed
>> should solve the problem.
> 
> Right, it was fallout of "plug the leakage" patch. I think below
> patch is more aligned with the rest of code.
> 
> Commit 24f4e57c4684471da088c504dec0380886eece0c plugged leakage
> of CFLAGS between individual tests, which broke test for libgcc
> symbols. It needs -nostdlib which was set in previous test and
> inherited before. Set it explicitly.
> 
Go ahead
> ---
>  configure.ac | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 2c4f019..1842910 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -815,9 +815,9 @@ LIBS="$TARGET_LIBGCC"
>  grub_ASM_USCORE
>  if test "x$TARGET_APPLE_LINKER" = x0 ; then
>  if test x$grub_cv_asm_uscore = xyes; then
> -CFLAGS="$TARGET_CFLAGS -Wl,--defsym,_abort=_main"
> +CFLAGS="$TARGET_CFLAGS -nostdlib -Wl,--defsym,_abort=_main"
>  else
> -CFLAGS="$TARGET_CFLAGS -Wl,--defsym,abort=main"
> +CFLAGS="$TARGET_CFLAGS -nostdlib -Wl,--defsym,abort=main"
>  fi
>  fi
>  
> 



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 291 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2013-11-16 12:51 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-15  5:19 PPC build failure with undefined symbols __ashldi3, _restgpr_14_x, Andrey Borzenkov
2013-11-15 11:00 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-11-15 12:22   ` Andrey Borzenkov
2013-11-15 12:33     ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-11-15 13:43       ` Andrey Borzenkov
2013-11-15 14:02         ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-11-15 14:35           ` Andrey Borzenkov
2013-11-15 14:41             ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-11-15 14:53               ` Andrey Borzenkov
2013-11-16  4:49               ` [PATCH] restore -nostdlib for libgcc symbols tests Andrey Borzenkov
2013-11-16 12:51                 ` Vladimir 'φ-coder/phcoder' Serbinenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).