Skip to content
This repository has been archived by the owner on Feb 24, 2023. It is now read-only.

Better Stan support #22

Closed
coatless opened this issue Nov 8, 2019 · 1 comment · Fixed by #24
Closed

Better Stan support #22

coatless opened this issue Nov 8, 2019 · 1 comment · Fixed by #24

Comments

@coatless
Copy link
Collaborator

coatless commented Nov 8, 2019

From Dealing with Catalina and Dealing with Catalina II, we need to modify how the compiler is setup to ease the C++ exception issue.

@bgoodri seems to have found a good option here:

CXX14 = /usr/local/clang7/bin/clang++ -stdlib=libc++ -nostdinc++ -I/usr/local/clang7/include/c++/v1
SHLIB_CXX14LD = /usr/local/clang7/bin/clang++ -L/usr/local/clang7/lib/

Note, the -nostdinc++ is disabling standard directorys, c.f. https://gcc.gnu.org/onlinedocs/gcc/Directory-Options.html

-nostdinc
Do not search the standard system directories for header files. Only the directories explicitly specified with -I, -iquote, -isystem, and/or -idirafter options (and the directory of the current file, if appropriate) are searched.

-nostdinc++
Do not search for header files in the C++-specific standard directories, but do still search the other standard directories. (This option is used when building the C++ library.)
@coatless
Copy link
Collaborator Author

Opted against this solution. Instead, I implemented Sebastian's ABI reference, c.f.

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant