`libeditline` dependency causes installation from source to fail

Hello,

I am trying to install Nix from source following these directions: Building Nix from Source
Version 2.3.15, 2.3.16, or 2.4 will suffice.

I have installed these versions of editline from here: GitHub - troglobit/editline: A small replacement for GNU readline() for UNIX

  • 1.17.1
  • master

./configure says libeditline is too old:

configure: error: Nix requires libeditline;
it was not found via pkg-config, but via its header, but required functions do not work.
 Maybe it is too old? >= 1.14 is required.

Furthermore, the version of editline provided by MacPorts Install libedit on macOS with MacPorts
is not found at all:

configure: error: Nix requires libeditline;
 it was found neither via pkg-config nor its normal header.

Which version of editline or libedit should I install?

Thank you

Which version of editline or libedit should I install?

In Nixpkgs we use troglobit editline. It looks like you might have found a bug in Nix’s build system. Have you checked open issues for it? If there isn’t one, I think you should open one.

Are you setting CFLAGS=-I/opt/local/include and LDFLAGS=-L/opt/local/lib in your environment before running configure? Most things won’t check the MacPorts prefix by default, so one needs to point them to it.

Hosted by Flying Circus.