[lldb-dev] Build failure on OS X

Jason Molenda jason at molenda.com
Wed Nov 20 22:27:28 PST 2013


Yeah, I hit the same problem recently with Mavericks / Xcode 5.0.2.  I noticed that the Mac OS X 10.8 SDK in the Xcode.app bundle has the Python framework - the 10.9 SDK does not.  If I change the Base SDK setting to "OS X 10.8", lldb builds.  The diff for your project file after doing this will look something like

Index: lldb.xcodeproj/project.pbxproj
===================================================================
--- lldb.xcodeproj/project.pbxproj	(revision 195314)
+++ lldb.xcodeproj/project.pbxproj	(working copy)
@@ -4616,6 +4616,7 @@
 					"-flimit-debug-info",
 					"-Wparentheses",
 				);
+				SDKROOT = macosx10.8;
 				STRIP_INSTALLED_PRODUCT = NO;
 				STRIP_STYLE = debugging;
 				WARNING_CFLAGS = "-Wreorder";
@@ -4678,6 +4679,7 @@
 					"-flimit-debug-info",
 					"-Wparentheses",
 				);
+				SDKROOT = macosx10.8;
 				STRIP_INSTALLED_PRODUCT = NO;
 				STRIP_STYLE = debugging;
 				WARNING_CFLAGS = "-Wreorder";
@@ -5041,6 +5043,7 @@
 					"-flimit-debug-info",
 					"-Wparentheses",
 				);
+				SDKROOT = macosx10.8;
 				STRIP_INSTALLED_PRODUCT = NO;
 				STRIP_STYLE = debugging;
 				WARNING_CFLAGS = "-Wreorder";
@@ -5523,6 +5526,7 @@
 					"-flimit-debug-info",
 					"-Wparentheses",
 				);
+				SDKROOT = macosx10.8;
 				STRIP_INSTALLED_PRODUCT = NO;
 				STRIP_STYLE = debugging;
 				WARNING_CFLAGS = "-Wreorder";



I don't know if the Mac OS X 10.8 SDK is available by default when you install Xcode 5.0.2.  It might have been one of the optional downloads I installed via Xcode Preferences > Downloads.
 
On Nov 20, 2013, at 5:06 PM, Greg Clayton <gclayton at apple.com> wrote:

