mono / sdb

A command line client for the Mono soft debugger.
https://www.mono-project.com
MIT License
116 stars 44 forks source link

Won't compile using parallel make (-j9) #39

Closed RiJo closed 6 years ago

RiJo commented 7 years ago

I detected this while adding mono/sdb to my buildroot setup. It seems that there's some dependency problem if make is executed using multiple jobs (HEAD: b8b329655f1f02a4d4af6e4275d5ae58226eec0b):


[tmp] $git clone https://github.com/mono/sdb.git
Cloning into 'sdb'...
remote: Counting objects: 1009, done.
remote: Total 1009 (delta 0), reused 0 (delta 0), pack-reused 1009
Receiving objects: 100% (1009/1009), 273.91 KiB | 345.00 KiB/s, done.
Resolving deltas: 100% (747/747), done.
[tmp] $cd sdb/
>>> entered git repo 'sdb.git' <<<
[sdb] (master) $git submodule init
Submodule 'dep/cecil' (git://github.com/mono/cecil.git) registered for path 'dep/cecil'
Submodule 'dep/debugger-libs' (git://github.com/mono/debugger-libs) registered for path 'dep/debugger-libs'
Submodule 'dep/nrefactory' (git://github.com/icsharpcode/NRefactory.git) registered for path 'dep/nrefactory'
[sdb] (master) $git submodule update
Cloning into '/tmp/sdb/dep/cecil'...
Cloning into '/tmp/sdb/dep/debugger-libs'...
Cloning into '/tmp/sdb/dep/nrefactory'...
Submodule path 'dep/cecil': checked out 'cd2ff63081bd9f65cb293689fa9697cf25ae8c95'
Submodule path 'dep/debugger-libs': checked out '4a74b2cc980df13e5c4076266e66d305ada41cb3'
Submodule path 'dep/nrefactory': checked out '1463cf299d05a80d1056ad6608c375688629f006'
[sdb] (master) $make -j9
cd dep/debugger-libs && xbuild /nologo /property:Configuration=net_4_0_Debug /verbosity:quiet debugger-libs.sln
cd dep/debugger-libs && xbuild /nologo /property:Configuration=net_4_0_Debug /verbosity:quiet debugger-libs.sln
cd dep/debugger-libs && xbuild /nologo /property:Configuration=net_4_0_Debug /verbosity:quiet debugger-libs.sln
cd dep/debugger-libs && xbuild /nologo /property:Configuration=net_4_0_Debug /verbosity:quiet debugger-libs.sln
cd dep/debugger-libs && xbuild /nologo /property:Configuration=net_4_0_Debug /verbosity:quiet debugger-libs.sln
cd dep/debugger-libs && xbuild /nologo /property:Configuration=net_4_0_Debug /verbosity:quiet debugger-libs.sln
cd dep/debugger-libs && xbuild /nologo /property:Configuration=net_4_0_Debug /verbosity:quiet debugger-libs.sln
mkdir -p bin
mkdir -p bin
cp sdb.exe.config bin/sdb.exe.config
sed -e s+__LIB_PATH_EXTRA__+/../lib/sdb+ -e s+__MONO_OPTIONS_EXTRA__+--debug+ sdb.in > bin/sdb
mkdir -p bin
chmod +x bin/sdb
sed -e s+__LIB_PATH_EXTRA__++ -e s+__MONO_OPTIONS_EXTRA__+--debug+ sdb.in > bin/sdb-dev
chmod +x bin/sdb-dev
debugger-libs.sln: error : /tmp/sdb/dep/debugger-libs/debugger-libs.sln: Unexpected end of file while parsing Name has occurred. Line
648, position 168.
debugger-libs.sln: error : Could not find file "/tmp/sdb/dep/debugger-libs/debugger-libs.sln.proj".

Unhandled Exception:
System.IO.FileNotFoundException: Could not find file "/tmp/sdb/dep/debugger-libs/debugger-libs.sln.proj".
File name: '/tmp/sdb/dep/debugger-libs/debugger-libs.sln.proj'
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share,
System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x0021a] in <dca3b561b8ad4f9fb10141d81b39ff45>:0
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share,
System.Int32 bufferSize, System.IO.FileOptions options, System.String msgPath, System.Boolean bFromProxy, System.Boolean useLongPath,
System.Boolean checkHost) [0x00000] in <dca3b561b8ad4f9fb10141d81b39ff45>:0
  at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileSha
re,int,System.IO.FileOptions,string,bool,bool,bool)
  at System.IO.StreamReader..ctor (System.String path, System.Text.Encoding encoding, System.Boolean detectEncodingFromByteOrderMarks,
 System.Int32 bufferSize, System.Boolean checkHost) [0x00079] in <dca3b561b8ad4f9fb10141d81b39ff45>:0
  at System.IO.StreamReader..ctor (System.String path, System.Text.Encoding encoding, System.Boolean detectEncodingFromByteOrderMarks,
 System.Int32 bufferSize) [0x00000] in <dca3b561b8ad4f9fb10141d81b39ff45>:0
  at System.IO.StreamReader..ctor (System.String path, System.Boolean detectEncodingFromByteOrderMarks) [0x0000d] in <dca3b561b8ad4f9f
b10141d81b39ff45>:0
  at System.IO.StreamReader..ctor (System.String path) [0x00000] in <dca3b561b8ad4f9fb10141d81b39ff45>:0
  at (wrapper remoting-invoke-with-check) System.IO.StreamReader:.ctor (string)
  at Microsoft.Build.BuildEngine.Project.Load (System.String projectFileName, Microsoft.Build.BuildEngine.ProjectLoadSettings settings
) [0x000f4] in <29ed228a0f8e4d039e4eda81cff6d54b>:0
  at Microsoft.Build.BuildEngine.Project.Load (System.String projectFileName) [0x00000] in <29ed228a0f8e4d039e4eda81cff6d54b>:0
  at Microsoft.Build.BuildEngine.Engine.BuildProjectFileInternal (System.String projectFile, System.String[] targetNames, Microsoft.Bu
ild.BuildEngine.BuildPropertyGroup globalProperties, System.Collections.IDictionary targetOutputs, Microsoft.Build.BuildEngine.BuildSe
ttings buildFlags, System.String toolsVersion) [0x000b9] in <29ed228a0f8e4d039e4eda81cff6d54b>:0
  at Microsoft.Build.BuildEngine.Engine.BuildProjectFile (System.String projectFile, System.String[] targetNames, Microsoft.Build.Buil
dEngine.BuildPropertyGroup globalProperties, System.Collections.IDictionary targetOutputs, Microsoft.Build.BuildEngine.BuildSettings b
uildFlags, System.String toolsVersion) [0x00008] in <29ed228a0f8e4d039e4eda81cff6d54b>:0
make: *** [Makefile:163: bin/Mono.Cecil.dll] Error 1
make: *** Waiting for unfinished jobs....
make: *** [Makefile:163: bin/ICSharpCode.NRefactory.dll] Error 1
debugger-libs.sln: error : Could not find file "/tmp/sdb/dep/debugger-libs/debugger-libs.sln.proj".

Unhandled Exception:
System.IO.FileNotFoundException: Could not find file "/tmp/sdb/dep/debugger-libs/debugger-libs.sln.proj".
File name: '/tmp/sdb/dep/debugger-libs/debugger-libs.sln.proj'
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share,
System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x0021a] in <dca3b561b8ad4f9fb10141d81b39ff45>:0
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share,
System.Int32 bufferSize, System.IO.FileOptions options, System.String msgPath, System.Boolean bFromProxy, System.Boolean useLongPath,
System.Boolean checkHost) [0x00000] in <dca3b561b8ad4f9fb10141d81b39ff45>:0
  at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileSha
