Closed sorhawell closed 1 year ago
This is a dependency I was supposed to remove from Cargo.toml, sorry about that. As far as I remember, that was the only dependency I needed to manually install. Would you mind trying again? I am waiting for some fixes on libsoxr crate before considering to reuse it.
I remove -lasound
from Makevars and then it could compile and pass all tests :)
> rextendr::document()
✔ Saving changes in the open files.
ℹ Generating extendr wrapper functions for package: harmonium.
ℹ Re-compiling harmonium (debug build)
── R CMD INSTALL ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
─ installing *source* package ‘harmonium’ ...
** using staged installation
** libs
using C compiler: ‘Apple clang version 14.0.0 (clang-1400.0.29.202)’
using SDK: ‘’
rm -Rf harmonium.so ./rust/target/release/libharmonium.a entrypoint.o
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -falign-functions=64 -Wall -g -O2 -UNDEBUG -Wall -pedantic -g -O0 -fdiagnostics-color=always -c entrypoint.c -o entrypoint.o
# In some environments, ~/.cargo/bin might not be included in PATH, so we need
# to set it here to ensure cargo can be invoked. It is appended to PATH and
# therefore is only used if cargo is absent from the user's PATH.
if [ "true" != "true" ]; then \
export CARGO_HOME=/Users/sorenwelling/Documents/projs/harmonium/r-harmonium/src/.cargo; \
fi && \
export PATH="/usr/local/Cellar/python@3.9/3.9.16/libexec/bin:/usr/local/opt/python@3.10/libexec/bin:/usr/local/opt/python@3.9/libexec/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/sorenwelling/.cargo/bin/:/Library/TeX/texbin:/opt/X11/bin:/Library/Apple/usr/bin:/Users/sorenwelling/.cargo/bin:/usr/ucb:/Users/sorenwelling/Applications/quarto/bin:/usr/texbin:/Applications/RStudio.app/Contents/Resources/app/quarto/bin:/Applications/RStudio.app/Contents/Resources/app/bin/postback:/Users/sorenwelling/.cargo/bin" && \
cargo build --lib --release --manifest-path=./rust/Cargo.toml --target-dir ./rust/target
warning: function `main` is never used
--> src/generate_r_docs.rs:6:4
|
6 | fn main() {
| ^^^^
|
= note: `#[warn(dead_code)]` on by default
warning: function `generate_r_docs` is never used
--> src/generate_r_docs.rs:33:4
|
33 | fn generate_r_docs(files: Vec<&str>, github_folder: &str, hash: &mut HashMap<String, Vec<String>>) {
| ^^^^^^^^^^^^^^^
warning: function `output_file` is never used
--> src/generate_r_docs.rs:123:4
|
123 | fn output_file(hash: HashMap<String, Vec<String>>, output_path: PathBuf) {
| ^^^^^^^^^^^
warning: `r-harmonium` (lib) generated 3 warnings
Finished release [optimized] target(s) in 0.27s
if [ "true" != "true" ]; then \
rm -Rf /Users/sorenwelling/Documents/projs/harmonium/r-harmonium/src/.cargo && \
rm -Rf ./rust/target/release/build; \
fi
clang -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/opt/gettext/lib -L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib -o harmonium.so entrypoint.o -L./rust/target/release -lharmonium -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
ld: warning: -undefined dynamic_lookup may not work with chained fixups
installing to /private/var/folders/v1/b2c26lpn2yjd997jg_gn4fgc0000gn/T/RtmpkgG4G7/devtools_install_b4686f5a7fe7/00LOCK-r-harmonium/00new/harmonium/libs
** checking absolute paths in shared objects and dynamic libraries
─ DONE (harmonium)
✔ Writing 'R/extendr-wrappers.R'
ℹ Updating harmonium documentation
Setting `RoxygenNote` to "7.2.3"
ℹ Loading harmonium
harmonium 0.1.0, see harmonium::hdocs() for documentation.
Deleting hconfig.Rd, print.HArray.Rd, print.HAudio.Rd, print.HDataType.Rd, print.HMatrix.Rd, print.HMetadataType.Rd, print.HResampler.Rd, and print.HResamplerType.Rd
Warning messages:
1: Skipping NAMESPACE
✖ It already exists and was not generated by roxygen2.
2: Skipping NAMESPACE
✖ It already exists and was not generated by roxygen2.
> devtools::test()
ℹ Testing harmonium
harmonium 0.1.0, see harmonium::hdocs() for documentation.
✔ | F W S OK | Context
✔ | 8 | arrow_conversions [1.1s]
✔ | 8 | as_mono [0.4s]
✔ | 6 | conversions
✔ | 11 | export
✔ | 40 | harray [0.2s]
⠦ | 17 | haudio thread '<unnamed>' panicked at 'cannot represent audio with complex data', src/hmatrix.rs:910:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread '<unnamed>' panicked at 'cannot represent audio with complex data', src/hmatrix.rs:988:9
✔ | 26 | haudio [0.1s]
✔ | 18 | haudiosink [0.5s]
⠏ | 0 | hconfig thread '<unnamed>' panicked at '"fmt" must be one of ["full", "mixed"].', src/hconfig.rs:9:14
✔ | 20 | hconfig [0.1s]
✔ | 5 | hfile
✔ | 48 | hmatrix [0.2s]
⠏ | 0 | hresampler thread '<unnamed>' panicked at 'called `Option::unwrap()` on a `None` value', src/hresampler.rs:386:1
✔ | 5 | hresampler
✔ | 12 | mean_cols [0.3s]
✔ | 40 | slice [0.2s]
══ Results ════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
Duration: 3.9 s
[ FAIL 0 | WARN 0 | SKIP 0 | PASS 247 ]
-lasound
is needed only for linux afaik... Are you on mac? If so, I will need to do some research on how to add lasound only for linux, excluding mac...
Yes I have an old MacBook :)
after fighting makevars file for a long time, now all CIs are passing for macos as well so I am closing this.
Hi @daniellga
I was trying out your cool project and was building your project with rextendr::document() with dir
r-hormonium
as workdir. However , I ran into a build error. It appears I have not installed library soxr on my antiquated macbook. See err msg below. How should I install soxr or any other dependencies before?have a great day :)