[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openembedded-core
Subject:    [OE-core] [PATCH] gnutls: explicitly set --with-librt-prefix
From:       "Martin Jansa" <Martin.Jansa () gmail ! com>
Date:       2020-10-31 23:31:30
Message-ID: 20201031233130.4016294-1-Martin.Jansa () gmail ! com
[Download RAW message or body]

Content-Transfer-Encoding: quoted-printable

* it will try to link with librt from host and if you have it on host (libc6-dev-i386 \
in ubuntu)  it fails with:
  /usr/lib32/librt.so: error: undefined reference to '__clock_settime', version \
'GLIBC_PRIVATE'  /usr/lib32/librt.so: error: undefined reference to \
'__clock_getcpuclockid', version 'GLIBC_PRIVATE'  /usr/lib32/librt.so: error: \
undefined reference to '__clock_getres', version 'GLIBC_PRIVATE'  \
/usr/lib32/librt.so: error: undefined reference to '__clock_nanosleep', version \
'GLIBC_PRIVATE'  collect2: error: ld returned 1 exit status

  in older 3.6.14 it was using /usr/lib32/librt.so from host as well, but without \
do_compile  failing

  configure:17539: checking for librt
  configure:17563: i686-oe-linux-gcc  -m32 -march=core2 -mtune=core2 -msse3 \
-mfpmath=sse -fstack-protector-strong  -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security \
-Werror=format-security -Werror=return-type \
--sysroot=/tmpdir/work/qemux86-oe-linux/gnutls/3.6.14-r0/recipe-sysroot -o conftest  \
-O2 -pipe -g -feliminate-unused-debug-types \
-fmacro-prefix-map=/tmpdir/work/qemux86-oe-linux/gnutls/3.6.14-r0=/usr/src/debug/gnutls/3.6.14-r0 \
-fdebug-prefix-map=/tmpdir/work/qemux86-oe-linux/gnutls/3.6.14-r0=/usr/src/debug/gnutls/3.6.14-r0 \
-fdebug-prefix-map=/tmpdir/work/qemux86-oe-linux/gnutls/3.6.14-r0/recipe-sysroot=     \
-fdebug-prefix-map=/tmpdir/work/qemux86-oe-linux/gnutls/3.6.14-r0/recipe-sysroot-native= \
-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,-z,relro,-z,now conftest.c \
/usr/lib32/librt.so  >&5  configure:17563: $? = 0
  configure:17573: result: yes
  configure:17580: checking how to link with librt
  configure:17582: result: /usr/lib32/librt.so

  with --with-librt-prefix passed, it finds the right one as shown in \
build/config.log:

  configure:17551: checking for librt
  configure:17575: i686-oe-linux-gcc  -m32 -march=core2 -mtune=core2 -msse3 \
-mfpmath=sse -fstack-protector-strong  -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security \
-Werror=format-security -Werror=return-type \
--sysroot=/tmpdir/work/qemux86-oe-linux/gnutls/3.6.15-r0/recipe-sysroot -o conftest  \
-O2 -pipe -g -feliminate-unused-debug-types \
-fmacro-prefix-map=/tmpdir/work/qemux86-oe-linux/gnutls/3.6.15-r0=/usr/src/debug/gnutls/3.6.15-r0 \
-fdebug-prefix-map=/tmpdir/work/qemux86-oe-linux/gnutls/3.6.15-r0=/usr/src/debug/gnutls/3.6.15-r0 \
-fdebug-prefix-map=/tmpdir/work/qemux86-oe-linux/gnutls/3.6.15-r0/recipe-sysroot=     \
-fdebug-prefix-map=/tmpdir/work/qemux86-oe-linux/gnutls/3.6.15-r0/recipe-sysroot-native= \
-I/tmpdir/work/qemux86-oe-linux/gnutls/3.6.15-r0/recipe-sysroot/usr/include -Wl,-O1 \
-Wl,--hash-style=gnu -Wl,--as-needed -Wl,-z,relro,-z,now conftest.c \
/tmpdir/work/qemux86-oe-linux/gnutls/3.6.15-r0/recipe-sysroot/usr/lib/librt.so  >&5  \
configure:17575: $? = 0  configure:17585: result: yes
  configure:17592: checking how to link with librt
  configure:17594: result: \
/tmpdir/work/qemux86-oe-linux/gnutls/3.6.15-r0/recipe-sysroot/usr/lib/librt.so

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 meta/recipes-support/gnutls/gnutls_3.6.15.bb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-support/gnutls/gnutls_3.6.15.bb \
b/meta/recipes-support/gnutls/gnutls_3.6.15.bb index 71118bd389..b936db50d1 100644
--- a/meta/recipes-support/gnutls/gnutls_3.6.15.bb
+++ b/meta/recipes-support/gnutls/gnutls_3.6.15.bb
@@ -43,6 +43,7 @@ EXTRA_OECONF = " \
     --enable-local-libopts \
     --enable-openssl-compatibility \
     --with-libpthread-prefix=${STAGING_DIR_HOST}${prefix} \
+    --with-librt-prefix=${STAGING_DIR_HOST}${prefix} \
     --with-default-trust-store-file=${sysconfdir}/ssl/certs/ca-certificates.crt \
 "
 
-- 
2.27.0



-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#144044): https://lists.openembedded.org/g/openembedded-core/message/144044
Mute This Topic: https://lists.openembedded.org/mt/77947322/4454766
Group Owner: openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [openembedded-core@marc.info]
-=-=-=-=-=-=-=-=-=-=-=-



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic