Skip to contentSkip to conversation

base.bbclass: add make-native to default dependencies

RFC In review Michael Smith 4 participants 14 messages Sep 20, 2010 – Sep 25, 2010

lore
Share & tools
lore
#0 lore raw

RFC 1/1 base.bbclass: add make-native to default dependencies

In case the build system is running some ancient make, we can just as easily build our own make (3.82) to get predictable behaviour. Does something like this make sense?

classes/base.bbclass +1 -1
index b19eb32..5c6d41d 100644
@@ -71,7 +71,7 @@ def base_deps(d):
        if not bb.data.getVar('INHIBIT_DEFAULT_DEPS', d):
                if (bb.data.getVar('HOST_SYS', d, 1) !=
                    bb.data.getVar('BUILD_SYS', d, 1)):
-                       deps += " virtual/${TARGET_PREFIX}gcc virtual/libc "
+                       deps += " make-native virtual/${TARGET_PREFIX}gcc virtual/libc "
                elif bb.data.inherits_class('native', d) and \
                                bb.data.getVar('PN', d, True) not in \
                                ("linux-libc-headers-native", 

"quilt-native",

#1 lore raw
Quoted 3 lines · Michael Smith

In case the build system is running some ancient make, we can just as easily build our own make (3.82) to get predictable behaviour. Does something like this make sense?

although it does but make 3.82 is not usable out of box yet. so people might find surprises. 3.81 would be ok.

Quoted 21 lines
classes/base.bbclass +0 -0
index b19eb32..5c6d41d 100644
@@ -71,7 +71,7 @@ def base_deps(d):

       if not bb.data.getVar('INHIBIT_DEFAULT_DEPS', d):
               if (bb.data.getVar('HOST_SYS', d, 1) != bb.data.getVar('BUILD_SYS', d, 1)):
-                       deps += " virtual/${TARGET_PREFIX}gcc virtual/libc "
+                       deps += " make-native virtual/${TARGET_PREFIX}gcc virtual/libc "
               elif bb.data.inherits_class('native', d) and \
                               bb.data.getVar('PN', d, True) not in \
                               ("linux-libc-headers-native", "quilt-native",

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

Signature · 1 line
-Khem
#2 lore raw
Quoted 2 lines · Khem Raj

although it does but make 3.82 is not usable out of box yet. so people might find surprises. 3.81 would be ok.

I could add a DEFAULT_PREFERENCE = "-1" to the 3.82 recipe and mention the packages that don't build with it in a comment. Do you remember which packages fail to build with 3.82?

Quoted 14 lines
Quoted 14 lines
classes/base.bbclass +1 -1
index b19eb32..5c6d41d 100644
@@ -71,7 +71,7 @@ def base_deps(d):
       if not bb.data.getVar('INHIBIT_DEFAULT_DEPS', d):
               if (bb.data.getVar('HOST_SYS', d, 1) !=
                   bb.data.getVar('BUILD_SYS', d, 1)):
-                       deps += " virtual/${TARGET_PREFIX}gcc virtual/libc "
+                       deps += " make-native virtual/${TARGET_PREFIX}gcc

virtual/libc "

               elif bb.data.inherits_class('native', d) and \
                               bb.data.getVar('PN', d, True) not in \
                               ("linux-libc-headers-native", "quilt-native",
#3 lore raw
Quoted 5 lines · Michael Smith
Quoted 2 lines · Khem Raj

although it does but make 3.82 is not usable out of box yet. so people might find surprises. 3.81 would be ok.

I hit eglibc there may be more.

Quoted 27 lines

I could add a DEFAULT_PREFERENCE = "-1" to the 3.82 recipe and mention the packages that don't build with it in a comment. Do you remember which packages fail to build with 3.82?

Quoted 8 lines
Quoted 8 lines
classes/base.bbclass +0 -0
index b19eb32..5c6d41d 100644
@@ -71,7 +71,7 @@ def base_deps(d):

      if not bb.data.getVar('INHIBIT_DEFAULT_DEPS', d):
              if (bb.data.getVar('HOST_SYS', d, 1) != bb.data.getVar('BUILD_SYS', d, 1)):

Quoted 8 lines
Quoted 8 lines

-                       deps += " virtual/${TARGET_PREFIX}gcc virtual/libc "
+                       deps += " make-native virtual/${TARGET_PREFIX}gcc virtual/libc "
              elif bb.data.inherits_class('native', d) and \
                              bb.data.getVar('PN', d, True) not in \
                              ("linux-libc-headers-native", "quilt-native",

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

Signature · 1 line
-Khem
#4 lore raw
Quoted 7 lines · Khem Raj
Quoted 4 lines · Michael Smith
Quoted 2 lines · Khem Raj

although it does but make 3.82 is not usable out of box yet. so people might find surprises. 3.81 would be ok.

I hit eglibc there may be more.

Hmm, OK. The patch below wouldn't affect eglibc's dependencies, so we'd still have to change eglibc.inc and eglibc-initial.inc to depend on make-native, or people with make 3.82 on their host system will be unable to build eglibc.

Or, apply a patch to every version of eglibc to fix the build with make 3.82.

Which do you prefer? I can only really test glibc 2.9, but adding make-native to the DEPENDS in glibc.inc/glibc-initial.inc should work about the same as doing it in eglibc.

Mike

Quoted 16 lines
Quoted 16 lines
Quoted 16 lines
Quoted 16 lines
classes/base.bbclass +0 -1
index b19eb32..5c6d41d 100644
@@ -71,7 +71,7 @@ def base_deps(d):
      if not bb.data.getVar('INHIBIT_DEFAULT_DEPS', d):
              if (bb.data.getVar('HOST_SYS', d, 1) !=
                  bb.data.getVar('BUILD_SYS', d, 1)):
-                       deps += " virtual/${TARGET_PREFIX}gcc

virtual/libc "
+ deps += " make-native virtual/${TARGET_PREFIX}gcc
virtual/libc "

              elif bb.data.inherits_class('native', d) and \
                              bb.data.getVar('PN', d, True) not in \
                              ("linux-libc-headers-native",

"quilt-native",

#5 lore raw
In reply to Michael Smith
Quoted 8 lines · Michael Smith
Quoted 2 lines · Khem Raj

although it does but make 3.82 is not usable out of box yet. so people might find surprises. 3.81 would be ok.

I could add a DEFAULT_PREFERENCE = "-1" to the 3.82 recipe and mention the packages that don't build with it in a comment. Do you remember which packages fail to build with 3.82?

well, busybox, glibc, gst* have failed and were fixed. In general I have hit:

- mixing 'rule %rule:', newer GNU make refuses to match that (busybox, glibc)
- spaces vs. tab. e.g. using 8 spaces instead of a tab (gst)

#6 lore raw
Quoted 10 lines · Holger Freyther
Quoted 3 lines · Michael Smith

I could add a DEFAULT_PREFERENCE = "-1" to the 3.82 recipe and mention the packages that don't build with it in a comment. Do you remember which packages fail to build with 3.82?

well, busybox, glibc, gst* have failed and were fixed. In general I have hit:

- mixing 'rule %rule:', newer GNU make refuses to match that (busybox, glibc)
- spaces vs. tab. e.g. using 8 spaces instead of a tab (gst)

Maybe it'd be easier to fix the affected packages, then. Would you be opposed to make-native being a default dep? The next testing cycle would probably spot any remaining fallout from 3.82.

Mike

#7 lore raw
Quoted 13 lines · Michael Smith
Quoted 12 lines · Holger Freyther
Quoted 6 lines · Michael Smith

I could add a DEFAULT_PREFERENCE = "-1" to the 3.82 recipe and mention the
packages that don't build with it in a comment. Do you remember which packages
fail to build with 3.82?

well, busybox, glibc, gst* have failed and were fixed. In general I have hit:

Quoted 8 lines
Quoted 3 lines

       - mixing 'rule %rule:', newer GNU make refuses to match that (busybox, glibc)
       - spaces vs. tab. e.g. using 8 spaces instead of a tab (gst)

Maybe it'd be easier to fix the affected packages, then. Would you be opposed to make-native being a default dep? The next testing cycle would probably spot any remaining fallout from 3.82.

make is a core component. We have enough fallout to fix which is not make related. this will add to it. and make 3.82 native recipe is there. I am just not ready to make it default yet.

Quoted 7 lines

Mike

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

Signature · 1 line
-Khem
#8 lore raw

PATCH 1/4 make 3.82: set DEFAULT_PREFERENCE = "-1"

This version has introduced several backwards incompatibilities and some packages are known not to build with 3.82. In particular:

- glibc-initial fails in do_install when prefix="".
- eglibc manual/Makefile has not yet been patched (see 3a06f50f)

---
 recipes/make/make_3.82.bb |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
recipes/make/make_3.82.bb +3 -0
index 3cdc0a0..86c58d6 100644
@@ -1,5 +1,8 @@
 require make.inc
 
+# Stock eglibc fails to build with make 3.82.
+DEFAULT_PREFERENCE = "-1"
+
 BBCLASSEXTEND = "native"
 SRC_URI[md5sum] = "1a11100f3c63fcf5753818e59d63088f"
 SRC_URI[sha256sum] = "e2c1a73f179c40c71e2fe8abf8a8a0688b8499538512984da4a76958d0402966"
Signature · 1 line
1.7.0.4
#9 lore raw

PATCH 2/4 base.bbclass: add make-native to default dependencies

This should work around package incompatibilities with whatever version of make is installed on the build system.

---
 classes/base.bbclass |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
classes/base.bbclass +2 -1
index b19eb32..60e6bc8 100644
@@ -71,7 +71,8 @@ def base_deps(d):
 	if not bb.data.getVar('INHIBIT_DEFAULT_DEPS', d):
 		if (bb.data.getVar('HOST_SYS', d, 1) !=
 	     	    bb.data.getVar('BUILD_SYS', d, 1)):
-			deps += " virtual/${TARGET_PREFIX}gcc virtual/libc "
+			deps += (" virtual/${TARGET_PREFIX}gcc virtual/libc "
+				"make-native")
 		elif bb.data.inherits_class('native', d) and \
 				bb.data.getVar('PN', d, True) not in \
 				("linux-libc-headers-native", "quilt-native",
Signature · 1 line
1.7.0.4
#10 lore raw

PATCH 3/4 glibc, glibc-initial: depend on make-native

In case the version of make installed on the build host is incompatible, we'll use make-native.

---
 recipes/glibc/glibc-initial.inc |    2 +-
 recipes/glibc/glibc.inc         |    4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)
recipes/glibc/glibc-initial.inc +1 -1
index effebf1..c95a161 100644
@@ -1,5 +1,5 @@
 SECTION = "libs"
-DEPENDS = "virtual/${TARGET_PREFIX}gcc-initial linux-libc-headers"
+DEPENDS = "virtual/${TARGET_PREFIX}gcc-initial linux-libc-headers make-native"
 PROVIDES = "virtual/${TARGET_PREFIX}libc-initial"
 
 PACKAGES = ""
recipes/glibc/glibc.inc +3 -1
index 643ebd3..38251bb 100644
@@ -4,7 +4,9 @@ SECTION = "libs"
 PRIORITY = "required"
 LICENSE = "LGPL"
 # nptl needs unwind support in gcc, which can't be built without glibc.
-DEPENDS = "virtual/${TARGET_PREFIX}gcc-intermediate linux-libc-headers"
+DEPENDS = "virtual/${TARGET_PREFIX}gcc-intermediate \
+		linux-libc-headers \
+		make-native"
 #this leads to circular deps, so lets not add it yet
 #RDEPENDS_ldd += " bash"
 PROVIDES = "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc"
Signature · 1 line
1.7.0.4
#11 lore raw

PATCH 4/4 eglibc, eglibc-initial: depend on make-native

In case the version of make installed on the build host is incompatible, we'll use make-native.

---
 recipes/eglibc/eglibc-initial.inc |    2 +-
 recipes/eglibc/eglibc.inc         |    4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)
recipes/eglibc/eglibc-initial.inc +1 -1
index eb765df..4384ed4 100644
@@ -1,5 +1,5 @@
 SECTION = "libs"
-DEPENDS = "linux-libc-headers virtual/${TARGET_PREFIX}gcc-initial"
+DEPENDS = "linux-libc-headers virtual/${TARGET_PREFIX}gcc-initial make-native"
 PROVIDES = "virtual/${TARGET_PREFIX}libc-initial"
 
 PACKAGES = ""
recipes/eglibc/eglibc.inc +3 -1
index 66bb90e..78e03c4 100644
@@ -5,7 +5,9 @@ PRIORITY = "required"
 LICENSE = "LGPL"
 INC_PR = "r11"
 # nptl needs unwind support in gcc, which can't be built without glibc.
-DEPENDS = "virtual/${TARGET_PREFIX}gcc-intermediate linux-libc-headers"
+DEPENDS = "virtual/${TARGET_PREFIX}gcc-intermediate \
+		linux-libc-headers \
+		make-native"
 #this leads to circular deps, so lets not add it yet
 #RDEPENDS_ldd += " bash"
 # nptl needs libgcc but dlopens it, so our shlibs code doesn't detect this
Signature · 1 line
1.7.0.4
#12 lore raw
In reply to Michael Smith

Am Freitag, den 24.09.2010, 15:39 -0400 schrieb Michael Smith:

Quoted 13 lines

This should work around package incompatibilities with whatever version of make is installed on the build system.

---
 classes/base.bbclass |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
classes/base.bbclass +0 -0
index b19eb32..60e6bc8 100644

classes/base.bbclass def base_deps(d): · line 75

Quoted 6 lines
classes/base.bbclass +2 -1
@@ -71,7 +71,8 @@ def base_deps(d):
 	if not bb.data.getVar('INHIBIT_DEFAULT_DEPS', d):
 		if (bb.data.getVar('HOST_SYS', d, 1) !=
 	     	    bb.data.getVar('BUILD_SYS', d, 1)):
-			deps += " virtual/${TARGET_PREFIX}gcc virtual/libc "
+			deps += (" virtual/${TARGET_PREFIX}gcc virtual/libc "
+				"make-native")

Are the parentheses »()« needed? Is it to prevent using »\« for the line break?

classes/base.bbclass def base_deps(d): · line 78

Quoted 3 lines
classes/base.bbclass +0 -0
 		elif bb.data.inherits_class('native', d) and \
 				bb.data.getVar('PN', d, True) not in \
 				("linux-libc-headers-native", "quilt-native",

Thanks,

Paul

#13 lore raw
Quoted 10 lines · Paul Menzel

Am Freitag, den 24.09.2010, 15:39 -0400 schrieb Michael Smith:

classes/base.bbclass def base_deps(d): · line 75

Quoted 6 lines

This should work around package incompatibilities with whatever version of make is installed on the build system.

classes/base.bbclass +2 -1
-			deps += " virtual/${TARGET_PREFIX}gcc virtual/libc "
+			deps += (" virtual/${TARGET_PREFIX}gcc virtual/libc "
+				"make-native")

Are the parentheses »()« needed? Is it to prevent using »\« for the line break?

Yes, that's correct.

Mike