<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>14519</bug_id>
          
          <creation_ts>2021-08-19 16:49:49 +0000</creation_ts>
          <short_desc>pkgconfig-native.do_configure failing when building in docker with uninative-3.3 (glibc-2.34)</short_desc>
          <delta_ts>2022-02-16 09:19:18 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>devtools / tool chain</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>High</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>3.4 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Martin Jansa">Martin.Jansa</reporter>
          <assigned_to name="Hongxu Jia">hongxu.jia</assigned_to>
          <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>pokylinux</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>ross.burton</cc>
    
    <cc>tim.orling</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>91237</commentid>
    <comment_count>0</comment_count>
    <who name="Martin Jansa">Martin.Jansa</who>
    <bug_when>2021-08-19 16:49:49 +0000</bug_when>
    <thetext>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&apos;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 &gt;&amp;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  &gt;&amp;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 &gt;&amp;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  &gt;&amp;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 &quot;glib&quot;
| #define PACKAGE_TARNAME &quot;glib&quot;
| #define PACKAGE_VERSION &quot;2.38.2&quot;
| #define PACKAGE_STRING &quot;glib 2.38.2&quot;
| #define PACKAGE_BUGREPORT &quot;http://bugzilla.gnome.org/enter_bug.cgi?product=glib&quot;
| #define PACKAGE_URL &quot;&quot;
| #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 &quot;glib20&quot;
| #define GLIB_LOCALE_DIR &quot;&quot;
| #define HAVE_DLFCN_H 1
| #define LT_OBJDIR &quot;.libs/&quot;
| #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 &lt;pthread.h&gt;
| int check_me = 0;
| void* func(void* data) {check_me = 42; return &amp;check_me;}
| int main()
|  { pthread_t t;
|    void *ret;
|    pthread_create (&amp;t, 0, func, 0);
|    pthread_join (t, &amp;ret);
|    return (check_me != 42 || ret != &amp;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  &gt;&amp;5
gcc: error: unrecognized command line option &apos;-pthreads&apos;; did you mean &apos;-pthread&apos;?
...
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  &gt;&amp;5
gcc: error: unrecognized command line option &apos;-mt&apos;; did you mean &apos;-t&apos;?
...
configure:22347: checking thread related cflags
configure:22349: result: -D_REENTRANT
...
configure:22439: result: no
configure:22448: error: I can&apos;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 =&gt; /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fbf4032e000)
        libc.so.6 =&gt; /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 -&gt; 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 =&gt; /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f0956f7d000)
        libc.so.6 =&gt; /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 =&gt; /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f1e0f113000)
        libc.so.6 =&gt; /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 =&gt; /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 &quot;docker run&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91240</commentid>
    <comment_count>1</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2021-08-20 10:46:06 +0000</bug_when>
    <thetext>https://github.com/moby/moby/commit/9f6b562dd12ef7b1f9e2f8e6f2ab6477790a6594 appears to be the fix in Docker for this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91277</commentid>
    <comment_count>2</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2021-08-26 14:42:01 +0000</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91286</commentid>
    <comment_count>3</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2021-08-26 15:04:17 +0000</bug_when>
    <thetext>We&apos;ve re-considered and this is going to affect many Yocto users so we&apos;ll carry the glibc patch it seems.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91287</commentid>
    <comment_count>4</comment_count>
    <who name="Martin Jansa">Martin.Jansa</who>
    <bug_when>2021-08-26 16:07:03 +0000</bug_when>
    <thetext>(In reply to comment #2)
&gt; Docker has fixed this upstream so either wait for a new release or backport
&gt; the fix for your docker or locally patch your glibc and rebuild uninative.
&gt; We prefer not to carry addition edge case patches to glibc.

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

I&apos;ve already pointed few people to this ticket when they were asking about sudden pkgconfig-native.do_configure failures.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91314</commentid>
    <comment_count>5</comment_count>
    <who name="Martin Jansa">Martin.Jansa</who>
    <bug_when>2021-08-31 16:20:36 +0000</bug_when>
    <thetext>Fix from Hongxu
https://lists.openembedded.org/g/openembedded-core/message/155465
https://lists.openembedded.org/g/openembedded-core/message/155513</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91331</commentid>
    <comment_count>6</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2021-09-02 14:54:45 +0000</bug_when>
    <thetext>Fixed by:
glibc: fix create thread failed in unprivileged processuninative-3.4 

https://git.openembedded.org/openembedded-core/commit/?id=234a3e84640c1bb6df5fa4d3d7089a854b19d108

and 

https://git.openembedded.org/openembedded-core/commit/?id=06d55ee67ef81a9f9da178b06bb797cc62881643</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92559</commentid>
    <comment_count>7</comment_count>
    <who name="Martin Jansa">Martin.Jansa</who>
    <bug_when>2022-02-16 09:19:18 +0000</bug_when>
    <thetext>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 &lt;kanashiro@ubuntu.com&gt;  Fri, 10 Sep 2021 15:34:38 -0300</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>