Skip to contentSkip to conversation

crash: fix do_compile relocation error

PATCH In review Changqing Li 2 participants 7 messages Jul 2, 2018 – Jul 6, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crash: fix do_compile relocation error

error info:

id: relocation error: /lib/x86_64-linux-gnu/libnss_nis.so.2:
symbol _nsl_default_nss version GLIBC_PRIVATE not defined in file libnsl.so.1 with link time reference

Recent glibc change removed libnss-nis module from glibc and a new recipe libnss-nis.bb was added. After this change, we need to include native libnss_nis in crash. otherwise, with "nis" in /etc/nssswitch.conf, we will met above error.

---
 meta-oe/recipes-kernel/crash/crash_7.2.0.bb | 1 +
 1 file changed, 1 insertion(+)
meta-oe/recipes-kernel/crash/crash_7.2.0.bb +1 -0
index 440a69d..09fe50d 100644
@@ -11,6 +11,7 @@ LICENSE = "GPLv3"
 LIC_FILES_CHKSUM = "file://COPYING3;md5=d32239bcb673463ab874e80d47fae504"
 
 DEPENDS = "zlib readline coreutils-native"
+DEPENDS_append_libc-glibc = " libnss-nis-native"
 
 SRC_URI = "https://github.com/crash-utility/${BPN}/archive/${PV}.tar.gz;downloadfilename=${BP}.tar.gz \
            http://ftp.gnu.org/gnu/gdb/gdb-7.6.tar.gz;name=gdb;subdir=${BP} \
Signature · 1 line
2.7.4
#1 lore raw
Quoted 22 lines · Changqing Li

error info:

id: relocation error: /lib/x86_64-linux-gnu/libnss_nis.so.2:
symbol _nsl_default_nss version GLIBC_PRIVATE not defined in file libnsl.so.1 with link time reference

Recent glibc change removed libnss-nis module from glibc and a new recipe libnss-nis.bb was added. After this change, we need to include native libnss_nis in crash. otherwise, with "nis" in /etc/nssswitch.conf, we will met above error.

---
 meta-oe/recipes-kernel/crash/crash_7.2.0.bb | 1 +
 1 file changed, 1 insertion(+)
meta-oe/recipes-kernel/crash/crash_7.2.0.bb +0 -0
index 440a69d..09fe50d 100644

meta-oe/recipes-kernel/crash/crash_7.2.0.bb LICENSE = "GPLv3" · line 14

Quoted 4 lines
meta-oe/recipes-kernel/crash/crash_7.2.0.bb +1 -0
@@ -11,6 +11,7 @@ LICENSE = "GPLv3"
 LIC_FILES_CHKSUM = "file://COPYING3;md5=d32239bcb673463ab874e80d47fae504"
 
 DEPENDS = "zlib readline coreutils-native"
+DEPENDS_append_libc-glibc = " libnss-nis-native"

A native dependency which is specific to a target libc seems not right. It should depend on
build host libc which in this case is always glibc so please drop the override.

Quoted 11 lines
meta-oe/recipes-kernel/crash/crash_7.2.0.bb +0 -1
 SRC_URI = "https://github.com/crash-utility/${BPN}/archive/${PV}.tar.gz;downloadfilename=${BP}.tar.gz \
            http://ftp.gnu.org/gnu/gdb/gdb-7.6.tar.gz;name=gdb;subdir=${BP} \
--

2.7.4

--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

#2 lore raw
Quoted 24 lines · Khem Raj
Quoted 23 lines · Changqing Li

error info:

id: relocation error: /lib/x86_64-linux-gnu/libnss_nis.so.2:
symbol _nsl_default_nss version GLIBC_PRIVATE not defined in file libnsl.so.1 with link time reference

Recent glibc change removed libnss-nis module from glibc and a new recipe libnss-nis.bb was added. After this change, we need to include native libnss_nis in crash. otherwise, with "nis" in /etc/nssswitch.conf, we will met above error.

---
  meta-oe/recipes-kernel/crash/crash_7.2.0.bb | 1 +
  1 file changed, 1 insertion(+)
meta-oe/recipes-kernel/crash/crash_7.2.0.bb +0 -0
index 440a69d..09fe50d 100644
@@ -11,6 +11,7 @@ LICENSE = "GPLv3"
  LIC_FILES_CHKSUM = "file://COPYING3;md5=d32239bcb673463ab874e80d47fae504"
 
Quoted 5 lines

meta-oe/recipes-kernel/crash/crash_7.2.0.bb LICENSE = "GPLv3" · line 14

Quoted 2 lines
meta-oe/recipes-kernel/crash/crash_7.2.0.bb +1 -0
  DEPENDS = "zlib readline coreutils-native"
+DEPENDS_append_libc-glibc = " libnss-nis-native"

A native dependency which is specific to a target libc seems not right. It should depend on
build host libc which in this case is always glibc so please drop the override.

Hi,  according  to below content of recipe libnss-nis,  only for glibc,  we will DEPNDS libnss-nis-native, so I add this override.

# We will skip parsing this packagegeoup for non-glibc systems #
python __anonymous () {
    if d.getVar('TCLIBC') != "glibc":
        raise bb.parse.SkipRecipe("incompatible with %s C library" % d.getVar('TCLIBC'))
}

//changqing

Quoted 10 lines
Quoted 10 lines
meta-oe/recipes-kernel/crash/crash_7.2.0.bb +0 -1
  SRC_URI = "https://github.com/crash-utility/${BPN}/archive/${PV}.tar.gz;downloadfilename=${BP}.tar.gz \
             http://ftp.gnu.org/gnu/gdb/gdb-7.6.tar.gz;name=gdb;subdir=${BP} \
--

2.7.4

--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

Signature · 4 lines
BRs

Sandy(Li Changqing)
+861084778653
#3 lore raw
Quoted 36 lines · Changqing Li
Quoted 24 lines · Khem Raj
Quoted 23 lines · Changqing Li

error info:

id: relocation error: /lib/x86_64-linux-gnu/libnss_nis.so.2:
symbol _nsl_default_nss version GLIBC_PRIVATE not defined in file libnsl.so.1 with link time reference

Recent glibc change removed libnss-nis module from glibc and a new recipe libnss-nis.bb was added. After this change, we need to include native libnss_nis in crash. otherwise, with "nis" in /etc/nssswitch.conf, we will met above error.

---
  meta-oe/recipes-kernel/crash/crash_7.2.0.bb | 1 +
  1 file changed, 1 insertion(+)
meta-oe/recipes-kernel/crash/crash_7.2.0.bb +0 -0
index 440a69d..09fe50d 100644
@@ -11,6 +11,7 @@ LICENSE = "GPLv3"
  LIC_FILES_CHKSUM = "file://COPYING3;md5=d32239bcb673463ab874e80d47fae504"
 
Quoted 5 lines

meta-oe/recipes-kernel/crash/crash_7.2.0.bb LICENSE = "GPLv3" · line 14

Quoted 2 lines
meta-oe/recipes-kernel/crash/crash_7.2.0.bb +1 -0
  DEPENDS = "zlib readline coreutils-native"
+DEPENDS_append_libc-glibc = " libnss-nis-native"

A native dependency which is specific to a target libc seems not right. It should depend on
build host libc which in this case is always glibc so please drop the override.

Hi, according to below content of recipe libnss-nis, only for glibc, we will DEPNDS
libnss-nis-native, so I add this override.

Quoted 6 lines

# We will skip parsing this packagegeoup for non-glibc systems #

