Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build warnings on MacOS ("non-portable path to file") #511

Closed
brianhuffman opened this issue Jun 14, 2018 · 2 comments
Closed

Build warnings on MacOS ("non-portable path to file") #511

brianhuffman opened this issue Jun 14, 2018 · 2 comments
Milestone

Comments

@brianhuffman
Copy link
Contributor

Running make on MacOS yields a bunch of these warnings:

Building executable 'cryptol' for cryptol-2.5.0..

<built-in>:15:10: error:
     warning: non-portable path to file '"dist/build/Cryptol/autogen/cabal_macros.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path]
#include "dist/build/cryptol/autogen/cabal_macros.h"
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         "dist/build/Cryptol/autogen/cabal_macros.h"
1 warning generated.

The problem is that cabal tries to create the directory dist/build/Cryptol for the compiled modules, and also the directory dist/build/cryptol for binaries. On MacOS, dist/build/cryptol maps onto the existing dist/build/Cryptol, because they only differ by case. I'm using cabal version 2.2.0.0.

Apparently this is a known issue with cabal: haskell/cabal#4739

Perhaps we should adopt one of the workarounds listed in that thread.

@atomb
Copy link
Contributor

atomb commented Jul 27, 2018

I believe that migrating to cabal new-build would get rid of this problem. The current build is somewhat tightly tied to sandboxes, so I'm reluctant to change this in time for 2.6.0, but after that I think it would be very worthwhile to start using new-build in the Makefile.

We're already successfully using new-build on Travis, but we're not using Travis to build distribution tarballs. I think the main remaining step for using new-build for distributions is locating the generated executables. They're deep in the dist-newstyle directory, and I don't think Cabal makes any promises that their locations won't change from release to release.

@atomb atomb added this to the 2.8.0 milestone Apr 30, 2019
@atomb atomb modified the milestones: 2.8.0, 2.9.0 Aug 28, 2019
@brianhuffman
Copy link
Contributor Author

Using cabal new-build or cabal v2-build seems to fix the problem. So I think this ticket is now subsumed by #570.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants