-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
MbedTLS source build fixes #39131
MbedTLS source build fixes #39131
Conversation
sed
call to work on macOSsed
call to work on macOS
Looks like building mbedtls from sources has a couple of issues which I'll take care of here. |
sed
call to work on macOS
Failure on aarch64 appears unrelated.
I'll rebase these changes and see if they pass on another CI run. |
Some additional details about the failures. Without the $ make -C deps extract-mbedtls
...
sed "s|//#define MBEDTLS_MD4_C|#define MBEDTLS_MD4_C|" -i /Users/omus/Development/Julia/x86/latest-src/deps/srccache/mbedtls-2.24.0/include/mbedtls/config.h
sed: -i: No such file or directory
... # all 3808 lines from mbedtls/config.h
make: *** [/Users/omus/Development/Julia/x86/latest-src/deps/srccache/mbedtls-2.24.0/source-extracted] Error 1 Without the fix to apply the MbedTLS patch only once the following error occurs when attempting to compile MbedTLS more than once: $ make -C deps compile-mbedtls
...
[100%] Linking C executable test_suite_aes.cbc
[100%] Built target test_suite_aes.cbc
echo 1 > scratch/mbedtls-2.24.0/build-compiled
$ make -C deps compile-mbedtls
# Apply workaround for CMake 3.18.2 bug (https://github.com/ARMmbed/mbedtls/pull/3691).
# This patch merged upstream shortly after MBedTLS's 2.25.0 minor release, so chances
# are it will be included at least in their next minor release (2.26.0?).
cd /Users/omus/Development/Julia/x86/latest-src/deps/srccache/mbedtls-2.24.0 && \
patch -p1 -f < /Users/omus/Development/Julia/x86/latest-src/deps/patches/mbedtls-cmake-findpy.patch
patching file CMakeLists.txt
Hunk #1 FAILED at 17.
1 out of 1 hunk FAILED -- saving rejects to file CMakeLists.txt.rej
make: *** [/Users/omus/Development/Julia/x86/latest-src/deps/srccache/mbedtls-2.24.0/mbedtls-cmake-findpy.patch-applied] Error 1 |
The $ make -C deps compile-mbedtls
...
-- Configuring done
CMake Warning (dev):
Policy CMP0042 is not set: MACOSX_RPATH is enabled by default. Run "cmake
--help-policy CMP0042" for policy details. Use the cmake_policy command to
set the policy and suppress this warning.
MACOSX_RPATH is not specified for the following targets:
mbedcrypto
mbedtls
mbedx509
This warning is for project developers. Use -Wno-dev to suppress it.
... |
Thanks for these fixes Curtis! I just spent the last long while tracking down an issue due to the |
(cherry picked from commit 492096f)
(cherry picked from commit 492096f)
(cherry picked from commit 492096f)
Fixes two issues with the MbedTLS sources builds:
sed
call to work on macOSFrom the macOS man page for
sed
:This syntax is also supported on Linux