Build fail with TIME_BITS=64 flag under imx6 process using mickledore yocto

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

Build fail with TIME_BITS=64 flag under imx6 process using mickledore yocto

342 Views
dannyshi
Contributor I

Hi:

   In Ubuntu 22.04, I can build imx-image-full successfully with below steps under imx6 solo processor:

 

 

repo init -u https://github.com/nxp-imx/imx-manifest -b imx-linux-mickledore -m imx-6.1.36-2.1.0.xml

DISTRO=fsl-imx-fb MACHINE=imx6solosabresd source imx-setup-release.sh -b build

bitbake imx-image-full

 

 

Notes: all the steps are

https://www.nxp.com/docs/en/user-guide/IMX_YOCTO_PROJECT_USERS_GUIDE.pdf

Also, I can run the image (including u-boot kernel filesystem) in imx6-solo, but when i change the system time after 2038 year, then the system will hang in the startup of filesystem (but after kenrel startup), so i guess that is classical 2038 year issue.

 

    Then, i found some info

https://community.nxp.com/t5/QorIQ/32-bit-arch-ls1021a-y2038-issue-on-yocto-side/m-p/1405744

   And i add below flag in the local.conf file, 

TARGET_CPPFLAGS += " -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64"

but build will fail with log 

 

 

cortexa9t2hf-neon-poky-linux-gnueabi/v4l-utils/1.23.0+gitAUTOINC+9431e4b26b-r0/recipe-sysroot/usr/include/features-time64.h:26:5: error: #error "_TIME_BITS=64 is allowed only with _FILE_OFFSET_BITS=64"

|    26 | #   error "_TIME_BITS=64 is allowed only with _FILE_OFFSET_BITS=64"

 

 

The i found in v4l-utils_1.23.0.bb file, there is a comment:

# v4l2 explicitly sets _FILE_OFFSET_BITS=32 to get access to

# both 32 and 64 bit file APIs.  But it does not handle the time side?

# Needs further investigation

GLIBC_64BIT_TIME_FLAGS = ""

  

Also, in the lastest yocto in the mainline, the comment is same,

 

So my question is:

   Currently there is no successful build with yocto that fixed 2038 issue in 32-bit platform, right?

   If no successful build, maybe i have to find the reason by myself.

   

Thanks

   

Labels (1)
Tags (2)
0 Kudos
0 Replies