[cfe-dev] How to compile using Clang?

Devchandra L Meetei dlmeetei at gmail.com
Thu May 3 01:52:37 PDT 2012


In Linux, I just did export CC=clang and export CXX=clang++
and It works great.
I am not sure on MaC OS but feel that it should work as both are UNIXs



On Thu, May 3, 2012 at 1:34 PM, Michal Stefanow <mstefanow at gmail.com> wrote:

> I'm having a problem with compiling. I've never used clang and I'm not
> sure how set up environment etc...
>
> ***
>
> Here is the makefile - http://pastebin.com/JqaB2GSh
>
> ***
>
> ./configure - http://pastebin.com/7Dw6Ybqi
>
> ***
>
> Trying to make:
> make
> Making all in backend
> /bin/sh ../libtool  --tag=CC   --mode=compile clang
> -DPACKAGE_NAME=\"Firesheep\" -DPACKAGE_TARNAME=\"firesheep\"
> -DPACKAGE_VERSION=\"0.1\" -DPACKAGE_STRING=\"Firesheep\ 0.1\"
> -DPACKAGE_BUGREPORT=\"eric at codebutler.com\" -DPACKAGE_URL=\"
> http://codebutler.github.com/firesheep\" -DPACKAGE=\"firesheep\"
> -DVERSION=\"0.1\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1
> -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1
> -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1
> -DLT_OBJDIR=\".libs/\" -DHAVE_BOOST=1 -DHAVE_BOOST_FORMAT_HPP=1
> -DHAVE_BOOST_ALGORITHM_STRING_HPP=1 -I. -I deps/ -I deps/http-parser -I
> deps/json_spirit    -isysroot /Developer/SDKs/MacOSX10.6.sdk
> -mmacosx-version-min=10.6 -Wall -g -O0 -DPLATFORM_OSX -arch i386 -arch
> x86_64   -MT libfiresheep_la-http_parser.lo -MD -MP -MF
> .deps/libfiresheep_la-http_parser.Tpo -c -o libfiresheep_la-http_parser.lo
> `test -f 'deps/http-parser/http_parser.c' || echo
> './'`deps/http-parser/http_parser.c
> libtool: compile:  clang -DPACKAGE_NAME=\"Firesheep\"
> -DPACKAGE_TARNAME=\"firesheep\" -DPACKAGE_VERSION=\"0.1\"
> "-DPACKAGE_STRING=\"Firesheep 0.1\"" -DPACKAGE_BUGREPORT=\"
> eric at codebutler.com\" -DPACKAGE_URL=\"
> http://codebutler.github.com/firesheep\" -DPACKAGE=\"firesheep\"
> -DVERSION=\"0.1\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1
> -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1
> -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1
> -DLT_OBJDIR=\".libs/\" -DHAVE_BOOST=1 -DHAVE_BOOST_FORMAT_HPP=1
> -DHAVE_BOOST_ALGORITHM_STRING_HPP=1 -I. -I deps/ -I deps/http-parser -I
> deps/json_spirit -isysroot /Developer/SDKs/MacOSX10.6.sdk
> -mmacosx-version-min=10.6 -Wall -g -O0 -DPLATFORM_OSX -arch i386 -arch
> x86_64 -MT libfiresheep_la-http_parser.lo -MD -MP -MF
> .deps/libfiresheep_la-http_parser.Tpo -c deps/http-parser/http_parser.c
>  -fno-common -DPIC -o .libs/libfiresheep_la-http_parser.o
> 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>
>          ^
> 1 error generated.
> make[1]: *** [libfiresheep_la-http_parser.lo] Error 1
> make: *** [all-recursive] Error 1
>
> ***
>
> cat /usr/include/sys/types.h - http://pastebin.com/ke59jmfq
>
> ***
>
> clang --version
> Apple clang version 3.1 (tags/Apple/clang-318.0.58) (based on LLVM 3.1svn)
> Target: x86_64-apple-darwin11.3.0
> Thread model: posix
>
> ***
>
> I have never been proficient in solving includes and compiling
> dependecies, simple Google search search in this case neither... Probably
> this a matter of setting one flag or another. Any hints?
>
> Thanks in advance
> Michal Stefanow
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20120503/7f672cba/attachment.html>


More information about the cfe-dev mailing list