python __anonymous () {
     if d.getVar('TCLIBC') != "glibc":
         raise bb.parse.SkipRecipe("incompatible with %s C library" %
                                    d.getVar('TCLIBC'))

may be this can be made to exclude non target recipes.

#4 lore raw
Quoted 35 lines · Khem Raj
Quoted 34 lines · Changqing Li
Quoted 24 lines · Khem Raj
Quoted 23 lines · Changqing Li

error info:

id: relocation error: /lib/x86_64-linux-gnu/libnss_nis.so.2:
symbol _nsl_default_nss version GLIBC_PRIVATE not defined in file libnsl.so.1 with link time reference

Recent glibc change removed libnss-nis module from glibc and a new recipe libnss-nis.bb was added. After this change, we need to include native libnss_nis in crash. otherwise, with "nis" in /etc/nssswitch.conf, we will met above error.

---
   meta-oe/recipes-kernel/crash/crash_7.2.0.bb | 1 +
   1 file changed, 1 insertion(+)
meta-oe/recipes-kernel/crash/crash_7.2.0.bb +0 -0
index 440a69d..09fe50d 100644
@@ -11,6 +11,7 @@ LICENSE = "GPLv3"
   LIC_FILES_CHKSUM = "file://COPYING3;md5=d32239bcb673463ab874e80d47fae504"
 
Quoted 5 lines

meta-oe/recipes-kernel/crash/crash_7.2.0.bb LICENSE = "GPLv3" · line 14

Quoted 2 lines
meta-oe/recipes-kernel/crash/crash_7.2.0.bb +1 -0
   DEPENDS = "zlib readline coreutils-native"
+DEPENDS_append_libc-glibc = " libnss-nis-native"

A native dependency which is specific to a target libc seems not right. It should depend on
build host libc which in this case is always glibc so please drop the override.

Hi, according to below content of recipe libnss-nis, only for glibc, we will DEPNDS
libnss-nis-native, so I add this override.

Quoted 8 lines
Quoted 6 lines

# We will skip parsing this packagegeoup for non-glibc systems #

python __anonymous () {
      if d.getVar('TCLIBC') != "glibc":
          raise bb.parse.SkipRecipe("incompatible with %s C library" %
                                     d.getVar('TCLIBC'))

may be this can be made to exclude non target recipes.

I don't quite get your mean, can you explain more? Thanks.

#5 lore raw
Quoted 44 lines · Changqing Li
Quoted 41 lines · Khem Raj
Quoted 40 lines · Changqing Li
Quoted 24 lines · Khem Raj
Quoted 23 lines · Changqing Li

error info:

id: relocation error: /lib/x86_64-linux-gnu/libnss_nis.so.2:
symbol _nsl_default_nss version GLIBC_PRIVATE not defined in file libnsl.so.1 with link time reference

Recent glibc change removed libnss-nis module from glibc and a new recipe libnss-nis.bb was added. After this change, we need to include native libnss_nis in crash. otherwise, with "nis" in /etc/nssswitch.conf, we will met above error.

---
   meta-oe/recipes-kernel/crash/crash_7.2.0.bb | 1 +

   1 file changed, 1 insertion(+)
meta-oe/recipes-kernel/crash/crash_7.2.0.bb +0 -0
index 440a69d..09fe50d 100644
@@ -11,6 +11,7 @@ LICENSE = "GPLv3"

   LIC_FILES_CHKSUM = "file://COPYING3;md5=d32239bcb673463ab874e80d47fae504"

Quoted 5 lines
Quoted 2 lines

   DEPENDS = "zlib readline coreutils-native" +DEPENDS_append_libc-glibc = " libnss-nis-native"

A native dependency which is specific to a target libc seems not right. It should depend on
build host libc which in this case is always glibc so please drop the override.

Hi,  according  to below content of recipe libnss-nis,  only for glibc, we will DEPNDS
libnss-nis-native, so I add this override.

# We will skip parsing this packagegeoup for non-glibc systems #
python __anonymous () {
      if d.getVar('TCLIBC') != "glibc":
          raise bb.parse.SkipRecipe("incompatible with %s C library" % d.getVar('TCLIBC'))

Quoted 4 lines
Quoted 2 lines

may be this can be made to exclude non target recipes.

I don't quite get your mean, can you explain more? Thanks.

fact that we are adding a dependency on a native package for just glibc based images is what I was asking about. libc-glibc is a target specific override and therefore this makes it such that it is only needed when target is glibc which to be sounds wrong, since other libcs should have same dependency needs as well.

Guessing from your error message it seems somewhere crash build is depending upon id program and this id program is coming from coreutils-native, which seems to depend on this library so this dependency really belongs there, it seems to me that coreutils-native should depend upon libnss-nis-native

#6 lore raw
Quoted 50 lines · Khem Raj
Quoted 47 lines · Changqing Li
Quoted 43 lines · Khem Raj
Quoted 34 lines · Changqing Li
Quoted 24 lines · Khem Raj
Quoted 23 lines · Changqing Li

error info:

id: relocation error: /lib/x86_64-linux-gnu/libnss_nis.so.2:
symbol _nsl_default_nss version GLIBC_PRIVATE not defined in file libnsl.so.1 with link time reference

Recent glibc change removed libnss-nis module from glibc and a new recipe libnss-nis.bb was added. After this change, we need to include native libnss_nis in crash. otherwise, with "nis" in /etc/nssswitch.conf, we will met above error.

---
   meta-oe/recipes-kernel/crash/crash_7.2.0.bb | 1 +

   1 file changed, 1 insertion(+)
meta-oe/recipes-kernel/crash/crash_7.2.0.bb +0 -0
index 440a69d..09fe50d 100644
@@ -11,6 +11,7 @@ LICENSE = "GPLv3"

   LIC_FILES_CHKSUM = "file://COPYING3;md5=d32239bcb673463ab874e80d47fae504"

Quoted 5 lines
Quoted 2 lines

   DEPENDS = "zlib readline coreutils-native" +DEPENDS_append_libc-glibc = " libnss-nis-native"

A native dependency which is specific to a target libc seems not right. It should depend on
build host libc which in this case is always glibc so please drop the override.

Hi,  according  to below content of recipe libnss-nis,  only for glibc, we will DEPNDS
libnss-nis-native, so I add this override.

Quoted 6 lines

# We will skip parsing this packagegeoup for non-glibc systems #
python __anonymous () {
      if d.getVar('TCLIBC') != "glibc":
          raise bb.parse.SkipRecipe("incompatible with %s C library" % d.getVar('TCLIBC'))

may be this can be made to exclude non target recipes.

Quoted 6 lines
Quoted 1 line

I don't quite get your mean, can you explain more? Thanks.

fact that we are adding a dependency on a native package for just glibc based images is what I was asking about. libc-glibc is a target specific override and therefore this makes it such that it is only needed when target is glibc which to be sounds wrong, since other libcs should have same dependency needs as well.

Guessing from your error message it seems somewhere crash build is depending upon id program and this id program is coming from coreutils-native, which seems to depend on this library so this dependency really belongs there, it seems to me that coreutils-native should depend upon libnss-nis-native

Thanks. I will move depend of libnss-nis-native to coreutils-native, and resend to patch.