Can't build CLang with CLang on FreeBSD

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Can't build CLang with CLang on FreeBSD

Jay Sullivan
When I try to build clang with clang, I get an error when building
Alarm.cpp. When I compile with profiling, I'm seeing the error "clang:
warning: the clang compiler does not support '-pg' ".  The build then
fails in the same place (Alarm.cpp) whether I use Debug and/or
Release, with or without profiling.  My operating system is FreeBSD
7.0-RELEASE.   The clang I'm using was built with gcc4.2.1 (admittedly
I'm not sure if that matters).

---- Here's some info about my PC ----

$ uname -a
FreeBSD dell.petio.org 7.0-RELEASE FreeBSD 7.0-RELEASE #2: Tue Dec 23
01:38:59 EST 2008     [hidden email]:/usr/obj/usr/src/sys/DELL
i386

$ dmesg | head -n 20
Copyright (c) 1992-2008 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
        The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 7.0-RELEASE #2: Tue Dec 23 01:38:59 EST 2008
    [hidden email]:/usr/obj/usr/src/sys/DELL
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: Intel(R) Pentium(R) 4 CPU 2.66GHz (2657.83-MHz 686-class CPU)
  Origin = "GenuineIntel"  Id = 0xf29  Stepping = 9
  Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
  Features2=0x4400<CNXT-ID,xTPR>
real memory  = 259473408 (247 MB)
avail memory = 244158464 (232 MB)

----Here's the version info for the compilers:----

$ gcc -v
  Using built-in specs.
  Target: i386-undermydesk-freebsd
  Configured with: FreeBSD/i386 system compiler
  Thread model: posix
  gcc version 4.2.1 20070719  [FreeBSD]

$ g++ -v
  Using built-in specs.
  Target: i386-undermydesk-freebsd
  Configured with: FreeBSD/i386 system compiler
  Thread model: posix
  gcc version 4.2.1 20070719  [FreeBSD]

$ clang -v
  clang version 1.5 (trunk 101372)
  Target: i386-unknown-freebsd7.0
  Thread model: posix

$ clang++ -v
  clang version 1.5 (trunk 101372)
  Target: i386-unknown-freebsd7.0
  Thread model: posix

----Here's the outputs for the builds:----

Debug (build fails)
    $ env CC=clang CXX=clang++ ./configure --enable-profiling
        Output: http://petio.org/2010/04/16/clang_debug_configure
    $ gmake VERBOSE=1
        Output: http://petio.org/2010/04/16/clang_debug_make

Debug+Profile (build fails)
    $ env CC=clang CXX=clang++ ./configure --enable-profiling
        Output: http://petio.org/2010/04/16/clang_debug_profile_configure
    $ gmake VERBOSE=1
        Output: http://petio.org/2010/04/16/clang_debug_profile_make

Release (build fails)
    $ env CC=clang CXX=clang++ ./configure --enable-optimized --enable-profiling
        Output: http://petio.org/2010/04/16/clang_release_configure
    $ gmake VERBOSE=1
        Output: http://petio.org/2010/04/16/clang_release_make

Release+Profile (build fails)
    $ env CC=clang CXX=clang++ ./configure --enable-optimized --enable-profiling
        Output: http://petio.org/2010/04/16/clang_release_profile_configure
    $ gmake VERBOSE=1
        Output: http://petio.org/2010/04/16/clang_release_profile_make

--
Jay Sullivan
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Can't build CLang with CLang on FreeBSD

Jay Sullivan
> ----Here's the outputs for the builds:----
>
> Debug (build fails)
>    $ env CC=clang CXX=clang++ ./configure --enable-profiling
>        Output: http://petio.org/2010/04/16/clang_debug_configure
>    $ gmake VERBOSE=1
>        Output: http://petio.org/2010/04/16/clang_debug_make
>
> Debug+Profile (build fails)
>    $ env CC=clang CXX=clang++ ./configure --enable-profiling
>        Output: http://petio.org/2010/04/16/clang_debug_profile_configure
>    $ gmake VERBOSE=1
>        Output: http://petio.org/2010/04/16/clang_debug_profile_make
>
> Release (build fails)
>    $ env CC=clang CXX=clang++ ./configure --enable-optimized --enable-profiling
>        Output: http://petio.org/2010/04/16/clang_release_configure
>    $ gmake VERBOSE=1
>        Output: http://petio.org/2010/04/16/clang_release_make
>
> Release+Profile (build fails)
>    $ env CC=clang CXX=clang++ ./configure --enable-optimized --enable-profiling
>        Output: http://petio.org/2010/04/16/clang_release_profile_configure
>    $ gmake VERBOSE=1
>        Output: http://petio.org/2010/04/16/clang_release_profile_make
>
> --
> Jay Sullivan
>