> Looks like the "No SDK (Latest OS X)" is the one you want and already have selected. Did you still have to make a symlink in order for this to build?
> 
> Greg
> 
> On Nov 20, 2013, at 4:10 PM, Jean-Daniel Dupas <devlists at shadowlab.org> wrote:
> 
>> I'm not sure what version of Xcode you are using, but on Xcode 5.0.2 on Maverick, the Base SDK menu give only me these options:
>> No "Current OS X" option appears, and when I select "No SDK", Xcode fallbacks to 10.9 SDK.
>> 
>> <Capture d’écran 2013-11-21 à 01.06.19.png>
>> 
>> Le 21 nov. 2013 à 00:58, Greg Clayton <gclayton at apple.com> a écrit :
>> 
>>> The "Base SDK" setting can be changed. Click on your Xcode project in the project navigator and be sure to click the "All" button at the top so you see all settings, not just the ones that are customized:
>>> 
>>> <Screen Shot 2013-11-20 at 3.57.19 PM.png>
>>> 
>>> But making a symlink for the Python.framework should work just as well.
>>> 
>>> Greg
>>> 
>>> 
>>> 
>>> On Nov 20, 2013, at 2:57 PM, Jean-Daniel Dupas <devlists at shadowlab.org> wrote:
>>> 
>>>> I hoped it would be so easy, but I don't have any Python.framework dir in the SDK, and in Xcode 5/Maverick, the default for no SDKROOT value is now latest OS X version, which result in 10.9 SDK and not in current system files.
>>>> 
>>>> I just checked with a new simple project and make sure there where no value for SDKROOT, and the compiler is invoked with:
>>>> 
>>>> -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk
>>>> 
>>>> And there is nothing like "Current OS X" in the SDKROOT build setting.
>>>> 
>>>> Even adding the framework to the project does not solve this issue.
>>>> 
>>>> Until I find a better solution, I will create a Python.framework symlink in my SDK.
>>>> 
>>>> Le 20 nov. 2013 à 22:01, Greg Clayton <gclayton at apple.com> a écrit :
>>>> 
>>>>> I believe if you select "Current MacOSX" instead of the 10.9 SDK, you should be able to build. Or you can remove the Python.framework that is in the SDK. I believe the problem is there is a Python.framework in the SDK, but it is empty (no headers). If you remote the empty Python.framework from the SDK, it should fall back to the installed version.
>>>>> 
>>>>> 
>>>>> On Nov 20, 2013, at 8:11 AM, Jean-Daniel Dupas <devlists at shadowlab.org> wrote:
>>>>> 
>>>>>> OK,
>>>>>> 
>>>>>> I finally try to build it too, and encounter the same issue. And the problem is in fact that the SDK sold with Xcode no longer provide the Python framework. 
>>>>>> 
>>>>>> See this tech note for details: https://developer.apple.com/library/mac/technotes/tn2328/_index.html
>>>>>> 
>>>>>> 
>>>>>> Le 20 nov. 2013 à 09:46, Clayden, Jonathan <j.clayden at ucl.ac.uk> a écrit :
>>>>>> 
>>>>>>> Jean-Daniel,
>>>>>>> 
>>>>>>> Thanks for the reply. I do, however, already have the command-line tools installed.
>>>>>>> 
>>>>>>> Regards,
>>>>>>> Jon
>>>>>>> 
>>>>>>> 
>>>>>>>> On 20 Nov 2013, at 08:42, "Jean-Daniel Dupas" <devlists at shadowlab.org> wrote:
>>>>>>>> 
>>>>>>>> 
>>>>>>>>> Le 19 nov. 2013 à 18:14, Clayden, Jonathan <j.clayden at ucl.ac.uk> a écrit :
>>>>>>>>> 
>>>>>>>>> Dear all,
>>>>>>>>> 
>>>>>>>>> I'm trying to build LLDB, and specifically the command line program, from the SVN trunk on OS X (10.9 + Xcode 5.0.2). The build instructions seem to suggest that this should be straightforward, but after selecting the "lldb-tool" scheme and starting the build as described, after a while I get a build failure with "'Python/Python.h' file not found', referring to the source file lldb-python.h.
>>>>>>>>> 
>>>>>>>>> I have installed Swig (via Homebrew), so as far as I know all dependencies should be met.
>>>>>>>>> 
>>>>>>>>> Apologies in advance if I've missed something obvious, but it's not clear to me how to proceed. Any help would be appreciated.
>>>>>>>>> 
>>>>>>>>> Regards,
>>>>>>>>> Jon
>>>>>>>> 
>>>>>>>> 
>>>>>>>> I didn't try yet to build it on Maverick, but do you have installed "command line tools" with Xcode ?
>>>>>>>> This kind of error appears when some tools try to use the default search path for header instead of using the SDK distributed with Xcode. 
>>>>>>>> The usual workaround is to install "command line tools" which provide these headers.
>>>>>>>> 
>>>>>>>> You can force installation of the "command line tools" by running the following in the terminal, and then choosing install in the dialog that appears.
>>>>>>>> 
>>>>>>>> xcode-select --install
>>>>>>>> 
>>>>>>>> Of course, a better solution would be to investigate and figure out what part of the build system relies on this header and fix it to properly use the Xcode SDK.
>>>>>>>> 
>>>>>>>> -- Jean-Daniel
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>> 
>>>>>> 
>>>>>> -- Jean-Daniel
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> _______________________________________________
>>>>>> lldb-dev mailing list
>>>>>> lldb-dev at cs.uiuc.edu
>>>>>> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev
>>>>> 
>>>> 
>>>> -- Jean-Daniel
>>>> 
>>>> 
>>>> 
>>>> 
>>> 
>> 
>> -- Jean-Daniel
> 
> 
> _______________________________________________
> lldb-dev mailing list
> lldb-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev





More information about the lldb-dev mailing list