Open geotheory opened 5 years ago
you need to install official R clang toolchain - https://cran.r-project.org/bin/macosx/tools/ and specify compiler in your ~/.R/Makevars
. Something like CXX11=/usr/local/opt/llvm/bin/clang++
(change path to your clang)
Or clone repo and remove these lines from src/Makevars
PKG_CFLAGS = $(SHLIB_OPENMP_CFLAGS)
PKG_CXX11FLAGS = $(SHLIB_OPENMP_CFLAGS)
PKG_LIBS = $(SHLIB_OPENMP_CFLAGS)
That solved it, thanks :)
hi dselivanov
i could not find ~/.R/Makevars
on my mac! is the name correct?
thanks much
You might need to create it
On Wed, 23 Mar 2022, 13:14 tamerbio, @.***> wrote:
hi dselivanov i could not find ~/.R/Makevars on my mac! is the name correct? thanks much
— Reply to this email directly, view it on GitHub https://github.com/dselivanov/LSHR/issues/16#issuecomment-1076129762, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABHC5XPQ73JX3Y4CGTC7FZDVBLOIJANCNFSM4HAOHD6Q . You are receiving this because you commented.Message ID: @.***>
I am trying to install Shaman package from the source using:
install_local("~/Desktop/shaman-master.zip")
but getting this error:
* installing *source* package ‘shaman’ ...
** using staged installation
** libs
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include' -I/usr/local/include -fPIC -Wall -g -O2 -c ContactShuffler.cpp -o ContactShuffler.o
ContactShuffler.cpp:34:4: warning: field 'm_decay_smooth' will be initialized after field 'm_regularization' [-Wreorder-ctor]
m_decay_smooth(decay_smooth),
^
1 warning generated.
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include' -I/usr/local/include -fPIC -Wall -g -O2 -c GenomeGridLog.cpp -o GenomeGridLog.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include' -I/usr/local/include -fPIC -Wall -g -O2 -c Parser.cpp -o Parser.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include' -I/usr/local/include -fPIC -Wall -g -O2 -c Random.cpp -o Random.o
In file included from Random.cpp:1:
./Random.h:17:16: error: unknown type name 'uint'; did you mean 'int'?
static uint bits_data;
^~~~
int
./Random.h:22:16: error: unknown type name 'uint'; did you mean 'int'?
static uint bits();
^~~~
int
./Random.h:23:16: error: unknown type name 'uint'; did you mean 'int'?
static uint bits(int num);
^~~~
int
./Random.h:32:8: error: unknown type name 'uint'; did you mean 'int'?
inline uint Random::bits() {
^~~~
int
./Random.h:33:9: error: use of undeclared identifier 'uint'; did you mean 'int'?
uint raw = mrand48();
^~~~
int
Random.cpp:5:14: error: redefinition of 'bits_data' with a different type: 'uint' (aka 'unsigned int') vs 'int'
uint Random::bits_data = 0;
^
./Random.h:17:21: note: previous declaration is here
static uint bits_data;
^
Random.cpp:88:14: error: return type of out-of-line definition of 'Random::bits' differs from that in the declaration
uint Random::bits(int num) {
~~~~ ^
./Random.h:23:21: note: previous declaration is here
static uint bits(int num);
~~~~ ^
7 errors generated.
make: *** [Random.o] Error 1
ERROR: compilation failed for package ‘shaman’
* removing ‘/Library/Frameworks/R.framework/Versions/4.1/Resources/library/shaman’
Warning message:
In i.p(...) :
installation of package ‘/var/folders/tz/vb7vv98d2_bfq_t4zbrypvl40000gn/T//RtmpZUUjvc/remotes119d76ed0b5/shaman-master’ had non-zero exit status
could you may be help! many many thanks
Are you aware of this compile error for Mac users?
I'm running R 3.5.3 on macOS Movave 10.14.3. Can provide more env info if it helps. I ran
brew upgrade llvm
to v8.0.0 but no effect.