Bug 14519 - pkgconfig-native.do_configure failing when building in docker with uninative-3.3 (glibc-2.34)
Summary: pkgconfig-native.do_configure failing when building in docker with uninative-...
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: devtools / tool chain (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: High normal
Target Milestone: 3.4 M4
Assignee: Hongxu Jia
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2021-08-19 16:49 UTC by Martin Jansa
Modified: 2022-02-16 09:19 UTC (History)
6 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Jansa 2021-08-19 16:49:49 UTC
It fails to detect threads implementation in bundled glib inside pkgconfig:

configure:22347: checking thread related cflags
configure:22349: result: -D_REENTRANT
...
configure:22439: result: no
configure:22448: error: I can't find the libraries for the thread implementation
                 posix. Please choose another thread implementation or
                  provide information on your thread implementation.

The reason is that pthread_create() in this conftest fails with EPERM when building in docker without --privileged. It works fine without uninative (or after changing the loader from uninative (/OE/nodistro/honister/BUILD/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2) to the one from host (/lib64/ld-linux-x86-64.so.2)

It happens only after uninative upgrade from:
https://git.openembedded.org/openembedded-core/commit/?id=4aa4dcd5f31657073f2207a9a4a43247322c7eb1

Similar issue with faccessat2 before:
https://git.openembedded.org/openembedded-core/commit/?id=4d6ad6d611834c2648d6bf9791cb8140967e2529

More details bellow:

no-uninative:

configure:22099: checking for thread implementation
configure:22125: gcc  -c -isystem/OE/build/honister/BUILD/work/x86_64-linux/pkgconfig-native/0.29.2+gitAUTOINC+edf8e6f0ea-r0/recipe-sysroot-native/usr/include -O2 -pipe -isystem/OE/build/honister/BUILD/work/x86_64-linux/pkgconfig-native/0.29.2+gitAUTOINC+edf8e6f0ea-r0/recipe-sysroot-native/usr/include -D_POSIX4_DRAFT_SOURCE -D_POSIX4A_DRAFT10_SOURCE -U_OSF_SOURCE conftest.c >&5
configure:22125: $? = 0
configure:22168: result: posix
configure:22241: gcc  -o conftest -isystem/OE/build/honister/BUILD/work/x86_64-linux/pkgconfig-native/0.29.2+gitAUTOINC+edf8e6f0ea-r0/recipe-sysroot-native/usr/include -O2 -pipe -pthread -isystem/OE/build/honister/BUILD/work/x86_64-linux/pkgconfig-native/0.29.2+gitAUTOINC+edf8e6f0ea-r0/recipe-sysroot-native/usr/include -L/OE/build/honister/BUILD/work/x86_64-linux/pkgconfig-native/0.29.2+gitAUTOINC+edf8e6f0ea-r0/recipe-sysroot-native/usr/lib                         -L/OE/build/honister/BUILD/work/x86_64-linux/pkgconfig-native/0.29.2+gitAUTOINC+edf8e6f0ea-r0/recipe-sysroot-native/lib                         -Wl,--enable-new-dtags                         -Wl,-rpath-link,/OE/build/honister/BUILD/work/x86_64-linux/pkgconfig-native/0.29.2+gitAUTOINC+edf8e6f0ea-r0/recipe-sysroot-native/usr/lib                         -Wl,-rpath-link,/OE/build/honister/BUILD/work/x86_64-linux/pkgconfig-native/0.29.2+gitAUTOINC+edf8e6f0ea-r0/recipe-sysroot-native/lib                         -Wl,-rpath,/OE/build/honister/BUILD/work/x86_64-linux/pkgconfig-native/0.29.2+gitAUTOINC+edf8e6f0ea-r0/recipe-sysroot-native/usr/lib                         -Wl,-rpath,/OE/build/honister/BUILD/work/x86_64-linux/pkgconfig-native/0.29.2+gitAUTOINC+edf8e6f0ea-r0/recipe-sysroot-native/lib                         -Wl,-O1 conftest.c  >&5
configure:22241: $? = 0
configure:22241: ./conftest
configure:22241: $? = 0
configure:22347: checking thread related cflags
configure:22349: result: -pthread
configure:22518: checking thread related libraries
configure:22520: result: -pthread
configure:22528: checking for localtime_r
...


uninative:

configure:22099: checking for thread implementation
configure:22125: gcc  -c -isystem/OE/build/honister/BUILD/work/x86_64-linux/pkgconfig-native/0.29.2+gitAUTOINC+edf8e6f0ea-r0/recipe-sysroot-native/usr/include -O2 -pipe -isystem/OE/build/honister/BUILD/work/x86_64-linux/pkgconfig-native/0.29.2+gitAUTOINC+edf8e6f0ea-r0/recipe-sysroot-native/usr/include -D_POSIX4_DRAFT_SOURCE -D_POSIX4A_DRAFT10_SOURCE -U_OSF_SOURCE conftest.c >&5
configure:22125: $? = 0
configure:22168: result: posix
configure:22241: gcc  -o conftest -isystem/OE/build/honister/BUILD/work/x86_64-linux/pkgconfig-native/0.29.2+gitAUTOINC+edf8e6f0ea-r0/recipe-sysroot-native/usr/include -O2 -pipe -pthread -isystem/OE/build/honister/BUILD/work/x86_64-linux/pkgconfig-native/0.29.2+gitAUTOINC+edf8e6f0ea-r0/recipe-sysroot-native/usr/include -L/OE/build/honister/BUILD/work/x86_64-linux/pkgconfig-native/0.29.2+gitAUTOINC+edf8e6f0ea-r0/recipe-sysroot-native/usr/lib                         -L/OE/build/honister/BUILD/work/x86_64-linux/pkgconfig-native/0.29.2+gitAUTOINC+edf8e6f0ea-r0/recipe-sysroot-native/lib                         -Wl,--enable-new-dtags                         -Wl,-rpath-link,/OE/build/honister/BUILD/work/x86_64-linux/pkgconfig-native/0.29.2+gitAUTOINC+edf8e6f0ea-r0/recipe-sysroot-native/usr/lib                         -Wl,-rpath-link,/OE/build/honister/BUILD/work/x86_64-linux/pkgconfig-native/0.29.2+gitAUTOINC+edf8e6f0ea-r0/recipe-sysroot-native/lib                         -Wl,-rpath,/OE/build/honister/BUILD/work/x86_64-linux/pkgconfig-native/0.29.2+gitAUTOINC+edf8e6f0ea-r0/recipe-sysroot-native/usr/lib                         -Wl,-rpath,/OE/build/honister/BUILD/work/x86_64-linux/pkgconfig-native/0.29.2+gitAUTOINC+edf8e6f0ea-r0/recipe-sysroot-native/lib                         -Wl,-O1 -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=/OE/build/honister/BUILD/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2 conftest.c  >&5
configure:22241: $? = 0
configure:22241: ./conftest
configure:22241: $? = 1
configure: program exited with status 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "glib"
| #define PACKAGE_TARNAME "glib"
| #define PACKAGE_VERSION "2.38.2"
| #define PACKAGE_STRING "glib 2.38.2"
| #define PACKAGE_BUGREPORT "http://bugzilla.gnome.org/enter_bug.cgi?product=glib"
| #define PACKAGE_URL ""
| #define GLIB_MAJOR_VERSION 2
| #define GLIB_MINOR_VERSION 38
| #define GLIB_MICRO_VERSION 2
| #define GLIB_INTERFACE_AGE 2
| #define GLIB_BINARY_AGE 3802
| #define HAVE_STDIO_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_WCHAR_H 1
| #define STDC_HEADERS 1
| #define _ALL_SOURCE 1
| #define _DARWIN_C_SOURCE 1
| #define _GNU_SOURCE 1
| #define _HPUX_ALT_XOPEN_SOCKET_API 1
| #define _NETBSD_SOURCE 1
| #define _OPENBSD_SOURCE 1
| #define _POSIX_PTHREAD_SEMANTICS 1
| #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1
| #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
| #define __STDC_WANT_IEC_60559_DFP_EXT__ 1
| #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1
| #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1
| #define __STDC_WANT_LIB_EXT2__ 1
| #define __STDC_WANT_MATH_SPEC_FUNCS__ 1
| #define _TANDEM_SOURCE 1
| #define __EXTENSIONS__ 1
| #define GETTEXT_PACKAGE "glib20"
| #define GLIB_LOCALE_DIR ""
| #define HAVE_DLFCN_H 1
| #define LT_OBJDIR ".libs/"
| #define HAVE_VPRINTF 1
| #define HAVE_ALLOCA_H 1
| #define HAVE_ALLOCA 1
| #define HAVE_MMAP 1
| #define HAVE_POSIX_MEMALIGN 1
| #define HAVE_MEMALIGN 1
| #define HAVE_VALLOC 1
| #define HAVE_FSYNC 1
| #define HAVE_PIPE2 1
| #define HAVE_ATEXIT 1
| #define HAVE_ON_EXIT 1
| #define HAVE_TIMEGM 1
| #define HAVE_GMTIME_R 1
| #define HAVE_LIBC_ENABLE_SECURE 1
| #define SIZEOF_CHAR 1
| #define SIZEOF_SHORT 2
| #define SIZEOF_LONG 8
| #define SIZEOF_INT 4
| #define SIZEOF_VOID_P 8
| #define SIZEOF_LONG_LONG 8
| #define HAVE_SIG_ATOMIC_T 1
| #define HAVE_LONG_LONG_FORMAT 1
| #define G_HAVE___INLINE 1
| #define G_HAVE___INLINE__ 1
| #define G_HAVE_INLINE 1
| #define HAVE_DOWHILE_MACROS 1
| #define HAVE_DIRENT_H 1
| #define HAVE_FLOAT_H 1
| #define HAVE_LIMITS_H 1
| #define HAVE_PWD_H 1
| #define HAVE_GRP_H 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_POLL_H 1
| #define HAVE_SYS_RESOURCE_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_SYS_TIMES_H 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_VALUES_H 1
| #define HAVE_SYS_SELECT_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_SCHED_H 1
| #define HAVE_MALLOC_H 1
| #define HAVE_SYS_VFS_H 1
| #define HAVE_SYS_STATFS_H 1
| #define HAVE_SYS_STATVFS_H 1
| #define HAVE_MNTENT_H 1
| #define HAVE_FSTAB_H 1
| #define HAVE_SYS_UIO_H 1
| #define HAVE_LINUX_MAGIC_H 1
| #define HAVE_SYS_PRCTL_H 1
| #define HAVE_SYS_MOUNT_H 1
| #define HAVE_SYS_SYSCTL_H 1
| #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1
| #define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
| #define HAVE_STRUCT_STAT_ST_CTIM_TV_NSEC 1
| #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
| #define HAVE_STRUCT_STAT_ST_BLOCKS 1
| #define HAVE_STRUCT_STATFS_F_BAVAIL 1
| #define HAVE_STRUCT_TM_TM_GMTOFF 1
| #define HAVE_DIRENT_H 1
| #define HAVE_STRUCT_DIRENT_D_TYPE 1
| #define HAVE_LANGINFO_CODESET 1
| #define HAVE_STDDEF_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_SETLOCALE 1
| #define SIZEOF_SIZE_T 8
| #define SIZEOF_SSIZE_T 8
| #define HAVE_LSTAT 1
| #define HAVE_STRERROR 1
| #define HAVE_STRSIGNAL 1
| #define HAVE_MEMMOVE 1
| #define HAVE_VSNPRINTF 1
| #define HAVE_STPCPY 1
| #define HAVE_STRCASECMP 1
| #define HAVE_STRNCASECMP 1
| #define HAVE_POLL 1
| #define HAVE_GETCWD 1
| #define HAVE_VASPRINTF 1
| #define HAVE_SETENV 1
| #define HAVE_UNSETENV 1
| #define HAVE_GETC_UNLOCKED 1
| #define HAVE_READLINK 1
| #define HAVE_SYMLINK 1
| #define HAVE_MEMMEM 1
| #define HAVE_CHOWN 1
| #define HAVE_LCHOWN 1
| #define HAVE_FCHMOD 1
| #define HAVE_FCHOWN 1
| #define HAVE_LINK 1
| #define HAVE_UTIMES 1
| #define HAVE_GETGRGID 1
| #define HAVE_GETPWUID 1
| #define HAVE_GETRESUID 1
| #define HAVE_GETMNTENT_R 1
| #define HAVE_SETMNTENT 1
| #define HAVE_ENDMNTENT 1
| #define HAVE_HASMNTOPT 1
| #define HAVE_FALLOCATE 1
| #define HAVE_SPLICE 1
| #define HAVE_PRLIMIT 1
| #define HAVE_STATVFS 1
| #define HAVE_STATFS 1
| #define USE_STATFS 1
| #define HAVE_NEWLOCALE 1
| #define HAVE_USELOCALE 1
| #define HAVE_STRTOD_L 1
| #define HAVE_STRTOLL_L 1
| #define HAVE_STRTOULL_L 1
| #define HAVE_C99_VSNPRINTF 1
| #define HAVE_UNIX98_PRINTF 1
| #define HAVE_GETPROTOBYNAME_R 1
| #define HAVE_ENDSERVENT 1
| #define HAVE_IF_NAMETOINDEX 1
| #define HAVE_IF_INDEXTONAME 1
| #define HAVE_RES_INIT 1
| #define HAVE_NETLINK 1
| #define HAVE_IP_MREQN /**/
| #define STATFS_ARGS 2
| #define HAVE_GOOD_PRINTF 1
| #define HAVE_LONG_LONG 1
| #define HAVE_LONG_DOUBLE 1
| #define HAVE_WCHAR_T 1
| #define HAVE_WINT_T 1
| #define HAVE_PTRDIFF_T 1
| #define HAVE_INTTYPES_H_WITH_UINTMAX 1
| #define HAVE_STDINT_H_WITH_UINTMAX 1
| #define HAVE_INTMAX_T 1
| #define HAVE_SNPRINTF 1
| #define HAVE_WCSLEN 1
| #define HAVE_C99_SNPRINTF 1
| #define HAVE_CODESET 1
| #define HAVE_LANGINFO_TIME 1
| #define HAVE_LANGINFO_OUTDIGIT 1
| #define POSIX_MEMALIGN_WITH_COMPLIANT_ALLOCS 1
| #define G_VA_COPY va_copy
| #define G_VA_COPY_AS_ARRAY 1
| #define HAVE_SYS_INOTIFY_H 1
| #define HAVE_INOTIFY_INIT1 1
| /* end confdefs.h.  */
|
| #include <pthread.h>
| int check_me = 0;
| void* func(void* data) {check_me = 42; return &check_me;}
| int main()
|  { pthread_t t;
|    void *ret;
|    pthread_create (&t, 0, func, 0);
|    pthread_join (t, &ret);
|    return (check_me != 42 || ret != &check_me);
| }
configure:22241: gcc  -o conftest -isystem/OE/build/honister/BUILD/work/x86_64-linux/pkgconfig-native/0.29.2+gitAUTOINC+edf8e6f0ea-r0/recipe-sysroot-native/usr/include -O2 -pipe -pthreads -isystem/OE/build/honister/BUILD/work/x86_64-linux/pkgconfig-native/0.29.2+gitAUTOINC+edf8e6f0ea-r0/recipe-sysroot-native/usr/include -L/OE/build/honister/BUILD/work/x86_64-linux/pkgconfig-native/0.29.2+gitAUTOINC+edf8e6f0ea-r0/recipe-sysroot-native/usr/lib                         -L/OE/build/honister/BUILD/work/x86_64-linux/pkgconfig-native/0.29.2+gitAUTOINC+edf8e6f0ea-r0/recipe-sysroot-native/lib                         -Wl,--enable-new-dtags                         -Wl,-rpath-link,/OE/build/honister/BUILD/work/x86_64-linux/pkgconfig-native/0.29.2+gitAUTOINC+edf8e6f0ea-r0/recipe-sysroot-native/usr/lib                         -Wl,-rpath-link,/OE/build/honister/BUILD/work/x86_64-linux/pkgconfig-native/0.29.2+gitAUTOINC+edf8e6f0ea-r0/recipe-sysroot-native/lib                         -Wl,-rpath,/OE/build/honister/BUILD/work/x86_64-linux/pkgconfig-native/0.29.2+gitAUTOINC+edf8e6f0ea-r0/recipe-sysroot-native/usr/lib                         -Wl,-rpath,/OE/build/honister/BUILD/work/x86_64-linux/pkgconfig-native/0.29.2+gitAUTOINC+edf8e6f0ea-r0/recipe-sysroot-native/lib                         -Wl,-O1 -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=/OE/build/honister/BUILD/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2 conftest.c  >&5
gcc: error: unrecognized command line option '-pthreads'; did you mean '-pthread'?
...
configure:22241: gcc  -o conftest -isystem/OE/build/honister/BUILD/work/x86_64-linux/pkgconfig-native/0.29.2+gitAUTOINC+edf8e6f0ea-r0/recipe-sysroot-native/usr/include -O2 -pipe -mt -isystem/OE/build/honister/BUILD/work/x86_64-linux/pkgconfig-native/0.29.2+gitAUTOINC+edf8e6f0ea-r0/recipe-sysroot-native/usr/include -L/OE/build/honister/BUILD/work/x86_64-linux/pkgconfig-native/0.29.2+gitAUTOINC+edf8e6f0ea-r0/recipe-sysroot-native/usr/lib                         -L/OE/build/honister/BUILD/work/x86_64-linux/pkgconfig-native/0.29.2+gitAUTOINC+edf8e6f0ea-r0/recipe-sysroot-native/lib                         -Wl,--enable-new-dtags                         -Wl,-rpath-link,/OE/build/honister/BUILD/work/x86_64-linux/pkgconfig-native/0.29.2+gitAUTOINC+edf8e6f0ea-r0/recipe-sysroot-native/usr/lib                         -Wl,-rpath-link,/OE/build/honister/BUILD/work/x86_64-linux/pkgconfig-native/0.29.2+gitAUTOINC+edf8e6f0ea-r0/recipe-sysroot-native/lib                         -Wl,-rpath,/OE/build/honister/BUILD/work/x86_64-linux/pkgconfig-native/0.29.2+gitAUTOINC+edf8e6f0ea-r0/recipe-sysroot-native/usr/lib                         -Wl,-rpath,/OE/build/honister/BUILD/work/x86_64-linux/pkgconfig-native/0.29.2+gitAUTOINC+edf8e6f0ea-r0/recipe-sysroot-native/lib                         -Wl,-O1 -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=/OE/build/honister/BUILD/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2 conftest.c  >&5
gcc: error: unrecognized command line option '-mt'; did you mean '-t'?
...
configure:22347: checking thread related cflags
configure:22349: result: -D_REENTRANT
...
configure:22439: result: no
configure:22448: error: I can't find the libraries for the thread implementation
                 posix. Please choose another thread implementation or
                  provide information on your thread implementation.



bitbake@301261cefcd1:~/nodistro/honister/BUILD/work/x86_64-linux/pkgconfig-native/0.29.2+gitAUTOINC+edf8e6f0ea-r0/build/glib$ ./conftest 
bitbake@301261cefcd1:~/nodistro/honister/BUILD/work/x86_64-linux/pkgconfig-native/0.29.2+gitAUTOINC+edf8e6f0ea-r0/build/glib$ echo $?
1
bitbake@301261cefcd1:~/nodistro/honister/BUILD/work/x86_64-linux/pkgconfig-native/0.29.2+gitAUTOINC+edf8e6f0ea-r0/build/glib$ ldd conftest 
        linux-vdso.so.1 (0x00007ffe60924000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fbf4032e000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fbf4013c000)
bitbake@301261cefcd1:~/nodistro/honister/BUILD/work/x86_64-linux/pkgconfig-native/0.29.2+gitAUTOINC+edf8e6f0ea-r0/build/glib$ ls -lah /lib/x86_64-linux-gnu/libpthread.so.0
lrwxrwxrwx 1 root root 18 Dec 16  2020 /lib/x86_64-linux-gnu/libpthread.so.0 -> libpthread-2.31.so


bitbake@301261cefcd1:~$ ./conftest-uninative 
bitbake@301261cefcd1:~$ echo $?
1
bitbake@301261cefcd1:~$ ./conftest-no-uninative 
bitbake@301261cefcd1:~$ echo $?
0
bitbake@301261cefcd1:~$ file conftest-*
conftest-no-uninative: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=a92f7af1023b1b9a74a118df8e2bdffbc263a493, for GNU/Linux 3.2.0, not stripped
conftest-uninative:    ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /OE/nodistro/honister/BUILD/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2, BuildID[sha1]=fac86a409239acabe529ee8f7dfe62cbdbacb10e, for GNU/Linux 3.2.0, not stripped

bitbake@301261cefcd1:~$ ldd conftest-*
conftest-no-uninative:
        linux-vdso.so.1 (0x00007ffe6efaf000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f0956f7d000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f0956d8b000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f0956fac000)
conftest-uninative:
        linux-vdso.so.1 (0x00007ffc74dd4000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f1e0f113000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f1e0ef21000)
        /OE/nodistro/honister/BUILD/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2 (0x00007f1e0f142000)

bitbake@301261cefcd1:~$ cp conftest-uninative conftest-uninative-without-loader
bitbake@301261cefcd1:~$ patchelf-uninative --set-interpreter /lib64/ld-linux-x86-64.so.2 conftest-uninative-without-loader

bitbake@301261cefcd1:~$ file conftest-*
conftest-no-uninative:             ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=a92f7af1023b1b9a74a118df8e2bdffbc263a493, for GNU/Linux 3.2.0, not stripped
conftest-uninative:                ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /OE/nodistro/honister/BUILD/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2, BuildID[sha1]=fac86a409239acabe529ee8f7dfe62cbdbacb10e, for GNU/Linux 3.2.0, not stripped
conftest-uninative-without-loader: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=fac86a409239acabe529ee8f7dfe62cbdbacb10e, not stripped

bitbake@301261cefcd1:~$ ./conftest-uninative-without-loader 
bitbake@301261cefcd1:~$ echo $?
0
bitbake@301261cefcd1:~$ ls -lah /OE/nodistro/honister/BUILD/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2
-rwxr-xr-x 1 bitbake bitbake 211K Aug 19 15:14 /OE/nodistro/honister/BUILD/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2

Adding some additional debug output to conftest.c shows that create_pthread failed with EPERM and works fine after adding --privileged to "docker run".
Comment 1 Ross Burton 2021-08-20 10:46:06 UTC
https://github.com/moby/moby/commit/9f6b562dd12ef7b1f9e2f8e6f2ab6477790a6594 appears to be the fix in Docker for this.
Comment 2 Randy MacLeod 2021-08-26 14:42:01 UTC
Docker has fixed this upstream so either wait for a new release or backport the fix for your docker or locally patch your glibc and rebuild uninative.
We prefer not to carry addition edge case patches to glibc.
Comment 3 Randy MacLeod 2021-08-26 15:04:17 UTC
We've re-considered and this is going to affect many Yocto users so we'll carry the glibc patch it seems.
Comment 4 Martin Jansa 2021-08-26 16:07:03 UTC
(In reply to comment #2)
> Docker has fixed this upstream so either wait for a new release or backport
> the fix for your docker or locally patch your glibc and rebuild uninative.
> We prefer not to carry addition edge case patches to glibc.

I wasn't expecting it to be fixed in oe-core/glibc, this ticket was mostly to document what's currently failing and possible work around (e.g. --privileged or using older uninative).

I've already pointed few people to this ticket when they were asking about sudden pkgconfig-native.do_configure failures.
Comment 7 Martin Jansa 2022-02-16 09:19:18 UTC
FYI: Ubuntu patched their docker.io package shortly after upgrading to glibc-2.34 in Ubuntu-21.10, see:
http://changelogs.ubuntu.com/changelogs/pool/universe/d/docker.io/docker.io_20.10.7-0ubuntu5~20.04.2/changelog

docker.io (20.10.7-0ubuntu4) impish; urgency=medium

  * d/p/seccomp-add-support-for-clone3-syscall-in-default-policy.patch: Fix
    failure with new glibc clone3 syscall adding it to the default seccomp
    policy (LP: #1943049).

 -- Lucas Kanashiro <kanashiro@ubuntu.com>  Fri, 10 Sep 2021 15:34:38 -0300