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

Ensure that OS X framework headers are in include path #2739

Merged
merged 1 commit into from Jul 27, 2015

Conversation

Projects
None yet
3 participants
@bgamari
Contributor

bgamari commented Jul 27, 2015

This fixes #2689.

@bgamari

This comment has been minimized.

Show comment
Hide comment
@bgamari

bgamari Jul 27, 2015

Contributor

I'm pretty sure this CI failure isn't due to me.

That being said, it's not entirely clear that cabal is the right place to handle this. Perhaps GHC should add these header paths itself (as is done with linking flags)?

Contributor

bgamari commented Jul 27, 2015

I'm pretty sure this CI failure isn't due to me.

That being said, it's not entirely clear that cabal is the right place to handle this. Perhaps GHC should add these header paths itself (as is done with linking flags)?

@23Skidoo

This comment has been minimized.

Show comment
Hide comment
@23Skidoo

23Skidoo Jul 27, 2015

Member

LGTM. The Travis failure was spurious, apparently.

Member

23Skidoo commented Jul 27, 2015

LGTM. The Travis failure was spurious, apparently.

23Skidoo added a commit that referenced this pull request Jul 27, 2015

Merge pull request #2739 from bgamari/osx-frameworks
Ensure that OS X framework headers are in include path

@23Skidoo 23Skidoo merged commit bd7bbd7 into haskell:master Jul 27, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@23Skidoo

This comment has been minimized.

Show comment
Hide comment
@23Skidoo

23Skidoo Jul 27, 2015

Member

Merged, thanks!

Member

23Skidoo commented Jul 27, 2015

Merged, thanks!

@mtolly

This comment has been minimized.

Show comment
Hide comment
@mtolly

mtolly Jul 29, 2015

Contributor

This does not appear to work for me (at least for my original use case); here's my steps:

  1. Clone phaazon/al@2f26970

  2. Edit al.cabal, remove the line:

    include-dirs: "/System/Library/Frameworks/OpenAL.framework/Headers/"
    
  3. cabal build, output:

    Package has never been configured. Configuring with default flags. If this
    fails, please run configure manually.
    Resolving dependencies...
    Configuring al-0.1.4...
    Building al-0.1.4...
    Preprocessing library al-0.1.4...
    dist/build/Sound/AL/Buffer.chs.h:2:10: fatal error: 'al.h' file not found
    #include <al.h>
         ^
    1 error generated.
    c2hs: Error during preprocessing custom header file
    

I notice that .framework isn't added to the directory. That is, the framework OpenAL's headers are at /System/Library/Frameworks/OpenAL.framework/Headers and I think this change is adding the incorrect /System/Library/Frameworks/OpenAL/Headers.

Also, the directory is not actually getting passed to c2hs. Here's the command from cabal build -v:

/Users/mtolly/.local/bin/c2hs '--cpp=/usr/bin/gcc' '--cppopts=-E' '--cppopts=-D__GLASGOW_HASKELL__=710' '--cppopts=-Ddarwin_BUILD_OS=1' '--cppopts=-Dx86_64_BUILD_ARCH=1' '--cppopts=-Ddarwin_HOST_OS=1' '--cppopts=-Dx86_64_HOST_ARCH=1' '--cppopts=-DCALLCV=ccall' '--cppopts=-includedist/build/autogen/cabal_macros.h' '--include=dist/build' '--cppopts=-I/Applications/ghc-7.10.1.app/Contents/lib/ghc-7.10.1/base_I5BErHzyOm07EBNpKBEeUv/include' '--cppopts=-I/Applications/ghc-7.10.1.app/Contents/lib/ghc-7.10.1/integ_2aU3IZNMF9a7mQ0OzsZ0dS/include' '--cppopts=-I/Applications/ghc-7.10.1.app/Contents/lib/ghc-7.10.1/include' '--output-dir=dist/build' '--output=Sound/AL/Defines.hs' src/Sound/AL/Defines.chs
Contributor

mtolly commented Jul 29, 2015

