[cfe-dev] How to compile using Clang?

Michal Stefanow mstefanow at gmail.com
Sun Jul 15 09:02:10 PDT 2012


Just for future reference: the problem has been solved.

More details:
https://github.com/codebutler/firesheep/issues/169#issuecomment-6985466

In brief:
changing CFLAGS in configure.ac
CFLAGS = -isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk
-mmacosx-version-min=10.7

Works like a charm. I would say this a simple solution, something really
simple I initially expected to be :]

On 20 June 2012 19:33, Michal Stefanow <mstefanow at gmail.com> wrote:

> Thank you for suggestions!
>
> It actually helped someone else... And I'm still having same problems
>
> ls
> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/
> MacOSX10.6.sdk MacOSX10.7.sdk
>
> Essence:
> In file included from deps/http-parser/http_parser.c:21:
> deps/http-parser/http_parser.h:28:10: fatal error: 'sys/types.h' file not
> found
>
> Full output: http://pastebin.com/fa2AGjrC
>
> How to solve it?
> Thanks
> Michal
>
>
>
> On 9 May 2012 08:52, Csaba Raduly <rcsaba at gmail.com> wrote:
>
>> Hi Michaelm
>>
>> On Wed, May 9, 2012 at 2:41 AM, Michal Stefanow <mstefanow at gmail.com>
>> wrote:
>> > On 4 May 2012 08:19, Csaba Raduly <rcsaba at gmail.com> wrote:
>> >>
>> >> make CXXFLAGS=-v
>> >>
>> >> This will pass the -v flag to clang, causing it to print the
>> >> directories where headers are searched, among other things. Perhaps
>> >> this will help understand why the compiler doesn't find sys/types.h (I
>> >> suspect this option:  -isysroot /Developer/SDKs/MacOSX10.6.sdk).
>> >
>> >
>> > That is actually very good hint :)
>> >
>> > Here is full output: http://pastebin.com/HhVEVLTG
>> >
>> > Most important parts:
>>
>> Actually, you omitted some important parts :)
>>
>> ignoring nonexistent directory
>> "/Developer/SDKs/MacOSX10.6.sdk/usr/local/include"
>> ignoring nonexistent directory
>> "/Developer/SDKs/MacOSX10.6.sdk/usr/include"
>> ignoring nonexistent directory
>> "/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks"
>> ignoring nonexistent directory
>> "/Developer/SDKs/MacOSX10.6.sdk/Library/Frameworks"
>>
>> > #include "..." search starts here:
>> > #include <...> search starts here:
>> >  .
>> >  deps/
>> >  deps/http-parser
>> >  deps/json_spirit
>> >  /usr/bin/../lib/clang/3.1/include
>> > End of search list.
>> > In file included from deps/http-parser/http_parser.c:21:
>> > deps/http-parser/http_parser.h:28:10: fatal error: 'sys/types.h' file
>> not
>> > found
>> > #include <sys/types.h>
>> >
>>
>> >
>> > I haven't used makefiles for a while - can you help me solving this
>> > "puzzle"? :)
>>
>> Change the makefile to not pass the      -isysroot
>> /Developer/SDKs/MacOSX10.6.sdk         option to clang.
>> It's the CFLAGS line.
>>
>> Alternatively, install the Mac OSX 10.6 SDK into /Developer/SDKs
>>
>> --
>> GCS a+ e++ d- C++ ULS$ L+$ !E- W++ P+++$ w++$ tv+ b++ DI D++ 5++
>> The Tao of math: The numbers you can count are not the real numbers.
>> Life is complex, with real and imaginary parts.
>> "Ok, it boots. Which means it must be bug-free and perfect. " -- Linus
>> Torvalds
>> "People disagree with me. I just ignore them." -- Linus Torvalds
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20120715/4f5f1739/attachment.html>


More information about the cfe-dev mailing list