-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
ARM64-to-ARM32 cross build is broken due to missing OPENSSL_gmtime #107647
Comments
Tagging subscribers to this area: @dotnet/area-system-security, @bartonjs, @vcsjones |
Removing the references to it manually fails the build later:
So it seems like the default rootfs for arm32-on-arm64 has 32-bit time_t for some reason. |
The rootfs appears to ignore #define __TIME_T_TYPE __SLONGWORD_TYPE in typesizes.h unconditionally, and __STD_TYPE __TIME_T_TYPE __time_t; /* Seconds since the Epoch. */ typedef __time_t time_t; |
That's specifically because recent distributions started compiling with 64-bit It makes me wonder what is the default distribution for |
Grepping around led me to EDIT: This appears to fix it. So I think we need to change the default for build-rootfs when targeting arm. |
should be |
On some hosts, the rootfs generated for an ARM cross build does not have OPENSSL_gmtime. I've reproduced this on both debian and ubuntu. For me on a brand new ubuntu arm64 vm in Azure, the following steps will repro it:
sudo ./eng/common/cross/build-rootfs.sh arm
./build.sh --cross --os linux --arch arm
I also tried an arm64 debian vm but I'm not sure if the failure there was identical, it just didn't work either.
The failure looks like this:
Looking through the rootfs, there are no symbols resembling
OPENSSL_gmtime
anywhere in it. I can't figure out why it's not there - according to openssl documentation this function dates back to 1.0.0 and both OpenSSL and BoringSSL should include it, though it looks like BoringSSL moves it to a different header.The reference to this missing function is scoped to arm32-on-linux:
which is probably why it hasn't caused grief for anyone yet. I think since we typically don't build for arm32 from an arm64 host, we're not hitting it - I guess somehow building an arm32 rootfs from an x64 host gets different headers? debootstrap-in-general seems like a total nightmare I'm struggling to understand (on my debian host debootstrap doesn't even work without manually creating symlinks), so I figure it's worth filing an issue about this.
The text was updated successfully, but these errors were encountered: