0

使用する Windows ビルド マシンをアップグレードしています

  • Visual Studio 2015 Update 3
  • scons 2.5.0
  • msbuild 14.0.25420.1

から

  • Visual Studio 2013 Update 4
  • scons 2.3.4
  • msbuild 12.0.31101

しかし、ビルドエラーが発生しています。「初期」実行中、ビルドは次の理由で失敗します

cl : コマンド ライン エラー D8022 : 'c:\users\admini~1\appdata\local\temp\tmpjbx8xe.lnk' を開けません

このようなエラーがいくつか発生する可能性があります。ファイルを見つけようとすると、それらが存在しないことに気付きます。

ビルドを再実行すると成功します。

他の誰かがこの問題に遭遇しましたか? 解決策はありますか?

参考までに: ビルドは 20 コアのマシンで並行して実行されます。これにより、タイミング条件が発生する可能性があります。しかし、以前の設定では問題ありませんでした。

更新: さらに調査した結果、これは SCons の問題である可能性があるようです。SCons が .lnk ファイルを作成しているようです。これらのファイルにリンク コマンド ラインを保存し、cl を介してそれらを実行します。

cl @c:\users\admini~1\appdata\local\temp\tmpjbx8xe.lnk

4

1 に答える 1

0

SCons 2.3.5 でエッジ ケースのバグが導入されたことが判明しました。以下のコミットで

https://bitbucket.org/scons/scons/commits/bad59be7270dbbe62c7868a532fad84480f95fae https://bitbucket.org/scons/scons/commits/9aa37cd21e99eb684ab6ae8f7b21e0a71751ac7f https://bitbucket.org/scons/scons/commits/da5785c5f30f852734b3f985b798a5508bfea9db

さらに調査したところ、ビルド スクリプトの 1 つのセクションでのみエラーが発生したことがわかりました。彼らは次のようなことをしていました

# Get all the .cpp files
sources = getAllSources() 

# Create a group of .obj files from the sources
objFiles = envLocal.Object(sources) 

# Create a shared library from the sources
artifacts = envLocal.SharedLibrary('Library', sources) 

# Add the .obj files to the link path on another environment
envTest['LIBS'].append(objFiles)

test_sources = getAllSources() # Get all the test .cpp files

# Create a test executable which re-uses the .obj files from LIBS on another environment
envTest.Program('TestExecutable', test_sources) 

コードを次のように更新したとき

# Create a shared library from the objFiles instead of sources
artifacts = envLocal.SharedLibrary('Library', objFiles) 

エラーが消えました。

于 2016-09-09T10:27:21.603 に答える