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

Fix DISABLE_PERL=on builds for non-assembly optimized platforms #1068

Merged
merged 2 commits into from
Jun 27, 2023

Conversation

skmcgrail
Copy link
Member

Description of changes:

I noticed that when attempting to build aws-lc with DISABLE_PERL=on the logic is not 100% accurate on whether it should expect to find optimized assembly for a given architecture or not. If you attempt to build aws-lc on an architecture with no provided assembly, and don't set DISABLE_PERL=off or set OPENSSL_NO_ASN=on the build may fail with the following message:

  Copying platform assembly files from /home/ec2-user/aws-lc-rs/aws-lc-sys/aws-lc/generated-src/linux-riscv64/crypto/ to /home/ec2-user/aws-lc-rs/target/debug/build/aws-lc-sys-6fc1a5d572af4537/out/build/aws-lc/crypto
  CMake Error at aws-lc/crypto/CMakeLists.txt:138 (file):
    file COPY cannot find
    "/home/ec2-user/aws-lc-rs/aws-lc-sys/aws-lc/generated-src/linux-riscv64/crypto/":
    No such file or directory.

However there is logic in this check that looks to see if $(ARCH) == generic, and will otherwise not set the ASSEMBLY_SOURCE variable. There are instances such as riscv64 where the processor is detected, and ARCH is purposefully not set to the value generic. This causes the build to fail in this specific configuration combination outlined above, even if we don't have assembly source for that platform purposefully. This adds a status message to indicate if a pre-generated assembly directory is non-existent, and allows the compilation to move forward. Note that BoringSSL does not have this issue as they don't provide pre-generated assembly files.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.

@skmcgrail skmcgrail merged commit 09c53d2 into aws:main Jun 27, 2023
@skmcgrail skmcgrail deleted the build-fix branch June 27, 2023 20:42
@skmcgrail skmcgrail mentioned this pull request Jul 7, 2023
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

Successfully merging this pull request may close these issues.

3 participants