Skip to content

Fix -Wnonportable-include-path workaround #382

@dan-zheng

Description

@dan-zheng

dex.cabal includes some ghc-options for working around a macOS build error reproducible in some environments: repro'd locally by @dan-zheng but not on the macOS CI machines.

Reproducer if all occurrences of -optP-Wno-nonportable-include-path are removed from dex.cabal:

$ make
...
Preprocessing foreign library 'Dex' for dex-0.1.0.0..
Building foreign library 'Dex' for dex-0.1.0.0..
[2 of 5] Compiling Dex.Foreign.Context [PPrint changed]
[3 of 5] Compiling Dex.Foreign.Serialize [Serialize changed]
[4 of 5] Compiling Dex.Foreign.JIT [Export changed]
[5 of 5] Compiling Dex.Foreign.API [Export changed]

/Users/danielzheng/dex-lang/<built-in>:2:10: error:
     warning: non-portable path to file '".stack-work/dist/x86_64-osx/Cabal-3.0.1.0/build/dex/autogen/cabal_macros.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path]
#include ".stack-work/dist/x86_64-osx/Cabal-3.0.1.0/build/Dex/autogen/cabal_macros.h"
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         ".stack-work/dist/x86_64-osx/Cabal-3.0.1.0/build/dex/autogen/cabal_macros.h"
1 warning generated.

We should get down to the bottom of this and find out what causes the error on macOS environments but not others.


Relevant workaround PRs: #378, #381

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingmaintenanceMaintenance tasks (build systems, CI, code cleanup, etc)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions