[yocto] NooB: qemu-native compile error during bitbake core-image-sato

2019-10-14 Thread pwr

Hello list,

First time here so, hi there :-) I'm new to yocto but not new to linux.

I'm following the Yocto Project Quick Build manual 
(https://www.yoctoproject.org/docs/2.7.1/brief-yoctoprojectqs/brief-yoctoprojectqs.html)
on an Arch (Manjaro) machine (uname -r: 4.19.79-1-MANJARO). I know 
Manjaro is not an official supported distribution but I'm hopping on 
some help nevertheless.


My build stops at:
>> bitbake core-image-sato

Build Configuration:
BB_VERSION   = "1.42.0"
BUILD_SYS    = "x86_64-linux"
NATIVELSBSTRING  = "manjaro"
TARGET_SYS   = "i586-poky-linux"
MACHINE  = "qemux86"
DISTRO   = "poky"
DISTRO_VERSION   = "2.7.1"
TUNE_FEATURES    = "m32 i586"
TARGET_FPU   = ""
meta
meta-poky
meta-yocto-bsp   = 
"my-yocto-2.7.1:38d5c8ea98cfa49825c473eba8984c12edf062be"


WARNING: Your host glibc verson (2.30) is newer than that in uninative 
(2.29). Disabling uninative so that sstate is not corrupted.


ERROR: qemu-native-3.1.0-r0 do_compile: oe_runmake failed
ERROR: qemu-native-3.1.0-r0 do_compile: Function failed: do_compile (log 
file is located at 
poky/build/tmp/work/x86_64-linux/qemu-native/3.1.0-r0/temp/log.do_compile.1259)
ERROR: Logfile of failure stored in: 
poky/build/tmp/work/x86_64-linux/qemu-native/3.1.0-r0/temp/log.do_compile.1259


One of the errors in the log.do_compile.1259 file (file attached):
poky/build/tmp/work/x86_64-linux/qemu-native/3.1.0-r0/qemu-3.1.0/linux-user/syscall.c:253:16: 
error: static declaration of ‘gettid’ follows non-static declaration

  253 | _syscall0(int, gettid)
OR
poky/build/tmp/work/x86_64-linux/qemu-native/3.1.0-r0/qemu-3.1.0/linux-user/ioctls.h:223:9: 
error: ‘SIOCGSTAMPNS’ undeclared here (not in a function); did you mean 
‘SIOCGSTAMP_OLD’?

  223 |   IOCTL(SIOCGSTAMPNS, IOC_R, MK_PTR(MK_STRUCT(STRUCT_timespec)))


I do not know enough to understand where this error comes from. But I 
suspect it may have to do with the warning I got just before the failure:


Is there a way to tell the build system to ignore the newer version 
glibc? And use the 2.29 version.

Or can someone help me to debug this error?


Thanks,
Robert.

DEBUG: Executing shell function do_compile
NOTE: make -j 2 LD=ld  AR=ar OBJCOPY=objcopy 
LDFLAGS=-Lpoky/build/tmp/work/x86_64-linux/qemu-native/3.1.0-r0/recipe-sysroot-native/usr/lib
 
-Lpoky/build/tmp/work/x86_64-linux/qemu-native/3.1.0-r0/recipe-sysroot-native/lib
 -Wl,--enable-new-dtags 
-Wl,-rpath-link,poky/build/tmp/work/x86_64-linux/qemu-native/3.1.0-r0/recipe-sysroot-native/usr/lib
 
-Wl,-rpath-link,poky/build/tmp/work/x86_64-linux/qemu-native/3.1.0-r0/recipe-sysroot-native/lib
 
-Wl,-rpath,poky/build/tmp/work/x86_64-linux/qemu-native/3.1.0-r0/recipe-sysroot-native/usr/lib
 
-Wl,-rpath,poky/build/tmp/work/x86_64-linux/qemu-native/3.1.0-r0/recipe-sysroot-native/lib
 -Wl,-O1 -fuse-ld=bfd
  CC  aarch64-linux-user/linux-user/syscall.o
  CC  arm-linux-user/linux-user/syscall.o
poky/build/tmp/work/x86_64-linux/qemu-native/3.1.0-r0/qemu-3.1.0/linux-user/syscall.c:253:16:
 error: static declaration of ‘gettid’ follows non-static declaration
  253 | _syscall0(int, gettid)
  |^~
poky/build/tmp/work/x86_64-linux/qemu-native/3.1.0-r0/qemu-3.1.0/linux-user/syscall.c:184:13:
 note: in definition of macro ‘_syscall0’
  184 | static type name (void)   \
  | ^~~~
In file included from /usr/include/unistd.h:1170,
 from 
poky/build/tmp/work/x86_64-linux/qemu-native/3.1.0-r0/qemu-3.1.0/include/qemu/osdep.h:90,
 from 
poky/build/tmp/work/x86_64-linux/qemu-native/3.1.0-r0/qemu-3.1.0/linux-user/syscall.c:20:
/usr/include/bits/unistd_ext.h:34:16: note: previous declaration of ‘gettid’ 
was here
   34 | extern __pid_t gettid (void) __THROW;
  |^~
poky/build/tmp/work/x86_64-linux/qemu-native/3.1.0-r0/qemu-3.1.0/linux-user/syscall.c:253:16:
 error: static declaration of ‘gettid’ follows non-static declaration
  253 | _syscall0(int, gettid)
  |^~
poky/build/tmp/work/x86_64-linux/qemu-native/3.1.0-r0/qemu-3.1.0/linux-user/syscall.c:184:13:
 note: in definition of macro ‘_syscall0’
  184 | static type name (void)   \
  | ^~~~
In file included from /usr/include/unistd.h:1170,
 from 
poky/build/tmp/work/x86_64-linux/qemu-native/3.1.0-r0/qemu-3.1.0/include/qemu/osdep.h:90,
 from 
poky/build/tmp/work/x86_64-linux/qemu-native/3.1.0-r0/qemu-3.1.0/linux-user/syscall.c:20:
/usr/include/bits/unistd_ext.h:34:16: note: previous declaration of ‘gettid’ 
was here
   34 | extern __pid_t gettid (void) __THROW;
  |^~
poky/build/tmp/work/x86_64-linux/qemu-native/3.1.0-r0/qemu-3.1.0/linux-user/ioctls.h:222:9:
 error: ‘SIOCGSTAMP’ undeclared here 

Re: [yocto] NooB: qemu-native compile error during bitbake core-image-sato

2019-10-14 Thread pwr

On 14-10-2019 18:54, Ross Burton wrote:

On 14/10/2019 17:20, p...@iae.nl wrote:

Hello list,

First time here so, hi there :-) I'm new to yocto but not new to linux.