re,int,System.IO.FileOptions,string,bool,bool,bool)
  at System.IO.StreamReader..ctor (System.String path, System.Text.Encoding encoding, System.Boolean detectEncodingFromByteOrderMarks,
 System.Int32 bufferSize, System.Boolean checkHost) [0x00079] in <dca3b561b8ad4f9fb10141d81b39ff45>:0
  at System.IO.StreamReader..ctor (System.String path, System.Text.Encoding encoding, System.Boolean detectEncodingFromByteOrderMarks,
 System.Int32 bufferSize) [0x00000] in <dca3b561b8ad4f9fb10141d81b39ff45>:0
  at System.IO.StreamReader..ctor (System.String path, System.Boolean detectEncodingFromByteOrderMarks) [0x0000d] in <dca3b561b8ad4f9f
b10141d81b39ff45>:0
  at System.IO.StreamReader..ctor (System.String path) [0x00000] in <dca3b561b8ad4f9fb10141d81b39ff45>:0
  at (wrapper remoting-invoke-with-check) System.IO.StreamReader:.ctor (string)
  at Microsoft.Build.BuildEngine.Project.Load (System.String projectFileName, Microsoft.Build.BuildEngine.ProjectLoadSettings settings
) [0x000f4] in <29ed228a0f8e4d039e4eda81cff6d54b>:0
  at Microsoft.Build.BuildEngine.Project.Load (System.String projectFileName) [0x00000] in <29ed228a0f8e4d039e4eda81cff6d54b>:0
  at Microsoft.Build.BuildEngine.Engine.BuildProjectFileInternal (System.String projectFile, System.String[] targetNames, Microsoft.Bu
ild.BuildEngine.BuildPropertyGroup globalProperties, System.Collections.IDictionary targetOutputs, Microsoft.Build.BuildEngine.BuildSe
ttings buildFlags, System.String toolsVersion) [0x000b9] in <29ed228a0f8e4d039e4eda81cff6d54b>:0
  at Microsoft.Build.BuildEngine.Engine.BuildProjectFile (System.String projectFile, System.String[] targetNames, Microsoft.Build.Buil
dEngine.BuildPropertyGroup globalProperties, System.Collections.IDictionary targetOutputs, Microsoft.Build.BuildEngine.BuildSettings b
uildFlags, System.String toolsVersion) [0x00008] in <29ed228a0f8e4d039e4eda81cff6d54b>:0
make: *** [Makefile:163: bin/ICSharpCode.NRefactory.CSharp.dll] Error 1
debugger-libs.sln: error : /tmp/sdb/dep/debugger-libs/debugger-libs.sln: There is an unclosed literal string. Line 795, position 32.
debugger-libs.sln: error : Could not find file "/tmp/sdb/dep/debugger-libs/debugger-libs.sln.proj".

Unhandled Exception:
System.IO.FileNotFoundException: Could not find file "/tmp/sdb/dep/debugger-libs/debugger-libs.sln.proj".
File name: '/tmp/sdb/dep/debugger-libs/debugger-libs.sln.proj'
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share,
System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x0021a] in <dca3b561b8ad4f9fb10141d81b39ff45>:0
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share,
System.Int32 bufferSize, System.IO.FileOptions options, System.String msgPath, System.Boolean bFromProxy, System.Boolean useLongPath,
System.Boolean checkHost) [0x00000] in <dca3b561b8ad4f9fb10141d81b39ff45>:0
  at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileSha
