Skip to content
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

error: failed to run custom build command for aws-lc-fips-sys v0.12.13 #587

Closed
pront opened this issue Nov 13, 2024 · 8 comments
Closed

Comments

@pront
Copy link

pront commented Nov 13, 2024

Problem:

Build error:

clang: error: overriding '-mmacos-version-min=14.7' option with '--target=arm64-apple-macosx15.1' [-Werror,-Woverriding-option]
error: failed to run custom build command for `aws-lc-fips-sys v0.12.13`
note: To improve backtraces for build dependencies, set the CARGO_PROFILE_DEV_BUILD_OVERRIDE_DEBUG=true environment variable to enable debug information generation.
Caused by:
  process didn't exit successfully: `/Users/pavlos.rontidis/CLionProjects/vector/target/debug/build/aws-lc-fips-sys-4a4993c8465640bf/build-script-main` (exit status: 101)
  --- stdout
  cargo:rerun-if-env-changed=AWS_LC_FIPS_SYS_NO_PREFIX
  cargo:rerun-if-env-changed=AWS_LC_FIPS_SYS_PREGENERATING_BINDINGS
  cargo:rerun-if-env-changed=AWS_LC_FIPS_SYS_EXTERNAL_BINDGEN
  cargo:rerun-if-env-changed=AWS_LC_FIPS_SYS_NO_ASM
  cargo:rustc-cfg=aarch64_apple_darwin
  cargo:rerun-if-env-changed=AWS_LC_FIPS_SYS_STATIC
  cargo:rerun-if-env-changed=AWS_LC_FIPS_SYS_STATIC
  cargo:rerun-if-env-changed=CMAKE_TOOLCHAIN_FILE
  cargo:rerun-if-env-changed=CMAKE_TOOLCHAIN_FILE_aarch64_apple_darwin
  CMAKE_TOOLCHAIN_FILE_aarch64-apple-darwin = None
  CMAKE_TOOLCHAIN_FILE_aarch64_apple_darwin = None
  HOST_CMAKE_TOOLCHAIN_FILE = None
  CMAKE_TOOLCHAIN_FILE = None
  CMAKE_GENERATOR_aarch64-apple-darwin = None
  CMAKE_GENERATOR_aarch64_apple_darwin = None
  HOST_CMAKE_GENERATOR = None
  CMAKE_GENERATOR = None
  CMAKE_PREFIX_PATH_aarch64-apple-darwin = None
  CMAKE_PREFIX_PATH_aarch64_apple_darwin = None
  HOST_CMAKE_PREFIX_PATH = None
  CMAKE_PREFIX_PATH = None
  CMAKE_aarch64-apple-darwin = None
  CMAKE_aarch64_apple_darwin = None
  HOST_CMAKE = None
  CMAKE = Some("cmake")
  running: cd "/Users/pavlos.rontidis/CLionProjects/vector/target/debug/build/aws-lc-fips-sys-a5a091a5020ce430/out/build" && CMAKE_PREFIX_PATH="" "cmake" "/Users/pavlos.rontidis/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-fips-sys-0.12.13" "-DBUILD_SHARED_LIBS=1" "-DCMAKE_BUILD_TYPE=debug" "-DBORINGSSL_PREFIX=aws_lc_fips_0_12_13_" "-DBORINGSSL_PREFIX_HEADERS=/Users/pavlos.rontidis/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-fips-sys-0.12.13/generated-include" "-DBUILD_TESTING=OFF" "-DBUILD_LIBSSL=OFF" "-DFIPS=1" "-DCMAKE_OSX_ARCHITECTURES=arm64" "-DCMAKE_SYSTEM_PROCESSOR=arm64" "-DCMAKE_INSTALL_PREFIX=/Users/pavlos.rontidis/CLionProjects/vector/target/debug/build/aws-lc-fips-sys-a5a091a5020ce430/out" "-DCMAKE_C_FLAGS= -ffunction-sections -fdata-sections -fPIC --target=arm64-apple-macosx15.1" "-DCMAKE_C_COMPILER=/opt/homebrew/opt/llvm/bin/clang" "-DCMAKE_CXX_FLAGS= -ffunction-sections -fdata-sections -fPIC --target=arm64-apple-macosx15.1" "-DCMAKE_CXX_COMPILER=/opt/homebrew/opt/llvm/bin/clang++" "-DCMAKE_ASM_FLAGS= -ffunction-sections -fdata-sections -fPIC --target=arm64-apple-macosx15.1" "-DCMAKE_ASM_COMPILER=/opt/homebrew/opt/llvm/bin/clang" "--no-warn-unused-cli"
  Not searching for unused variables given on the command line.
  -- FIPS build mode configured
  -- FIPS entropy source method configured: Passive
  -- stdalign_check.c probe is negative, NOT enabling AWS_LC_STDALIGN_AVAILABLE:
  --     Change Dir: '/Users/pavlos.rontidis/CLionProjects/vector/target/debug/build/aws-lc-fips-sys-a5a091a5020ce430/out/build/aws-lc/CMakeFiles/CMakeTmp'
  Run Build Command(s): /opt/homebrew/bin/cmake -E env VERBOSE=1 /opt/homebrew/bin/gmake -f Makefile cmTC_5969a/fast
  /opt/homebrew/bin/gmake  -f CMakeFiles/cmTC_5969a.dir/build.make CMakeFiles/cmTC_5969a.dir/build
  gmake[1]: Entering directory '/Users/pavlos.rontidis/CLionProjects/vector/target/debug/build/aws-lc-fips-sys-a5a091a5020ce430/out/build/aws-lc/CMakeFiles/CMakeTmp'
  /opt/homebrew/opt/llvm/bin/clang   -ffunction-sections -fdata-sections -fPIC --target=arm64-apple-macosx15.1 -fno-function-sections -fno-data-sections -std=c99 -fvisibility=hidden -Wall -Wextra -Wno-unused-parameter -Werror -Wunused -Wcomment -Wchar-subscripts -Wuninitialized -Wshadow -Wwrite-strings -Wformat-security -Wunused-result  -Wvla -Wtype-limits -Werror -Wformat=2 -Wsign-compare -Wmissing-field-initializers -Wwrite-strings -ggdb -Wall -fvisibility=hidden -fno-common -Wnewline-eof -fcolor-diagnostics -Wstring-concatenation -Wimplicit-fallthrough -Wmissing-prototypes -Wold-style-definition -Wstrict-prototypes  -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.1.sdk -mmacosx-version-min=14.7   -Werror -MD -MT CMakeFiles/cmTC_5969a.dir/stdalign_check.c.o -MF CMakeFiles/cmTC_5969a.dir/stdalign_check.c.o.d -o CMakeFiles/cmTC_5969a.dir/stdalign_check.c.o -c /Users/pavlos.rontidis/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-fips-sys-0.12.13/aws-lc/tests/compiler_features_tests/stdalign_check.c
  clang: error: overriding '-mmacos-version-min=14.7' option with '--target=arm64-apple-macosx15.1' [-Werror,-Woverriding-option]
  gmake[1]: *** [CMakeFiles/cmTC_5969a.dir/build.make:82: CMakeFiles/cmTC_5969a.dir/stdalign_check.c.o] Error 1
  gmake[1]: Leaving directory '/Users/pavlos.rontidis/CLionProjects/vector/target/debug/build/aws-lc-fips-sys-a5a091a5020ce430/out/build/aws-lc/CMakeFiles/CMakeTmp'
  gmake: *** [Makefile:133: cmTC_5969a/fast] Error 2
  -- builtin_swap_check.c probe is negative, NOT enabling AWS_LC_BUILTIN_SWAP_SUPPORTED:
  --     Change Dir: '/Users/pavlos.rontidis/CLionProjects/vector/target/debug/build/aws-lc-fips-sys-a5a091a5020ce430/out/build/aws-lc/CMakeFiles/CMakeTmp'
  Run Build Command(s): /opt/homebrew/bin/cmake -E env VERBOSE=1 /opt/homebrew/bin/gmake -f Makefile cmTC_bbde8/fast
  /opt/homebrew/bin/gmake  -f CMakeFiles/cmTC_bbde8.dir/build.make CMakeFiles/cmTC_bbde8.dir/build
  gmake[1]: Entering directory '/Users/pavlos.rontidis/CLionProjects/vector/target/debug/build/aws-lc-fips-sys-a5a091a5020ce430/out/build/aws-lc/CMakeFiles/CMakeTmp'
  /opt/homebrew/opt/llvm/bin/clang   -ffunction-sections -fdata-sections -fPIC --target=arm64-apple-macosx15.1 -fno-function-sections -fno-data-sections -std=c99 -fvisibility=hidden -Wall -Wextra -Wno-unused-parameter -Werror -Wunused -Wcomment -Wchar-subscripts -Wuninitialized -Wshadow -Wwrite-strings -Wformat-security -Wunused-result  -Wvla -Wtype-limits -Werror -Wformat=2 -Wsign-compare -Wmissing-field-initializers -Wwrite-strings -ggdb -Wall -fvisibility=hidden -fno-common -Wnewline-eof -fcolor-diagnostics -Wstring-concatenation -Wimplicit-fallthrough -Wmissing-prototypes -Wold-style-definition -Wstrict-prototypes  -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.1.sdk -mmacosx-version-min=14.7   -Werror -MD -MT CMakeFiles/cmTC_bbde8.dir/builtin_swap_check.c.o -MF CMakeFiles/cmTC_bbde8.dir/builtin_swap_check.c.o.d -o CMakeFiles/cmTC_bbde8.dir/builtin_swap_check.c.o -c /Users/pavlos.rontidis/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-fips-sys-0.12.13/aws-lc/tests/compiler_features_tests/builtin_swap_check.c
  clang: error: overriding '-mmacos-version-min=14.7' option with '--target=arm64-apple-macosx15.1' [-Werror,-Woverriding-option]
  gmake[1]: *** [CMakeFiles/cmTC_bbde8.dir/build.make:82: CMakeFiles/cmTC_bbde8.dir/builtin_swap_check.c.o] Error 1
  gmake[1]: Leaving directory '/Users/pavlos.rontidis/CLionProjects/vector/target/debug/build/aws-lc-fips-sys-a5a091a5020ce430/out/build/aws-lc/CMakeFiles/CMakeTmp'
  gmake: *** [Makefile:133: cmTC_bbde8/fast] Error 2
  -- Disabling debug symbols for Clang internal assembler
  -- Configuring incomplete, errors occurred!
  --- stderr
  CMake Deprecation Warning at CMakeLists.txt:4 (cmake_minimum_required):
    Compatibility with CMake < 3.10 will be removed from a future version of
    CMake.
    Update the VERSION argument <min> value or use a ...<max> suffix to tell
    CMake that the project does not need compatibility with older versions.
  CMake Deprecation Warning at aws-lc/CMakeLists.txt:1 (cmake_minimum_required):
    Compatibility with CMake < 3.10 will be removed from a future version of
    CMake.
    Update the VERSION argument <min> value or use a ...<max> suffix to tell
    CMake that the project does not need compatibility with older versions.
  CMake Warning (dev) at aws-lc/crypto/CMakeLists.txt:582 (add_custom_command):
    The following keywords are not supported when using
    add_custom_command(TARGET): DEPENDS.
    Policy CMP0175 is not set: add_custom_command() rejects invalid arguments.
    Run "cmake --help-policy CMP0175" for policy details.  Use the cmake_policy
    command to set the policy and suppress this warning.
  This warning is for project developers.  Use -Wno-dev to suppress it.
  CMake Error at /opt/homebrew/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:233 (message):
    Could NOT find Threads (missing: Threads_FOUND)
  Call Stack (most recent call first):
    /opt/homebrew/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:603 (_FPHSA_FAILURE_MESSAGE)
    /opt/homebrew/share/cmake/Modules/FindThreads.cmake:226 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
    aws-lc/crypto/CMakeLists.txt:623 (find_package)
  thread 'main' panicked at /Users/pavlos.rontidis/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cmake-0.1.50/src/lib.rs:1098:5:
  command did not execute successfully, got: exit status: 1
  build script failed, must exit now
  stack backtrace:
     0: rust_begin_unwind
               at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/std/src/panicking.rs:665:5
     1: core::panicking::panic_fmt
               at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/core/src/panicking.rs:74:14
     2: cmake::fail
     3: cmake::run
     4: cmake::Config::build
     5: build_script_main::cmake_builder::CmakeBuilder::build_rust_wrapper
     6: <build_script_main::cmake_builder::CmakeBuilder as build_script_main::Builder>::build
     7: build_script_main::main
     8: core::ops::function::FnOnce::call_once
  note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

You can checkout this PR: vectordotdev/vector#21504

Relevant details

AWS-LC for Rust versions or commit:

aws-lc-fips-sys v0.12.13

System information:

❯ sw_vers
ProductName:		macOS
ProductVersion:		14.7.1
BuildVersion:		23H222
❯ xcodebuild -showsdks
DriverKit SDKs:
        DriverKit 24.1                  -sdk driverkit24.1

iOS SDKs:
        iOS 18.1                        -sdk iphoneos18.1

iOS Simulator SDKs:
        Simulator - iOS 18.1            -sdk iphonesimulator18.1

macOS SDKs:
        macOS 15.1                      -sdk macosx15.1
        macOS 15.1                      -sdk macosx15.1

tvOS SDKs:
        tvOS 18.1                       -sdk appletvos18.1

tvOS Simulator SDKs:
        Simulator - tvOS 18.1           -sdk appletvsimulator18.1

visionOS SDKs:
        visionOS 2.1                    -sdk xros2.1

visionOS Simulator SDKs:
        Simulator - visionOS 2.1        -sdk xrsimulator2.1

watchOS SDKs:
        watchOS 11.1                    -sdk watchos11.1

watchOS Simulator SDKs:
        Simulator - watchOS 11.1        -sdk watchsimulator11.1

