Dealing with Catalina II

Still denies changes after running that above.

Open a new thread in the forum. Type

ls -lsa

In that directory, and paste that into the new post.

1 Like

Hi,
so I managed to change the rights for that file with somewhat obvious answer (sudo).
Thanks for your help and that code above, it solved the problems for me! :)

1 Like

I just want to say that this fixed the problem for me as well. Thank you!

I’ve been trying to run brms code on my Mac (latest version of everything, R, RStudio, all packages, etc) and get the following error:

[1] “Error in sampler$call_sampler(args_list[[i]]) : "
[2] " c++ exception (unknown reason)”
error occurred during calling the sampler; sampling not done
some chains had errors; consider specifying chains = 1 to debughere are whatever error messages were returned

I respecified the chains but got the same error.

Any ideas how to fix this? You seem much more helpful than the brms developer…
Thanks.

You need to install the new version of the installer mentioned in the first post on this thread.

I did install it, a day before I joined the thread. The results above are with the new version.

Read this: Dealing with Catalina II, and then, if necessary, recompile all relevant packages.

1 Like

I reinstalled and changed the .R/Makevars code (I have absolutely no idea what that is or what I did), restarted my Mac, and everything worked beautifully. I can’t thank you enough!! Your help is invaluable and enormously appreciated.

Installed macos-rtools-3.2.0.pkg. It still gave me the Error in sampler error untill I added this line to .R/Makevars file:

SHLIB_CXX14LDFLAGS+=-Wl,-rpath,/Library/Frameworks/R.framework/Resources/lib /Library/Frameworks/R.framework/Resources/lib/libc++abi.1.dylib

Now everything works. My full .R/Makevars file is this

# clang: start
CFLAGS=-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
CCFLAGS=-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
CXXFLAGS=-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
CPPFLAGS=-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include

SHLIB_CXXLDFLAGS+=-Wl,-rpath,${R_HOME}/lib ${R_HOME}/lib/libc++abi.1.dylib
SHLIB_CXX14LDFLAGS+=-Wl,-rpath,/Library/Frameworks/R.framework/Resources/lib /Library/Frameworks/R.framework/Resources/lib/libc++abi.1.dylib
# clang: end
1 Like

Mmm, interesting. Okay, we’ll add the SHLIB_CXX14LDFLAGS as well.

I’m wondering if somewhere these implicit variables aren’t getting read…

Ok I’m having issues. @coatless I downloaded and ran the latest version of your installer today. It ran without complaint. When I tried to run a brms model got this error:

So I went into Terminal and tried running a few commands like make or git and was seeing this:

user$ make
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun  

Ok. So then I reinstalled command line tools like so: sudo xcode-select --install and this fixed my command line issues. Make and git now run again.

However when I try to build an rstan example model I got issues:

>stanmodelcode <- "
data {
  int<lower=0> N;
  real y[N];
} 

parameters {
  real mu;
} 

model {
  target += normal_lpdf(mu | 0, 10);
  target += normal_lpdf(y  | mu, 1);
} 
"

y <- rnorm(20) 
dat <- list(N = 20, y = y); 
fit <- stan(model_code = stanmodelcode, model_name = "example", 
            data = dat, iter = 2012, chains = 3, verbose = TRUE,
            sample_file = file.path(tempdir(), 'norm.csv')) 
print(fit)


Error in compileCode(f, code, language = language, verbose = verbose) : 
  Compilation ERROR, function(s)/method(s) not created! In file included from file14a252700959.cpp:8:
In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/StanHeaders/include/src/stan/model/model_header.hpp:4:
In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/StanHeaders/include/stan/math.hpp:4:
In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/StanHeaders/include/stan/math/rev/mat.hpp:4:
In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/StanHeaders/include/stan/math/rev/core.hpp:5:
In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/StanHeaders/include/stan/math/rev/core/build_vari_array.hpp:4:
In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/StanHeaders/include/stan/math/prim/mat/fun/Eigen.hpp:4:
In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/l

I’m at a loss as to what to do next - any advice appreciated.

Post the output of

example(stan_model, package = "rstan", run.dontrun = TRUE)
1 Like

A few quick questions:

  1. Which version of macOS was used?
  2. What version of R was used?
  3. What version of the installer? v3.2.1?
  4. Was the computer online while the installer was run?
  5. Was this a brand new computer or was it upgraded from a prior macOS version?
1 Like

Ok… this generated so much text the forum limit would not let me post it directly. I’ve stuck it into a text file so → stan_example_output.txt (64.8 KB)

  1. Catalina 10.15.2
  2. R 3.5.1
  3. r-macos-rtools 3.2.1
  4. Yes
  5. New 16" with restore from Time Machine backup from MacOs Mojave 10.14.6

Well, the ultimate error was

clang-7: error: no such file or directory: ‘/Library/Frameworks/R.framework/Resources/lib/libc++abi.1.dylib’

So, maybe you have a different version of clang than clang-7 or your PATH is messed up or you have something in ~/.R/Makevars that sets CXX14 = clang-7 when it should just be CXX14 = clang?

1 Like

My r/Makevars looks like this:

# clang: start
CFLAGS=-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
CCFLAGS=-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
CXXFLAGS=-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
CPPFLAGS=-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include

SHLIB_CXXLDFLAGS+=-Wl,-rpath,${R_HOME}/lib ${R_HOME}/lib/libc++abi.1.dylib
SHLIB_CXX14LDFLAGS+=-Wl,-rpath,${R_HOME}/lib ${R_HOME}/lib/libc++abi.1.dylib
# clang: end

@jroon looks like the R version is outdated. Can you upgrade to R 3.6.2?

1 Like

@bgoodri I’ll add some protection around the R version installed.

SHLIB_CXXLDFLAGS+=-Wl,-rpath,${R_HOME}/lib ${R_HOME}/lib/libc++abi.1.dylib
SHLIB_CXX14LDFLAGS+=-Wl,-rpath,${R_HOME}/lib ${R_HOME}/lib/libc++abi.1.dylib

Maybe is only relevant on R 3.6.x

1 Like