re,int,System.IO.FileOptions,string,bool,bool,bool)
  at System.IO.StreamReader..ctor (System.String path, System.Text.Encoding encoding, System.Boolean detectEncodingFromByteOrderMarks,
 System.Int32 bufferSize, System.Boolean checkHost) [0x00079] in <dca3b561b8ad4f9fb10141d81b39ff45>:0
  at System.IO.StreamReader..ctor (System.String path, System.Text.Encoding encoding, System.Boolean detectEncodingFromByteOrderMarks, System.Int32 bufferSize) [0x00000] in <dca3b561b8ad4f9fb10141d81b39ff45>:0
  at System.IO.StreamReader..ctor (System.String path, System.Boolean detectEncodingFromByteOrderMarks) [0x0000d] in <dca3b561b8ad4f9fb10141d81b39ff45>:0
  at System.IO.StreamReader..ctor (System.String path) [0x00000] in <dca3b561b8ad4f9fb10141d81b39ff45>:0
  at (wrapper remoting-invoke-with-check) System.IO.StreamReader:.ctor (string)
  at Microsoft.Build.BuildEngine.Project.Load (System.String projectFileName, Microsoft.Build.BuildEngine.ProjectLoadSettings settings) [0x000f4] in <29ed228a0f8e4d039e4eda81cff6d54b>:0
  at Microsoft.Build.BuildEngine.Project.Load (System.String projectFileName) [0x00000] in <29ed228a0f8e4d039e4eda81cff6d54b>:0
  at Microsoft.Build.BuildEngine.Engine.BuildProjectFileInternal (System.String projectFile, System.String[] targetNames, Microsoft.Build.BuildEngine.BuildPropertyGroup globalProperties, System.Collections.IDictionary targetOutputs, Microsoft.Build.BuildEngine.BuildSettings buildFlags, System.String toolsVersion) [0x000b9] in <29ed228a0f8e4d039e4eda81cff6d54b>:0
  at Microsoft.Build.BuildEngine.Engine.BuildProjectFile (System.String projectFile, System.String[] targetNames, Microsoft.Build.BuildEngine.BuildPropertyGroup globalProperties, System.Collections.IDictionary targetOutputs, Microsoft.Build.BuildEngine.BuildSettings buildFlags, System.String toolsVersion) [0x00008] in <29ed228a0f8e4d039e4eda81cff6d54b>:0
make: *** [Makefile:163: bin/Mono.Debugger.Soft.dll] Error 1
make: *** [Makefile:163: bin/Mono.Debugging.Soft.dll] Error 1
TypeSystem/IType.cs(50,19): warning CS1580: Invalid type for parameter `1' in XML comment cref attribute `IEquatable<IType>.Equals(IType)'
TypeSystem/IType.cs(50,19): warning CS1574: XML comment on `ICSharpCode.NRefactory.TypeSystem.IType' has cref attribute `IEquatable<IType>.Equals(IType)' that could not be resolved
TypeSystem/ReflectionHelper.cs(211,32): warning CS1574: XML comment on `ICSharpCode.NRefactory.TypeSystem.ReflectionHelper.ParseReflectionName(string)' has cref attribute `FullTypeName(string)' that could not be resolved
TypeSystem/IType.cs(50,19): warning CS1580: Invalid type for parameter `1' in XML comment cref attribute `IEquatable<IType>.Equals(IType)'
TypeSystem/IType.cs(50,19): warning CS1574: XML comment on `ICSharpCode.NRefactory.TypeSystem.IType' has cref attribute `IEquatable<IType>.Equals(IType)' that could not be resolved
TypeSystem/ReflectionHelper.cs(211,32): warning CS1574: XML comment on `ICSharpCode.NRefactory.TypeSystem.ReflectionHelper.ParseReflectionName(string)' has cref attribute `FullTypeName(string)' that could not be resolved
TypeSystem/Implementation/DefaultUnresolvedTypeParameter.cs(41,15): warning CS0649: Field `ICSharpCode.NRefactory.TypeSystem.Implementation.DefaultUnresolvedTypeParameter.flags' is never assigned to, and will always have its default value
TypeSystem/Implementation/DefaultUnresolvedTypeParameter.cs(41,15): warning CS0649: Field `ICSharpCode.NRefactory.TypeSystem.Implementation.DefaultUnresolvedTypeParameter.flags' is never assigned to, and will always have its default value
Main.cs(51,12): warning CS0219: The variable `dec' is assigned but its value is never used
Main.cs(57,6): warning CS0219: The variable `c' is assigned but its value is never used
Main.cs(58,6): warning CS0219: The variable `b' is assigned but its value is never used
Main.cs(59,6): warning CS0219: The variable `a' is assigned but its value is never used
Main.cs(61,22): warning CS0219: The variable `withDisplayString' is assigned but its value is never used
Main.cs(62,14): warning CS0219: The variable `withProxy' is assigned but its value is never used
Main.cs(63,17): warning CS0219: The variable `withToString' is assigned but its value is never used
Main.cs(65,12): warning CS0219: The variable `numbersArrays' is assigned but its value is never used
Main.cs(66,12): warning CS0219: The variable `numbersMulti' is assigned but its value is never used
Main.cs(68,8): warning CS0219: The variable `dict' is assigned but its value is never used
Main.cs(69,8): warning CS0219: The variable `dictArray' is assigned but its value is never used
Main.cs(70,8): warning CS0219: The variable `thing' is assigned but its value is never used
Main.cs(71,8): warning CS0219: The variable `done' is assigned but its value is never used
Main.cs(78,10): warning CS0219: The variable `c' is assigned but its value is never used
Main.cs(44,17): warning CS0414: The private field `UnitTests.TestApp.MainClass.staticString' is assigned but its value is never used
Main.cs(45,10): warning CS0414: The private field `UnitTests.TestApp.MainClass.someString' is assigned but its value is never used
Main.cs(46,12): warning CS0414: The private field `UnitTests.TestApp.MainClass.numbers' is assigned but its value is never used
Main.cs(51,12): warning CS0219: The variable `dec' is assigned but its value is never used
Main.cs(57,6): warning CS0219: The variable `c' is assigned but its value is never used
Main.cs(58,6): warning CS0219: The variable `b' is assigned but its value is never used
Main.cs(59,6): warning CS0219: The variable `a' is assigned but its value is never used
Main.cs(61,22): warning CS0219: The variable `withDisplayString' is assigned but its value is never used
Main.cs(62,14): warning CS0219: The variable `withProxy' is assigned but its value is never used
Main.cs(63,17): warning CS0219: The variable `withToString' is assigned but its value is never used
Main.cs(65,12): warning CS0219: The variable `numbersArrays' is assigned but its value is never used
Main.cs(66,12): warning CS0219: The variable `numbersMulti' is assigned but its value is never used
Main.cs(68,8): warning CS0219: The variable `dict' is assigned but its value is never used
Main.cs(69,8): warning CS0219: The variable `dictArray' is assigned but its value is never used
Main.cs(70,8): warning CS0219: The variable `thing' is assigned but its value is never used
Main.cs(71,8): warning CS0219: The variable `done' is assigned but its value is never used
Main.cs(78,10): warning CS0219: The variable `c' is assigned but its value is never used
Main.cs(44,17): warning CS0414: The private field `UnitTests.TestApp.MainClass.staticString' is assigned but its value is never used
Main.cs(45,10): warning CS0414: The private field `UnitTests.TestApp.MainClass.someString' is assigned but its value is never used
Main.cs(46,12): warning CS0414: The private field `UnitTests.TestApp.MainClass.numbers' is assigned but its value is never used
Mono.Debugger.Soft/Connection.cs(1500,14): warning CS0219: The variable `watch' is assigned but its value is never used
Mono.Debugger.Soft/Connection.cs(1500,14): warning CS0219: The variable `watch' is assigned but its value is never used
Mono.Debugger.Soft/Connection.cs(409,14): warning CS0169: The private field `Mono.Debugger.Soft.Connection.ConnectionId' is never used
Mono.Debugger.Soft/VirtualMachine.cs(157,10): warning CS0414: The private field `Mono.Debugger.Soft.VirtualMachine.threadCacheLocker' is assigned but its value is never used
Mono.Debugger.Soft/Connection.cs(409,14): warning CS0169: The private field `Mono.Debugger.Soft.Connection.ConnectionId' is never used
Mono.Debugger.Soft/VirtualMachine.cs(157,10): warning CS0414: The private field `Mono.Debugger.Soft.VirtualMachine.threadCacheLocker' is assigned but its value is never used
Parser/mcs/cs-tokenizer.cs(1712,9): warning CS0219: The variable `hasLeadingDot' is assigned but its value is never used
Parser/mcs/cs-tokenizer.cs(3215,4): warning CS0162: Unreachable code detected
Parser/mcs/cs-tokenizer.cs(1712,9): warning CS0219: The variable `hasLeadingDot' is assigned but its value is never used
Parser/mcs/cs-tokenizer.cs(3215,4): warning CS0162: Unreachable code detected
Completion/CSharpCompletionEngine.cs(886,17): warning CS0219: The variable `parameterDefinition' is assigned but its value is never used
Completion/CSharpCompletionEngine.cs(886,17): warning CS0219: The variable `parameterDefinition' is assigned but its value is never used
Mono.Debugging.Evaluation/NRefactoryExpressionEvaluatorVisitor.cs(1097,63): warning CS0618: `ICSharpCode.NRefactory.CSharp.EmptyExpression' is obsolete: `This class is obsolete. Remove all referencing code.'
Mono.Debugging.Evaluation/NRefactoryExpressionEvaluatorVisitor.cs(1097,63): warning CS0618: `ICSharpCode.NRefactory.CSharp.EmptyExpression' is obsolete: `This class is obsolete. Remove all referencing code.'
mkdir -p bin
cp dep/nrefactory/bin/Debug/ICSharpCode.NRefactory.dll \
    bin/ICSharpCode.NRefactory.dll
