kernel build fails with 12.04 and 12.05 toolchain released

Bug #1007353 reported by Deepti B. Kalakeri
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linaro Toolchain Binaries
Fix Released
High
Zhenqiang Chen

Bug Description

Hi,

The kernel build for linux-linaro-tracking tree (linux-linaro branch) with the latest released 12.04 and 12.05 gcc binaries fails with the following error:

  CC arch/arm/boot/compressed/decompress.o
/mnt/ci_build/workspace/linux-linaro-tracking_panda-omap2plus_sandbox_job/arch/arm/boot/compressed/head.S: Assembler messages:
/mnt/ci_build/workspace/linux-linaro-tracking_panda-omap2plus_sandbox_job/arch/arm/boot/compressed/head.S:127: Error: selected processor does not support requested special purpose register -- `mrs r2,cpsr'
/mnt/ci_build/workspace/linux-linaro-tracking_panda-omap2plus_sandbox_job/arch/arm/boot/compressed/head.S:134: Error: selected processor does not support requested special purpose register -- `mrs r2,cpsr'
/mnt/ci_build/workspace/linux-linaro-tracking_panda-omap2plus_sandbox_job/arch/arm/boot/compressed/head.S:136: Error: selected processor does not support requested special purpose register -- `msr cpsr_c,r2'
make[3]: *** [arch/arm/boot/compressed/head.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [arch/arm/boot/compressed/vmlinux] Error 2
make[1]: *** [uImage] Error 2
make: *** [sub-make] Error 2

The build was executed on a precise ec2 instance. Here is the link to the complete failure log: https://ci.linaro.org/jenkins/job/linux-linaro-tracking_panda-omap2plus_sandbox_job/78/console.

Regards,
Deepti.

Revision history for this message
Zhenqiang Chen (zhenqiang-chen) wrote :

Thank you report the issue. But I can not reproduce it with the following steps:

export ARCH=arm
export CROSS_COMPILE=.../gcc-linaro-arm-linux-gnueabihf-2012.05-20120523_linux/bin/arm-linux-gnueabihf-
make omap2plus_defconfig
make uImage -j4 V=1

Logs show there is no error and I can get a vmlinux.

Would you please give more instructions to reproduce it?

Revision history for this message
Deepti B. Kalakeri (deeptik) wrote : Re: [Bug 1007353] Re: kernel build fails with 12.04 and 12.05 toolchain released

On Mon, Jun 4, 2012 at 3:25 PM, Zhenqiang Chen
<email address hidden>wrote:

> Thank you report the issue. But I can not reproduce it with the
> following steps:
>
> export ARCH=arm
> export
> CROSS_COMPILE=.../gcc-linaro-arm-linux-gnueabihf-2012.05-20120523_linux/bin/arm-linux-gnueabihf-
> make omap2plus_defconfig
> make uImage -j4 V=1
>
> Logs show there is no error and I can get a vmlinux.
>
> Would you please give more instructions to reproduce it?
>

Well the above instructions work. But if I try to do something like the
following I get the compilation error mentioned previously

make ARCH=arm clean mrproper
make ARCH=arm
CROSS_COMPILE='~/work/kernel/gcc_4.7/gcc-linaro-arm-linux-gnueabi-2012.04-20120426_linux/bin/arm-linux-gnueabi-'
omap2plus_defconfig
echo 'CONFIG_ARCH_OMAP2=n' >> .config
echo 'CONFIG_THUMB2_KERNEL=y' >> .config
yes '' |make ARCH=arm oldconfig
 make ARCH=arm
CROSS_COMPILE='~/work/kernel/gcc_4.7/gcc-linaro-arm-linux-gnueabi-2012.04-20120426_linux/bin/arm-linux-gnueabi-'
-j4 uImage

> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1007353
>
> Title:
> kernel build fails with 12.04 and 12.05 toolchain released
>
> Status in Linaro Toolchain Binaries:
> New
>
> Bug description:
> Hi,
>
> The kernel build for linux-linaro-tracking tree (linux-linaro branch)
> with the latest released 12.04 and 12.05 gcc binaries fails with the
> following error:
>
> CC arch/arm/boot/compressed/decompress.o
> /mnt/ci_build/workspace/linux-linaro-tracking_panda-omap2plus_sandbox_job/arch/arm/boot/compressed/head.S:
> Assembler messages:
> /mnt/ci_build/workspace/linux-linaro-tracking_panda-omap2plus_sandbox_job/arch/arm/boot/compressed/head.S:127:
> Error: selected processor does not support requested special purpose
> register -- `mrs r2,cpsr'
> /mnt/ci_build/workspace/linux-linaro-tracking_panda-omap2plus_sandbox_job/arch/arm/boot/compressed/head.S:134:
> Error: selected processor does not support requested special purpose
> register -- `mrs r2,cpsr'
> /mnt/ci_build/workspace/linux-linaro-tracking_panda-omap2plus_sandbox_job/arch/arm/boot/compressed/head.S:136:
> Error: selected processor does not support requested special purpose
> register -- `msr cpsr_c,r2'
> make[3]: *** [arch/arm/boot/compressed/head.o] Error 1
> make[3]: *** Waiting for unfinished jobs....
> make[2]: *** [arch/arm/boot/compressed/vmlinux] Error 2
> make[1]: *** [uImage] Error 2
> make: *** [sub-make] Error 2
>
> The build was executed on a precise ec2 instance. Here is the link to
> the complete failure log: https://ci.linaro.org/jenkins/job/linux-
> linaro-tracking_panda-omap2plus_sandbox_job/78/console.
>
> Regards,
> Deepti.
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/linaro-toolchain-binaries/+bug/1007353/+subscriptions
>

