Skip to content

nix from git tries to write to system root at build time: cannot open output file /usr/lib/libnixutil.so: Permission denied #5184

@trofi

Description

@trofi

When building on a non-nixos for system-wide installation build system fails to write to /usr:

$ cd /tmp
$ git clone https://github.com/NixOS/nix.git
$ cd nix
$ ./bootstrap.sh
$ ./configure --prefix=/usr ac_cv_header_aws_s3_S3Client_h=no
$ make
...
$ LANG=C make
  LD     /usr/lib/libnixutil.so
/usr/lib/gcc/x86_64-pc-linux-gnu/12.0.0/../../../../x86_64-pc-linux-gnu/bin/ld: cannot open output file /usr/lib/libnixutil.so: Permission denied
collect2: error: ld returned 1 exit status
make: *** [mk/lib.mk:117: /usr/lib/libnixutil.so] Error 1

I think that is not expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions