karo-electronics / meta-karo

Meta Layer for Ka-Ro Yocto BSP for Ka-Ro TX and QS CoMs
https://github.com/karo-electronics/karo-bsp
10 stars 10 forks source link

Compile error during build of SDK for TX6S #3

Closed nickaein closed 2 years ago

nickaein commented 6 years ago

I am getting compile error during the build of SDK for TX6S-8035.

Here is my local.conf:

MACHINE ??= 'imx6dl-tx6-emmc'

#DL_DIR ?= "${BSPDIR}/downloads"
#SSTATE_DIR ?= "${BSPDIR}/sstate-cache"
DISTRO ?= 'poky'
PACKAGE_CLASSES ?= "package_deb"
EXTRA_IMAGE_FEATURES ?= "debug-tweaks"
VIRTUAL-RUNTIME_init_manager = "sysvinit"
USER_CLASSES ?= "buildstats image-mklibs image-prelink"
PATCHRESOLVE = "noop"
BB_DISKMON_DIRS ??= "\
    STOPTASKS,${TMPDIR},1G,100K \
    STOPTASKS,${DL_DIR},1G,100K \
    STOPTASKS,${SSTATE_DIR},1G,100K \
    STOPTASKS,/tmp,100M,100K \
    ABORT,${TMPDIR},100M,1K \
    ABORT,${DL_DIR},100M,1K \
    ABORT,${SSTATE_DIR},100M,1K \
    ABORT,/tmp,10M,1K"
PACKAGECONFIG_append_pn-qemu-native = " sdl"
PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl"
CONF_VERSION = "1"

VIRTUAL-RUNTIME_dev_manager ?= "udev"

BB_NUMBER_THREADS ?= "12"
DL_DIR ?= "/opt/yocto/downloads/"
SSTATE_DIR ?= "/opt/yocto/rocko-karo/sstate-cache"

INHERIT += "rm_work"
RM_OLD_IMAGE = "1"

I have successfully built the core-image-minimal image, but I got the following error when populating SDK:

yocto@yocto-server:/opt/yocto/rocko-karo/build-srm645$ bitbake core-image-minimal -c populate_sdk
Parsing recipes: 100% |##########################################################################################################################################| Time: 0:00:33
Parsing of 1925 .bb files complete (0 cached, 1925 parsed). 2724 targets, 99 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION           = "1.36.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "universal"
TARGET_SYS           = "arm-poky-linux-gnueabi"
MACHINE              = "imx6dl-tx6-emmc"
DISTRO               = "poky"
DISTRO_VERSION       = "2.4.2"
TUNE_FEATURES        = "arm armv7a vfp neon callconvention-hard cortexa9"
TARGET_FPU           = "hard"
meta-networking      
meta-oe              
meta-python          = "HEAD:dacfa2b1920e285531bec55cd2f08743390aaf57"
meta                 
meta-poky            
meta-yocto-bsp       = "HEAD:198ea7da88a2b67fd3d5d02c7b0d8d10f85bafe2"
meta-karo            = "HEAD:c17d83ca0403bdf929b488ffb588a9566c9a52cf"

Initialising tasks: 100% |#######################################################################################################################################| Time: 0:00:11
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
ERROR: nativesdk-dbus-1.10.20-r0 do_package: Error executing a python function in exec_python_func() autogenerated:

The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_python_func() autogenerated', lineno: 2, function: <module>
     0001:
 *** 0002:fixup_perms(d)
     0003:
File: '/opt/yocto/rocko-karo/sources/poky/meta/classes/package.bbclass', lineno: 801, function: fixup_perms
     0797:                if len(lsplit) != 8 and not (len(lsplit) == 3 and lsplit[1].lower() == "link"):
     0798:                    msg = "Fixup perms: %s invalid line: %s" % (conf, line)
     0799:                    package_qa_handle_error("perm-line", msg, d)
     0800:                    continue
 *** 0801:                entry = fs_perms_entry(d.expand(line))
     0802:                if entry and entry.path:
     0803:                    if entry.link:
     0804:                        fs_link_table[entry.path] = entry
     0805:                        if entry.path in fs_perms_table:
File: '/opt/yocto/rocko-karo/sources/poky/meta/classes/package.bbclass', lineno: 655, function: __init__
     0651:            lsplit = line.split()
     0652:            if len(lsplit) == 3 and lsplit[1].lower() == "link":
     0653:                self._setlink(lsplit[0], lsplit[2])
     0654:            elif len(lsplit) == 8:
 *** 0655:                self._setdir(lsplit[0], lsplit[1], lsplit[2], lsplit[3], lsplit[4], lsplit[5], lsplit[6], lsplit[7])
     0656:            else:
     0657:                msg = "Fixup Perms: invalid config line %s" % line
     0658:                package_qa_handle_error("perm-config", msg, d)
     0659:                self.path = None
File: '/opt/yocto/rocko-karo/sources/poky/meta/classes/package.bbclass', lineno: 672, function: _setdir
     0668:                return None
     0669:            self.path = os.path.normpath(path)
     0670:            self.link = None
     0671:            self.mode = self._procmode(mode)
 *** 0672:            self.uid  = self._procuid(uid)
     0673:            self.gid  = self._procgid(gid)
     0674:            self.walk = walk.lower()
     0675:            self.fmode = self._procmode(fmode)
     0676:            self.fuid = self._procuid(fuid)
File: '/opt/yocto/rocko-karo/sources/poky/meta/classes/package.bbclass', lineno: 696, function: _procuid
     0692:                return -1
     0693:            elif uid.isdigit():
     0694:                return int(uid)
     0695:            else:
 *** 0696:                return pwd.getpwnam(uid).pw_uid
     0697:
     0698:        def _procgid(self, gid):
     0699:            if gid is None or gid == "-":
     0700:                return -1
Exception: KeyError: 'getpwnam(): name not found: messagebus'

ERROR: nativesdk-dbus-1.10.20-r0 do_package: Function failed: fixup_perms
ERROR: Logfile of failure stored in: /opt/yocto/rocko-karo/build-srm645/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-dbus/1.10.20-r0/temp/log.do_package.21528
ERROR: Task (virtual:nativesdk:/opt/yocto/rocko-karo/sources/poky/meta/recipes-core/dbus/dbus_1.10.20.bb:do_package) failed with exit code '1'
NOTE: Tasks Summary: Attempted 2549 tasks of which 1792 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
  virtual:nativesdk:/opt/yocto/rocko-karo/sources/poky/meta/recipes-core/dbus/dbus_1.10.20.bb:do_package
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
yocto@yocto-server:/opt/yocto/rocko-karo/build-srm645$
nickaein commented 6 years ago

The issue is caused by the following line in meta/files/fs-perms.txt file:

#/run/dbus 0755 messagebus messagebus false - - -

It seems the messagebus user is missing during build. Note that this error didn't show up when building image and only occurs when building SDK.

AttilaHorvath-PP commented 5 years ago

Any updates on this issue? It's a bit inconvenient I have to modify your repo's content to be able to build packages. I have to modify the meta/files/fs-perms.txt file like this:

#/run/dbus      0755    messagebus messagebus false - - -
#/run/utmp      0664    root    utmp    false - - -
/run/wpa_supplicant 0700    root    root    false - - -
#/var/log/wtmp      0664    root    utmp    false - - -

If I don't do it I can't build a single package. Would be nice to hear your opinion.

nickaein commented 5 years ago

I think you can temporary add this workaround as a patch in your layer until it get fixed

AttilaHorvath-PP commented 5 years ago

I had to do it but it would be nice to include a fix in future releases. I was expecting some sort of 'will be fixed soon' reaction from KaRo tbh.

theonlymb commented 3 years ago

is this still present?