dieharder: new package
PATCH v3 1/1 dieharder: new package
From: Julien Viard de Galbert <[email protected]>
---
Changes v2 -> v3
- remove intermediate variable use (suggested by Baruch Siach)
Changes v1 -> v2
- fixed typo "bin" instead of "big" (thanks Thomas Petazoni)
- select gls in config (suggested by Romain Naour)
- specified "includedir" to fix unsafe header path
--- package/Config.in | 1 + package/dieharder/Config.in | 9 +++++++++ package/dieharder/dieharder.mk | 26 ++++++++++++++++++++++++++ 3 files changed, 36 insertions(+) create mode 100644 package/dieharder/Config.in create mode 100644 package/dieharder/dieharder.mk
package/Config.in +1 -0
@@ -61,6 +61,7 @@ menu "Debugging, profiling and benchmark" source "package/bonnie/Config.in" source "package/cache-calibrator/Config.in" source "package/dhrystone/Config.in" + source "package/dieharder/Config.in" source "package/dmalloc/Config.in" source "package/dropwatch/Config.in" source "package/dstat/Config.in"
package/dieharder/Config.in new file +9 -0
@@ -0,0 +1,9 @@ +config BR2_PACKAGE_DIEHARDER + bool "dieharder" + select BR2_PACKAGE_GSL + help + dieharder is a fairly involved random number/uniform deviate generator + tester. It is thus suitable for use in testing both software RNG's and + hardware RNG's. + + http://www.phy.duke.edu/~rgb/General/dieharder.php
package/dieharder/dieharder.mk new file +26 -0
@@ -0,0 +1,26 @@ +################################################################################ +# +# dieharder +# +################################################################################ + +DIEHARDER_VERSION = 3.31.1 +DIEHARDER_SITE = http://www.phy.duke.edu/~rgb/General/dieharder/ +DIEHARDER_SOURCE = dieharder-$(DIEHARDER_VERSION).tgz +DIEHARDER_SUBDIR = dieharder-$(DIEHARDER_VERSION) +DIEHARDER_LICENSE = GPLv2b +DIEHARDER_LICENSE_FILES = $(DIEHARDER_SUBDIR)/COPYING +DIEHARDER_DEPENDENCIES = gsl + +DIEHARDER_CONF_OPTS = --includedir=$(STAGING_DIR)/usr/include +# fix endiannes detection +ifeq ($(BR2_ENDIAN),"BIG") +DIEHARDER_CONF_OPTS += ac_cv_c_endian=big +else +DIEHARDER_CONF_OPTS += ac_cv_c_endian=little +endif + +# parallel build fail, disable it +DIEHARDER_MAKE=$(MAKE1) + +$(eval $(autotools-package))
Signature · 1 line
2.1.4
PATCH v3 1/1 dieharder: new package
Hello Julien,
Quoted 18 lines · julien.viarddegalbert at openwide.fr
package/Config.in +1
-0@@ -61,6 +61,7 @@ menu "Debugging, profiling and benchmark" source "package/bonnie/Config.in" source "package/cache-calibrator/Config.in" source "package/dhrystone/Config.in" + source "package/dieharder/Config.in" source "package/dmalloc/Config.in" source "package/dropwatch/Config.in" source "package/dstat/Config.in"package/dieharder/Config.in new file +0
-0
package/dieharder/Config.in line 7
Quoted 7 lines
package/dieharder/Config.in new file +7
-0@@ -0,0 +1,9 @@ +config BR2_PACKAGE_DIEHARDER + bool "dieharder" + select BR2_PACKAGE_GSL + help + dieharder is a fairly involved random number/uniform deviate generator + tester. It is thus suitable for use in testing both software RNG's and + hardware RNG's.
Those help lines look fairly too long. Make sure they're not longer than 72 columns.
Quoted 7 lines
package/dieharder/dieharder.mk new file +1
-0@@ -0,0 +1,26 @@ +################################################################################
package/dieharder/dieharder.mk line 11
Quoted 10 lines
package/dieharder/dieharder.mk new file +10
-0+# +# dieharder +# +################################################################################ + +DIEHARDER_VERSION = 3.31.1 +DIEHARDER_SITE = http://www.phy.duke.edu/~rgb/General/dieharder/ +DIEHARDER_SOURCE = dieharder-$(DIEHARDER_VERSION).tgz +DIEHARDER_SUBDIR = dieharder-$(DIEHARDER_VERSION) +DIEHARDER_LICENSE = GPLv2b
What is GPLv2b ? We normally have GPLv2 or GPLv2+.
package/dieharder/dieharder.mk line 15
Quoted 4 lines
package/dieharder/dieharder.mk new file +4
-0+DIEHARDER_LICENSE_FILES = $(DIEHARDER_SUBDIR)/COPYING +DIEHARDER_DEPENDENCIES = gsl + +DIEHARDER_CONF_OPTS = --includedir=$(STAGING_DIR)/usr/include
Why do you need this? This looks wrong, as it would install the headers in a completely wrong location, if dieharder would be installing headers. --includedir is not used to specify where a program should look for headers of libraries, but to tell where it should install its own headers.
package/dieharder/dieharder.mk line 21
Quoted 6 lines
package/dieharder/dieharder.mk new file +6
-0+# fix endiannes detection +ifeq ($(BR2_ENDIAN),"BIG") +DIEHARDER_CONF_OPTS += ac_cv_c_endian=big +else +DIEHARDER_CONF_OPTS += ac_cv_c_endian=little +endif
We generally pass such values in <pkg>_CONF_ENV instead.
package/dieharder/dieharder.mk line 24
Quoted 3 lines
package/dieharder/dieharder.mk new file +3
-0+ +# parallel build fail, disable it +DIEHARDER_MAKE=$(MAKE1)
Spaces around = sign please.
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v3 1/1 dieharder: new package
Quoted 25 lines · Thomas Petazzoni
Hello Julien,
Quoted 20 lines · julien.viarddegalbert at openwide.fr
package/Config.in +1
-0@@ -61,6 +61,7 @@ menu "Debugging, profiling and benchmark" source "package/bonnie/Config.in" source "package/cache-calibrator/Config.in" source "package/dhrystone/Config.in" + source "package/dieharder/Config.in" source "package/dmalloc/Config.in" source "package/dropwatch/Config.in" source "package/dstat/Config.in"package/dieharder/Config.in new file +2
-0@@ -0,0 +1,9 @@ +config BR2_PACKAGE_DIEHARDER + bool "dieharder"
Quoted 9 lines
package/dieharder/Config.in line 7
Quoted 5 lines
package/dieharder/Config.in new file +5
-0+ select BR2_PACKAGE_GSL + help + dieharder is a fairly involved random number/uniform deviate generator + tester. It is thus suitable for use in testing both software RNG's and + hardware RNG's.Those help lines look fairly too long. Make sure they're not longer than 72 columns.
Ok, also I just sent another patch to document that point.
Quoted 11 lines
Quoted 11 lines
package/dieharder/dieharder.mk new file +5
-0@@ -0,0 +1,26 @@ +################################################################################ +# +# dieharder +# +################################################################################
Quoted 9 lines
package/dieharder/dieharder.mk line 11
Quoted 6 lines
package/dieharder/dieharder.mk new file +6
-0+ +DIEHARDER_VERSION = 3.31.1 +DIEHARDER_SITE = http://www.phy.duke.edu/~rgb/General/dieharder/ +DIEHARDER_SOURCE = dieharder-$(DIEHARDER_VERSION).tgz +DIEHARDER_SUBDIR = dieharder-$(DIEHARDER_VERSION) +DIEHARDER_LICENSE = GPLv2bWhat is GPLv2b ? We normally have GPLv2 or GPLv2+.
You are right this should be made more explicit, there is an extra "beverage" clause in the licence file.
I could either use the syntax the software uses:DIEHARDER_LICENSE = GPLv2b (b for beverage)
Or make it simply:DIEHARDER_LICENSE = GPLv2 with beverage clause
What do you think ?
Quoted 11 lines
package/dieharder/dieharder.mk line 15
Quoted 4 lines
package/dieharder/dieharder.mk new file +4
-0+DIEHARDER_LICENSE_FILES = $(DIEHARDER_SUBDIR)/COPYING +DIEHARDER_DEPENDENCIES = gsl + +DIEHARDER_CONF_OPTS = --includedir=$(STAGING_DIR)/usr/includeWhy do you need this? This looks wrong, as it would install the headers in a completely wrong location, if dieharder would be installing headers. --includedir is not used to specify where a program should look for headers of libraries, but to tell where it should install its own headers.
That was to try to fix the build using "/usr/include/" but it's wrong. I overlooked the normal --includedir function. So I guess the upstream scripts are wrong as they use the --includedir value to also specify some include search path...
Also it _really_ do install some headers there. We probably don't want those on the target rootfs. So I guess I need to find how to tell it not to do that...
Quoted 9 lines
package/dieharder/dieharder.mk line 21
Quoted 6 lines
package/dieharder/dieharder.mk new file +6
-0+# fix endiannes detection +ifeq ($(BR2_ENDIAN),"BIG") +DIEHARDER_CONF_OPTS += ac_cv_c_endian=big +else +DIEHARDER_CONF_OPTS += ac_cv_c_endian=little +endifWe generally pass such values in <pkg>_CONF_ENV instead.
OK, I'll do that.
Quoted 5 lines
package/dieharder/dieharder.mk line 24
Quoted 3 lines
package/dieharder/dieharder.mk new file +3
-0+ +# parallel build fail, disable it +DIEHARDER_MAKE=$(MAKE1)Spaces around = sign please.
OK, sorry, I read about that one... my mistake.
Quoted 8 lines
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
Signature · 1 line
Julien Viard de Galbert
PATCH v3 1/1 dieharder: new package
Dear Julien Viard de Galbert,
Quoted 4 lines · Julien Viard de Galbert
Quoted 3 lines
Those help lines look fairly too long. Make sure they're not longer than 72 columns.
Ok, also I just sent another patch to document that point.
Sure, good idea.
Quoted 9 lines
You are right this should be made more explicit, there is an extra "beverage" clause in the licence file.
I could either use the syntax the software uses:DIEHARDER_LICENSE= GPLv2b (b for beverage)Or make it simply:
DIEHARDER_LICENSE= GPLv2 with beverage clauseWhat do you think ?
The second solution you propose looks better to me.
Quoted 11 lines
Quoted 11 lines
package/dieharder/dieharder.mk line 15
Quoted 4 lines
package/dieharder/dieharder.mk new file +4
-0+DIEHARDER_LICENSE_FILES = $(DIEHARDER_SUBDIR)/COPYING +DIEHARDER_DEPENDENCIES = gsl + +DIEHARDER_CONF_OPTS = --includedir=$(STAGING_DIR)/usr/includeWhy do you need this? This looks wrong, as it would install the headers in a completely wrong location, if dieharder would be installing headers. --includedir is not used to specify where a program should look for headers of libraries, but to tell where it should install its own headers.
Quoted 8 lines
That was to try to fix the build using "
/usr/include/" but it's wrong. I overlooked the normal --includedir function. So I guess the upstream scripts are wrong as they use the --includedir value to also specify some include search path...Also it _really_ do install some headers there. We probably don't want those on the target rootfs. So I guess I need to find how to tell it not to do that...
As long as headers are installed in $(TARGET_DIR)/usr/include, you shouldn't do anything: Buildroot automatically deletes this directory at the end of the build process.
Thanks,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v3 1/1 dieharder: new package
In reply to julien.viarddegalbert at openwide.frHi Julien,
Le 17/05/2015 09:43, julien.viarddegalbert at openwide.fr a ?crit :
Quoted 64 lines
From: Julien Viard de Galbert <[email protected]>
Signed-off-by Julien Viard de Galbert <[email protected]>---
Changes v2 -> v3
- remove intermediate variable use (suggested by Baruch Siach)
Changes v1 -> v2
- fixed typo "bin" instead of "big" (thanks Thomas Petazoni)
- select gls in config (suggested by Romain Naour)
- specified "includedir" to fix unsafe header pathSigned-off-by Julien Viard de Galbert <[email protected]>--- package/Config.in | 1 + package/dieharder/Config.in | 9 +++++++++ package/dieharder/dieharder.mk | 26 ++++++++++++++++++++++++++ 3 files changed, 36 insertions(+) create mode 100644 package/dieharder/Config.in create mode 100644 package/dieharder/dieharder.mkpackage/Config.in +1
-0@@ -61,6 +61,7 @@ menu "Debugging, profiling and benchmark" source "package/bonnie/Config.in" source "package/cache-calibrator/Config.in" source "package/dhrystone/Config.in" + source "package/dieharder/Config.in" source "package/dmalloc/Config.in" source "package/dropwatch/Config.in" source "package/dstat/Config.in"package/dieharder/Config.in new file +9
-0@@ -0,0 +1,9 @@ +config BR2_PACKAGE_DIEHARDER + bool "dieharder" + select BR2_PACKAGE_GSL + help + dieharder is a fairly involved random number/uniform deviate generator + tester. It is thus suitable for use in testing both software RNG's and + hardware RNG's. + + http://www.phy.duke.edu/~rgb/General/dieharder.phppackage/dieharder/dieharder.mk new file +11
-0@@ -0,0 +1,26 @@ +################################################################################ +# +# dieharder +# +################################################################################ + +DIEHARDER_VERSION = 3.31.1 +DIEHARDER_SITE = http://www.phy.duke.edu/~rgb/General/dieharder/ +DIEHARDER_SOURCE = dieharder-$(DIEHARDER_VERSION).tgz +DIEHARDER_SUBDIR = dieharder-$(DIEHARDER_VERSION) +DIEHARDER_LICENSE = GPLv2b
package/dieharder/dieharder.mk line 21
Quoted 10 lines
package/dieharder/dieharder.mk new file +10
-0+DIEHARDER_LICENSE_FILES = $(DIEHARDER_SUBDIR)/COPYING +DIEHARDER_DEPENDENCIES = gsl + +DIEHARDER_CONF_OPTS = --includedir=$(STAGING_DIR)/usr/include +# fix endiannes detection +ifeq ($(BR2_ENDIAN),"BIG") +DIEHARDER_CONF_OPTS += ac_cv_c_endian=big +else +DIEHARDER_CONF_OPTS += ac_cv_c_endian=little +endif
There is a build issue with musl libc due to missing M_PI when _GNU_SOURCE is not defined.
I suggest you add it in CFLAGS by using DIEHARDER_MAKE_OPTS:
DIEHARDER_MAKE_OPTS = CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE"
Don't forget to take into account Thomas's comment for the next version ;-)
Best regards,
Romain
Quoted 6 lines
package/dieharder/dieharder.mk new file +5
-0+ +# parallel build fail, disable it +DIEHARDER_MAKE=$(MAKE1) + +$(eval $(autotools-package))
PATCH v3 1/1 dieharder: new package
Julien, Romain, All,
On 2015-07-11 01:10 +0200, Romain Naour spake thusly:
Quoted 4 lines
Le 17/05/2015 09:43, julien.viarddegalbert at openwide.fr a ?crit :
Quoted 3 lines
From: Julien Viard de Galbert <[email protected]>
Signed-off-by Julien Viard de Galbert <[email protected]>
[--SNIP--]
Quoted 31 lines
Quoted 17 lines
package/dieharder/dieharder.mk new file +11
-0@@ -0,0 +1,26 @@ +################################################################################ +# +# dieharder +# +################################################################################ + +DIEHARDER_VERSION = 3.31.1 +DIEHARDER_SITE = http://www.phy.duke.edu/~rgb/General/dieharder/ +DIEHARDER_SOURCE = dieharder-$(DIEHARDER_VERSION).tgz +DIEHARDER_SUBDIR = dieharder-$(DIEHARDER_VERSION) +DIEHARDER_LICENSE = GPLv2bpackage/dieharder/dieharder.mk line 21
Quoted 10 lines
package/dieharder/dieharder.mk new file +10
-0+DIEHARDER_LICENSE_FILES = $(DIEHARDER_SUBDIR)/COPYING +DIEHARDER_DEPENDENCIES = gsl + +DIEHARDER_CONF_OPTS = --includedir=$(STAGING_DIR)/usr/include +# fix endiannes detection +ifeq ($(BR2_ENDIAN),"BIG") +DIEHARDER_CONF_OPTS += ac_cv_c_endian=big +else +DIEHARDER_CONF_OPTS += ac_cv_c_endian=little +endifThere is a build issue with musl libc due to missing
M_PIwhen_GNU_SOURCEis not defined.
Quoted 3 lines
I suggest you add it in CFLAGS by using
DIEHARDER_MAKE_OPTS:
DIEHARDER_MAKE_OPTS= CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE"
Better yet: patch dieharder to define it in the source, and submit that patch upstream.
Regards,
Yann E. MORIN.
Quoted 16 lines
Don't forget to take into account Thomas's comment for the next version ;-)
Best regards,
Romainpackage/dieharder/dieharder.mk line 26
Quoted 6 lines
package/dieharder/dieharder.mk new file +5
-0+ +# parallel build fail, disable it +DIEHARDER_MAKE=$(MAKE1) + +$(eval $(autotools-package))_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH v3 1/1 dieharder: new package
Hello All,
I've been moving and still need to wait to get internet access at the new home, so this will take some time, but yes, I think it's better to upstream patches than work on our side.
Also I'm not sure how soon I'll be able to work on this, I will keep all your emails and review them all at that time.
Best regards,
Julien
----- Mail original -----
Quoted 92 lines
De: "Yann E. MORIN" <[email protected]>
?: "Romain Naour" <[email protected]>
Cc: "Julien Viard de Galbert" <[email protected]>, buildroot at buildroot.org, "julien viarddegalbert" <[email protected]>
Envoy?: Samedi 11 Juillet 2015 09:43:44
Objet: Re: [Buildroot] [PATCH v3] dieharder: new packageJulien, Romain, All,
On 2015-07-11 01:10 +0200, Romain Naour spake thusly:
Quoted 4 lines
Le 17/05/2015 09:43, julien.viarddegalbert at openwide.fr a ?crit :
Quoted 3 lines
From: Julien Viard de Galbert <[email protected]>
Signed-off-by Julien Viard de Galbert <[email protected]>[--SNIP--]
Quoted 33 lines
Quoted 18 lines
package/dieharder/dieharder.mk new file +11
-0@@ -0,0 +1,26 @@ +################################################################################ +# +# dieharder +# +################################################################################ + +DIEHARDER_VERSION = 3.31.1 +DIEHARDER_SITE = http://www.phy.duke.edu/~rgb/General/dieharder/ +DIEHARDER_SOURCE = dieharder-$(DIEHARDER_VERSION).tgz +DIEHARDER_SUBDIR = dieharder-$(DIEHARDER_VERSION) +DIEHARDER_LICENSE = GPLv2bpackage/dieharder/dieharder.mk line 21
Quoted 10 lines
package/dieharder/dieharder.mk new file +10
-0+DIEHARDER_LICENSE_FILES = $(DIEHARDER_SUBDIR)/COPYING +DIEHARDER_DEPENDENCIES = gsl + +DIEHARDER_CONF_OPTS = --includedir=$(STAGING_DIR)/usr/include +# fix endiannes detection +ifeq ($(BR2_ENDIAN),"BIG") +DIEHARDER_CONF_OPTS += ac_cv_c_endian=big +else +DIEHARDER_CONF_OPTS += ac_cv_c_endian=little +endifThere is a build issue with musl libc due to missing
M_PIwhen_GNU_SOURCEis
not defined.Quoted 3 lines
I suggest you add it in CFLAGS by using
DIEHARDER_MAKE_OPTS:
DIEHARDER_MAKE_OPTS= CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE"Better yet: patch dieharder to define it in the source, and submit that
patch upstream.Regards,
Yann E. MORIN.Quoted 6 lines
Don't forget to take into account Thomas's comment for the next version ;-)
Best regards,
RomainQuoted 11 lines
package/dieharder/dieharder.mk line 26
Quoted 6 lines
package/dieharder/dieharder.mk new file +5
-0+ +# parallel build fail, disable it +DIEHARDER_MAKE=$(MAKE1) + +$(eval $(autotools-package))_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot--
.-----------------.--------------------.------------------.--------------------.| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' | conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | | +33 223 225 172 `------------.-------: X AGAINST | \e/ | There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v | conspiracy. |'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
Julien Viard de Galbert // `` OPEN WIDE 23-25 Rue Daviel Responsable des op?rations \\// Ing?nierie 75013 Paris - France julien.viarddegalbert at openwide.fr +33 (0)1 42 68 28 11 Open Wide Ing?nierie ingenierie.openwide.fr Open Wide vid?o avanc?es video.ingenierie.openwide.fr Blog des technologies libres et embarqu?es www.linuxembedded.fr