cp dep/nrefactory/bin/Debug/ICSharpCode.NRefactory.CSharp.dll \
    bin/ICSharpCode.NRefactory.CSharp.dll
cp dep/cecil/bin/net_4_0_Debug/Mono.Cecil.dll \
    bin/Mono.Cecil.dll
cp dep/cecil/bin/net_4_0_Debug/Mono.Cecil.Mdb.dll \
    bin/Mono.Cecil.Mdb.dll
cp dep/debugger-libs/Mono.Debugger.Soft/bin/Debug/Mono.Debugger.Soft.dll \
    bin/Mono.Debugger.Soft.dll
cp dep/debugger-libs/Mono.Debugging/bin/Debug/Mono.Debugging.dll \
    bin/Mono.Debugging.dll
cp dep/debugger-libs/Mono.Debugging.Soft/bin/Debug/Mono.Debugging.Soft.dll \
    bin/Mono.Debugging.Soft.dll
mkdir -p bin
cp dep/nrefactory/bin/Debug/ICSharpCode.NRefactory.dll \
    bin/ICSharpCode.NRefactory.dll
cp dep/nrefactory/bin/Debug/ICSharpCode.NRefactory.CSharp.dll \
    bin/ICSharpCode.NRefactory.CSharp.dll
cp dep/cecil/bin/net_4_0_Debug/Mono.Cecil.dll \
    bin/Mono.Cecil.dll
cp dep/cecil/bin/net_4_0_Debug/Mono.Cecil.Mdb.dll \
    bin/Mono.Cecil.Mdb.dll
cp dep/debugger-libs/Mono.Debugger.Soft/bin/Debug/Mono.Debugger.Soft.dll \
    bin/Mono.Debugger.Soft.dll
cp dep/debugger-libs/Mono.Debugging/bin/Debug/Mono.Debugging.dll \
    bin/Mono.Debugging.dll
cp dep/debugger-libs/Mono.Debugging.Soft/bin/Debug/Mono.Debugging.Soft.dll \
    bin/Mono.Debugging.Soft.dll```

Workaround in buildroot package: `MONO_SDB_MAKE=$(MAKE1)`
alexrp commented 7 years ago

I figure it's because of this line: https://github.com/mono/sdb/blob/master/Makefile#L163

Make tries to build each DLL in bin in parallel, but they're all meant to be built as a single, serial recipe. SDB's Makefile should probably just have a .NOTPARALLEL directive.