--
Thanks and Regards,
Deepti

Changed in linaro-toolchain-binaries:
status: New → Triaged
Revision history for this message
Zhenqiang Chen (zhenqiang-chen) wrote :

Thank you! I can reproduce it with the new config.

Revision history for this message
Michael Hope (michaelh1) wrote :

Hmm, this is:
 http://sourceware.org/bugzilla/show_bug.cgi?id=12698

which was fixed in mid 2011 in commit 6413e2b47bbbcfe1f4d5df11a4472ccd9a85b78d. This is included in the 2.22 that we ship.

Revision history for this message
Michael Hope (michaelh1) wrote :

This reduces to:

michaelh@crucis:~$ arm-linux-gnueabi-as --gdwarf2 -EL -march=armv7-a -mfloat-abi=soft -mfpu=vfpv3-d16 -meabi=5 -mimplicit-it=always -mno-warn-deprecated -mthumb -march=all -o head.o head2.s
head2.s: Assembler messages:
head2.s:60: Error: selected processor does not support requested special purpose register -- `mrs r2,cpsr'
head2.s:67: Error: selected processor does not support requested special purpose register -- `mrs r2,cpsr'
head2.s:69: Error: selected processor does not support requested special purpose register -- `msr cpsr_c,r2'

The fault occurs in 2.22 and current trunk.

Revision history for this message
Michael Hope (michaelh1) wrote :

The fault seems to be in gas/config/tc-arm.c:11203:

if (ARM_CPU_HAS_FEATURE (selected_cpu, arm_ext_m))

This needs to go upstream.

Revision history for this message
Zhenqiang Chen (zhenqiang-chen) wrote :

Yip. Two functions need fix after "if (ARM_CPU_HAS_FEATURE (selected_cpu, arm_ext_m))".

do_t_msr
do_t_mrs

I will create similar workaround patch as http://sourceware.org/bugzilla/show_bug.cgi?id=12698

Revision history for this message
Zhenqiang Chen (zhenqiang-chen) wrote :

Reopen http://sourceware.org/bugzilla/show_bug.cgi?id=12698 and create a reference patch for it.

Revision history for this message
Michael Hope (michaelh1) wrote :

Zhenqiang, could you drive this?

Changed in linaro-toolchain-binaries:
importance: Undecided → High
assignee: nobody → Zhenqiang Chen (zhenqiang-chen)
Michael Hope (michaelh1)
Changed in linaro-toolchain-binaries:
milestone: none → 2012.06
Michael Hope (michaelh1)
Changed in linaro-toolchain-binaries:
status: Triaged → In Progress
Changed in linaro-toolchain-binaries:
status: In Progress → Fix Committed
Revision history for this message
Deepti B. Kalakeri (deeptik) wrote :

Where can I get the latest gcc binary containing the fix.
http://releases.linaro.org/12.06/components/toolchain/gcc-linaro/4.7/gcc-linaro-4.7-2012.06.tar.bz2 is the location for the same ?

Revision history for this message
Zhenqiang Chen (zhenqiang-chen) wrote :

No. It is the source tarball. The 2012.06 binary toolchain is not released yet.

In general, we release the binary toolchain at the last week of a month.

To verify it, you can try an internal build at: http://people.linaro.org/~zhenqiangchen/gcc-linaro-arm-linux-gnueabihf-2012.06-20120528+bzr2438_linux.tar.bz2.

Changed in linaro-toolchain-binaries:
status: Fix Committed → Fix Released
Revision history for this message
Deepti B. Kalakeri (deeptik) wrote :

I have verified that the http://people.linaro.org/~zhenqiangchen/gcc-linaro-arm-linux-gnueabihf-2012.06-20120528+bzr2438_linux.tar.bz2 and it works.

But, I dont see anything under http://releases.linaro.org/12.06/components/toolchain/binaries/ dir.
when can I get the gcc binary on releases.linaro.org ?

Thanks!!!
Deepti

Revision history for this message
Zhenqiang Chen (zhenqiang-chen) wrote :

The linux toolchain is: gcc-linaro-arm-linux-gnueabihf-2012.06-20120625_linux.tar.bz2

You can get it from
  http://releases.linaro.org/12.06/components/toolchain/binaries/
or
  https://launchpad.net/linaro-toolchain-binaries/+download

Revision history for this message
Deepti B. Kalakeri (deeptik) wrote :

Yup, Fathi was in the process of uploading the binaries to r.l.o when I replied.
I see the binaries now on r.l.o and I tested it with my CI job using the http://releases.linaro.org/12.06/components/toolchain/binaries/gcc-linaro-arm-linux-gnueabihf-2012.06-20120625_linux.tar.bz2 binary and it works now.
Here is the test job which passes now https://ci.linaro.org/jenkins/job/linux-linaro-tracking_panda-omap2plus_sandbox_job/84/consoleFull.

Thanks!!!
Deepti.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.