Build log:
See above.

❯ clang --version
Homebrew clang version 19.1.3
Target: arm64-apple-darwin23.6.0
Thread model: posix
InstalledDir: /opt/homebrew/Cellar/llvm/19.1.3/bin
Configuration file: /opt/homebrew/etc/clang/arm64-apple-darwin23.cfg
@justsmth
Copy link
Contributor

Hello @pront -- Thanks for reporting this!

We started noticing this failure on certain CI jobs a couple of weeks ago. I put up a PR to address it: #584

As a workaround, you might try setting CFLAGS in your environment:

export CFLAGS="-Wno-overriding-t-option"

This appears to have worked when I tested it here.

We plan to put out another release of aws-lc-fips-sys soon to correct this issue.

@pront
Copy link
Author

pront commented Nov 14, 2024

We plan to put out another release of aws-lc-fips-sys soon to correct this issue.

Thank you @justsmth. Looking forward to the next release.

@justsmth
Copy link
Contributor

aws-lc-rs v1.11.0 has now been released. We believe this release addresses the problem reported here.

We will now close this issue. Feel free to re-open it (or open another) if you continue to see a problem after upgrading. Thanks again for reporting this issue!

@pront
Copy link
Author

pront commented Nov 18, 2024

This is interesting, I did:

cargo update -p async-nats
cargo clean

