Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[android]build cdac-build-tool failed #114986

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
llzz19851985 opened this issue Apr 24, 2025 · 2 comments
Open

[android]build cdac-build-tool failed #114986

llzz19851985 opened this issue Apr 24, 2025 · 2 comments
Labels
area-Infrastructure-mono os-android untriaged New issue has not been triaged by the area owner

Comments

@llzz19851985
Copy link

Description

After referring to the build documentation,I use follow command to build android on ubuntu

  1. sudo eng/common/cross/build-android-rootfs.sh arm64
  2. ROOTFS_DIR=$(realpath /home/vinno/net8/runtime-9.0.4/.tools/android-rootfs/android-ndk-r21/sysroot) ./build.sh --cross -a arm64 -s clr
    than build failed,error as follow:
    grep: /home/vinno/net8/runtime-9.0.4/.tools/android-rootfs/android-ndk-r21/sysroot/etc/os-release: No such file or directory
    ld.lld : error : cannot open crti.o: No such file or directory [/home/vinno/net8/runtime-9.0.4/src/native/managed/cdacreader/src/cdacreader.csproj]
    ld.lld : error : cannot open crtbeginS.o: No such file or directory [/home/vinno/net8/runtime-9.0.4/src/native/managed/cdacreader/src/cdacreader.csproj]
    ld.lld : error : unable to find library -ldl [/home/vinno/net8/runtime-9.0.4/src/native/managed/cdacreader/src/cdacreader.csproj]
    ld.lld : error : unable to find library -lrt [/home/vinno/net8/runtime-9.0.4/src/native/managed/cdacreader/src/cdacreader.csproj]
    ld.lld : error : unable to find library -lm [/home/vinno/net8/runtime-9.0.4/src/native/managed/cdacreader/src/cdacreader.csproj]
    ld.lld : error : unable to find library -lgcc [/home/vinno/net8/runtime-9.0.4/src/native/managed/cdacreader/src/cdacreader.csproj]
    ld.lld : error : unable to find library -lgcc_s [/home/vinno/net8/runtime-9.0.4/src/native/managed/cdacreader/src/cdacreader.csproj]
    ld.lld : error : unable to find library -lpthread [/home/vinno/net8/runtime-9.0.4/src/native/managed/cdacreader/src/cdacreader.csproj]
    ld.lld : error : unable to find library -lc [/home/vinno/net8/runtime-9.0.4/src/native/managed/cdacreader/src/cdacreader.csproj]
    ld.lld : error : unable to find library -lgcc [/home/vinno/net8/runtime-9.0.4/src/native/managed/cdacreader/src/cdacreader.csproj]
    ld.lld : error : unable to find library -lgcc_s [/home/vinno/net8/runtime-9.0.4/src/native/managed/cdacreader/src/cdacreader.csproj]
    ld.lld : error : cannot open crtendS.o: No such file or directory [/home/vinno/net8/runtime-9.0.4/src/native/managed/cdacreader/src/cdacreader.csproj]
    ld.lld : error : cannot open crtn.o: No such file or directory [/home/vinno/net8/runtime-9.0.4/src/native/managed/cdacreader/src/cdacreader.csproj]
    clang : error : linker command failed with exit code 1 (use -v to see invocation) [/home/vinno/net8/runtime-9.0.4/src/native/managed/cdacreader/src/cdacreader.csproj]
    /home/vinno/.nuget/packages/microsoft.dotnet.ilcompiler/9.0.0-rtm.24511.16/build/Microsoft.NETCore.Native.targets(376,5): error MSB3073: The command ""clang" --gcc-toolchain=/home/vinno/net8/runtime-9.0.4/.tools/android-rootfs/android-ndk-r21/sysroot/usr "/home/vinno/net8/runtime-9.0.4/artifacts/obj/cdacreader/Debug/net9.0/linux-arm64/native/libcdacreader.o" -o "/home/vinno/net8/runtime-9.0.4/artifacts/bin/cdacreader/Debug/net9.0/linux-arm64/native/libcdacreader.so" -Wl,--version-script=/home/vinno/net8/runtime-9.0.4/artifacts/obj/cdacreader/Debug/net9.0/linux-arm64/native/libcdacreader.exports -Wl,--export-dynamic -Wl,-soname=cdacreader.so -gz=zlib -fuse-ld=lld /home/vinno/.nuget/packages/runtime.linux-arm64.microsoft.dotnet.ilcompiler/9.0.0-rtm.24511.16/sdk/libbootstrapperdll.o /home/vinno/.nuget/packages/runtime.linux-arm64.microsoft.dotnet.ilcompiler/9.0.0-rtm.24511.16/sdk/libRuntime.WorkstationGC.a /home/vinno/.nuget/packages/runtime.linux-arm64.microsoft.dotnet.ilcompiler/9.0.0-rtm.24511.16/sdk/libeventpipe-disabled.a /home/vinno/.nuget/packages/runtime.linux-arm64.microsoft.dotnet.ilcompiler/9.0.0-rtm.24511.16/sdk/libstandalonegc-disabled.a /home/vinno/.nuget/packages/runtime.linux-arm64.microsoft.dotnet.ilcompiler/9.0.0-rtm.24511.16/sdk/libstdc++compat.a /home/vinno/.nuget/packages/runtime.linux-arm64.microsoft.dotnet.ilcompiler/9.0.0-rtm.24511.16/framework/libSystem.Native.a /home/vinno/.nuget/packages/runtime.linux-arm64.microsoft.dotnet.ilcompiler/9.0.0-rtm.24511.16/framework/libSystem.IO.Compression.Native.a /home/vinno/.nuget/packages/runtime.linux-arm64.microsoft.dotnet.ilcompiler/9.0.0-rtm.24511.16/framework/libSystem.Net.Security.Native.a /home/vinno/.nuget/packages/runtime.linux-arm64.microsoft.dotnet.ilcompiler/9.0.0-rtm.24511.16/framework/libSystem.Security.Cryptography.Native.OpenSsl.a /home/vinno/.nuget/packages/runtime.linux-arm64.microsoft.dotnet.ilcompiler/9.0.0-rtm.24511.16/sdk/libz.a --sysroot="/home/vinno/net8/runtime-9.0.4/.tools/android-rootfs/android-ndk-r21/sysroot" --target=aarch64-linux-gnu -g -Wl,-rpath,'$ORIGIN' -Wl,--build-id=sha1 -Wl,--as-needed -Wl,-e,0x0 -pthread -ldl -lrt -lm -shared -Wl,-z,relro -Wl,-z,now -Wl,--eh-frame-hdr -Wl,--discard-all -Wl,--gc-sections -Wl,-T,"/home/vinno/net8/runtime-9.0.4/artifacts/obj/cdacreader/Debug/net9.0/linux-arm64/native/sections.ld"" exited with code 1. [/home/vinno/net8/runtime-9.0.4/src/native/managed/cdacreader/src/cdacreader.csproj]

