Help! Trying to install nmh on ubuntu

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Help! Trying to install nmh on ubuntu

Norman Shapiro-3
Here is the result of sb_release -a:

  Distributor ID: Ubuntu
  Description: Ubuntu 18.04.3 LTS
  Release: 18.04
  Codename: bionic
  No LSB modules are available.


I have given up trying to install nmh from a package, deciding instead
to install from the sources. But

  ./configure  --prefix=/usr/local/nmh-1.7.1ubuntu/

fails.

I will attach config.log.

Thank you, as they say, in advance.

    Norman Shapiro

config.log (99K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Help! Trying to install nmh on ubuntu

Jay Vosburgh
[hidden email] wrote:

>Here is the result of sb_release -a:
>
>  Distributor ID: Ubuntu
>  Description: Ubuntu 18.04.3 LTS
>  Release: 18.04
>  Codename: bionic
>  No LSB modules are available.

        There is an NMH package available in the standard Ubuntu
repositories, "sudo apt install nmh" should install it.  I've used it
for years without issue.

>I have given up trying to install nmh from a package, deciding instead
>to install from the sources. But
>
>  ./configure  --prefix=/usr/local/nmh-1.7.1ubuntu/
>
>fails.
>
>I will attach config.log.

        Looking at the config.log, it appears that <curses.h> is
missing, that comes from the libncurses5-dev package (so, "sudo apt
install libncurses5-dev").  You could also try installing the build
dependencies for nmh, something like "sudo apt-get build-dep nmh".

        Building nmh from source might also need to run ./autogen.sh
before ./configure, as well.  I just tried this against the current git
repository on Ubuntu 18.04 and it worked fine for me.

        -J

---
        -Jay Vosburgh, [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Help! Trying to install nmh on ubuntu

Ken Hornstein-2
In reply to this post by Norman Shapiro-3
>  ./configure  --prefix=/usr/local/nmh-1.7.1ubuntu/
>
>fails.
>
>I will attach config.log.

It looks like ... you need to install a package that contains curses.h.
Maybe runnig "apt-file search curses.h" will tell you which package that is?

--Ken

Reply | Threaded
Open this post in threaded view
|

Re: Help! Trying to install nmh on ubuntu

Ralph Corderoy
Hi Norm,

Ken wrote:
> >   ./configure  --prefix=/usr/local/nmh-1.7.1ubuntu/
> >
> > fails.
>
> It looks like ... you need to install a package that contains curses.h.
> Maybe runnig "apt-file search curses.h" will tell you which package
> that is?

There's also a web interface that Ubuntu provide to search packages for
files with a particular name in a given Ubuntu release.

https://packages.ubuntu.com/search?searchon=contents&keywords=curses.h&mode=exactfilename&suite=disco&arch=any
is an example, starting from https://packages.ubuntu.com/

--
Cheers, Ralph.

Reply | Threaded
Open this post in threaded view
|

Re: Help! Trying to install nmh on ubuntu

Ken Hornstein-2
In reply to this post by Jay Vosburgh
> Building nmh from source might also need to run ./autogen.sh
>before ./configure, as well.  I just tried this against the current git
>repository on Ubuntu 18.04 and it worked fine for me.

That's only required if you build from the repository; if you're building
from a distribution tar file, that isn't necessary (you also need to have
flex and bison to build from the repository).

--Ken

Reply | Threaded
Open this post in threaded view
|

Re: Help! Trying to install nmh on ubuntu

Ralph Corderoy
In reply to this post by Jay Vosburgh
Hi Jay,

>     There is an NMH package available in the standard Ubuntu
> repositories, "sudo apt install nmh" should install it.  I've used it
> for years without issue.

Yes, but from an earlier thread I think Norm has vestiges of old nmh
installs hanging around and the package version is picking up bits from
those.  So it seems like he's hoping building from source will avoid
that, perhaps by replacing the leftovers from earlier ones.
https://lists.nongnu.org/archive/html/nmh-workers/2019-10/msg00023.html

--
Cheers, Ralph.

Reply | Threaded
Open this post in threaded view
|

Re: Help! Trying to install nmh on ubuntu

Ralph Corderoy
In reply to this post by Norman Shapiro-3
Hi Norm,

Here's what I did to build nmh-1.7.1.tar.gz on Ubuntu 18.04.

In short, install these packages to improve the chance of success.

    sudo apt-get install \
        libncurses5-dev \
        libreadline-dev \
        libgdbm-compat-dev \
        libgdbm-dev \
        libcurl4-openssl-dev \
        libsasl2-dev \
        libssl-dev

>   Release: 18.04
>   Codename: bionic
...
> I have given up trying to install nmh from a package, deciding instead
> to install from the sources.

That might mean either installing from a git clone, or a
nmh-1.7.1.tar.gz.

Either way, the INSTALL file covers what to do next.  Before starting at
step 0 for a git clone, or step 1 for the tar file, it says to check the
MACHINES file for OS-specific instructions.

MACHINES says for Linux that a bunch of packages are required to run,
build, and test nmh.  However, I found none of those exist on
Ubuntu 18.04!

On running ./configure with nmh-1.7.1.tar.gz I get the same error that
you suffer.  To find packages that provide a file called curses.h I did

    $ apt-file find -x '/curses\.h$'
    libncurses5-dev: /usr/include/curses.h
    libncursesw5-dev: /usr/include/ncursesw/curses.h
    $

Examining config.log shows that the #include is

    #include <curses.h>

Given there's no mention of ‘ncursesw’ there I went with the other
option and installed libncurses5-dev.

Next ./configure failure:

    checking for dbm in ndbm.h... no
    checking for dbm in db.h and db... no
    checking for dbm in ndbm.h and db... no
    checking for dbm in ndbm.h and db1... no
    checking for dbm in ndbm.h and ndbm... no
    checking for dbm in db1/ndbm.h and db1... no
    checking for dbm in gdbm/ndbm.h and gdbm... no
    checking for dbm in gdbm/ndbm.h and gdbm_compat -lgdbm... no
    checking for dbm in ndbm.h and gdbm... no
    checking for dbm in ndbm.h and gdbm_compat -lgdbm... no
    checking for dbm in gdbm-ndbm.h and gdbm_compat... no
    configure: error: could not find a working ndbm library/header combination

Searching for the error:

    $ grep 'fatal error' config.log
    ...
    conftest.c:45:10: fatal error: ndbm.h: No such file or directory
    conftest.c:45:10: fatal error: db.h: No such file or directory
    conftest.c:45:10: fatal error: ndbm.h: No such file or directory
    conftest.c:45:10: fatal error: ndbm.h: No such file or directory
    conftest.c:45:10: fatal error: ndbm.h: No such file or directory
    conftest.c:45:10: fatal error: db1/ndbm.h: No such file or directory
    conftest.c:45:10: fatal error: gdbm/ndbm.h: No such file or directory
    conftest.c:45:10: fatal error: gdbm/ndbm.h: No such file or directory
    conftest.c:45:10: fatal error: ndbm.h: No such file or directory
    conftest.c:45:10: fatal error: ndbm.h: No such file or directory
    conftest.c:45:10: fatal error: gdbm-ndbm.h: No such file or directory
    $

    $ apt-file find -x 'ndbm\.h$'
    freebsd-glue: /usr/include/freebsd/ndbm.h
    libace-dev: /usr/include/ace/os_include/os_ndbm.h
    libgdbm-compat-dev: /usr/include/gdbm-ndbm.h
    libgdbm-compat-dev: /usr/include/ndbm.h
    libsingular4-dev-common: /usr/include/singular/singular/Singular/links/ndbm.h
    $

libgdbm-compat-dev looks the best bet, providing two of the alternatives
sought.  Installed that.  ./configure still fails the same as before,
but config.log has

    /usr/include/ndbm.h:28:10: fatal error: gdbm.h: No such file or directory
     #include <gdbm.h>

Another search:

    $ apt-file find -x '/gdbm\.h$'
    libgdbm-dev: /usr/include/gdbm.h
    $

Installed libgdbm-dev.  ./configure now succeeds, but at the end shows
support for some parts is disabled.

    nmh configuration
    -----------------
    nmh version                : 1.7.1
    host os                    : x86_64-unknown-linux-gnu
    compiler                   : cc
    compiler flags             :  -g -O2 -Wall -Wextra
    linker flags               :  
    preprocessor flags         : -D_GNU_SOURCE
    source code location       : .
    binary install path        : /usr/local/nmh/bin
    libexec install path       : /usr/local/nmh/libexec/nmh
    config files install path  : /usr/local/nmh/etc/nmh
    man page install path      : /usr/local/nmh/share/man
    docs install path          : /usr/local/nmh/share/doc/nmh
    RPM build root             : ./RPM
    backup prefix              : ,
    transport system           : smtp
    spool default locking type : fcntl
    default smtp server        : localhost
  → SASL support               : no
  → TLS support                : no
  → OAuth support              : no

Give up.  Obtain source of Ubuntu's package.

    $ apt-get source nmh

See what packages it wants.

    $ grep -i depends nmh-1.7.1~RC3/debian/control
    Build-Depends: debhelper (>= 9.0.0), dh-strip-nondeterminism, dh-autoreconf, libncurses5-dev, liblockfile-dev (>= 1.01), libsasl2-dev, libdb-dev, flex, libfl-dev, libssl-dev, libcurl4-openssl-dev
    Depends: ${shlibs:Depends}, netbase (>= 3.16-1), ${misc:Depends}, mime-support
    $

Install the SSL-related ones.

    sudo apt-get install libsasl2-dev libssl-dev libcurl4-openssl-dev

Re-run ./configure.  It ends with

    nmh configuration
    -----------------
    nmh version                : 1.7.1
    host os                    : x86_64-unknown-linux-gnu
    compiler                   : cc
    compiler flags             :  -g -O2 -Wall -Wextra
    linker flags               :  
    preprocessor flags         : -D_GNU_SOURCE
    source code location       : .
    binary install path        : /usr/local/nmh/bin
    libexec install path       : /usr/local/nmh/libexec/nmh
    config files install path  : /usr/local/nmh/etc/nmh
    man page install path      : /usr/local/nmh/share/man
    docs install path          : /usr/local/nmh/share/doc/nmh
    RPM build root             : ./RPM
    backup prefix              : ,
    transport system           : smtp
    spool default locking type : fcntl
    default smtp server        : localhost
    SASL support               : yes
    TLS support                : yes
    OAuth support              : yes

Ran ‘make all check’; that succeeded.

But ‘ldd uip/whatnow’ didn't suggest readline support.  (Shouldn't this
be listed in the above table?)  Confirmed with

    $ grep -i readline config.h
    /* Support for using readline() in whatnow */
    /* #undef READLINE_SUPPORT */
    $

Installed libreadline-dev.  Re-ran ‘./configure && make all check’.
Still passed.  whatnow now uses readline.

    $ ldd uip/whatnow
            linux-vdso.so.1 (0x00007ffe3cbcf000)
  →         libreadline.so.7 => /lib/x86_64-linux-gnu/libreadline.so.7 (0x00007f9e77a0b000)
            libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5 (0x00007f9e777e1000)
            libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f9e773f0000)
            /lib64/ld-linux-x86-64.so.2 (0x00007f9e77eb3000)
    $

