Open karlensberg opened 1 month ago
I found two other similar installation issues for other packages if you search for:
/usr/local/include/except.h:15:32: error: typedef redefinition with different types
This leads me to believe that this might not be an issue with the presto code, but rather an issue with the system you're installing it on.
Have you installed R with conda or brew?
If so, could you try uninstalling and using the packages from the official R website? https://www.r-project.org/
If you find any other solution, please consider sharing it here so others may benefit in the future. Thanks!
You might consider trying to update Rcpp and RcppArmadillo, then update the other packages, then install presto:
# Update Rcpp and RcppArmadillo
install.packages("Rcpp")
install.packages("RcppArmadillo")
# Update all other packages
update.packages(ask = FALSE)
# Try reinstalling the 'presto' package
devtools::install_github("immunogenomics/presto")
If you still run into the same issue, then there is a possibility that your R installation is using the wrong except.h
file, and you have multiple except.h
files on your system. You might want to try looking for environment variables or configurations that define where R will look for these files when compiling packages.
On my system, here are all the paths to the except.h
file:
find / -iname 'except.h'
/System/Volumes/Data/opt/gfortran/lib/gcc/aarch64-apple-darwin20.0/12.2.0/plugin/include/except.h
/System/Volumes/Data/opt/gfortran/lib/gcc/x86_64-apple-darwin20.0/12.2.0/plugin/include/except.h
/opt/gfortran/lib/gcc/aarch64-apple-darwin20.0/12.2.0/plugin/include/except.h
/opt/gfortran/lib/gcc/x86_64-apple-darwin20.0/12.2.0/plugin/include/except.h
Again, my best guess is that your system is setup differently due to using conda or brew. I could be mistaken. Consider sharing the output of find / -iname 'except.h'
if you want to help clarify this issue.
To answer your earlier question, I downloaded R from the official website so I don't believe thats the issue. I also tried updating all of the packages and that didn't fix it either. I think you may be right about the except.h file stuff. I am working on a computer that others have used in the past, so I think the setup/pathing may be messed up due to that? I tried running the command, heres the list that I got back if it's any help:
/usr/local/include/except.h
/usr/local/Cellar/gcc/12.2.0/lib/gcc/current/gcc/x86_64-apple-darwin20/12/plugin/include/except.h
/System/Volumes/Data/usr/local/include/except.h
/System/Volumes/Data/usr/local/Cellar/gcc/12.2.0/lib/gcc/current/gcc/x86_64-apple-darwin20/12/plugin/include/except.h
/System/Volumes/Data/Applications/NGS_Analysis_Applications/Aligners/gmap-2017-06-20/src/except.h
/Applications/NGS_Analysis_Applications/Aligners/gmap-2017-06-20/src/except.h
/dev/fd/6/usr/local/include/except.h
/dev/fd/6/usr/local/Cellar/gcc/12.2.0/lib/gcc/current/gcc/x86_64-apple-darwin20/12/plugin/include/except.h
/dev/fd/6/System/Volumes/Data/usr/local/include/except.h
/dev/fd/6/System/Volumes/Data/usr/local/Cellar/gcc/12.2.0/lib/gcc/current/gcc/x86_64-apple-darwin20/12/plugin/include/except.h
/dev/fd/6/System/Volumes/Data/Applications/NGS_Analysis_Applications/Aligners/gmap-2017-06-20/src/except.h
/dev/fd/6/Applications/NGS_Analysis_Applications/Aligners/gmap-2017-06-20/src/except.h
Since you have a Cellar
directory, that means brew was used to install some packages.
It seems to me like the brew version of gcc is not working for you, since you are seeing the error about except.h
.
When gcc was installed with brew, I think this probably created /usr/local/include/except.h
, and now your compiler is using that new file instead of the correct file. That seems like it might be the problem here.
I am not certain about how to fix your setup, but here are some steps you might consider trying:
~/.R/Makevars
file, and delete it if you do (consider making a backup)You might find this page helpful to figure out how to install xcode and gfortran:
If these steps did not help, then you might want to search around for other issue reports in other R packages to see how others have tried to deal with using gcc from brew when compiling R packages, and maybe you might find some steps that worked for someone else.
Please consider sharing your steps if you eventually find a solution.
I wish you the best of luck! I hope you can get your system working soon.
I'm am struggling to install presto and no one else seems to be having the same issue. Here is the error message I get:
Here is the session info:
Any ideas of what I should try?