Re: How to compile with --enable-nanorc?

Benno Schulenberg <[email protected]> Thu, 5 Dec 2019 13:53:36 +0100
Newsgroups gmane.editors.nano.general
Message-ID <[email protected]>
[In case you reply, then please only to the list.]

Op 04-12-2019 om 22:26 schreef flomanstrategy:
> Hello, I compiled nano (v 2.9 bcause it's not available on debian stretch)

Version 2.9 does not exist.  Do you mean 2.9.0?  But when you are
compiling from source, why not the latest version, 4.6?

> and by
> default nanorc is not read which was very surprising.
> 
> So I tried to fix it by recompiling like that:
> ./configure --enable-nanorc --enable-color --enable-multibuffer --sysconfdir=/etc
> --prefix=/usr

All the --enable... things are the default, so you can leave them out.
The --sysconfdir=/etc is the default too, I think.  Anyway, it should
not be needed, so better leave it out.  The only configure option that
you need is --prefix=/usr (if you want to overwrite the system-installed
nano instead of having an additional, locally installed nano).

> make
> make install

I suppose you use 'sudo' before that last command?  Or are you building
nano while being root?

> Also tried other variants, but the result is that /etc/nanorc is never read
> 
> strace -fe trace=open nano /etc/nanorc

Which nano is this running?  You can find out with 'which nano',
or with 'type - nano'.

Anyway, it's better to run strace without any options, so you get a
full log and can grep the result for various strings.  I would do the
following:

  strace nano README  2>TRAIL; grep access TRAIL | grep nanorc | less

This will show where nano is looking for its rc files -- because nano will
first probe for the places where rc files might be; it will not simply try
and open them right away.

Did you maybe compile and install nano at first without the --prefix=/usr
option?  If yes, then you need to configure it again without that option
and run 'make uninstall', to get rid of the nano in /usr/local/bin/.

Benno
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEv9AJBh5TUFKtDfIVDSjU0qCs6IQFAl3o/dgACgkQDSjU0qCs
6IQF6Q/9FDE+GjoCo1Ifa26DXBidtsH1crkD6lg7bkKec0EsF0CDqsKg6xZPYqwr
k7EE7gWtKrWLbUQiBzdSs4nYY4fb62PnpM8QN/1HR3zVh1S/ukrYZeaqbBPuOIZS
aT291eEYeJKMyruAPpI8CZ2dIcqqXyaShHs/izyltR9Nf0GSTMPuwLv6rQuiq9Ur
FoHeb72UYtKwFWZFdU3bYy9NY5SYrVQxkNYA5TPspgubPqsLtOJuuzV4QUlT4hRd
i38VJSnYOj7SSbfYw7lgMe451/OyKwNfQHIrKhGzXR3PcgJfXibSYg2WmrWW/WQI
DkB/ZEb7wZskA/fCv4uFkLvd+Wk72K93w8VRevZZd3bm+tUuFqMFOpND2IkXqvAL
YZY2luKRUEOIL3FCAZ/pn/Gq9q/lMAJcdNIvaDTO43H1LS8F35NZjQ2SLDzwZUxi
XM0WT4IxCd1CHhX03nFI9wph5qrakomPf8bbpU+LgZIja9DdEChUvMIRbgzD0Lga
wpx6z8034Yrb60cAlB1Kfh6mTL0UcF6d1fUmY95rNb+eMmPdgp/xuQ+ZBjm4m9+9
FouD0b0KUNtBqcom9KkYn7HWvU1KRz+lShs3G6trA9OZpHsEfONsD5bzIOhWzXEc
1ur2WMl1qVzH9cIK2ZV7JPYWxpP27HwQPfNFHVYHDoRtZvm/KT8=
=sqM4
-----END PGP SIGNATURE-----