Bug 24252 – ci: Error: error writing file 'compilable\testcstuff3_0.obj'

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
Windows
Creation time
2023-11-20T10:04:54Z
Last change time
2024-01-28T01:26:19Z
Keywords
pull
Assigned to
No Owner
Creator
Iain Buclaw

Comments

Comment #0 by ibuclaw — 2023-11-20T10:04:54Z
It looks like CI has a race condition between two files of the same name. --- ... compilable\testcstuff3.i () ... compilable\testcstuff3.d () ============================== Test 'compilable\testcstuff3.d' failed. The logged output: D:\a\1\s\generated\windows\RelWithAsserts\Win32\dmd.exe -conf= -m32mscoff -Icompilable -odD:\a\1\s\compiler\test\test_results\compilable -ofD:\a\1\s\compiler\test\test_results\compilable\testcstuff3_0.obj -c compilable\testcstuff3.d Error: error writing file 'D:\a\1\s\compiler\test\test_results\compilable\testcstuff3_0.obj' ============================== Test 'compilable\testcstuff3.d' failed: Expected rc == 0, but exited with rc == 1
Comment #1 by kinke — 2023-12-21T15:30:55Z
AFAICT, the problem is that DMD generates the temporary preprocessed `.i` in the same dir as the `.c`, just with the extension replaced: https://github.com/dlang/dmd/blob/fa7a1b3d9f4e89d4a6b44ec57ed1f5137c303694/compiler/src/dmd/cpreprocess.d#L88 LDC creates a unique temp directory to hold the `.i`.
Comment #2 by razvan.nitu1305 — 2024-01-03T09:55:41Z
*** This issue has been marked as a duplicate of issue 24293 ***
Comment #3 by kinke — 2024-01-27T14:05:02Z
Oh, this has obviously nothing to do with a temporary .i - the test file is an .i already, so no preprocessing. The problem is simply that the object files collide for these 2 tests, as the d_do_test.d runner uses the same object file path `…\compilable\testcstuff3_0.obj`. Fix incoming.
Comment #4 by dlang-bot — 2024-01-27T14:15:35Z
@kinke updated dlang/dmd pull request #16100 "[stable] Fix Issue 24252 - Object files collision for tests compilable/testcstuff3.{d,i}" fixing this issue: - Fix Bugzilla Issue 24252 - Object files collision for tests compilable/testcstuff3.{d,i} https://github.com/dlang/dmd/pull/16100
Comment #5 by dlang-bot — 2024-01-27T15:37:11Z
dlang/dmd pull request #16100 "[stable] Fix Issue 24252 - Object files collision for tests compilable/testcstuff3.{d,i}" was merged into stable: - 2c1b5390f8e0d9829aa9659593f50418246cd930 by Martin Kinkelin: Fix Bugzilla Issue 24252 - Object files collision for tests compilable/testcstuff3.{d,i} https://github.com/dlang/dmd/pull/16100
Comment #6 by dlang-bot — 2024-01-28T01:26:19Z
dlang/dmd pull request #16105 "merge stable" was merged into master: - b4d851769390a195094688183f260d82cae8459b by Martin Kinkelin: Fix Bugzilla Issue 24252 - Object files collision for tests compilable/testcstuff3.{d,i} https://github.com/dlang/dmd/pull/16105