Skip to content

armel build fail #49347

@clamp03

Description

@clamp03

armel build fails in System.Private.CoreLib crossgen2

How to

ROOTFS_DIR=../rootfs/armel ./build.sh --portablebuild false --arch armel --os Linux --clang10 --restore --build --configuration Release --cross --subset clr

Error Message

crossgen-corelib -> 
Generating native image of System.Private.CoreLib for Linux.armel.Release. Logging to /home/dheon/work/dotnet/jobs/net6/runtime/artifacts/log/CrossgenCoreLib_Linux__armel__Release.log
/home/dheon/work/dotnet/jobs/net6/runtime/dotnet.sh /home/dheon/work/dotnet/jobs/net6/runtime/artifacts/bin/coreclr/Linux.armel.Release/x64/crossgen2/crossgen2.dll -o:/home/dheon/work/dotnet/jobs/net6/runtime/artifacts/bin/coreclr/Linux.armel.Release/System.Private.CoreLib.dll -r:/home/dheon/work/dotnet/jobs/net6/runtime/artifacts/bin/coreclr/Linux.armel.Release/IL/*.dll --targetarch:armel -O /home/dheon/work/dotnet/jobs/net6/runtime/artifacts/bin/coreclr/Linux.armel.Release/IL/System.Private.CoreLib.dll --perfmap --perfmap-path:/home/dheon/work/dotnet/jobs/net6/runtime/artifacts/bin/coreclr/Linux.armel.Release/
EXEC : error : Unable to load shared library 'clrjit_unix_arm_x64' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libclrjit_unix_arm_x64: cannot open shared object file: No such file or directory [/home/dheon/work/dotnet/jobs/net6/runtime/src/coreclr/crossgen-corelib.proj]
  System.DllNotFoundException: Unable to load shared library 'clrjit_unix_arm_x64' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libclrjit_unix_arm_x64: cannot open shared object file: No such file or directory
     at System.Runtime.InteropServices.NativeLibrary.LoadByName(String libraryName, QCallAssembly callingAssembly, Boolean hasDllImportSearchPathFlag, UInt32 dllImportSearchPathFlag, Boolean throwOnError)
     at System.Runtime.InteropServices.NativeLibrary.LoadLibraryByName(String libraryName, Assembly assembly, Nullable`1 searchPath, Boolean throwOnError)
     at System.Runtime.InteropServices.NativeLibrary.Load(String libraryName, Assembly assembly, Nullable`1 searchPath)
     at Internal.JitInterface.JitConfigProvider.<>c__DisplayClass5_0.<Initialize>b__0(String libName, Assembly assembly, Nullable`1 searchPath)
     at System.Runtime.InteropServices.NativeLibrary.LoadLibraryCallbackStub(String libraryName, Assembly assembly, Boolean hasDllImportSearchPathFlags, UInt32 dllImportSearchPathFlags)
     at Internal.JitInterface.CorInfoImpl.jitStartup(IntPtr host)
     at Internal.JitInterface.CorInfoImpl.Startup()
     at Internal.JitInterface.JitConfigProvider.Initialize(TargetDetails target, IEnumerable`1 jitFlags, IEnumerable`1 parameters, String jitPath)
     at ILCompiler.ReadyToRunCodegenCompilationBuilder.ToCompilation()
     at ILCompiler.Program.Run(String[] args) in /home/dheon/work/dotnet/jobs/net6/runtime/src/coreclr/tools/aot/crossgen2/Program.cs:line 624
     at ILCompiler.Program.Main(String[] args) in /home/dheon/work/dotnet/jobs/net6/runtime/src/coreclr/tools/aot/crossgen2/Program.cs:line 791
/home/dheon/work/dotnet/jobs/net6/runtime/src/coreclr/crossgen-corelib.proj(107,5): error MSB3073: "/home/dheon/work/dotnet/jobs/net6/runtime/dotnet.sh /home/dheon/work/dotnet/jobs/net6/runtime/artifacts/bin/coreclr/Linux.armel.Release/x64/crossgen2/crossgen2.dll -o:/home/dheon/work/dotnet/jobs/net6/runtime/artifacts/bin/coreclr/Linux.armel.Release/System.Private.CoreLib.dll -r:/home/dheon/work/dotnet/jobs/net6/runtime/artifacts/bin/coreclr/Linux.armel.Release/IL/*.dll --targetarch:armel -O /home/dheon/work/dotnet/jobs/net6/runtime/artifacts/bin/coreclr/Linux.armel.Release/IL/System.Private.CoreLib.dll --perfmap --perfmap-path:/home/dheon/work/dotnet/jobs/net6/runtime/artifacts/bin/coreclr/Linux.armel.Release/" 명령이 종료되었습니다(코드: 1).

빌드하지 못했습니다.

EXEC : error : Unable to load shared library 'clrjit_unix_arm_x64' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libclrjit_unix_arm_x64: cannot open shared object file: No such file or directory [/home/dheon/work/dotnet/jobs/net6/runtime/src/coreclr/crossgen-corelib.proj]
/home/dheon/work/dotnet/jobs/net6/runtime/src/coreclr/crossgen-corelib.proj(107,5): error MSB3073: "/home/dheon/work/dotnet/jobs/net6/runtime/dotnet.sh /home/dheon/work/dotnet/jobs/net6/runtime/artifacts/bin/coreclr/Linux.armel.Release/x64/crossgen2/crossgen2.dll -o:/home/dheon/work/dotnet/jobs/net6/runtime/artifacts/bin/coreclr/Linux.armel.Release/System.Private.CoreLib.dll -r:/home/dheon/work/dotnet/jobs/net6/runtime/artifacts/bin/coreclr/Linux.armel.Release/IL/*.dll --targetarch:armel -O /home/dheon/work/dotnet/jobs/net6/runtime/artifacts/bin/coreclr/Linux.armel.Release/IL/System.Private.CoreLib.dll --perfmap --perfmap-path:/home/dheon/work/dotnet/jobs/net6/runtime/artifacts/bin/coreclr/Linux.armel.Release/" 명령이 종료되었습니다(코드: 1).
    경고 0개
    오류 2개

It try to load libclrjit_unix_arm_x64.so instead of libclrjit_unix_armel_x64.so in crossgen2.
In my guess, it needs a PR (#43706) to support armel in crossgen2. And updates targetspec string (below code) based on the PR.

libHandle = NativeLibrary.Load("clrjit_" + GetTargetSpec(target), assembly, searchPath);

private static string GetTargetSpec(TargetDetails target)
{
string targetOSComponent = (target.OperatingSystem == TargetOS.Windows ? "win" : "unix");
string targetArchComponent = target.Architecture switch
{
TargetArchitecture.X86 => "x86",
TargetArchitecture.X64 => "x64",
TargetArchitecture.ARM => "arm",
TargetArchitecture.ARM64 => "arm64",
_ => throw new NotImplementedException(target.Architecture.ToString())
};
return targetOSComponent + '_' + targetArchComponent + "_" + RuntimeInformation.ProcessArchitecture.ToString().ToLowerInvariant();
}

+ In armel client, crossgen2 requires "libjitinterface_arm.so and libcjirjit_arm_arm.so" files instead of existing "libjitinterface_armel.so and libcjirjit_armel_armel.so".

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions