-
Notifications
You must be signed in to change notification settings - Fork 16
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
Update setup guides to include DEPEND_INSTALL env var #266
Conversation
Signed-off-by: 5abeel <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have some reservations about doing this.
In the nomenclature used by the cmake listfiles, INSTALL is used for input install trees. PREFIX is used for output install trees.
Things get hairier when you're building for ES2K. There, you have two sets of dependency libraries: the host dependencies, which are built for the development system (nominally x86), and the target dependencies, which are built for the runtime system (nominally aarch64).
When we're building in the native environment, we use the same dependency libraries for both development and runtime systems. This is also true for ES2K if we are running P4 Control Plane on one of the x86 host cores. In both cases, DEPEND_INSTALL
provides the path to the x86 dependencies.
When we're cross-compiling for the ACC:
- The environment variable for the host dependencies is
HOST_INSTALL
. It is the path to the x86 libraries. - The environment variable for the target dependencies is
DEPEND_INSTALL
. It is the path to the aarch64 libraries.
You have to build the dependencies twice for cross-compilation. We provide a pair of helper scripts for the ES2K dependency builds, make-host-deps.sh
and make-cross-deps.sh
. You have to build the host dependencies first, because you need them to build the target dependencies.
The chances for confusion are high. To try to reduce this confusion, the helper scripts use distinct terminology:
--deps
(-D
) for the input target dependency tree, or the sole dependency tree if you're building in native mode--host
(-H
) for the input host dependencies, used only when cross-compiling--prefix
(-P
) for the output install tree
I make a point of using actual file paths (or, in some cases, purpose-specific environment variables) for CMAKE_INSTALL_PREFIX
in the examples I create. You can damage things if you write to the wrong location. Better to be explicit.
I'm worried that using DEPEND_INSTALL
as an output variable will muddy the waters.
|
Setup guides had details setting DEPEND_INSTALL environment variable set after usage in previous section. Updating to re-order to set the DEPEND_INSTALL environment variable, and using it in the cmake command