Errors running dada2: Rcpp not loading due to png.dylib version issue

I just tried removing and recreating the conda environment and get the same error message.

I did end up moving forward with the analysis using deblur instead, but it would be great to figure this out for future analyses.

Thank you.

With your QIIME 2 conda environment active, can you post the output from the command which R? It seems like the wrong R is being used somehow even though it seems like your path is correct. R can do some strange things to determine which executable to use.

(qiime2-2022.8) Heather-Maughans-iMac:Oct2022_Combined_datasets heathermaughan$ which R
/Users/heathermaughan/miniconda3/envs/qiime2-2022.8/bin/R

Ok, that sure looks like the correct R! A few things to try.

With the QIIME 2 conda active the entire time, can you run type R? If that shows a different R than the one you just saw using which can you run rehash and try type R again? If type R is still showing the incorrect R, can you post the contents of your .zshrc here?

If type R does show the correct R the first time, skip the other steps and just let me know here. It could be that it is choosing the correct R, but you don't have the dependency for some reason, but it would be odd for that to not be resolved by remaking the environment.

1 Like

R is the same:
(qiime2.2022.8) heathermaughan@Heather-Maughans-iMac Oct2022_Combined_datasets % type R

R is /Users/heathermaughan/miniconda3/envs/qiime2.2022.8/bin/R

(qiime2.2022.8) heathermaughan@Heather-Maughans-iMac Oct2022_Combined_datasets % which R

/Users/heathermaughan/miniconda3/envs/qiime2.2022.8/bin/R

1 Like

Just to clarify: By remaking the environment, I trashed the miniconda3/envs/qiime2-2022.8 folder and re-ran conda env create -n qiime2.2022.8 --file qiime2-2022.8-py38-osx-conda.yml

1 Like

Opening this up to other @moderators with more experience debugging this R stuff, because I'm really not sure.

1 Like

I wonder if another version of libpng is on the system outside of Conda, and that's confusing R.

I found similar errors when installing stuff with brew and this old conda issue.

Just to check, is this an M1 mac or an Intel mac? (You can check in :apple: > About this Mac)

Thanks for the reply. It is an Intel mac. I can try the suggestions in the "old conda issue" thread you linked.

1 Like

OK, good to know.

I'm not sure that conda thread will solve it. If this is an issue with the packages on conda-forge or bioconda we may have to wait for this bug to be fixed upstream before we download a fix...

1 Like

Ok, thank you for the information.

I wanted to pop in here and mention we're seeing a similar issue on our "canary" tests for the last release. I don't have a good solution, but we'll look into it.

Something that may be relevant is R was recently rebuilt on conda-forge for 4.2. It's likely the png library was a cran package, and something may be off there.

cc @lizgehret

2 Likes

Hi @Heather_Maughan,

We think this issue has been fixed conda-forge. There are now new builds of r-png available which pin libpng to a compatible version.

You should be able to remove your qiime2 environment and reinstall.
We're hoping to find this build after the reinstall (conda list r-png):

r-png   0.1_7-r41h815d134_1006

(it should end in 1006 rather than 1005)

If the reinstall still fetches the wrong one, then try clearing your conda cache with
conda clean --all and try again.

Hopefully we found the root of this issue.

Thanks for looking in to this. Unfortunately I'm still seeing the '1005' version:
(qiime2-2022.8) heathermaughan@HeatherhansiMac Oct2022_Combined_datasets % conda list r-png

packages in environment at /Users/heathermaughan/miniconda3/envs/qiime2-2022.8:

Name Version Build Channel

r-png 0.1_7 r41h815d134_1005 conda-forge

I did clear the conda cache and noticed then that r-png-0.1_7 was downloaded and extracted as part of the new env create. But still the wrong one. ?

Hi @Heather_Maughan,

It's weird it seems like it downloaded it and then ignored it. Conda sometimes doesn't do what I expect, so when that happens I find deleting the pkg cache and implicated environment manually can help.

As always, be careful with rm commands, but these ought to be pretty harmless:

rm -r /Users/heathermaughan/miniconda3/pkgs  # this is the cache
rm -r /Users/heathermaughan/miniconda3/envs/qiime2-2022.8  # the environmen

(If you get a bunch of questions about a protected file, cancel the command (ctrl-c [not cmd]) and re-run with an extra -f flag for "force")

Then try again, and hopefully we end up with the correct latest build.

2 Likes

Unfortunately the problem persists even after the removing the cache and environment using the 'rm' command.
I also use Qiime2 on my laptop (MacBook Pro, M1 chip), same version of Qiime2, and noticed it was using the wrong r-png build. I haven't tried to run the dada2 command on the laptop.

Name Version Build Channel

r-png 0.1_7 r41h815d134_1005 conda-forge

1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.