qemu build error in imx-5.4.3-2.0.0_genivi.xml

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

qemu build error in imx-5.4.3-2.0.0_genivi.xml

8,338 Views
csoapy
Contributor III

DISTRO=fsl-imx-wayland MACHINE=imx8qxpmek source imx-setup-release.sh -b bld-wld

bitbake core-image-minimal

| /home/yang/elinux/imx-yocto-bsp/bld-wld/tmp/work/x86_64-linux/qemu-native/4.1.0-r0/qemu-4.1.0/linux-user/syscall.c:7657: undefined reference to `stime'
| collect2: error: ld returned 1 exit status
| make[1]: *** [Makefile:209: qemu-mips] Error 1
| make: *** [Makefile:472: mips-linux-user/all] Error 2
| LINK aarch64-linux-user/qemu-aarch64
| WARNING: exit code 1 from a shell command.
|
ERROR: Task (/home/yang/elinux/imx-yocto-bsp/sources/poky/meta/recipes-devtools/qemu/qemu-native_4.1.0.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 1706 tasks of which 223 didn't need to be rerun and 1 failed.

Labels (1)
6 Replies

7,684 Views
andrewtaylor
Contributor I

I also have this problem with imx-5.4.3-1.0.0.xml. Did you find a fix?

I get a warning about using a Ubuntu 20.04 host which is not tested, So I'm going to try again with Ubuntu 19.04.

0 Kudos
Reply

7,684 Views
michiel_tjampen
Contributor III

Got the same issue on same Ubuntu version, so would be interested to hear if downgrading fixed it. (although i hope for a different solution)

According to this the cause of the issue is

As stime has been removed from glibc-2.31

The version of glibc used in (updated) Ubuntu 20.04:

ldd (Ubuntu GLIBC 2.31-0ubuntu9) 2.31

According to this, the lastest release for Ubuntu 19.04 is 2.29.

Given the error is <builddir>/tmp/work/x86_64-linux/qemu-native/4.1.0-r0/qemu-4.1.0/linux-user/syscall.c:7657: undefined reference to `stime'

We can just let it fail and replace that line with: return get_errno(clock_settime(CLOCK_REALTIME,&host_time));

Then the warning: <builddir>/tmp/work/x86_64-linux/qemu-native/4.1.0-r0/qemu-4.1.0/scripts/tracetool/__init__.py:461: SyntaxWarning: "is" with a literal. Did you mean "=="?

It's indeed supposed to be ==

if len(format) ==  0:
        raise TracetoolError("format not set")
    if not tracetool.format.exists(format):
        raise TracetoolError("unknown format: %s" % format)

    if len(backends) ==  0:

That got me passed the issues with qemu... (and onto the next ones)

So now i'm stuck at "make_dtb_boot_files': No such file or directory"

7,684 Views
joanxie
NXP TechSupport
NXP TechSupport

try to use "bitbake -c cleanall qemu-native", then use "bitbake qemu-native"

7,684 Views
csoapy
Contributor III

I don't believe bitbake -c cleanall will fix "undefined reference to `stime'" issue, since I've not modified any source.

0 Kudos
Reply

6,626 Views
2548903578
Contributor III
Hi, I am also using this version and this undefined error occurred. I made comparisons and modifications based on other versions, and compiled no errors. Open the wrong file and make the following modification on line 7652: case TARGET_NR_stime: { struct timespec ts; ts.tv_nsec = 0; if (get_user_sal(ts.tv_sec, arg1)) return -TARGET_EFAULT; return get_errno(clock_settime(CLOCK_REALTIME, &ts)); } You can refer to it.
0 Kudos
Reply

7,684 Views
joanxie
NXP TechSupport
NXP TechSupport

firstly, this is useful solution for building, sometimes maybe the network issue caused unexpected error, cleanall and build again can remove the error message,  secondly, I found you use "imx-5.4.3-2.0.0_genivi.xml", I don't suggest to use this special version, try to use  "imx-5.4.3-2.0.0.xml"

0 Kudos
Reply