nixfmt icon indicating copy to clipboard operation
nixfmt copied to clipboard

Error during build: "warning: non-portable path to file"

Open austinbutler opened this issue 5 years ago • 1 comments

Still seems to work fine, and in fact it seems it's really a warning, but Nix shows it as an error so it looks more concerning than it probably is.

Preprocessing executable 'nixfmt' for nixfmt-0.4.0..
Building executable 'nixfmt' for nixfmt-0.4.0..

<built-in>:16:10: error:
     warning: non-portable path to file '"dist/build/Nixfmt/autogen/cabal_macros.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path]
#include "dist/build/nixfmt/autogen/cabal_macros.h"
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         "dist/build/Nixfmt/autogen/cabal_macros.h"
1 warning generated.
[1 of 4] Compiling Paths_nixfmt     ( dist/build/nixfmt/autogen/Paths_nixfmt.hs, dist/build/nixfmt/nixfmt-tmp/Paths_nixfmt.o )
[2 of 4] Compiling System.IO.Atomic ( main/System/IO/Atomic.hs, dist/build/nixfmt/nixfmt-tmp/System/IO/Atomic.o )
[3 of 4] Compiling System.IO.Utf8   ( main/System/IO/Utf8.hs, dist/build/nixfmt/nixfmt-tmp/System/IO/Utf8.o )
[4 of 4] Compiling Main             ( main/Main.hs, dist/build/nixfmt/nixfmt-tmp/Main.o )

<built-in>:16:10: error:
     warning: non-portable path to file '"dist/build/Nixfmt/autogen/cabal_macros.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path]
#include "dist/build/nixfmt/autogen/cabal_macros.h"
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         "dist/build/Nixfmt/autogen/cabal_macros.h"
1 warning generated.
Linking dist/build/nixfmt/nixfmt ...
running tests
Package has no test suites.
haddockPhase
installing
Installing library in /nix/store/dz2azpxx2p4gr1ib95vc2myyl2284lib-nixfmt-0.4.0/lib/ghc-8.8.4/x86_64-osx-ghc-8.8.4/nixfmt-0.4.0-GcDvt8PY2Bn9nuCLZaF9x0
Installing executable nixfmt in /nix/store/dz2azpxx2p4gr1ib95vc2myyl2284lib-nixfmt-0.4.0/bin
Warning: The directory
/nix/store/dz2azpxx2p4gr1ib95vc2myyl2284lib-nixfmt-0.4.0/bin is not in the
system search path.
Registering library for nixfmt-0.4.0..
post-installation fixup
strip is /nix/store/qmxmk9l5ldy8zp50qaxmyv2r1sdfw7az-cctools-binutils-darwin-927.0.2/bin/strip
stripping (with command strip and flags -S) in /nix/store/dz2azpxx2p4gr1ib95vc2myyl2284lib-nixfmt-0.4.0/lib  /nix/store/dz2azpxx2p4gr1ib95vc2myyl2284lib-nixfmt-0.4.0/bin
patching script interpreter paths in /nix/store/dz2azpxx2p4gr1ib95vc2myyl2284lib-nixfmt-0.4.0

On macOS Catalina.

❯ nix-channel --list
home-manager https://github.com/rycee/home-manager/archive/master.tar.gz
nixpkgs https://nixos.org/channels/nixpkgs-unstable

austinbutler avatar Oct 16 '20 01:10 austinbutler

This is probably a bug in cabal. Nothing we can do about it.

Lucus16 avatar Mar 08 '22 22:03 Lucus16