radiasoft / zgoubi

Git repo for zgoubi source code
https://sourceforge.net/projects/zgoubi/
GNU General Public License v2.0
9 stars 3 forks source link

Install ndiff in docker image #46

Closed rouson closed 5 years ago

rouson commented 5 years ago

@robnagler If the request in the title of this issue is not a problem, then feel free to skip the text below and close the issue after installing ndiff.

The longer explanation:

The 3 tests on the build-test-infrastructure branch pass if thePATH contains ndiff, a tool that provides a service similar to the POSIX diff but allows for ignoring numerical differences below a user-specified error tolerance. @dtabell recommends using the ndiff implementation by Nelson Beebe of the University of Utah. I tried editing zgoubi's travis.sh script to download and build Beebe's ndiff, but ndiff's build system installs to /usr/local by default. The installation therefore necessitates sudo privileges. I think this means ndiff will need to be pre-installed in the docker image in order for it to be invoked by Travis-CI.

I also tried following the ndiff documentation to install to a different location, but that failed due to what appears to be some unusual and archaic design decisions in ndiff's build system -- namely the ndiff source archive contains a mkdir.sh script designed to work around the possibility that a system might not support mkdir -p. It appears that script is failing silently so the directory that make install expects to exist doesn't exist cp fails during installation.

robnagler commented 5 years ago

Let's avoid futzing with Docker right now. To install ndiff in your environment, do this:

./configure --prefix=$(pyenv prefix)
make install
rouson commented 5 years ago

@robnagler That gets things a little further but terminates with the following error:

/usr/bin/sh: line 3: /home/vagrant/.pyenv/versions/py2/man/man1/ndiff.1: No such file or directory
chmod: cannot access '/home/vagrant/.pyenv/versions/py2/man/man1/ndiff.1': No such file or directory
make: *** [Makefile:629: install-man] Error 1

I also tried adding --mandir=$(pyenv prefix), but that still results in the above error message.

rouson commented 5 years ago

@zbeekman gave me the idea to run ndiff from its build directory without installing it. That works!

robnagler commented 5 years ago

Could also:

mkdir -p $(pyenv which)/man/man1

or

make MANFILES= install

There doesn't appear to be a way to turn off installing doc directly from configure.