Build FAILED.

ld.lld : error : cannot open crti.o: No such file or directory [/home/vinno/net8/runtime-9.0.4/src/native/managed/cdacreader/src/cdacreader.csproj]
ld.lld : error : cannot open crtbeginS.o: No such file or directory [/home/vinno/net8/runtime-9.0.4/src/native/managed/cdacreader/src/cdacreader.csproj]
ld.lld : error : unable to find library -ldl [/home/vinno/net8/runtime-9.0.4/src/native/managed/cdacreader/src/cdacreader.csproj]
ld.lld : error : unable to find library -lrt [/home/vinno/net8/runtime-9.0.4/src/native/managed/cdacreader/src/cdacreader.csproj]
ld.lld : error : unable to find library -lm [/home/vinno/net8/runtime-9.0.4/src/native/managed/cdacreader/src/cdacreader.csproj]
ld.lld : error : unable to find library -lgcc [/home/vinno/net8/runtime-9.0.4/src/native/managed/cdacreader/src/cdacreader.csproj]
ld.lld : error : unable to find library -lgcc_s [/home/vinno/net8/runtime-9.0.4/src/native/managed/cdacreader/src/cdacreader.csproj]
ld.lld : error : unable to find library -lpthread [/home/vinno/net8/runtime-9.0.4/src/native/managed/cdacreader/src/cdacreader.csproj]
ld.lld : error : unable to find library -lc [/home/vinno/net8/runtime-9.0.4/src/native/managed/cdacreader/src/cdacreader.csproj]
ld.lld : error : unable to find library -lgcc [/home/vinno/net8/runtime-9.0.4/src/native/managed/cdacreader/src/cdacreader.csproj]
ld.lld : error : unable to find library -lgcc_s [/home/vinno/net8/runtime-9.0.4/src/native/managed/cdacreader/src/cdacreader.csproj]
ld.lld : error : cannot open crtendS.o: No such file or directory [/home/vinno/net8/runtime-9.0.4/src/native/managed/cdacreader/src/cdacreader.csproj]
ld.lld : error : cannot open crtn.o: No such file or directory [/home/vinno/net8/runtime-9.0.4/src/native/managed/cdacreader/src/cdacreader.csproj]
clang : error : linker command failed with exit code 1 (use -v to see invocation) [/home/vinno/net8/runtime-9.0.4/src/native/managed/cdacreader/src/cdacreader.csproj]
/home/vinno/.nuget/packages/microsoft.dotnet.ilcompiler/9.0.0-rtm.24511.16/build/Microsoft.NETCore.Native.targets(376,5): error MSB3073: The command ""clang" --gcc-toolchain=/home/vinno/net8/runtime-9.0.4/.tools/android-rootfs/android-ndk-r21/sysroot/usr "/home/vinno/net8/runtime-9.0.4/artifacts/obj/cdacreader/Debug/net9.0/linux-arm64/native/libcdacreader.o" -o "/home/vinno/net8/runtime-9.0.4/artifacts/bin/cdacreader/Debug/net9.0/linux-arm64/native/libcdacreader.so" -Wl,--version-script=/home/vinno/net8/runtime-9.0.4/artifacts/obj/cdacreader/Debug/net9.0/linux-arm64/native/libcdacreader.exports -Wl,--export-dynamic -Wl,-soname=cdacreader.so -gz=zlib -fuse-ld=lld /home/vinno/.nuget/packages/runtime.linux-arm64.microsoft.dotnet.ilcompiler/9.0.0-rtm.24511.16/sdk/libbootstrapperdll.o /home/vinno/.nuget/packages/runtime.linux-arm64.microsoft.dotnet.ilcompiler/9.0.0-rtm.24511.16/sdk/libRuntime.WorkstationGC.a /home/vinno/.nuget/packages/runtime.linux-arm64.microsoft.dotnet.ilcompiler/9.0.0-rtm.24511.16/sdk/libeventpipe-disabled.a /home/vinno/.nuget/packages/runtime.linux-arm64.microsoft.dotnet.ilcompiler/9.0.0-rtm.24511.16/sdk/libstandalonegc-disabled.a /home/vinno/.nuget/packages/runtime.linux-arm64.microsoft.dotnet.ilcompiler/9.0.0-rtm.24511.16/sdk/libstdc++compat.a /home/vinno/.nuget/packages/runtime.linux-arm64.microsoft.dotnet.ilcompiler/9.0.0-rtm.24511.16/framework/libSystem.Native.a /home/vinno/.nuget/packages/runtime.linux-arm64.microsoft.dotnet.ilcompiler/9.0.0-rtm.24511.16/framework/libSystem.IO.Compression.Native.a /home/vinno/.nuget/packages/runtime.linux-arm64.microsoft.dotnet.ilcompiler/9.0.0-rtm.24511.16/framework/libSystem.Net.Security.Native.a /home/vinno/.nuget/packages/runtime.linux-arm64.microsoft.dotnet.ilcompiler/9.0.0-rtm.24511.16/framework/libSystem.Security.Cryptography.Native.OpenSsl.a /home/vinno/.nuget/packages/runtime.linux-arm64.microsoft.dotnet.ilcompiler/9.0.0-rtm.24511.16/sdk/libz.a --sysroot="/home/vinno/net8/runtime-9.0.4/.tools/android-rootfs/android-ndk-r21/sysroot" --target=aarch64-linux-gnu -g -Wl,-rpath,'$ORIGIN' -Wl,--build-id=sha1 -Wl,--as-needed -Wl,-e,0x0 -pthread -ldl -lrt -lm -shared -Wl,-z,relro -Wl,-z,now -Wl,--eh-frame-hdr -Wl,--discard-all -Wl,--gc-sections -Wl,-T,"/home/vinno/net8/runtime-9.0.4/artifacts/obj/cdacreader/Debug/net9.0/linux-arm64/native/sections.ld"" exited with code 1. [/home/vinno/net8/runtime-9.0.4/src/native/managed/cdacreader/src/cdacreader.csproj]
0 Warning(s)
15 Error(s)

please help how to fixed this issue,thank you very much!

Reproduction Steps

  1. sudo eng/common/cross/build-android-rootfs.sh arm64
  2. ROOTFS_DIR=$(realpath /home/vinno/net8/runtime-9.0.4/.tools/android-rootfs/android-ndk-r21/sysroot) ./build.sh --cross -a arm64 -s clr

Expected behavior

build android ok

Actual behavior

cannot build cdac-build-tool on android

Regression?

No response

Known Workarounds

No response

Configuration

No response

Other information

No response

@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Apr 24, 2025
@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Apr 24, 2025
Copy link
Contributor

Tagging subscribers to 'arch-android': @vitek-karas, @simonrozsival, @steveisok, @akoeplinger
See info in area-owners.md if you want to be subscribed.

Copy link
Contributor

Tagging subscribers to this area: @akoeplinger, @matouskozak
See info in area-owners.md if you want to be subscribed.

@teo-tsirpanis teo-tsirpanis removed the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label May 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Infrastructure-mono os-android untriaged New issue has not been triaged by the area owner
Projects
None yet
Development

No branches or pull requests

3 participants