but when I build with I get:

error: failed to run custom build command for `aws-lc-fips-sys v0.12.13`

Caused by:
  process didn't exit successfully: `/Users/pavlos.rontidis/CLionProjects/vector/target/debug/build/aws-lc-fips-sys-e0039db9928a266f/build-script-main` (exit status: 101)
  --- stdout
  cargo:rerun-if-env-changed=AWS_LC_FIPS_SYS_NO_PREFIX
  cargo:rerun-if-env-changed=AWS_LC_FIPS_SYS_PREGENERATING_BINDINGS
  cargo:rerun-if-env-changed=AWS_LC_FIPS_SYS_EXTERNAL_BINDGEN
  cargo:rerun-if-env-changed=AWS_LC_FIPS_SYS_NO_ASM
  cargo:rustc-cfg=aarch64_apple_darwin
  cargo:rerun-if-env-changed=AWS_LC_FIPS_SYS_STATIC
  cargo:rerun-if-env-changed=AWS_LC_FIPS_SYS_STATIC
  cargo:rerun-if-env-changed=CMAKE_TOOLCHAIN_FILE
  cargo:rerun-if-env-changed=CMAKE_TOOLCHAIN_FILE_aarch64_apple_darwin
  CMAKE_TOOLCHAIN_FILE_aarch64-apple-darwin = None
  CMAKE_TOOLCHAIN_FILE_aarch64_apple_darwin = None
  HOST_CMAKE_TOOLCHAIN_FILE = None
  CMAKE_TOOLCHAIN_FILE = None
  CMAKE_GENERATOR_aarch64-apple-darwin = None
  CMAKE_GENERATOR_aarch64_apple_darwin = None
  HOST_CMAKE_GENERATOR = None
  CMAKE_GENERATOR = None
  CMAKE_PREFIX_PATH_aarch64-apple-darwin = None
  CMAKE_PREFIX_PATH_aarch64_apple_darwin = None
  HOST_CMAKE_PREFIX_PATH = None
  CMAKE_PREFIX_PATH = None
  CMAKE_aarch64-apple-darwin = None
  CMAKE_aarch64_apple_darwin = None
  HOST_CMAKE = None
  CMAKE = Some("cmake")
  running: cd "/Users/pavlos.rontidis/CLionProjects/vector/target/debug/build/aws-lc-fips-sys-c12b65e2bed0dda8/out/build" && CMAKE_PREFIX_PATH="" "cmake" "/Users/pavlos.rontidis/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-fips-sys-0.12.13" "-DBUILD_SHARED_LIBS=1" "-DCMAKE_BUILD_TYPE=debug" "-DBORINGSSL_PREFIX=aws_lc_fips_0_12_13_" "-DBORINGSSL_PREFIX_HEADERS=/Users/pavlos.rontidis/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-fips-sys-0.12.13/generated-include" "-DBUILD_TESTING=OFF" "-DBUILD_LIBSSL=OFF" "-DFIPS=1" "-DCMAKE_OSX_ARCHITECTURES=arm64" "-DCMAKE_SYSTEM_PROCESSOR=arm64" "-DCMAKE_INSTALL_PREFIX=/Users/pavlos.rontidis/CLionProjects/vector/target/debug/build/aws-lc-fips-sys-c12b65e2bed0dda8/out" "-DCMAKE_C_FLAGS= -ffunction-sections -fdata-sections -fPIC --target=arm64-apple-macosx15.1" "-DCMAKE_C_COMPILER=/opt/homebrew/opt/llvm/bin/clang" "-DCMAKE_CXX_FLAGS= -ffunction-sections -fdata-sections -fPIC --target=arm64-apple-macosx15.1" "-DCMAKE_CXX_COMPILER=/opt/homebrew/opt/llvm/bin/clang++" "-DCMAKE_ASM_FLAGS= -ffunction-sections -fdata-sections -fPIC --target=arm64-apple-macosx15.1" "-DCMAKE_ASM_COMPILER=/opt/homebrew/opt/llvm/bin/clang" "--no-warn-unused-cli"
  Not searching for unused variables given on the command line.
  -- FIPS build mode configured
  -- FIPS entropy source method configured: Passive
  -- stdalign_check.c probe is positive, enabling AWS_LC_STDALIGN_AVAILABLE
  -- builtin_swap_check.c probe is positive, enabling AWS_LC_BUILTIN_SWAP_SUPPORTED
  -- Disabling debug symbols for Clang internal assembler
  -- Configuring done (1.4s)
  -- Generating done (0.2s)
  -- Build files have been written to: /Users/pavlos.rontidis/CLionProjects/vector/target/debug/build/aws-lc-fips-sys-c12b65e2bed0dda8/out/build
  running: cd "/Users/pavlos.rontidis/CLionProjects/vector/target/debug/build/aws-lc-fips-sys-c12b65e2bed0dda8/out/build" && MAKEFLAGS="-j --jobserver-fds=8,9 --jobserver-auth=8,9" "cmake" "--build" "." "--target" "install" "--config" "Debug"
  [  0%] Built target boringssl_prefix_symbols
  [  0%] Built target global_target
  [ 21%] Built target bcm_library
  [ 22%] Built target bcm_o_target
  [ 24%] Built target jitterentropy
  [ 24%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/bio/connect.c.o

  --- stderr
  CMake Deprecation Warning at CMakeLists.txt:4 (cmake_minimum_required):
    Compatibility with CMake < 3.10 will be removed from a future version of
    CMake.

    Update the VERSION argument <min> value or use a ...<max> suffix to tell
    CMake that the project does not need compatibility with older versions.


  CMake Deprecation Warning at aws-lc/CMakeLists.txt:1 (cmake_minimum_required):
    Compatibility with CMake < 3.10 will be removed from a future version of
    CMake.

    Update the VERSION argument <min> value or use a ...<max> suffix to tell
    CMake that the project does not need compatibility with older versions.


  CMake Warning (dev) at aws-lc/crypto/CMakeLists.txt:582 (add_custom_command):
    The following keywords are not supported when using
    add_custom_command(TARGET): DEPENDS.

    Policy CMP0175 is not set: add_custom_command() rejects invalid arguments.
    Run "cmake --help-policy CMP0175" for policy details.  Use the cmake_policy
    command to set the policy and suppress this warning.
  This warning is for project developers.  Use -Wno-dev to suppress it.

  gmake: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
  /Users/pavlos.rontidis/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-fips-sys-0.12.13/aws-lc/crypto/bio/connect.c:493:29: error: cast from 'bio_info_cb' (aka 'long (*)(struct bio_st *, int, const char *, int, long, long)') to 'int (*)(const struct bio_st *, int, int)' converts to incompatible function type [-Werror,-Wcast-function-type-mismatch]
    493 |       data->info_callback = (int (*)(const struct bio_st *, int, int))fp;
        |                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1 error generated.
  gmake[2]: *** [aws-lc/crypto/CMakeFiles/crypto_objects.dir/build.make:577: aws-lc/crypto/CMakeFiles/crypto_objects.dir/bio/connect.c.o] Error 1
  gmake[1]: *** [CMakeFiles/Makefile2:327: aws-lc/crypto/CMakeFiles/crypto_objects.dir/all] Error 2
  gmake: *** [Makefile:136: all] Error 2
  thread 'main' panicked at /Users/pavlos.rontidis/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cmake-0.1.50/src/lib.rs:1098:5:

  command did not execute successfully, got: exit status: 2

  build script failed, must exit now
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...

I don't think the issue was fixed. Can you please take another look?


Note: I am on macOS 14.7.1.
We would love to properly support FIPS in Vector.

@pront
Copy link
Author

pront commented Nov 18, 2024

To reproduce:

# https://github.com/vectordotdev/vector/pull/21504
gh pr checkout 21504
cargo build

@justsmth
Copy link
Contributor

justsmth commented Nov 18, 2024

Hello again! Thanks for the update! I'm sorry that you hit another build failure.

This compile error is one that I don't remember seeing before...

  /Users/pavlos.rontidis/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-fips-sys-0.12.13/aws-lc/crypto/bio/connect.c:493:29: error: cast from 'bio_info_cb' (aka 'long (*)(struct bio_st *, int, const char *, int, long, long)') to 'int (*)(const struct bio_st *, int, int)' converts to incompatible function type [-Werror,-Wcast-function-type-mismatch]
    493 |       data->info_callback = (int (*)(const struct bio_st *, int, int))fp;
        |                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1 error generated.

As a workaround, you could try building with Clang v18 or older. The fix for this will require changes to AWS-LC as well as an update to its CI. (The CI for AWS-LC currently tests using Clang versions 10 through 18.)

Would you like to re-open this issue? Or copy the information over to a new one? Either way is fine.

@pront
Copy link
Author

pront commented Nov 18, 2024

Hello again! Thanks for the update! I'm sorry that you hit another build failure.

This compile error is one that I don't remember seeing before...

  /Users/pavlos.rontidis/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-fips-sys-0.12.13/aws-lc/crypto/bio/connect.c:493:29: error: cast from 'bio_info_cb' (aka 'long (*)(struct bio_st *, int, const char *, int, long, long)') to 'int (*)(const struct bio_st *, int, int)' converts to incompatible function type [-Werror,-Wcast-function-type-mismatch]
    493 |       data->info_callback = (int (*)(const struct bio_st *, int, int))fp;
        |                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1 error generated.

As a workaround, you could try building with Clang v18 or older. The fix for this will require changes to AWS-LC as well as an update to its CI. (The CI for AWS-LC currently tests using Clang versions 10 through 18.)

Would you like to re-open this issue? Or copy the information over to a new one? Either way is fine.

Thanks for the quick response @justsmth, I created #601.

@pront
Copy link
Author

pront commented Nov 18, 2024

To make this a bit more complicated I also just encountered a different error:

  clang: error: overriding '-mmacos-version-min=14.7' option with '--target=arm64-apple-macosx15.1' [-Werror,-Woverriding-option]
  gmake[1]: *** [CMakeFiles/cmTC_975e8.dir/build.make:82: CMakeFiles/cmTC_975e8.dir/builtin_swap_check.c.o] Error 1
  gmake[1]: Leaving directory '/Users/pavlos.rontidis/CLionProjects/vector/target/debug/build/aws-lc-fips-sys-c12b65e2bed0dda8/out/build/aws-lc/CMakeFiles/CMakeTmp'
  gmake: *** [Makefile:133: cmTC_975e8/fast] Error 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants