Skip to contentSkip to conversation

ncurses_6.0: Improve reproducibility

PATCH In review Juro Bystricky 5 participants 7 messages Mar 31, 2017 – Apr 1, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ncurses_6.0: Improve reproducibility

Build static libraries without the binutils "ar" -U option. This option deliberately breaks deterministic mode.
The option seems to be a relic from 2015, intended as a workaround for some unspecified build problems.

[YOCTO#11247]

---
 .../ncurses/files/configure-reproducible.patch       | 20 ++++++++++++++++++++
 meta/recipes-core/ncurses/ncurses_6.0+20161126.bb    |  1 +
 2 files changed, 21 insertions(+)
 create mode 100644 meta/recipes-core/ncurses/files/configure-reproducible.patch
meta/recipes-core/ncurses/files/configure-reproducible.patch new file +20 -0
new file mode 100644
index 0000000..54a8bdc
@@ -0,0 +1,20 @@
+"configure" enforces -U for ar flags, breaking deterministic builds.
+The flag was added to fix some vaguely specified "recent POSIX binutil
+build problems" in 2015. 
+
+Upstream-Status: Pending
+Signed-off-by: Juro Bystricky <[email protected]>
+
+diff --git a/configure b/configure
+index 7f31208..aa80911 100755
+--- a/configure
++++ b/configure
+@@ -4428,7 +4428,7 @@ if test "${cf_cv_ar_flags+set}" = set; then
+ else
+ 
+ 	cf_cv_ar_flags=unknown
+-	for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
++	for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
+ 	do
+ 
+ 		# check if $ARFLAGS already contains this choice
meta/recipes-core/ncurses/ncurses_6.0+20161126.bb +1 -0
index e95741f..ace3108 100644
@@ -3,6 +3,7 @@ require ncurses.inc
 SRC_URI += "file://tic-hang.patch \
             file://fix-cflags-mangle.patch \
             file://config.cache \
+            file://configure-reproducible.patch \
 "
 # commit id corresponds to the revision in package version
 SRCREV = "3db0bd19cb50e3d9b4f2cf15b7a102fe11302068"
Signature · 1 line
2.7.4
#1 lore raw
Quoted 2 lines · Juro Bystricky

Build static libraries without the binutils "ar" -U option. This option deliberately breaks deterministic mode.

While this patch is ok it would be better if we configured binutils with enable-deterministic-archives option please file a ticket for it

Quoted 64 lines

The option seems to be a relic from 2015, intended as a workaround for some unspecified build problems.

[YOCTO#11247]

---
 .../ncurses/files/configure-reproducible.patch       | 20
++++++++++++++++++++
 meta/recipes-core/ncurses/ncurses_6.0+20161126.bb    |  1 +
 2 files changed, 21 insertions(+)
 create mode 100644

meta/recipes-core/ncurses/files/configure-reproducible.patch

meta/recipes-core/ncurses/files/configure-reproducible.patch new file +20 -0
new file mode 100644
index 0000000..54a8bdc
@@ -0,0 +1,20 @@
+"configure" enforces -U for ar flags, breaking deterministic builds.
+The flag was added to fix some vaguely specified "recent POSIX binutil
+build problems" in 2015.
+
+Upstream-Status: Pending
+Signed-off-by: Juro Bystricky <[email protected]>
+
+diff --git a/configure b/configure
+index 7f31208..aa80911 100755
+--- a/configure
++++ b/configure
+@@ -4428,7 +4428,7 @@ if test "${cf_cv_ar_flags+set}" = set; then
+ else
+
+       cf_cv_ar_flags=unknown
+-      for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
++      for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
+       do
+
+               # check if $ARFLAGS already contains this choice
meta/recipes-core/ncurses/ncurses_6.0+20161126.bb +1 -1
index e95741f..ace3108 100644
@@ -3,6 +3,7 @@ require ncurses.inc
 SRC_URI += "file://tic-hang.patch \
             file://fix-cflags-mangle.patch \
             file://config.cache \
+            file://configure-reproducible.patch \
 "
 # commit id corresponds to the revision in package version
 SRCREV = "3db0bd19cb50e3d9b4f2cf15b7a102fe11302068"
--

2.7.4

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

#2 lore raw
Quoted 8 lines · Khem Raj
Quoted 2 lines · Juro Bystricky

Build static libraries without the binutils "ar" -U option. This option deliberately breaks deterministic mode.

While this patch is ok it would be better if we configured binutils with enable-deterministic-archives option please file a ticket for it

ncurses is specifically asking binutils to make a non-deterministic archive here so I'm not sure that would help in this specific case.

Cheers,

Richard

#6 lore raw
In reply to Khem Raj
Quoted 9 lines · Khem Raj
Quoted 3 lines · Juro Bystricky

Build static libraries without the binutils "ar" -U option. This option deliberately breaks deterministic mode.

While this patch is ok it would be better if we configured binutils with enable-deterministic-archives option please file a ticket for it

We already do that:

http://git.openembedded.org/openembedded-core/commit/?id=df0d525c02780b5a0bd7a177a249c55f41797476

Quoted 71 lines
Quoted 58 lines

The option seems to be a relic from 2015, intended as a workaround for some unspecified build problems.

[YOCTO#11247]

---
 .../ncurses/files/configure-reproducible.patch       | 20
++++++++++++++++++++
 meta/recipes-core/ncurses/ncurses_6.0+20161126.bb    |  1 +
 2 files changed, 21 insertions(+)
 create mode 100644

meta/recipes-core/ncurses/files/configure-reproducible.patch

meta/recipes-core/ncurses/files/configure-reproducible.patch new file +20 -0
new file mode 100644
index 0000000..54a8bdc
@@ -0,0 +1,20 @@
+"configure" enforces -U for ar flags, breaking deterministic builds.
+The flag was added to fix some vaguely specified "recent POSIX binutil
+build problems" in 2015.
+
+Upstream-Status: Pending
+Signed-off-by: Juro Bystricky <[email protected]>
+
+diff --git a/configure b/configure
+index 7f31208..aa80911 100755
+--- a/configure
++++ b/configure
+@@ -4428,7 +4428,7 @@ if test "${cf_cv_ar_flags+set}" = set; then
+ else
+
+       cf_cv_ar_flags=unknown
+-      for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
++      for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
+       do
+
+               # check if $ARFLAGS already contains this choice
meta/recipes-core/ncurses/ncurses_6.0+20161126.bb +1 -1
index e95741f..ace3108 100644
@@ -3,6 +3,7 @@ require ncurses.inc
 SRC_URI += "file://tic-hang.patch \
             file://fix-cflags-mangle.patch \
             file://config.cache \
+            file://configure-reproducible.patch \
 "
 # commit id corresponds to the revision in package version
 SRCREV = "3db0bd19cb50e3d9b4f2cf15b7a102fe11302068"
--

2.7.4

Quoted 5 lines

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

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

#3 lore raw
In reply to Richard Purdie
Quoted 6 lines · Richard Purdie
Quoted 5 lines · Khem Raj
Quoted 2 lines · Juro Bystricky

Build static libraries without the binutils "ar" -U option. This option deliberately breaks deterministic mode.

Quoted 7 lines
Quoted 3 lines

While this patch is ok it would be better if we configured binutils with enable-deterministic-archives option please file a ticket for it

ncurses is specifically asking binutils to make a non-deterministic archive here so I'm not sure that would help in this specific case Cheers,

Not this case obviously but I was reminded that this should be default option from tool gain if not specified

Quoted 4 lines

Richard

#4 lore raw
Quoted 4 lines · Khem Raj

Not this case obviously but I was reminded that this should be default option from tool gain if not specified

Quoted 1 line

Yes, and it already is.

Ross

#5 lore raw
Quoted 8 lines · Ross
Quoted 3 lines · Khem Raj

Not this case obviously but I was reminded that this should be default option from tool gain if not specified

Yes, and it already is.

right. Andre confirmed that yesterday so settled.