--
Cheers, Ralph.

Reply | Threaded
Open this post in threaded view
|

Re: Help! Trying to install nmh on ubuntu

Norman Shapiro-3
All that seems to have worked find, except that 'make check' complained
a couple of times about not having a text editor. In fact I am generating
and will be sending this message, using nmh, from the ubuntu computer.

Ralph Corderoy <[hidden email]> writes:

>Hi Norm,
>
>Here's what I did to build nmh-1.7.1.tar.gz on Ubuntu 18.04.
>
>In short, install these packages to improve the chance of success.
>
>sudo apt-get install \
>libncurses5-dev \
>libreadline-dev \
>libgdbm-compat-dev \
>libgdbm-dev \
>libcurl4-openssl-dev \
>libsasl2-dev \
>libssl-dev
>
>>   Release: 18.04
>>   Codename: bionic
>...
>> I have given up trying to install nmh from a package, deciding instead
>> to install from the sources.
>
>That might mean either installing from a git clone, or a
>nmh-1.7.1.tar.gz.
>
>Either way, the INSTALL file covers what to do next.  Before starting at
>step 0 for a git clone, or step 1 for the tar file, it says to check the
>MACHINES file for OS-specific instructions.
>
>MACHINES says for Linux that a bunch of packages are required to run,
>build, and test nmh.  However, I found none of those exist on
>Ubuntu 18.04!
>
>On running ./configure with nmh-1.7.1.tar.gz I get the same error that
>you suffer.  To find packages that provide a file called curses.h I did
>
>$ apt-file find -x '/curses\.h$'
>libncurses5-dev: /usr/include/curses.h
>libncursesw5-dev: /usr/include/ncursesw/curses.h
>$
>
>Examining config.log shows that the #include is
>
>#include <curses.h>
>
>Given there's no mention of ‘ncursesw’ there I went with the other
>option and installed libncurses5-dev.
>
>Next ./configure failure:
>
>checking for dbm in ndbm.h... no
>checking for dbm in db.h and db... no
>checking for dbm in ndbm.h and db... no
>checking for dbm in ndbm.h and db1... no
>checking for dbm in ndbm.h and ndbm... no
>checking for dbm in db1/ndbm.h and db1... no
>checking for dbm in gdbm/ndbm.h and gdbm... no
>checking for dbm in gdbm/ndbm.h and gdbm_compat -lgdbm... no
>checking for dbm in ndbm.h and gdbm... no
>checking for dbm in ndbm.h and gdbm_compat -lgdbm... no
>checking for dbm in gdbm-ndbm.h and gdbm_compat... no
>configure: error: could not find a working ndbm library/header combination
>
>Searching for the error:
>
>$ grep 'fatal error' config.log
>...
>conftest.c:45:10: fatal error: ndbm.h: No such file or directory
>conftest.c:45:10: fatal error: db.h: No such file or directory
>conftest.c:45:10: fatal error: ndbm.h: No such file or directory
>conftest.c:45:10: fatal error: ndbm.h: No such file or directory
>conftest.c:45:10: fatal error: ndbm.h: No such file or directory
>conftest.c:45:10: fatal error: db1/ndbm.h: No such file or directory
>conftest.c:45:10: fatal error: gdbm/ndbm.h: No such file or directory
>conftest.c:45:10: fatal error: gdbm/ndbm.h: No such file or directory
>conftest.c:45:10: fatal error: ndbm.h: No such file or directory
>conftest.c:45:10: fatal error: ndbm.h: No such file or directory
>conftest.c:45:10: fatal error: gdbm-ndbm.h: No such file or directory
>$
>
>$ apt-file find -x 'ndbm\.h$'
>freebsd-glue: /usr/include/freebsd/ndbm.h
>libace-dev: /usr/include/ace/os_include/os_ndbm.h
linux-vdso.so.1 (0x00007ffe3cbcf000)
>→         libreadline.so.7 => /lib/x86_64-linux-gnu/libreadline.so.7 (0x00007f9e77a0b000)
>libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5 (0x00007f9e777e1000)
>libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f9e773f0000)
>/lib64/ld-linux-x86-64.so.2 (0x00007f9e77eb3000)
>$
>
>--
>Cheers, Ralph.

    Norman Shapiro