Oops, I got the options wrong. I meant to say :

Debug (build fails)
$ env CC=clang CXX=clang++ ./configure

Debug+Profile (build fails)
$ env CC=clang CXX=clang++ ./configure --enable-profiling

Release (build fails)
$ env CC=clang CXX=clang++ ./configure --enable-optimized

Release+Profile (build fails)
$ env CC=clang CXX=clang++ ./configure --enable-optimized --enable-profiling

The output logs are still correct; I just made a typo in the email.

--
Jay Sullivan

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Can't build CLang with CLang on FreeBSD

Jay Sullivan
> When I try to build clang with clang, I get an error when building
> Alarm.cpp. When I compile with profiling, I'm seeing the error "clang:
> warning: the clang compiler does not support '-pg' ".  The build then
> fails in the same place (Alarm.cpp) whether I use Debug and/or
> Release, with or without profiling.  My operating system is FreeBSD
> 7.0-RELEASE.   The clang I'm using was built with gcc4.2.1.

Okay! Get this: it took about a day and a half to complete, but I was
able to compile Clang [Release] using Clang [Debug].  Thus, I've had
to use GCC to build Clang [Debug], and then use Clang [Debug] to build
Clang [Release].   (When I try to build Clang [Release] with GCC, it
creates a b0rken executable.)  Trying to build Clang [Release] with
Clang [Release], however, left me with:

[jay@dell ~/progs/llvm]$ gmake
gmake[1]: Entering directory `/usr/home/jay/progs/llvm/lib/System'
llvm[1]: Compiling Alarm.cpp for Release build
Stack dump:
0.      Program arguments:
/usr/home/jay/progs/clang/Release_clang/bin/clang -cc1 -triple
i386-unknown-freebsd7.0 -S -disable-free -main-file-name Alarm.cpp
-pic-level 2 -mdisable-fp-elim -mconstructor-aliases -target-cpu
pentium4 -resource-dir
/usr/home/jay/progs/clang/Release_clang/lib/clang/1.5 -dependency-file
/usr/home/jay/progs/llvm/lib/System/Release/Alarm.d.tmp -MP -MT
/usr/home/jay/progs/llvm/lib/System/Release/Alarm.o -MT
/usr/home/jay/progs/llvm/lib/System/Release/Alarm.d -D_DEBUG
-D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS
-I/usr/home/jay/progs/llvm/include
-I/usr/home/jay/progs/llvm/lib/System -O3 -Woverloaded-virtual
-Wcast-qual -Wall -W -Wno-unused-parameter -Wwrite-strings
-ferror-limit 19 -fmessage-length 80 -fgnu-runtime
-fdiagnostics-show-option -fcolor-diagnostics -o /tmp/cc-HxV9zW.s -x
c++ Alarm.cpp
1.      <eof> parser at end of file
2.      Per-module optimization passes
3.      Running pass 'CallGraph Pass Manager' on module 'Alarm.cpp'.
4.      Running pass 'Dead Store Elimination' on function
'@_ZN4llvm3sys10SetupAlarmEj'
clang: error: compiler command failed due to signal 11 (use -v to see
invocation)
gmake[1]: *** [/usr/home/jay/progs/llvm/lib/System/Release/Alarm.o] Error 1
gmake[1]: Leaving directory `/usr/home/jay/progs/llvm/lib/System'
gmake: *** [all] Error 1



--
Jay Sullivan
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Can't build CLang with CLang on FreeBSD

Erik Cederstrand

Den 19/04/2010 kl. 21.38 skrev Jay Sullivan:
>
> clang: error: compiler command failed due to signal 11 (use -v to see
> invocation)

At least earlier, a signal 11 from GCC on FreeBSD was a strong indicator of faulty hardware, e.g. a bad RAM module. It may be the case for Clang, too.

Thanks,
Erik
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev

smime.p7s (2K) Download Attachment