300x250 AD TOP

Search This Blog

Paling Dilihat

Powered by Blogger.

Thursday, July 31, 2014

A newer kernel is required to run this binary. (__kernel_cmpxchg64 helper)

While porting multithreaded C++ code to Android, I've encountered this error:

A newer kernel is required to run this binary. (__kernel_cmpxchg64 helper)

Origin:
https://github.com/mirrors/gcc/blob/master/libgcc/config/arm/linux-atomic-64bit.c

If you also encounter this issue, its important to understand all the elements involved in this error.

  • It is part of gcc 4.7 and up
  • it will fail below kernel 3.1, only then __kernel_cmpxchg64 was implemented
  • The problem is that 64 bit atomic operation is implemented using the kernel on arm unless armv7 is used.
  • Using arm instead of thumb will not solve your problem.
  • Enabling arm v7 hard-float might solve your problem (it solved mine).
  • Using  -mfpu=vfp and -mfloat-abi=hard might solve your problem (i didn't try as armv7 was desired).
(https://www.mail-archive.com/rust-dev@mozilla.org/msg08627.html)

Tags: , , , ,

2 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. Hello
    I know the subject is very old but I wanted to open up my problem
    I'm using a gt-i9300 device
    I use stock rom and I use my own chroot but
      .A newer kernel is required to run this binary. (__kernel_cmpxchg64 helper)
    I couldn't overcome this error
    can you help me please ?

    ReplyDelete