Bug 8491 - libglib2 2.46.1 not Building for armv5 on 2015.11-rc3
Summary: libglib2 2.46.1 not Building for armv5 on 2015.11-rc3
Status: RESOLVED FIXED
Alias: None
Product: buildroot
Classification: Unclassified
Component: Other (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 minor
Target Milestone: 2015.11
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-29 20:23 UTC by brandurs
Modified: 2015-11-30 07:24 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description brandurs 2015-11-29 20:23:58 UTC
When configure runs..
configure: WARNING: unrecognized options: --disable-doc, --disable-docs, --disable-documentation, --with-xmlto, --with-fop, --enable-ipv6

when building..
  CC       libglib_2_0_la-gthread.lo
/tmp/.private/root/ccSdfBdl.s: Assembler messages:
/tmp/.private/root/ccSdfBdl.s:1010: Error: shifts in CMP/MOV instructions are only supported in unified syntax -- `mov r12,r12,ror#3'
/tmp/.private/root/ccSdfBdl.s:1010: Error: shifts in CMP/MOV instructions are only supported in unified syntax -- `mov r12,r12,ror#13'
/tmp/.private/root/ccSdfBdl.s:1011: Error: shifts in CMP/MOV instructions are only supported in unified syntax -- `mov r12,r12,ror#29'
/tmp/.private/root/ccSdfBdl.s:1011: Error: shifts in CMP/MOV instructions are only supported in unified syntax -- `mov r12,r12,ror#19'
/tmp/.private/root/ccSdfBdl.s:1012: Error: lo register required -- `orr r10,r10,r10'
Makefile:2087: recipe for target 'libglib_2_0_la-gslice.lo' failed
Comment 1 Yann E. MORIN 2015-11-29 21:31:18 UTC
Hello,

Thanks for your report!

However, I can not reproduce that build failure.
Here's my defconfig:

BR2_arm=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_INIT_NONE=y
BR2_SYSTEM_BIN_SH_NONE=y
# BR2_PACKAGE_BUSYBOX is not set
BR2_PACKAGE_LIBGLIB2=y

This selects an arm926t CPU, which is an armv5. And libglib2
builds correctly here.

Care to share your defconfig, please?

Regards,
Yann E. MORIN.
Comment 2 Peter Korsgaard 2015-11-29 21:52:14 UTC
(In reply to comment #1)
> Hello,
> 
> Thanks for your report!
> 
> However, I can not reproduce that build failure.
> Here's my defconfig:
> 
> BR2_arm=y
> BR2_TOOLCHAIN_EXTERNAL=y
> BR2_INIT_NONE=y
> BR2_SYSTEM_BIN_SH_NONE=y
> # BR2_PACKAGE_BUSYBOX is not set
> BR2_PACKAGE_LIBGLIB2=y

Based on the error message, the reporter was most likely building with thumb1 mode.

And indeed, it fails here as well with that config + BR2_ARM_INSTRUCTIONS_THUMB=y

  CC       libglib_2_0_la-gstringchunk.lo
/tmp/ccSVEXME.s: Assembler messages:
/tmp/ccSVEXME.s:587: Error: shifts in CMP/MOV instructions are only supported in unified syntax -- `mov r12,r12,ror#3'
/tmp/ccSVEXME.s:587: Error: shifts in CMP/MOV instructions are only supported in unified syntax -- `mov r12,r12,ror#13'
/tmp/ccSVEXME.s:588: Error: shifts in CMP/MOV instructions are only supported in unified syntax -- `mov r12,r12,ror#29'
/tmp/ccSVEXME.s:588: Error: shifts in CMP/MOV instructions are only supported in unified syntax -- `mov r12,r12,ror#19'
/tmp/ccSVEXME.s:589: Error: lo register required -- `orr r10,r10,r10'
Makefile:2087: recipe for target 'libglib_2_0_la-gslice.lo' failed

I guess we'll need to force -marm for libglib2.
Comment 3 Peter Korsgaard 2015-11-29 21:54:09 UTC
(In reply to comment #0)
> When configure runs..
> configure: WARNING: unrecognized options: --disable-doc, --disable-docs,
> --disable-documentation, --with-xmlto, --with-fop, --enable-ipv6
> 
> when building..
>   CC       libglib_2_0_la-gthread.lo
> /tmp/.private/root/ccSdfBdl.s: Assembler messages:
> /tmp/.private/root/ccSdfBdl.s:1010: Error: shifts in CMP/MOV instructions are
> only supported in unified syntax -- `mov r12,r12,ror#3'
> /tmp/.private/root/ccSdfBdl.s:1010: Error: shifts in CMP/MOV instructions are
> only supported in unified syntax -- `mov r12,r12,ror#13'
> /tmp/.private/root/ccSdfBdl.s:1011: Error: shifts in CMP/MOV instructions are
> only supported in unified syntax -- `mov r12,r12,ror#29'
> /tmp/.private/root/ccSdfBdl.s:1011: Error: shifts in CMP/MOV instructions are
> only supported in unified syntax -- `mov r12,r12,ror#19'
> /tmp/.private/root/ccSdfBdl.s:1012: Error: lo register required -- `orr

That TMPDIR seems to indicate that you are building as root. PLEASE don't do that. One of the most basic features of Buildroot is that you don't need to be root (and no guarantees are given that it will behave sanely if you DO run it as root).
Comment 4 Thomas Petazzoni 2015-11-29 22:59:21 UTC
(In reply to comment #2)

> I guess we'll need to force -marm for libglib2.

The assembly code in question comes from glib/valgrind.h, but unfortunately, I don't see a way of disabling valgrind "support" from glib.
Comment 5 Peter Korsgaard 2015-11-30 07:24:17 UTC
Fixed in git by:

commit 26013972ce568e55a121c21a55afce45bc0675e9
Author: Peter Korsgaard <peter@korsgaard.com>
Date:   Mon Nov 30 08:19:59 2015 +0100

    libglib2: force arm mode when building with thumb1
    
    Fixes #8491
    
    glib/valgrind.h contains inline asm not compatible with thumb1, so build it
    in arm mode:
    
      CC       libglib_2_0_la-gstringchunk.lo
    /tmp/ccSVEXME.s: Assembler messages:
    /tmp/ccSVEXME.s:587: Error: shifts in CMP/MOV instructions are only supported
    in unified syntax -- `mov r12,r12,ror#3'
    /tmp/ccSVEXME.s:587: Error: shifts in CMP/MOV instructions are only supported
    in unified syntax -- `mov r12,r12,ror#13'
    /tmp/ccSVEXME.s:588: Error: shifts in CMP/MOV instructions are only supported
    in unified syntax -- `mov r12,r12,ror#29'
    /tmp/ccSVEXME.s:588: Error: shifts in CMP/MOV instructions are only supported
    in unified syntax -- `mov r12,r12,ror#19'
    /tmp/ccSVEXME.s:589: Error: lo register required -- `orr r10,r10,r10'
    Makefile:2087: recipe for target 'libglib_2_0_la-gslice.lo' failed
    
    Signed-off-by: Peter Korsgaard <peter@korsgaard.com>