Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Jul 2012 14:34:39 -0700
From:      Doug Barton <dougb@FreeBSD.org>
To:        Gerald Pfeifer <gerald@pfeifer.com>
Cc:        freebsd-ports@FreeBSD.org
Subject:   Re: lang/gcc46 building stuff in $TMPDIR
Message-ID:  <5015AC6F.2040001@FreeBSD.org>
In-Reply-To: <alpine.LNX.2.00.1207292039220.2303@gerinyyl.fvgr>
References:  <4FD004F7.6090401@FreeBSD.org> <alpine.LNX.2.00.1206070808380.2395@gerinyyl.fvgr> <4FD37AD7.7010304@FreeBSD.org> <4FFC5189.1000102@dougbarton.us> <alpine.LNX.2.00.1207292039220.2303@gerinyyl.fvgr>

next in thread | previous in thread | raw e-mail | index | archive | help
On 07/29/2012 13:50, Gerald Pfeifer wrote:
> On Sat, 9 Jun 2012, Doug Barton wrote:
>>> Are you saying you actually noticed some leftovers in /tmp, or that
>>> there "just" has been more at certain points in time than you would
>>> expect?
>> I finally had time to watch this closely, and found the culprit(s).
>> While building the port creates a lot of files in /tmp (I think it's
>> actually $TMP, not $TMPDIR). A lot of them are *.s files, most of which
>> are small, but one of which grew to over 64M, which is what caused my
>> build to fail. It also creates a variety of other files, including .o,
>> .c, .ld, .le, .zip, etc.
>>
>> The java OPTION also creates some pretty big jar directories, I had one
>> grow to 49M, which didn't crash my build, but might blow up someone with
>> a smaller /tmp.
>>
>> My suggestion would be to create a directory in $WRKDIR and assign $TMP
>> (or whatever the right envar is) to it.
> 
> That could be done, but has one significant drawback: those of us
> who have /tmp on fastest storage, and $WRKDIR on slower storage,
> could lose a lot of speed.

Have you measured that?

> Also, while I understand your situation, I am very hesitant to change
> any defaults given that I have not seen any other user reports, not
> even upstream.

It's doubtful that others have a tiny /tmp like I do, but reproducing
the problem is trivial.

> Note: according to the GCC documentation
> 
>     If `TMPDIR' is set, it specifies the directory to use for temporary
>     files.  GCC uses temporary files to hold the output of one stage of
>     compilation which is to be used as input to the next stage: for
>     example, the output of the preprocessor, which is the input to the
>     compiler proper.
> 
> Does it make a difference for you if you set TMPDIR to some location
> where you have more storage?

Obviously. :)

> On Tue, 10 Jul 2012, Doug Barton wrote:
>> Just tried building the latest, same error. Did I misunderstand that
>> something was supposed to be different?
> 
> I believe lang/gcc47 has seen a split of one large, automatically
> generated, source file which is what you may have run into. 

I haven't gotten into 47 yet.

> Another might be reducing the amount of parallel building on your
> system.
> 
> Finally, you indicated that you also saw Java create a large
> temporary file.  If you want to avoid building Java, the GCC
> ports have an option to disable Java.  Let me actually take
> this as a trigger to convert this to the new options framework.

Reducing functionality to handle build infrastructure problems is not a
desirable solution. But thanks for the response in any case. :)

Doug

-- 

    I am only one, but I am one.  I cannot do everything, but I can do
    something.  And I will not let what I cannot do interfere with what
    I can do.
			-- Edward Everett Hale, (1822 - 1909)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5015AC6F.2040001>