V: Failed to create /tmp/v/v.tmp.c

Created on 1 Jan 2020  路  6Comments  路  Source: vlang/v

V version:
0.1.23 -> 0.1.24

OS:
Gentoo linux

What did you do?
v up

What did you expect to see?
Success. A working V .

What did you see instead?
Errors, broken V

tuomas@trombi ~/v $ v up
Updating V...
From https://github.com/vlang/v
 * branch              master     -> FETCH_HEAD
   3a2491e9..d226fa7b  master     -> origin/master
Updating 3a2491e9..d226fa7b
...
 create mode 100644 vlib/v/gen/x64/gen.v
Current branch master is up to date.
make: Entering directory '/home/tuomas/v'
make fresh_vc
make[1]: Entering directory '/home/tuomas/v'
rm -rf /tmp/vc
git clone --depth 1 --quiet https://github.com/vlang/vc /tmp/vc
make[1]: Leaving directory '/home/tuomas/v'
cd /tmp/vc && git clean -xf && git pull --quiet
make fresh_tcc
make[1]: Entering directory '/home/tuomas/v'
rm -rf /var/tmp/tcc
git clone --depth 1 --quiet https://github.com/vlang/tccbin /var/tmp/tcc
make[1]: Leaving directory '/home/tuomas/v'
cd /var/tmp/tcc && git clean -xf && git pull --quiet
cc -std=gnu11 -w -o v /tmp/vc/v.c  -lm
Self rebuild (3a7f1db => d226fa7)
make[1]: Entering directory '/home/tuomas/v'
./v -cg -o v v.v
C compiler=cc
failed to create /tmp/v/v.tmp.c
cc: error: /tmp/v/v.tmp.c: No such file or directory
V error: C error. This should never happen. 
Please create a GitHub issue: https://github.com/vlang/v/issues/new/choose
make[1]: *** [Makefile:92: selfcompile] Error 1
make[1]: Leaving directory '/home/tuomas/v'
make: *** [Makefile:47: all] Error 2
make: Leaving directory '/home/tuomas/v'

tuomas@trombi ~/v $ v
V panic: V tool "/home/tuomas/v/tools/vrepl.v" could not be compiled
failed to create /tmp/v/vrepl.tmp.c
cc: error: /tmp/v/vrepl.tmp.c: No such file or directory
V error: C error. This should never happen. 
Please create a GitHub issue: https://github.com/vlang/v/issues/new/choose
                                               | 0x5621a832abe8 | v(+0x3be8) 
                                               | 0x5621a83a8a59 | v(+0x81a59) 
                                               | 0x5621a83b1ed2 | v(+0x8aed2) 
                                               | 0x5621a83b44f3 | v(+0x8d4f3) 
                                               | 0x7f2ea654bf2b | /lib64/libc.so.6(__libc_start_main+0xeb) 
                                               | 0x5621a832949a | v(+0x249a) 

tuomas@trombi ~/v $ 
Bug

Most helpful comment

@teesalonen can you run rm -rf /tmp/v then try again v up ?

All 6 comments

@teesalonen Probably, this is a duplicate of #3238. If so, the solution is described in https://github.com/vlang/v/issues/3238#issuecomment-569333511.

@spytheman can we detect if /tmp is writable, and use a different directory if it isn't?

3238 is first time run. I have run 'v up' many times recently. Just last time it failed, and i made this issue as the error message advised.

@medvednikov a better solution would be a separate build directory inside v's root directory and build all the things there and create the *.tmp.c files inside this location.

So if you want a fresh build you can easily delete the build directory and start over again.

This approach is common when e.g. building gcc/binutils or cmake projects in general.

@teesalonen can you run rm -rf /tmp/v then try again v up ?

No. The /tmp is emptied automatically when the computer is booted, and I have booted many times since this issue.

The V was left broken and both 'v' and 'v up' crashed.

I removed ~/v and reinstalled V from source. Now V works again (and v up).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

vtereshkov picture vtereshkov  路  3Comments

oleg-kachan picture oleg-kachan  路  3Comments

radare picture radare  路  3Comments

medvednikov picture medvednikov  路  3Comments

lobotony picture lobotony  路  3Comments