Clang build (with profiling enabled) fails on FreeBSD

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

Clang build (with profiling enabled) fails on FreeBSD

Jay Sullivan
I attempted to build clang with profiling enabled, and it won't
compile.  I was able to compile the Debug and Release versions without
problems, but problems arise whenever I try to add profiling.

Here's what I attempted to do:

    $ svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm
    $ cd llvm/tools
    $ svn co http://llvm.org/svn/llvm-project/cfe/trunk clang
    $ cd ..
    $ ./configure --enable-optimized --enable-profiling
    $ gmake

It was building for a while, but eventually saw the following output:

    llvm[2]: Linking Release+Profile executable not
    llvm[2]: ======= Finished Linking Release+Profile Executable not
    gmake[2]: Leaving directory `/usr/home/jay/progs/llvm/utils/not'
    gmake[2]: Entering directory `/usr/home/jay/progs/llvm/utils/unittest'
    gmake[3]: Entering directory
`/usr/home/jay/progs/llvm/utils/unittest/googletest'
    gmake[3]: Nothing to be done for `all'.
    gmake[3]: Leaving directory
`/usr/home/jay/progs/llvm/utils/unittest/googletest'
    gmake[3]: Entering directory
`/usr/home/jay/progs/llvm/utils/unittest/UnitTestMain'
    gmake[3]: Nothing to be done for `all'.
    gmake[3]: Leaving directory
`/usr/home/jay/progs/llvm/utils/unittest/UnitTestMain'
    gmake[2]: Leaving directory `/usr/home/jay/progs/llvm/utils/unittest'
    gmake[1]: Leaving directory `/usr/home/jay/progs/llvm/utils'
    gmake[1]: Entering directory `/usr/home/jay/progs/llvm/lib/VMCore'
    llvm[1]: Building Intrinsics.gen.tmp from Intrinsics.td
    gmake[1]: ***
[/usr/home/jay/progs/llvm/lib/VMCore/Release+Profile/Intrinsics.gen.tmp]
Segmentation fault: 11 (core dumped)
    gmake[1]: Leaving directory `/usr/home/jay/progs/llvm/lib/VMCore'
    gmake: *** [all] Error 1

I'm running FreeBSD 7.0 on a PC with 128 Mb of RAM. More details:

    $ 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

    $ cc -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]


--
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: Clang build (with profiling enabled) fails on FreeBSD

Jay Sullivan
Sorry, I had to redo it a few times to get the correct output again.
I've uploaded the full output of gmake to:
http://petio.org/temp/clangoutput


On Thu, Apr 15, 2010 at 4:27 PM, Roman Divacky <[hidden email]> wrote:

>
> what happens with "gmake VERBOSE=1" ? I believe our buggy/old gcc
> is to be blamed :(
>
> On Thu, Apr 15, 2010 at 04:25:34PM -0400, Jay Sullivan wrote:
>> I attempted to build clang with profiling enabled, and it won't
>> compile.  I was able to compile the Debug and Release versions without
>> problems, but problems arise whenever I try to add profiling.
>>
>> Here's what I attempted to do:
>>
>>     $ svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm
>>     $ cd llvm/tools
>>     $ svn co http://llvm.org/svn/llvm-project/cfe/trunk clang
>>     $ cd ..
>>     $ ./configure --enable-optimized --enable-profiling
>>     $ gmake
>>
>> It was building for a while, but eventually saw the following output:
>>
>>     llvm[2]: Linking Release+Profile executable not
>>     llvm[2]: ======= Finished Linking Release+Profile Executable not
>>     gmake[2]: Leaving directory `/usr/home/jay/progs/llvm/utils/not'
>>     gmake[2]: Entering directory `/usr/home/jay/progs/llvm/utils/unittest'
>>     gmake[3]: Entering directory
>> `/usr/home/jay/progs/llvm/utils/unittest/googletest'
>>     gmake[3]: Nothing to be done for `all'.
>>     gmake[3]: Leaving directory
>> `/usr/home/jay/progs/llvm/utils/unittest/googletest'
>>     gmake[3]: Entering directory
>> `/usr/home/jay/progs/llvm/utils/unittest/UnitTestMain'
>>     gmake[3]: Nothing to be done for `all'.
>>     gmake[3]: Leaving directory
>> `/usr/home/jay/progs/llvm/utils/unittest/UnitTestMain'
>>     gmake[2]: Leaving directory `/usr/home/jay/progs/llvm/utils/unittest'
>>     gmake[1]: Leaving directory `/usr/home/jay/progs/llvm/utils'
>>     gmake[1]: Entering directory `/usr/home/jay/progs/llvm/lib/VMCore'
>>     llvm[1]: Building Intrinsics.gen.tmp from Intrinsics.td
>>     gmake[1]: ***
>> [/usr/home/jay/progs/llvm/lib/VMCore/Release+Profile/Intrinsics.gen.tmp]
>> Segmentation fault: 11 (core dumped)
>>     gmake[1]: Leaving directory `/usr/home/jay/progs/llvm/lib/VMCore'
>>     gmake: *** [all] Error 1
>>
>> I'm running FreeBSD 7.0 on a PC with 128 Mb of RAM. More details:
>>
>>     $ 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
>>
>>     $ cc -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]
>>
>>
>> --
>> Jay Sullivan
>> _______________________________________________
>> cfe-dev mailing list
>> [hidden email]
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>



--
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: Clang build (with profiling enabled) fails on FreeBSD

Jay Sullivan
So, looks like it's failing on the tblgen command:

    /usr/home/jay/progs/llvm/Release+Profile/bin/tblgen -I
