[Tizen] Workaround Timing Issue
authorHyungju Lee <leee.lee@samsung.com>
Sun, 19 Apr 2020 22:19:32 +0000 (07:19 +0900)
committerGleb Balykov <g.balykov@samsung.com>
Tue, 27 Sep 2022 12:50:22 +0000 (15:50 +0300)
To avoid an exception thrown on managed build
Context: dotnet/roslyn#37974 and dotnet/roslyn#38420

```
[  336s] /home/abuild/rpmbuild/BUILD/corefx-3.1.0/packages/microsoft.net.compilers.toolset/3.3.0-beta2-19367-02/tasks/netcoreapp2.1/Microsoft.CSharp.Core.targets(58,5): error MSB3883: Unexpected exception:  [/home/abuild/rpmbuild/BUILD/corefx-3.1.0/src/System.ComponentModel/src/System.ComponentModel.csproj]
[  336s] /home/abuild/rpmbuild/BUILD/corefx-3.1.0/packages/microsoft.net.compilers.toolset/3.3.0-beta2-19367-02/tasks/netcoreapp2.1/Microsoft.CSharp.Core.targets(58,5): error : System.AggregateException: One or more errors occurred. (Object synchronization method was called from an unsynchronized block of code.) [/home/abuild/rpmbuild/BUILD/corefx-3.1.0/src/System.ComponentModel/src/System.ComponentModel.csproj]
[  336s] /home/abuild/rpmbuild/BUILD/corefx-3.1.0/packages/microsoft.net.compilers.toolset/3.3.0-beta2-19367-02/tasks/netcoreapp2.1/Microsoft.CSharp.Core.targets(58,5): error : ---> System.ApplicationException: Object synchronization method was called from an unsynchronized block of code. [/home/abuild/rpmbuild/BUILD/corefx-3.1.0/src/System.ComponentModel/src/System.ComponentModel.csproj]
[  336s] /home/abuild/rpmbuild/BUILD/corefx-3.1.0/packages/microsoft.net.compilers.toolset/3.3.0-beta2-19367-02/tasks/netcoreapp2.1/Microsoft.CSharp.Core.targets(58,5): error : at System.Threading.Mutex.ReleaseMutex() [/home/abuild/rpmbuild/BUILD/corefx-3.1.0/src/System.ComponentModel/src/System.ComponentModel.csproj]
[  336s] /home/abuild/rpmbuild/BUILD/corefx-3.1.0/packages/microsoft.net.compilers.toolset/3.3.0-beta2-19367-02/tasks/netcoreapp2.1/Microsoft.CSharp.Core.targets(58,5): error : at Microsoft.CodeAnalysis.CommandLine.ServerNamedMutex.Dispose() [/home/abuild/rpmbuild/BUILD/corefx-3.1.0/src/System.ComponentModel/src/System.ComponentModel.csproj]
[  336s] /home/abuild/rpmbuild/BUILD/corefx-3.1.0/packages/microsoft.net.compilers.toolset/3.3.0-beta2-19367-02/tasks/netcoreapp2.1/Microsoft.CSharp.Core.targets(58,5): error : at Microsoft.CodeAnalysis.CommandLine.BuildServerConnection.RunServerCompilationCore(RequestLanguage language, List`1 arguments, BuildPathsAlt buildPaths, String pipeName, String keepAlive, String libEnvVariable, Nullable`1 timeoutOverride, Func`3 tryCreateServerFunc, CancellationToken cancellationToken) [/home/abuild/rpmbuild/BUILD/corefx-3.1.0/src/System.ComponentModel/src/System.ComponentModel.csproj]
[  336s] /home/abuild/rpmbuild/BUILD/corefx-3.1.0/packages/microsoft.net.compilers.toolset/3.3.0-beta2-19367-02/tasks/netcoreapp2.1/Microsoft.CSharp.Core.targets(58,5): error : --- End of inner exception stack trace --- [/home/abuild/rpmbuild/BUILD/corefx-3.1.0/src/System.ComponentModel/src/System.ComponentModel.csproj]
[  336s] /home/abuild/rpmbuild/BUILD/corefx-3.1.0/packages/microsoft.net.compilers.toolset/3.3.0-beta2-19367-02/tasks/netcoreapp2.1/Microsoft.CSharp.Core.targets(58,5): error : at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) [/home/abuild/rpmbuild/BUILD/corefx-3.1.0/src/System.ComponentModel/src/System.ComponentModel.csproj]
[  336s] /home/abuild/rpmbuild/BUILD/corefx-3.1.0/packages/microsoft.net.compilers.toolset/3.3.0-beta2-19367-02/tasks/netcoreapp2.1/Microsoft.CSharp.Core.targets(58,5): error : at System.Threading.Tasks.Task.Wait(CancellationToken cancellationToken) [/home/abuild/rpmbuild/BUILD/corefx-3.1.0/src/System.ComponentModel/src/System.ComponentModel.csproj]
[  336s] /home/abuild/rpmbuild/BUILD/corefx-3.1.0/packages/microsoft.net.compilers.toolset/3.3.0-beta2-19367-02/tasks/netcoreapp2.1/Microsoft.CSharp.Core.targets(58,5): error : at Microsoft.CodeAnalysis.BuildTasks.ManagedCompiler.ExecuteTool(String pathToTool, String responseFileCommands, String commandLineCommands) [/home/abuild/rpmbuild/BUILD/corefx-3.1.0/src/System.ComponentModel/src/System.ComponentModel.csproj]
```

packaging/coreclr.spec

index d7f5e44..4f46f0c 100755 (executable)
@@ -322,17 +322,17 @@ export LD_LIBRARY_PATH=%{_builddir}/%{name}-%{version}/libicu-57.1/
 %if 0%{skipmanaged}
 %else
 # Build managed CoreFX
-./build.sh %{_build_args} --subset libs.ref+libs.src+libs.packages
+./build.sh %{_build_args} --subset libs.ref+libs.src+libs.packages /p:UseSharedCompilation=false
 
 %if 0%{skipmanagedtools}
 %else
 # Build managed tools
-./build.sh %{_build_args} --subset clr.tools
+./build.sh %{_build_args} --subset clr.tools /p:UseSharedCompilation=false
 %endif
 
 %ifarch x86_64
 # Build CoreFX managed tests, which are reused for all arches
-./build.sh %{_build_args} --subset libs.pretest+libs.tests --testscope all /p:DisableImplicitFSharpCoreReference=true
+./build.sh %{_build_args} --subset libs.pretest+libs.tests --testscope all /p:DisableImplicitFSharpCoreReference=true /p:UseSharedCompilation=false
 %endif
 %endif