Opened 8 years ago

Closed 8 years ago

#37805 closed defect (invalid)

git-core compile missing framework includes

Reported by: chris+macports@… Owned by: ci42
Priority: Normal Milestone:
Component: base Version: 2.1.2
Keywords: Cc:
Port: git-core

Description (last modified by ryandesign (Ryan Schmidt))

on a 10.8.2 machine, after installing XQuartz 2.7.4, XCode 4.5.2 and MacPorts 2.1.2-10.8-MountainLion:

port install git-core

fails with this error in main.log:

:info:build /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -c -I. -Wall -O2 -I/opt/local/include -arch x86_64 git-credential-osxkeychain.c
:info:build git-credential-osxkeychain.c:4:10: fatal error: 'Security/Security.h' file not found
:info:build #include <Security/Security.h>
:info:build          ^
:info:build 1 error generated.

I managed to get it to build by linking various framework directories into /opt/local/include:

  sudo ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Security.framework/Versions/A/Headers Security 
  sudo ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/CoreFoundation.framework/Versions/A/Headers CoreFoundation

I doubt was the correct fix, but it worked, and resulted in a functional git.

Any idea what went wrong?

Attachments (1)

main.log (268.1 KB) - added by chris+macports@… 8 years ago.
main.log

Download all attachments as: .zip

Change History (6)

comment:1 Changed 8 years ago by ryandesign (Ryan Schmidt)

Description: modified (diff)
Keywords: frameworks removed
Milestone: MacPorts 2.1.3
Owner: changed from macports-tickets@… to ciserlohn@…

Please attach the main.log file.

Changed 8 years ago by chris+macports@…

Attachment: main.log added

main.log

comment:2 Changed 8 years ago by larryv (Lawrence Velázquez)

A couple of strange things, although I’m not sure either of them are relevant.

  • Your build uses /Applications/Xcode.app/Contents/…/usr/bin/clang throughout; it ought to be using /usr/bin/clang.
  • Actually, it shouldn’t be using either:
    :notice:configure --->  Configuring git-core
    :debug:configure Using compiler 'Mac OS X llvm-gcc 4.2'
    

comment:3 Changed 8 years ago by ryandesign (Ryan Schmidt)

Yeah that's odd. The port does not appear to specify the compiler in any way, which means it should be using the MacPorts default compiler, which is chosen based on the version of Xcode. The only versions of Xcode in which MacPorts choses llvm-gcc-4.2 as the default compiler are 4.0.x and 4.1.x, but the log says you're using OS X 10.8.x, on which the minimum supported Xcode version is 4.4.x.

What version of Xcode do you have? If less than 4.5.2, please update to 4.5.2 or later using the Mac App Store or Apple Developer Connection.

Are the command line tools installed and up to date? Open Xcode's Preferences window and go to the Downloads section. If there is an Install or Update button next to "Command Line Tools", click it.

comment:4 Changed 8 years ago by chris+macports@…

XCode 4.5.2, but I forgot to install the command line tools. Sorry for the noise.

comment:5 Changed 8 years ago by mf2k (Frank Schima)

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.