pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Problems Building lang/go120 - /tmp full?



yancm%sdf.org@localhost writes:

`>> yancm%sdf.org@localhost writes:
>>> Trying to build lang/go120 from pkgsrc/HEAD on NetBSD 9_current amd64...
>>> I'm getting this:
>>>
>>> [ 1095082.9828822] /tmp: write failed, file system is full
>>> # cmd/compile/internal/ssa
>>> compile: writing output: write $WORK/b121/_pkg_.a: no space left on
>>> device
>>> go tool dist: FAILED:
>>> /usr/pkgsrc/lang/go120/work/go/pkg/tool/netbsd_amd64/go_bootstrap
>>> install
>>> -v cmd/asm cmd/cgo cmd/compile cmd/link: exit status 1
>>> *** Error code 2
>> [snip]
>>
>>> which I changed to this (and created a clean ./work/tmp)
>>> TMPDIR?=         /usr/pkgsrc/lang/go120/work/tmp
>>>
>>> But the build fails the same way...
>>>
>>> I'm not used to packages trying to write/build outside of the working
>>> directory and in any event I should have plenty of space available...
>>> Any pointers?
>>
>> You may have to set TMPDIR on the command line, as well, before starting
>> the build (I also set TMPDIR in /etc/mk.conf because I want the C
>> compiler, for example, to not use /tmp too).  All versions of go that I
>> am aware of make use of space outside of the current directory to build
>> themselves, the C compilers do as well when building objects during
>> compiles, but the files are typically much smaller.  I would not
>> directly use the go work directory... but something in /usr/pkgsrc,
>> maybe /usr/pkgsrc/TMP should be fine.  I often just use /var/tmp.
>
> Interesting... I've been building from pkgsrc for 20+ years and not had to
> resort to so many (any) workarounds...
> Long term, I would hope maintainers might clean this up?
> Short term, could you please share how you set TMPDIR on the build line?

# setenv TMPDIR /var/tmp
# cd /usr/pkgsrc/lang/go
# make

and it is in /etc/mk.conf

TMPDIR=/var/tmp

In a lot of ways, this really isn't much different than what the C
compilers do, just look in /tmp or /var/tmp while compiling stuff you
will see files ending in .s and the like there, except that go generates
a much larger intermediate set of files when it compiles itself.  I have
run /tmp out of space, when it is set to be very small, even when using
gcc.


Unrelated to this, probably, I also use MAKE_JOBS=1 in /etc/mk.conf
being rather pessimistic about some things.


Simular operations may also be needed when compiling rust from source.




-- 
Brad Spencer - brad%anduin.eldar.org@localhost - KC8VKS - http://anduin.eldar.org


Home | Main Index | Thread Index | Old Index