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

gcc on mojave miss the system includes to /usr/local/include #35181

Closed
6 tasks done
howard0su opened this issue Dec 17, 2018 · 5 comments
Closed
6 tasks done

gcc on mojave miss the system includes to /usr/local/include #35181

howard0su opened this issue Dec 17, 2018 · 5 comments
Labels
outdated PR was locked due to age

Comments

@howard0su
Copy link

howard0su commented Dec 17, 2018

  • are reporting a bug others will be able to reproduce and not asking a question. If you're not sure or want to ask a question do so on our Discourse: https://discourse.brew.sh
  • have a problem with brew install (or upgrade, reinstall) a single, official formula (not cask)? If it's a general brew problem please file this issue at Homebrew/brew: https://github.com/Homebrew/brew/issues/new/choose. If it's a brew cask problem please file this issue at https://github.com/Homebrew/homebrew-cask/issues/new/choose. If it's a tap (e.g. Homebrew/homebrew-php) problem please file this issue at the tap.
  • ran brew update and can still reproduce the problem?
  • ran brew doctor, fixed all issues and can still reproduce the problem?
    MacBook-Air:src howardsu$ brew doctor
    Please note that these warnings are just used to help the Homebrew maintainers
    with debugging if you file an issue. If everything you use Homebrew for is
    working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: You have external commands with conflicting names.
Found command brew-aspell-dictionaries in following places:
/usr/local/Homebrew/Library/Taps/gtdmmb/homebrew-core/cmd/brew-aspell-dictionaries.rb
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/cmd/brew-aspell-dictionaries.rb
Found command brew-postgresql-upgrade-database in following places:
/usr/local/Homebrew/Library/Taps/gtdmmb/homebrew-core/cmd/brew-postgresql-upgrade-database.rb
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/cmd/brew-postgresql-upgrade-database.rb

  • ran brew gist-logs <formula> (where <formula> is the name of the formula that failed) and included the output link?
  • if brew gist-logs didn't work: ran brew config and brew doctor and included their output with your issue?

MacBook-Air:pages howardsu$ brew config
HOMEBREW_VERSION: 1.8.5
ORIGIN: https://github.com/Homebrew/brew
HEAD: 38493a3
Last commit: 10 days ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 497ca90
Core tap last commit: 10 hours ago
HOMEBREW_PREFIX: /usr/local
CPU: quad-core 64-bit sandybridge
Homebrew Ruby: 2.3.7 => /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby
Clang: 10.0 build 1000
Git: 2.20.1 => /usr/local/bin/git
Curl: 7.54.0 => /usr/bin/curl
Java: 1.7.0_71
macOS: 10.14.2-x86_64
CLT: 10.1.0.0.1.1539992718
Xcode: N/A
XQuartz: 2.7.11 => /opt/X11

To help us debug your issue please explain:

  • What you were trying to do (and why)
    Compile code under gcc with some local installed brew package. The issue is the new compiler doesn't include /usr/local/include as a system include folder.

  • What happened (include command output)
    target/common/emu/fltk.cpp:28:10: fatal error: FL/Fl.H: No such file or directory
    #include <FL/Fl.H>
    ^~~~~~~~~
    compilation terminated.

  • What you expected to happen
    successfully compile the code

  • Step-by-step reproduction instructions (by running brew install commands)
    brew install gcc
    brew install fltk
    compile the following code:
    // a.c
    #include <FL/Fl.H>

void main() { return; }

@MikeMcQuaid
Copy link
Member

  • ran brew config and brew doctor and included their output with your issue?

@howard0su Please provide this output.

CC @fxcoudert for clarification on the expected behaviour here.

@howard0su
Copy link
Author

provided all details.

@fxcoudert
Copy link
Member

fxcoudert commented Dec 17, 2018

clang header search path on Mojave is:

 /usr/local/include
 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/10.0.0/include
 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include
 /usr/include
 /System/Library/Frameworks (framework directory)
 /Library/Frameworks (framework directory)

Homebrew's GCC 8 is:

 /usr/local/Cellar/gcc/8.2.0/lib/gcc/8/gcc/x86_64-apple-darwin18.0.0/8.2.0/include
 /usr/local/Cellar/gcc/8.2.0/lib/gcc/8/gcc/x86_64-apple-darwin18.0.0/8.2.0/include-fixed
 /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include
 /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks

so I feel like this is "sort of" a bug.

It tries to look up /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/local/include, but this directory does not exist. We could try to configure GCC with --with-local-prefix, but I am not sure if this plays well with our use of --with-sysroot or not.

@MikeMcQuaid
Copy link
Member

so I feel like this is "sort of" a bug.
We could try to configure GCC with --with-local-prefix

@fxcoudert Feel free to close out or open/request a PR; your call.

@MikeMcQuaid
Copy link
Member

@fxcoudert Oh, and: thanks! ❤️

@lock lock bot added the outdated PR was locked due to age label Feb 20, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Feb 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

No branches or pull requests

3 participants