epiverse-trace / epidemics

A library of published compartmental epidemic models, and classes to represent demographic structure, non-pharmaceutical interventions, and vaccination regimes, to compose epidemic scenarios.
https://epiverse-trace.github.io/epidemics/
Other
8 stars 2 forks source link

Unable to install on MacOS Ventura #119

Closed jamesmbaazam closed 10 months ago

jamesmbaazam commented 11 months ago

Please see attached file for the full error message. I've had this issue before, which I reported in #63. I got it fixed but it seems to have reappeared. I don't have this issue installing other packages that use cpp, so I'm not sure what the issue is here. This also seems to be related to #115. It seems the OS is the common denominator here.
epidemics_error.md

pratikunterwegs commented 11 months ago

Thanks - could you try re-installing {finalsize} as well and check whether that works? It shares Rcpp-related dependencies with {epidemics} so would be good to check whether it is also affected. If it is not, that might help isolate the issue.

jamesmbaazam commented 11 months ago

I'm able to install/build finalsize.

I've fixed the issue through a series of try and errors.

I first ran brew doctor which showed that I had a few problematic files in my /usr/local/include directory, so I deleted that folder.

Then I removed my current R installation using

sudo rm -rf /Applications/R.app
sudo rm -rf /Library/Frameworks/R.framework
sudo rm /usr/bin/{R,Rscript}

and downgrading my R to 4.2.3.

In the past, removing the /usr/local/include directory was enough to fix the issue, so I'm not sure if it's that or the R downgrade that fixed it.

pratikunterwegs commented 11 months ago

Thanks @jamesmbaazam for flagging this and trying various fixes. Downgrading R isn't a sustainable solution, so I'll take this up as a priority along with #63.

pratikunterwegs commented 11 months ago

Hi @jamesmbaazam thanks for the full error message. This issue seems to be the same as #115, and appears to be related to the use of std::unary_function and std::binary_function in {BH} (Boost Headers), which are not compatible with Clang 15 provided with Xcode 15.

A hacky looking fix is to 're-enable' these, as specified in the Xcode 15 release notes, but I'll check whether there are alternatives available before implementing this.

pratikunterwegs commented 11 months ago

This still doesn't explain why downgrading R might have fixed the issue.

jamesmbaazam commented 11 months ago

This still doesn't explain why downgrading R might have fixed the issue.

I will upgrade my R to see if it reproduces the problem. I doubt that the downgrade fixed it but let me confirm.

pratikunterwegs commented 10 months ago

Hi @jamesmbaazam - have you been able to install epidemics since #129? If so I will close this issue along with #115 as fixed

jamesmbaazam commented 10 months ago

Yes, I have. I thought I left a comment here. Thanks.

pratikunterwegs commented 10 months ago

Fixed by #129.