pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: clang builds and /var/tmp
On Wed, 21 Oct 2015 08:52:44 +0200
Richard PALO <richard%netbsd.org@localhost> wrote:
> just noticed with concern with clang that /var/tmp is used by default during builds.
>
> I have WRKOBJDIR set to /tmp/pkgsrc and no where else do I stipulate TMP or TMPDIR
>
> In any event, never to /var/tmp
>
> > richard@omnis:/tmp/pkgsrc/lang/clang/work$ grep var\/tmp */*
> > build/config.log:setupterm /var/tmp//cc_rqEmo.o
> > build/config.log:el_init /var/tmp//cc7zWSmo.o
> > build/config.log:mallinfo /var/tmp//ccjEWZmo.o
> > build/config.log:__crashreporter_info__ /var/tmp//cc8_WJpo.o
> > build/config.log:strtoq /var/tmp//ccoiG.ro.o
> > build/config.log:malloc_zone_statistics /var/tmp//ccTnGmso.o
> > build/config.log:futimes /var/tmp//cceEq6so.o
>
> the only thing I specifically notice setting this is in getDefaultTempDir():
> > richard@omnis:/tmp/pkgsrc/lang/clang/work$ grep var\/tmp */*/*/*/*
> > llvm-3.7.0.src/include/llvm/Support/Path.h:/// "/var/tmp" or "C:/TEMP"
> > llvm-3.7.0.src/lib/Support/Unix/Path.inc: return "/var/tmp";
> but can't seem to find any callers..
>
> Is there somewhere else this can identified? I find nothing in pkgsrc/mk setting /var/tmp to TMP or TMPDIR excepting the following, apparently not relevant here:
> >bsd.pkg.readme.mk: TMPDIR=${TMPDIR:U/tmp:Q} \
>
> Anybody else suffer this?
>
> This seems to be killing my boot SSD which is supposed to be, for the most part, read-only. I have my swap on a different fast SSD + 32G ram.
>
> If I `bmake configure TMPDIR=/tmp' it seems to do the right thing... for my environment
> setting TMPDIR=${WKROBJDIR}/tmp seems reasonable, but does that mean I need to add it to ALL_ENV myself in etc/mk.conf.
>
> What is the correct procedure?
The purpose of /var/tmp is to be a globally writable temp directory.
If you do "ktrace gcc -o test test.c" you will find that the gcc +
binutils toolchain too creates many temporary files there, unless -pipe
is used. A good solution to preserve the life of your ssd is to mount
tmpfs on /tmp and /var/tmp. But beware that this breaks virecover.
-Tobias
Home |
Main Index |
Thread Index |
Old Index