YoeDistro / yoe-distro

Embedded Linux distribution optimized for product development (based on OE/Yocto)
MIT License
194 stars 45 forks source link

pkgconfig build issue #570

Closed cbrake closed 3 years ago

cbrake commented 3 years ago

Getting the following with the latest when building in docker container. I do NOT get this error when building without container in ARCH, so it seems we need to update our container to latest Debian or something.

| checking thread related cflags... -D_REENTRANT
| checking for pthread_create/pthread_join... no
| checking for pthread_create/pthread_join in -lpthread... no
| checking for pthread_create/pthread_join in -lpthread32... no
| checking for pthread_create/pthread_join in -lpthreads... no
| checking for pthread_create/pthread_join in -lthread... no
| configure: error: I can't find the libraries for the thread implementation
|                  posix. Please choose another thread implementation or
|                   provide information on your thread implementation.
| configure: error: ../../git/glib/configure failed for glib
| WARNING: /scratch/yoe/yoe-distro/build/tmp/work/x86_64-linux/pkgconfig-native/0.29.2+gitAUTOINC+edf8e6f0ea-r0/temp/run.do_configure.131:273 exit 1 from 'exit 1'
| WARNING: Backtrace (BB generated script):
|       #1: bbfatal_log, /scratch/yoe/yoe-distro/build/tmp/work/x86_64-linux/pkgconfig-native/0.29.2+gitAUTOINC+edf8e6f0ea-r0/temp/run.do_configure.131, line 273
|       #2: oe_runconf, /scratch/yoe/yoe-distro/build/tmp/work/x86_64-linux/pkgconfig-native/0.29.2+gitAUTOINC+edf8e6f0ea-r0/temp/run.do_configure.131, line 250
|       #3: autotools_do_configure, /scratch/yoe/yoe-distro/build/tmp/work/x86_64-linux/pkgconfig-native/0.29.2+gitAUTOINC+edf8e6f0ea-r0/temp/run.do_configure.131, line 229
|       #4: do_configure, /scratch/yoe/yoe-distro/build/tmp/work/x86_64-linux/pkgconfig-native/0.29.2+gitAUTOINC+edf8e6f0ea-r0/temp/run.do_configure.131, line 149
|       #5: main, /scratch/yoe/yoe-distro/build/tmp/work/x86_64-linux/pkgconfig-native/0.29.2+gitAUTOINC+edf8e6f0ea-r0/temp/run.do_configure.131, line 287
| 
| Backtrace (metadata-relative locations):
|       #1: bbfatal_log, /scratch/yoe/yoe-distro/sources/openembedded-core/meta/classes/logging.bbclass, line 72
|       #2: oe_runconf, /scratch/yoe/yoe-distro/sources/openembedded-core/meta/classes/autotools.bbclass, line 97
|       #3: autotools_do_configure, /scratch/yoe/yoe-distro/sources/openembedded-core/meta/classes/autotools.bbclass, line 229
|       #4: do_configure, autogenerated, line 2
ERROR: Task (virtual:native:/scratch/yoe/yoe-distro/sources/openembedded-core/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb:do_configure) failed with exit code '1'
NOTE: Tasks Summary: Attempted 637 tasks of which 609 didn't need to be rerun and 2 failed.
NOTE: Writing buildhistory
NOTE: Writing buildhistory took: 3 seconds
NOTE: Build completion summary:
NOTE:   do_populate_sysroot: 0.0% sstate reuse(0 setscene, 6 scratch)
NOTE:   do_populate_lic: 0.0% sstate reuse(0 setscene, 1 scratch)

Summary: 2 tasks failed:
  virtual:native:/scratch/yoe/yoe-distro/sources/openembedded-core/meta/recipes-devtools/ninja/ninja_1.10.2.bb:do_compile
  virtual:native:/scratch/yoe/yoe-distro/sources/openembedded-core/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb:do_configure
Summary: There were 3 ERROR messages shown, returning a non-zero exit code.
cbrake commented 3 years ago

trying to build a new container and having some type of dns problem with deb.debian.com here -- will try again later.

cbrake commented 3 years ago

The ubuntu_20.04 container fails as well.

beaglebone build completed with ARCH host and no container.

cbrake commented 3 years ago

get the same thing with debian:bullseye, so likely just missing a package ...

cbrake commented 3 years ago

in arch, libpthread is located in /lib

in debian buster/bullseye/ubuntu, it appears to be in /lib/x86_64-linux-gnu

not sure if that is relevant

kraj commented 3 years ago

Can you dig config.log from pkgconfig build ?

cbrake commented 3 years ago

config.log

kraj commented 3 years ago

OK take this test case

#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);
}

and compile it inside docker using

gcc -o conftest -isystem/scratch/yoe/yoe-distro2/build/tmp/work/x86_64-linux/pkgconfig-native/0.29.2+gitAUTOINC+edf8e6f0ea-r0/recipe-sysroot-native/usr/include -O2 -pipe -isystem/scratch/yoe/yoe-distro2/build/tmp/work/x86_64-linux/pkgconfig-native/0.29.2+gitAUTOINC+edf8e6f0ea-r0/recipe-sysroot-native/usr/include -D_REENTRANT -D_POSIX4_DRAFT_SOURCE -D_POSIX4A_DRAFT10_SOURCE -U_OSF_SOURCE -L/scratch/yoe/yoe-distro2/build/tmp/work/x86_64-linux/pkgconfig-native/0.29.2+gitAUTOINC+edf8e6f0ea-r0/recipe-sysroot-native/usr/lib -L/scratch/yoe/yoe-distro2/build/tmp/work/x86_64-linux/pkgconfig-native/0.29.2+gitAUTOINC+edf8e6f0ea-r0/recipe-sysroot-native/lib -Wl,--enable-new-dtags -Wl,-rpath-link,/scratch/yoe/yoe-distro2/build/tmp/work/x86_64-linux/pkgconfig-native/0.29.2+gitAUTOINC+edf8e6f0ea-r0/recipe-sysroot-native/usr/lib -Wl,-rpath-link,/scratch/yoe/yoe-distro2/build/tmp/work/x86_64-linux/pkgconfig-native/0.29.2+gitAUTOINC+edf8e6f0ea-r0/recipe-sysroot-native/lib -Wl,-rpath,/scratch/yoe/yoe-distro2/build/tmp/work/x86_64-linux/pkgconfig-native/0.29.2+gitAUTOINC+edf8e6f0ea-r0/recipe-sysroot-native/usr/lib -Wl,-rpath,/scratch/yoe/yoe-distro2/build/tmp/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=/scratch/yoe/yoe-distro2/build/tmp/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2 conftest.c -lthread

cbrake commented 3 years ago

this got fixed in recent uninative tarball update -- will be merged soon.