/usr/home/jay/progs/llvm/lib/VMCore -I
/usr/home/jay/progs/llvm/include -I  /usr/home/jay/progs/llvm/include
-I  /usr/home/jay/progs/llvm/lib/Target
/usr/home/jay/progs/llvm/include/llvm/Intrinsics.td -o
/usr/home/jay/progs/llvm/lib/VMCore/Release+Profile/Intrinsics.gen.tmp
-gen-intrinsic

Here's a trussed output for this command:

    http://petio.org/temp/tblgen_bad

Interestingly, if I try to use a different tblgen (one compiled
without profiling enabled), it doesn't crash:

    http://petio.org/temp/tblgen_good

Any thoughts?



On Thu, Apr 15, 2010 at 5:11 PM, Jay Sullivan <[hidden email]> wrote:

> Sorry, I had to redo it a few times to get the correct output again.
> I've uploaded the full output of gmake to:
> http://petio.org/temp/clangoutput
>
>
> On Thu, Apr 15, 2010 at 4:27 PM, Roman Divacky <[hidden email]> wrote:
>>
>> what happens with "gmake VERBOSE=1" ? I believe our buggy/old gcc
>> is to be blamed :(
>>
>> On Thu, Apr 15, 2010 at 04:25:34PM -0400, Jay Sullivan wrote:
>>> I attempted to build clang with profiling enabled, and it won't
>>> compile.  I was able to compile the Debug and Release versions without
>>> problems, but problems arise whenever I try to add profiling.
>>>
>>> Here's what I attempted to do:
>>>
>>>     $ svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm
>>>     $ cd llvm/tools
>>>     $ svn co http://llvm.org/svn/llvm-project/cfe/trunk clang
>>>     $ cd ..
>>>     $ ./configure --enable-optimized --enable-profiling
>>>     $ gmake
>>>
>>> It was building for a while, but eventually saw the following output:
>>>
>>>     llvm[2]: Linking Release+Profile executable not
>>>     llvm[2]: ======= Finished Linking Release+Profile Executable not
>>>     gmake[2]: Leaving directory `/usr/home/jay/progs/llvm/utils/not'
>>>     gmake[2]: Entering directory `/usr/home/jay/progs/llvm/utils/unittest'
>>>     gmake[3]: Entering directory
>>> `/usr/home/jay/progs/llvm/utils/unittest/googletest'
>>>     gmake[3]: Nothing to be done for `all'.
>>>     gmake[3]: Leaving directory
>>> `/usr/home/jay/progs/llvm/utils/unittest/googletest'
>>>     gmake[3]: Entering directory
>>> `/usr/home/jay/progs/llvm/utils/unittest/UnitTestMain'
>>>     gmake[3]: Nothing to be done for `all'.
>>>     gmake[3]: Leaving directory
>>> `/usr/home/jay/progs/llvm/utils/unittest/UnitTestMain'
>>>     gmake[2]: Leaving directory `/usr/home/jay/progs/llvm/utils/unittest'
>>>     gmake[1]: Leaving directory `/usr/home/jay/progs/llvm/utils'
>>>     gmake[1]: Entering directory `/usr/home/jay/progs/llvm/lib/VMCore'
>>>     llvm[1]: Building Intrinsics.gen.tmp from Intrinsics.td
>>>     gmake[1]: ***
>>> [/usr/home/jay/progs/llvm/lib/VMCore/Release+Profile/Intrinsics.gen.tmp]
>>> Segmentation fault: 11 (core dumped)
>>>     gmake[1]: Leaving directory `/usr/home/jay/progs/llvm/lib/VMCore'
>>>     gmake: *** [all] Error 1
>>>
>>> I'm running FreeBSD 7.0 on a PC with 128 Mb of RAM. More details:
>>>
>>>     $ 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
>>>
>>>     $ cc -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]
>>>
>>>
>>> --
>>> Jay Sullivan
>>> _______________________________________________
>>> cfe-dev mailing list
>>> [hidden email]
>>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>>
>
>
>
> --
> Jay Sullivan
>



--
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: Clang build (with profiling enabled) fails on FreeBSD

Anton Korobeynikov
> Any thoughts?
Looks like your gcc is broken. Consider upgrading / downgrading

--
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Clang build (with profiling enabled) fails on FreeBSD

David Chisnall
On 15 Apr 2010, at 22:54, Anton Korobeynikov wrote:

>> Any thoughts?
> Looks like your gcc is broken. Consider upgrading / downgrading


It looks like exactly the same GCC that I've been using on FreeBSD 7.x / 8.0 to build clang, and it works for me, although I've not tried a profiling build.  Jay, does it work without profiling for you?

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

Re: Clang build (with profiling enabled) fails on FreeBSD

Neil Booth
In reply to this post by Jay Sullivan
Jay Sullivan wrote:-

> I'm running FreeBSD 7.0 on a PC with 128 Mb of RAM. More details:

I think you're optimistic.  Clang in release-asserts mode only just
builds on a 512MB machine of mine; the whole machine is in swap
when linking, and it takes 30mins to 1hr just to link the various
binaries.

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

Re: Clang build (with profiling enabled) fails on FreeBSD

Jay Sullivan
On Thu, Apr 15, 2010 at 6:37 PM, Neil Booth <[hidden email]> wrote:

> Jay Sullivan wrote:-
>
>> I'm running FreeBSD 7.0 on a PC with 128 Mb of RAM. More details:
>
> I think you're optimistic.  Clang in release-asserts mode only just
> builds on a 512MB machine of mine; the whole machine is in swap
> when linking, and it takes 30mins to 1hr just to link the various
> binaries.
>
> Neil.
>

Hey, now, there's got to be some value in testing the build in a low
RAM environment.  It is swapping a little bit, but not thrashing!  And
yes, 30mins to 1hr is accurate.  You mean it's not supposed to take
that long?? :)

--
Jay Sullivan

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