Uh oh!
There was an error while loading. Please reload this page.
Fix build on Clear Linux and Android device - #34211
Conversation
akoeplinger
commented
Mar 30, 2020
The Android change looks good but I'm not so sure about the CFLAGS/CXXFLAGS one. The reason why Clear Linux and other distros set these CFLAGS is exactly because they want them to be used by projects. It is standard behavior of autotools-based projects to be able to inject your own CFLAGS via env variables. |
am11
commented
Mar 30, 2020
Thanks. This project has complex configuration graph and desired flags are anyway materialized in configuration files, so some/most of the C{XX}Flags from environment are overwritten (unless cmake cache variable is used?) On Clear Linux, main problem is that If support of C{XX}Flags from the environment is desired (which I agree is the conventional approach), we can:
or do nothing. 🙂 |
akoeplinger
commented
Mar 30, 2020
If unsetting |
New changes pushed:
|
am11
commented
Mar 31, 2020
Seems like a disconnection issue on CI:
@jkotas, could you please run the failing legs? |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
am11
commented
Mar 31, 2020
@akoeplinger, updated the top comment. Could you please give it another pass? :) |
am11
commented
Apr 1, 2020
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
am11
commented
Apr 2, 2020
Although very close to the area which this PR is touching, but |
jkotas
commented
Apr 4, 2020
OSX machine recycled during the run (#34472) |
jkotas
commented
Apr 4, 2020
@akoeplinger Are you ok with this change after the discussion? |
Uh oh!
There was an error while loading. Please reload this page.
am11
commented
Apr 7, 2020
@jkotas, can this be merged? |
jkotas
commented
Apr 7, 2020
I am waiting for @akoeplinger to clear his changes requested feedback. The merging is blocked because of it. It is possible to merge anyway using admin privileges, but I prefer to use my admin privileges to handle emergencies only. |
Linux musl arm64 release looks similar to dotnet/arcade#4190. Could be due to #34044 ( cc @mmitche: https://dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_apis/build/builds/592074/logs/1016 |
akoeplinger
left a comment
There was a problem hiding this comment.
Looks good to me apart from one question. Sorry for the delay.
| usage_list+=("-nopgooptimize: do not use profile guided optimizations.") | ||
| usage_list+=("-pgoinstrument: generate instrumented code for profile guided optimization enabled binaries.") | ||
| usage_list+=("-skipcrossarchnative: Skip building cross-architecture native binaries.") | ||
| usage_list+=("-skiprestoreoptdata: skip restoring optimization data.") |
There was a problem hiding this comment.
@akoeplinger, I called it out here #34211 (comment). This option in help menu was removed from code, the case-esac block which handles options, and superseded by -nopgooptimize. For example, to quickly build coreclr native components with PAL tests on an unsupported Unix (e.g. SunOS, QNX), where dontet(1)/msbuild is currently unavailable, we can use:
./src/coreclr/build-runtime.sh -skipgenerateversion -nopgooptimize \
-cmakeargs -DCLR_CMAKE_BUILD_TESTS=1There was a problem hiding this comment.
Ok. It's still in src/coreclr/build-runtime.cmd that's why I was confused :)
am11
commented
Apr 8, 2020
Remaining failures are unrelated to PR changes.
Extraction failed for file: /datadisks/disk1/workspace/_work/1/s/__download__/libraries_test_assets_Linux_x64_Debug/libraries_test_assets_Linux_x64_Debug.tar.gz code: 2 stdout: helix/
helix/tests/
helix/tests/Linux.AnyCPU.Debug/
helix/tests/Linux.AnyCPU.Debug/System.ComponentModel.Composition.Tests.zip
...
helix/tests/Linux.AnyCPU.Debug/System.IO.Compression.Brotli.Tests.zip
stderr: gzip: stdin: unexpected end of file
/bin/tar: Unexpected EOF in archive
/bin/tar: Unexpected EOF in archive
/bin/tar: Error is not recoverable: exiting now
error: undefined; |
Consists of two small commits:
Fix native component build for Clear Linux
_FORTIFY_SOURCE=2which conflictst with CoreCLR and Libraries compilation and break the build. this delta clears_FORTIFY_SOURCE=2fromCMAKE_CXX_FLAGSandCMAKE_C_FLAGSif set by the environment (i.e. very early in the process).Only skip call to check_pie_supported on Android
glob(3), see the comment:runtime/eng/common/cross/build-android-rootfs.sh
Line 23 in f79afdb
-no-pieflag, thus the call tocheck_pie_supportedfails. However, it sets the PIC flag for us (not sure exactly where?). With level 28, it allows -no-pie, and also sets PIC flag. Hence, the current master is happy for both use-cases.android.toolchain.cmakeinto use).check_pie_supported, and set PIC unconditionally (as Android requires PIC and setting it twice in certain scenario has no side-effect).cc @jkotas, @akoeplinger, @janvorli