This does not appear to work for me (at least for my original use case); here's my steps:

  1. Clone phaazon/al@2f26970

  2. Edit al.cabal, remove the line:

    include-dirs: "/System/Library/Frameworks/OpenAL.framework/Headers/"
    
  3. cabal build, output:

    Package has never been configured. Configuring with default flags. If this
    fails, please run configure manually.
    Resolving dependencies...
    Configuring al-0.1.4...
    Building al-0.1.4...
    Preprocessing library al-0.1.4...
    dist/build/Sound/AL/Buffer.chs.h:2:10: fatal error: 'al.h' file not found
    #include <al.h>
         ^
    1 error generated.
    c2hs: Error during preprocessing custom header file
    

I notice that .framework isn't added to the directory. That is, the framework OpenAL's headers are at /System/Library/Frameworks/OpenAL.framework/Headers and I think this change is adding the incorrect /System/Library/Frameworks/OpenAL/Headers.

Also, the directory is not actually getting passed to c2hs. Here's the command from cabal build -v:

/Users/mtolly/.local/bin/c2hs '--cpp=/usr/bin/gcc' '--cppopts=-E' '--cppopts=-D__GLASGOW_HASKELL__=710' '--cppopts=-Ddarwin_BUILD_OS=1' '--cppopts=-Dx86_64_BUILD_ARCH=1' '--cppopts=-Ddarwin_HOST_OS=1' '--cppopts=-Dx86_64_HOST_ARCH=1' '--cppopts=-DCALLCV=ccall' '--cppopts=-includedist/build/autogen/cabal_macros.h' '--include=dist/build' '--cppopts=-I/Applications/ghc-7.10.1.app/Contents/lib/ghc-7.10.1/base_I5BErHzyOm07EBNpKBEeUv/include' '--cppopts=-I/Applications/ghc-7.10.1.app/Contents/lib/ghc-7.10.1/integ_2aU3IZNMF9a7mQ0OzsZ0dS/include' '--cppopts=-I/Applications/ghc-7.10.1.app/Contents/lib/ghc-7.10.1/include' '--output-dir=dist/build' '--output=Sound/AL/Defines.hs' src/Sound/AL/Defines.chs
@23Skidoo

This comment has been minimized.

Show comment
Hide comment
@23Skidoo

23Skidoo Jul 29, 2015

Member

@bgamari, can you look into this?

Member

23Skidoo commented Jul 29, 2015

@bgamari, can you look into this?

@bgamari

This comment has been minimized.

Show comment
Hide comment
@bgamari

bgamari Jul 29, 2015

Contributor

Arg, this is the trouble with not having a test environment.

@mtolly, thanks for your testing! Let me see what I can do on this.

@23Skidoo, sorry, I should have been more clear that the patch still needed testing. Moreover, I'm still not sure whether this logic belong in Cabal or GHC itself.

Contributor

bgamari commented Jul 29, 2015

Arg, this is the trouble with not having a test environment.

@mtolly, thanks for your testing! Let me see what I can do on this.

@23Skidoo, sorry, I should have been more clear that the patch still needed testing. Moreover, I'm still not sure whether this logic belong in Cabal or GHC itself.

@23Skidoo

This comment has been minimized.

Show comment
Hide comment
@23Skidoo

23Skidoo Jul 29, 2015

Member

@bgamari Do you want me to revert it?

Member

23Skidoo commented Jul 29, 2015

@bgamari Do you want me to revert it?

@bgamari

This comment has been minimized.

Show comment
Hide comment
@bgamari

bgamari Jul 29, 2015

Contributor

@23Skidoo it might be best to do so for now.

Contributor

bgamari commented Jul 29, 2015

@23Skidoo it might be best to do so for now.

23Skidoo added a commit that referenced this pull request Jul 29, 2015

Revert "Merge pull request #2739 from bgamari/osx-frameworks"
This reverts commit bd7bbd7, reversing
changes made to d8fa461.
@23Skidoo

This comment has been minimized.

Show comment
Hide comment
@23Skidoo

23Skidoo Jul 29, 2015

Member

@bgamari Reverted.

Member

23Skidoo commented Jul 29, 2015

@bgamari Reverted.

@mtolly

This comment has been minimized.

Show comment
Hide comment
@mtolly

mtolly Jul 31, 2015

Contributor

As noted in #2689 this is not necessary anymore.

Contributor

mtolly commented Jul 31, 2015

As noted in #2689 this is not necessary anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment