Failed to build glibc [Amlogic-ng]

Hello, I’m trying to build latest coreelec-21 branch (tried coreelec-20 also). I’m building in docker. Dockerfile and scripts you can see here

Build run cmd:
PROJECT=Amlogic-ce DEVICES=Amlogic-ng ARCH=arm make image

Build failed on package glibc with error

[091/343] [FAIL] install glibc:target
./sysdeps/unix/sysv/linux/statx.c: In function 'statx':
../sysdeps/unix/sysv/linux/statx.c:41:1: error: control reaches end of non-void function [-Werror=return-type]
FAILURE: scripts/build glibc:target during make_target (default)

Code of the problem function (project patches applied)

int
statx (int fd, const char *path, int flags,
       unsigned int mask, struct statx *buf)
{
#ifdef __NR_statx
  int ret = INLINE_SYSCALL_CALL (statx, fd, path, flags, mask, buf);
# ifdef __ASSUME_STATX
  return ret;
# else
  if (ret == 0 || errno != ENOSYS)
    /* Preserve non-error/non-ENOSYS return values.  */
    return ret;
# endif
#endif
#ifndef __ASSUME_STATX
  return statx_generic (fd, path, flags, mask, buf);
#endif
}

After some digging I understand the error. According to patches __NR_statx is undefined, but __ASSUME_STATX is defined (I didn’t find the reason why it shouldn’t be) => it results in empty function and compilation error.

Here I’m stucked, I don’t understand why it shouldn’t fail. Can you please hint what’s wrong?

I think you are building wrong configuration not supported (Amlogic-ne with arm).

You can use
DEVICE=Amlogic-ng ARCH=arm make
or just
DEVICE=Amlogic-ng make
or
DEVICE=Amlogic-ne ARCH=aarch64 make
or just
make

Thank you for you reply I will try that.
I thought about it but in latest builds there CoreELEC nightly builds I saw CoreELEC-Amlogic-ng.arm-21.0-Omega_nightly_20240210-Generic.img.gz

I got it. It should be DEVICE not DEVICES. I took it from here amlogic_meson_dvb4linux/README.md at master · availink/amlogic_meson_dvb4linux · GitHub

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.