Closed
Labels
Description
Build with (coreclr build doesn't work without #63121):
ROOTFS_DIR=`pwd`/.tools/rootfs/arm64 ./build.sh --portablebuild false --cross --clang10 --arch arm64 --runtimeConfiguration Release --librariesConfiguration Release --subset clr+libs.native /p:EnableSourceLink=false
ROOTFS_DIR=`pwd`/.tools/rootfs/arm64 ./build.sh --cross --clang10 --arch arm64 --runtimeConfiguration Release --librariesConfiguration Release --subset libs.ref+libs.src+libs.pretest+libs.packages+libs.tests --testscope all /p:EnableSourceLink=falseError:
Build FAILED.
"/home/runtime/.packages/microsoft.dotnet.arcade.sdk/7.0.0-beta.21621.3/tools/Build.proj" (default target) (1) ->
"/home/runtime/Build.proj" (Build target) (3:2) ->
"/home/runtime/src/libraries/tests.proj" (default target) (493) ->
"/home/runtime/src/libraries/System.Runtime.InteropServices/tests/DllImportGenerator.Tests/DllImportGenerator.Tests.csproj" (default target) (773) ->
"/home/runtime/src/libraries/System.Runtime.InteropServices/tests/DllImportGenerator.Tests/DllImportGenerator.Tests.csproj" (Build target) (773:2) ->
"/home/runtime/src/libraries/System.Runtime.InteropServices/tests/TestAssets/NativeExports/NativeExports.csproj" (default target) (775:2) ->
(GetUnixBuildArgumentsForDNNE target) ->
/home/runtime/src/libraries/System.Runtime.InteropServices/tests/TestAssets/NativeExports/NativeExports.csproj(33,5): error MSB3073: The command "..." exited with code 1.
0 Warning(s)
1 Error(s)
cc @alpencolt
Activity
gbalykov commentedon Dec 24, 2021
@am11 I think this is related to #62486, could you, please, take a look?
am11 commentedon Dec 24, 2021
@gbalykov, yup related to #62486 which fixed armel build but that is not cause of this error on arm64. 🙂
Can you please get some more diagnostics about the failing target:
basically we want to see the compiler command. (previously, I had to use similar debugging method for this target with DNNE sources to understand how the command is used in DNNE repo for gcc support: #60757)
gbalykov commentedon Dec 24, 2021
ROOTFS_DIR=`pwd`/.tools/rootfs/arm64 ./build.sh libs.tests -v:diag --cross --clang10 --arch arm64 --runtimeConfiguration Release --librariesConfiguration Release --testscope all /p:EnableSourceLink=falseLog:
I see that it can't find clang10 for some reason, but build of native part is performed with it:
am11 commentedon Dec 24, 2021
OK, it was not a straightforward one, but I am getting somewhere. First we are missing arm64 tizen tag in containers list, so I built tizen-arm64 rootfs in armel container (which also required patching objcopy in cmake).
Here is the command DNNE's internal target executes:
which resulted in:
I think you are on a different environment with clang10 with more than just the rootfs setup, so could be a different error? Could you share the dockerfile or details how your environment is setup, so I can dig deeper?
am11 commentedon Dec 24, 2021
Yup, just drop
-clang10from the command line it will pick it up automagically. If that fixes the build, I can look into why the detection is failing when-clang10is passed.gbalykov commentedon Dec 24, 2021
I use next setup for tizen cross build in docker.
Next script creates ubuntu docker container:
sudo docker pull ubuntu:focal sudo docker run ubuntu:focal bin/bash -c "apt update; DEBIAN_FRONTEND=noninteractive apt -y install tzdata; apt -y install git sudo curl libxml2-utils rpm2cpio cpio clang-9 llvm-9 clang-10 llvm-10 gcc-arm-linux-gnueabi g++-arm-linux-gnueabi gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf gcc-aarch64-linux-gnu g++-aarch64-linux-gnu vim cmake liblttng-ust-dev locales libicu-dev zlib1g zlib1g-dev libkrb5-dev libssl-dev; locale-gen en_US.UTF-8"To build rootfs:
To cross build runtime in ubuntu docker container:
This leads to another error:
I see that linker flags are setup in a way, that is not correct for tizen. In
eng/common/cross/toolchain.cmakewe setup linker flags this way:am11 commentedon Dec 24, 2021
Thanks. Regarding -clang10 detection, we used same mechanism in DNNE as used by
mono.proj. Unfortunately, both are missing version parsing as we doruntime/eng/native/build-commons.sh
Line 311 in 0b17270
am11 commentedon Dec 24, 2021
@gbalykov, with your setup, the clr subset fails at the end (during R2R)
gbalykov commentedon Dec 24, 2021
@am11 that's strange. Do you have checked build of dotnet sdk? Release
dotnetshould not show any asserts. For me this works:Also, you can skip
clr.nativecoreLibsubsetam11 commentedon Dec 24, 2021
You are right about the strange build. I just pushed the "remaining argument" index update (
"${@:7}"->"${@:5}") in #63126 which settles the build flavor. Now the tizen arm64 build is progressing fine, locally. 👍am11 commentedon Dec 24, 2021
@gbalykov, please try this patch: http://sprunge.us/2kg036
curl -s http://sprunge.us/2kg036 | git apply -and build libs.tests subset as you normally do with additional
__DistroRid=tizen.7.0.0-arm64environment variable. It's working on my machine ™️ :)note: I haven't added a support for
BEFOREandAFTERkeywords in this polyfill macro, since we are currently not using it intoolchain.cmakeam11 commentedon Dec 25, 2021
With #63128, we won't be needing manual
__DistroRidhack when usingROOTFS_DIR=`pwd`/.tools/rootfs/arm64 ./build.sh --cross --clang10 --arch arm64 --runtimeConfiguration Release --librariesConfiguration Release --subset libs.ref+libs.src+libs.pretest+libs.packages+libs.tests --testscope all /p:EnableSourceLink=falseam11 commentedon Jan 12, 2022
PR was manually merged. This can be closed now.
safern commentedon Jan 14, 2022
Closing per comment: PR was manually merged. This can be closed now.