I'm following the Yocto Project Quick Build manual 
(https://www.yoctoproject.org/docs/2.7.1/brief-yoctoprojectqs/brief-yoctoprojectqs.html)
on an Arch (Manjaro) machine (uname -r: 4.19.79-1-MANJARO). I know 
Manjaro is not an official supported distribution but I'm hopping on 
some help nevertheless.


My build stops at:
 >> bitbake core-image-sato

Build Configuration:
BB_VERSION  = "1.42.0"
BUILD_SYS    = "x86_64-linux"
NATIVELSBSTRING  = "manjaro"
TARGET_SYS  = "i586-poky-linux"
MACHINE  = "qemux86"
DISTRO   = "poky"
DISTRO_VERSION   = "2.7.1"
TUNE_FEATURES    = "m32 i586"
TARGET_FPU  = ""
meta
meta-poky
meta-yocto-bsp   = 
"my-yocto-2.7.1:38d5c8ea98cfa49825c473eba8984c12edf062be"


WARNING: Your host glibc verson (2.30) is newer than that in 
uninative (2.29). Disabling uninative so that sstate is not corrupted.


ERROR: qemu-native-3.1.0-r0 do_compile: oe_runmake failed
ERROR: qemu-native-3.1.0-r0 do_compile: Function failed: do_compile 
(log file is located at 
poky/build/tmp/work/x86_64-linux/qemu-native/3.1.0-r0/temp/log.do_compile.1259)
ERROR: Logfile of failure stored in: 
poky/build/tmp/work/x86_64-linux/qemu-native/3.1.0-r0/temp/log.do_compile.1259


One of the errors in the log.do_compile.1259 file (file attached):
poky/build/tmp/work/x86_64-linux/qemu-native/3.1.0-r0/qemu-3.1.0/linux-user/syscall.c:253:16: 
error: static declaration of ‘gettid’ follows non-static declaration

   253 | _syscall0(int, gettid)
OR
poky/build/tmp/work/x86_64-linux/qemu-native/3.1.0-r0/qemu-3.1.0/linux-user/ioctls.h:223:9: 
error: ‘SIOCGSTAMPNS’ undeclared here (not in a function); did you 
mean ‘SIOCGSTAMP_OLD’?

   223 |   IOCTL(SIOCGSTAMPNS, IOC_R, MK_PTR(MK_STRUCT(STRUCT_timespec)))


I do not know enough to understand where this error comes from. But I 
suspect it may have to do with the warning I got just before the failure:


Is there a way to tell the build system to ignore the newer version 
glibc? And use the 2.29 version.

Or can someone help me to debug this error?


You're trying to build an older qemu against a very new kernel. If you 
can, grab the warrior branch from git instead of using the 2.7.1 
release as that has the fix in.  Alternatively, cherry-pick this commit:


http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=0570ef5a5e180f7504df970645d1fcce6310b828 



Ross


Thanks, it seams to work. That is, using the warrior branch. I'll also 
try the patch you suggested.


For future reference, how could I have found this answer? I searched 
like crazy but never found any reference that qemu is "old" and my 
kernel is "new".


Robert.



--
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] NooB: qemu-native compile error during bitbake core-image-sato

2019-10-15 Thread pwr

On 15-10-2019 00:04, Ross Burton wrote:

On 14/10/2019 22:32, myken wrote:
For future reference, how could I have found this answer? I searched 
like crazy but never found any reference that qemu is "old" and my 
kernel is "new".


By recognising where the failure was, knowing that glibc changed, and 
that qemu needs to be fixed, then finding the relevant fixes already 
existed in qemu.


Running unsupported distros means discovering stuff like this.  :)

Ross


Yes I know, that's why I'm asking, thanks.
Robert.

--
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto