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

Unable to compile locally due to "feature removed" errors #1

Closed
aldashin opened this issue Aug 27, 2022 · 8 comments
Closed

Unable to compile locally due to "feature removed" errors #1

aldashin opened this issue Aug 27, 2022 · 8 comments

Comments

@aldashin
Copy link

aldashin commented Aug 27, 2022

Howdy! I'm trying to build and compile from source on Ubuntu 20 after modifying the difficulty.toml file, but I'm running into the following error stack:

 aldashin@TheWindTunnel:~$ ./build.sh
    Updating git repository `https://github.com/ultimate-research/nnsdk-rs.git`
    Updating crates.io index
   Compiling compiler_builtins v0.1.79
   Compiling core v0.0.0 (/home/aldashin/.cargo/skyline/toolchain/skyline/lib/rustlib/src/rust/library/core)
   Compiling proc-macro2 v1.0.43
   Compiling unicode-ident v1.0.3
   Compiling quote v1.0.21
   Compiling libc v0.2.131
   Compiling cc v1.0.73
   Compiling syn v1.0.99
   Compiling memchr v2.5.0
   Compiling serde v1.0.144
   Compiling serde_derive v1.0.144
   Compiling std v0.0.0 (/home/aldashin/.cargo/skyline/toolchain/skyline/lib/rustlib/src/rust/library/std)
   Compiling skyline_macro v0.1.0 (https://github.com/ultimate-research/skyline-rs.git#12920d76)
   Compiling lazy_static v1.4.0
   Compiling unwind v0.0.0 (/home/aldashin/.cargo/skyline/toolchain/skyline/lib/rustlib/src/rust/library/unwind)
   Compiling toml v0.5.9
   Compiling rustc-std-workspace-core v1.99.0 (/home/aldashin/.cargo/skyline/toolchain/skyline/lib/rustlib/src/rust/library/rustc-std-workspace-core)
   Compiling libc-nnsdk v0.0.1 (https://github.com/ultimate-research/libc-nnsdk.git#98c11e07)
error[E0557]: feature has been removed   ] 33/64: core, libc, toml, compiler_builtins, libc-nnsdk
 --> /home/aldashin/.cargo/git/checkouts/libc-nnsdk-887c2406398ea5ab/98c11e0/libc-nnsdk/src/lib.rs:5:12
  |
5 | #![feature(untagged_unions)]
  |            ^^^^^^^^^^^^^^^ feature has been removed
  |
  = note: unions with `Copy` and `ManuallyDrop` fields are stable; there is no intent to stabilize more

    Building [=============>             ] 34/64: core, toml, compiler_builtins, libc-nnsdk                           error: aborting due to previous error

For more information about this error, try `rustc --explain E0557`.

error: could not compile `libc-nnsdk` due to 2 previous errors
warning: build failed, waiting for other jobs to finish...

This is a fresh but (updated/upgraded) install of Ubuntu 20, so I may be missing one or more dependencies in my dev env. Off the top of my head I've installed curl, rust (+ cargo), llvm, gcc, git, clang, cmake/make, and yarn. I've tried cargo clean followed by re-running build.sh to no avail. I've also spent a few hours Googling and searching Stack Overflow to no avail.

Any tips/pointers/stuff I'm missing? For context, I'm a tech writer with fundamental Python and Unix but newer to Ubuntu and Rust.

@roccodev
Copy link
Owner

It looks like one of the upstream repositories was updated, I've updated the lockfile in 6ce23bf.

Could you please try again?

@aldashin aldashin reopened this Aug 27, 2022
@aldashin
Copy link
Author

Much appreciated! That helped a ton. The initial compile was successful, skyline-rs downloaded just fine, and libxc3_difficulty_unlocker.nro was built successfully.

Things fell down during the Skyline download. Here are the last few lines of output:

   Compiling skyline v0.1.0 (https://github.com/ultimate-research/skyline-rs.git#12920d76)
    Finished release [optimized] target(s) in 16.18s
Built "libxc3_difficulty_unlocker.nro"!
Downloading latest Skyline release...
ERROR: Failed to read Skyline release zip. Either corrupted or missing files.

Full output's at https://controlc.com/ddd951c0

Issue persisted after cargo clean, after deleting/redownloading the source files, and after reinstalling Ubuntu (along the projects/services I mentioned in the OP).

Any workarounds/solves from here?

@roccodev
Copy link
Owner

Ah yep, the command relies on a PR to cargo-skyline that's not been merged yet.
To work around that, you can run cargo install --git https://github.com/RoccoDev/cargo-skyline --branch "minor/remove-npdm-extraction".

@aldashin
Copy link
Author

Perfection! Build successful:

Downloading latest Skyline release...
Building Zip File...
Finished building zip at 'target/release.zip'

Verified the contents within are as they should be.

Thanks again!

@roccodev
Copy link
Owner

By the way, you can change the difficulty.toml after you've copied it to the SD card, without the need to rebuild every time. The mod reads it from that folder when the game starts.

@aldashin
Copy link
Author

aldashin commented Aug 28, 2022

Ah, I might be missing something there! The built version does indeed have an romfs directory, but there's no difficulty.toml file within, only a subdirectory for skyline. This is for both a locally-built version and the one downloaded from the Releases page.

The only time I see a difficulty.toml file is in the Source version, within the res directory.

May or may not be related: the Releases links in the Readme point to https://github.com/RoccoDev/xc3-difficulty-unlocker/blob/master/releases/latest, which results in a 404. The Releases link on the righthand side of the project home page works just fine.

@roccodev
Copy link
Owner

That's weird, I can see it just fine in both versions. If it's actually missing, you can just copy it in the proper directory inside the SD card.

If the game can't find it or there are errors in it, it will just load the defaults.

@aldashin
Copy link
Author

That did the trick! Verified all the effects are working as expected.

Thanks again!

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