[R-SIG-Mac] multithreading package failure?

Jan Wijffels jw|j||e|@ @end|ng |rom bno@@c@be
Mon Jun 24 14:11:17 CEST 2019


Dear r-sig-mac mailing list,

I don't own a Mac but I'm the maintainer of the ruimtehol R package which
FAILS on CRAN on Mac only (see logs at
https://cran.r-project.org/web/checks/check_results_ruimtehol.html)
I would like to get rid of the FAIL note on CRAN but I'm a bit stabbing in
the dark about how as there is not a lot of information on the check page
on the reason of failure.
The package is developped at https://github.com/bnosac/ruimtehol and
probably the failure is due to multi-threading as the only 2 things which
are different on MacOS is the code at
https://github.com/bnosac/ruimtehol/blob/da1cd4da6bbcc6a7cc4c346989e8476f37864091/src/Starspace/src/model.cpp#L31
and at
https://github.com/bnosac/ruimtehol/blob/da1cd4da6bbcc6a7cc4c346989e8476f37864091/src/Starspace/src/model.cpp#L38


Currently R package ruimtehol apparently has been built fine at least
once on CRAN as a Mac OS a binary is available at
https://CRAN.R-project.org/package=ruimtehol
Also R CMD check ran today on 2019/06/24 on rhub running Mac OS runs fine
as shown in the log at
https://builder.r-hub.io/status/ruimtehol_0.2.1.tar.gz-98f98671fd5fe78842e5bf463f1fe05c,
which makes me wonder what is the differences in compiler setup regarding
rhub and CRAN on Mac OS?

A user of the package has managed to get the package working as shown at
issue https://github.com/bnosac/ruimtehol/issues/10#issuecomment-458311181
He basically did change the compiler he used, namely did brew install llvm
and then fixed his compiler setup as follows

CC=/usr/local/opt/llvm/bin/clang #-fopenmp
CXX=/usr/local/opt/llvm/bin/clang++ #-fopenmp
CFLAGS=-g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe
CXXFLAGS=-g -O3 -Wall -pedantic -std=c++11 -mtune=native -pipe
LDFLAGS=-L/usr/local/opt/gettext/lib -L/usr/local/opt/llvm/lib
-Wl,-rpath,/usr/local/opt/llvm/lib
CPPFLAGS=-I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include


The Makevars in the package looks like this

CXX_STD = CXX11
PKG_LIBS = -pthread
PKG_CPPFLAGS = -pthread -DSTRICT_R_HEADERS -DBOOST_NO_AUTO_PTR -include
compliance.h -I./Starspace/src


Does anyone has a suggestion on what causes the failure of the package on
Mac OS?

Jan

Jan Wijffels
Statistician
www.bnosac.be  | +32 486 611708

	[[alternative HTML version deleted]]



More information about the R-SIG-Mac mailing list