1

I followed some instructions online and extracted the dieharder-3.31.1-1.x86_64 file to get a file called usr.

Now in usr/bin is located a file named dieharder but I have no idea on how to execute it. I have a binary file at path: Downloads and the dieharder file in: Downloads/usr/bin.

I do have Cygwin Terminal set up.

This is my first time running any such software so any help would be appreciated!

I am trying to give the command, 'dieharder' on the Cygwin terminal whose directory I have set as: Downloads/usr/bin but it is returning with an error: 'bash: dieharder: command not found'

This is the Cygwin terminal I opened in bin folder

S R
  • 11
  • 2
  • Simply `./dieharder` from the `bin` folder? Maybe you've got to `chmod +x dieharder` first. – Maarten Bodewes Apr 07 '23 at 00:53
  • some details more will help to understand what you did, we are NOT in front of your computer and you gave us no real information. I have the feeling that you downloaded a binary for Linux and not a Cygwin one – matzeri Apr 08 '23 at 21:39
  • @MaartenBodewes It didnt make any difference – S R Apr 09 '23 at 12:45
  • @matzeri How do I check if I downloaded the correct one? I downloaded dieharder-3.31.1-1.x86_64 rpm file from https://webhome.phy.duke.edu/~rgb/General/dieharder.php I then executed this in the terminal: rpm2cpio dieharder-3.31.1-1.x86_64.rpm | cpio -idmv It created a folder called usr in my Downloads folder. usr had 2 folders bin and share. bin folder has dieharder file. share folder has two more folders,doc and man in which the former contains a dieharder_config file amongst other files like copyright,readme etc – S R Apr 09 '23 at 12:57
  • if is in a RPM it is not a Cygwin file. Just run `file dieharder` in the directory where is located to have a confirmation. A cygwin file should produce ` PE32+ executable (console) x86-64, for MS Windows..` – matzeri Apr 09 '23 at 17:01

1 Answers1

2

Recipe to build dieharder-3.31.1 on a Cygwin platform.
It requires at least packages : cygwin-devel, gcc-core, make, autoconf2.5, automake1.11, libtool, libgsl-devel (I could have missed other packages)

The "$" is the cursor of bash command line

$ wget https://webhome.phy.duke.edu/~rgb/General/dieharder/dieharder-3.31.1.tgz
$ tar -xf dieharder-3.31.1.tgz
$ cd dieharder-3.31.1

the following is brutal but effective

$ find . -name "configure*" -exec sed -i -e "s/-std=c99//" {} \;    
$ find . -name "Makefile*" -exec sed -i -e "s/-std=c99//" {} \;

using specific version of autoconf:

$ autoreconf-2.69 -ivf
$ ./configure
$ make LDFLAGS="-Wl,--allow-multiple-definition -no-undefined"
$ make install

The program, library and documentation are installed under /usr/local

$ file  /usr/local/bin/*hard*
/usr/local/bin/cygdieharder-3.dll: PE32+ executable (DLL) (console) x86-64, for MS Windows, 19 sections
/usr/local/bin/dieharder.exe:      PE32+ executable (console) x86-64, for MS Windows, 19 sections

and the program is at least functional

$ dieharder  |head
#=============================================================================#
#            dieharder version 3.31.1 Copyright 2003 Robert G. Brown          #
#=============================================================================#

Usage:

dieharder [-a] [-d dieharder test number] [-f filename] [-B]
          [-D output flag [-D output flag] ... ] [-F] [-c separator]
          [-g generator number or -1] [-h] [-k ks_flag] [-l]
          [-L overlap] [-m multiply_p] [-n ntuple]
matzeri
  • 8,062
  • 2
  • 15
  • 16