Skip to content

Changes to build IPP Crypto from source - #731

Draft
sbellem wants to merge 2 commits into
intel:mainfrom
sbellem:nix-sgx_2.14
Draft

Changes to build IPP Crypto from source#731
sbellem wants to merge 2 commits into
intel:mainfrom
sbellem:nix-sgx_2.14

Conversation

@sbellem

@sbellem sbellem commented Jul 21, 2021

Copy link
Copy Markdown
Contributor

Please not that this is a draft PR and it needs some adjustments. I am putting it up so that it can benefit from feedback, and also it can be used as a patch in nix derivations that build IPP Crypto from source.

The goal of this PR is to allow building the IPP Crypto from source, and more particularly with nix. Moreover, the PR also aims to address issues encountered when building the SDK from source, with the IPP Crypto built-from-source as well.

The main thing that needs to be properly addressed is the usage of NIX_PATH and the check for the ipp submodule, which should not trigger the git submodule or git clone command when building from source with nix, as the ipp crypto submodule has already been fetched at the correct revision.

The work in progress commit 7dd8f19 provides more detailed information, copied here below for convenience:

WIP: figure more general mechanism to build ipp crypto

When building SDK & IPP Crypto from source with nix, the current check
for the IPP source code does not work properly. That is, even though the
IPP Crypto source code is there the check in the Makefile triggers the
call to the ipp_source target which invokes git to update the submodule
or clone the repo.

In the context of a nix derivation, the source code along with the
submodules is fetch at the beginning and the .git directory is removed,
such that later invocations to git commands such as the one in the
Makefile for the ipp_source target, fail.

Also, depending on the environment, NIX_PATH may not be set and is
therefore too restrictive as a check or assumes too much. A more general
mechanism would be preferable.

sbellem added 2 commits July 21, 2021 02:12
(when ipp-crypto is built from source)

Signed-off-by: Sylvain Bellemare <sbellem@gmail.com>
When building SDK & IPP Crypto from source with nix, the current check
for the IPP source code does not work properly. That is, even though the
IPP Crypto source code is there the check in the Makefile triggers the
call to the ipp_source target which invokes git to update the submodule
or clone the repo.

In the context of a nix derivation, the source code along with the
submodules is fetch at the beginning and the .git directory is removed,
such that later invocations to git commands such as the one in the
Makefile for the ipp_source target, fail.

Also, depending on the environment, NIX_PATH may not be set and is
therefore too restrictive as a check or assumes too much. A more general
mechanism would be preferable.

Signed-off-by: Sylvain Bellemare <sbellem@gmail.com>
@bot-cc1s-branch-sync

Copy link
Copy Markdown
Contributor

Important

🔀 The Intel® SGX SDK codebase has moved

Thank you for your contribution!
The code this pull request modifies now resides in a new repository,1 so, unfortunately, it can no longer be merged here as-is. If your change is still relevant, please re-open it against the SDK repository, where this code is now maintained.

If you have any questions or need assistance migrating, please ask here. As we complete the migration, older pull requests may eventually be closed. No work is lost, though, and you are welcome to re-open your change in the new repository at any time.

Footnotes

  1. The affected sources were migrated from confidential-computing.sgx to the dedicated confidential-computing.sgx.sdk repo. The migration covered the SDK sources (sdk/), shared headers (common/), samples (SampleCode/), and the runtime libraries (psw/urts, psw/enclave_common).

@bot-cc1s-branch-sync bot-cc1s-branch-sync added the repo-migration PR whose files moved to the SGX SDK repo (needs re-targeting) label Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

repo-migration PR whose files moved to the SGX SDK repo (needs re-targeting)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants