-
Notifications
You must be signed in to change notification settings - Fork 33
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
Build usable diem-node binary in libra-framework project #310
Comments
Some discussion on this here: rust-lang/cargo#10489 |
Narrowing in on what it means by "feature flags that shouldn't be enabled":
|
Not sure, but I think this is where the features for that code are defined: https://github.com/0LNetworkCommunity/diem/blob/release/diem-move/diem-vm/Cargo.toml#L63 |
Error string is in-tree, which is why it doesn't appear in Google searches: https://github.com/0LNetworkCommunity/diem/blob/release/diem-node/src/utils.rs#L14 |
Having loaded the context into my LLM, I think the solution is to just specify the "correct" set of features in our Challenge is to determine what that set is. |
Actually that was off-track. Reading the code (which of course has zero comments) in more detail, I think the error message is a red herring. The code is actually checking that we're not trying to run a binary that has test versions of native functions. I assume this is a safety check to stop foot-gunning problems in production? |
Feature that enables the functions it's looking for seems to be |
More digging: In the diem repo,
whereas in the libra-framework repo it reports this:
|
Building in libra-framework, the features passed to the compiler for the dependency
|
In diem repo:
|
This is present in the libra build: |
Tentatively have this diagnosed: The problem package here is That happens because depending packages have
This in turn is cause by cargo being dumb. It can't understand how to build two different binaries in the same workspace with different feature sets. So you get features randomly and silently enabled for no good reason. In our case the reason is that there is also another package (that we didn't ask to build) in the workspace called It turns on the Referenced here: https://github.com/0LNetworkCommunity/libra-framework/blob/main/smoke-tests/Cargo.toml#L20 |
Some history: rust-lang/cargo#4463 and rust-lang/cargo#10489 and rust-lang/cargo#5364 |
diem-node
is a package dependency in the libra-framework project.It (alone) can be built from within the project root directory with:
The resulting binary is created here:
However this binary file is not executable:
Task is to resolve this, generating instead an executable...executable.
The text was updated successfully, but these errors were encountered: