You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Rcpp compilation issue on Alpine distribution #448
I would encourage you to work up a (minimal) pull request demonstrating (via Travis CI) that nothing breaks on other systems yet that it recognizes your (somewhat exotic) libc variant.
We generally rely on that set of defines list over here at sourceforge. Methinks the required change may just be on one line (but possibly one line in several files).
@thirdwing take a step back -- @lostie correctly pointed to line 40 for execinfo.h but on line 37 we have the very test he needs to expand. Should not be hard, may however also be needed somewhere else.
I don't seem to be able to push my changes to the remote 😢
Welcome to git(hub). You are supposed to fork a repo after which you can push to your copy after which you can (once happy) propose a pull request back to our repo. Which we, who have write access to our repo, may or may not accept.
Basically, when R compiles code in a package, it calls make and reads in the system Makeconf, and then applies (potentially amending or overriding) any variables set in the appropriate Makevars files. If you're able to just edit the Makeconf file, that should be sufficient.
Reading the file at R.home("bin")/config is somewhat helpful (it shows how R looks up and uses the various Makefiles)
Not everyone has the permission to change system-wide configurations.
That’s not what I’ve asked. I’m maintainer of the R package in Alpine Linux, so I’m about to add CXXFLAGS and CXX1XFLAGS as the default for the package.
@kevinushey, thanks, so I’m gonna add these to the Makeconf.
Thanks for the update. As it happens, we'll probably release a new Rcpp version within a few days so if you have some cycles to spare, could you try the current master branch here (with version 0.12.5.7 likely to become 0.12.6 'real soon now') ?
Activity
eddelbuettel commentedon Mar 21, 2016
I would encourage you to work up a (minimal) pull request demonstrating (via Travis CI) that nothing breaks on other systems yet that it recognizes your (somewhat exotic) libc variant.
We generally rely on that set of defines list over here at sourceforge. Methinks the required change may just be on one line (but possibly one line in several files).
thirdwing commentedon Mar 21, 2016
From musl source code (http://git.musl-libc.org/cgit/musl/tree/include), there seems no
execinfo.h.I know GLIBC defines several macros (https://github.com/lattera/glibc/blob/master/include/features.h#L358), so we know we are using GLIBC.
I am not sure there are such macros in musl.
eddelbuettel commentedon Mar 21, 2016
@thirdwing take a step back -- @lostie correctly pointed to line 40 for
execinfo.hbut on line 37 we have the very test he needs to expand. Should not be hard, may however also be needed somewhere else.lostie commentedon Mar 21, 2016
I don't seem to be able to push my changes to the remote 😢
Here's a suggested patch: https://gist.github.com/lostie/425d11dff9c06cc9ff89
thirdwing commentedon Mar 21, 2016
Hi @lostie
I think there is another place need to be changed line260 . Maybe more.
This change means we will only have the full backtrace info using GLIBC.
eddelbuettel commentedon Mar 21, 2016
Welcome to git(hub). You are supposed to fork a repo after which you can push to your copy after which you can (once happy) propose a pull request back to our repo. Which we, who have write access to our repo, may or may not accept.
There are lots of tutorials for all of this.
eddelbuettel commentedon Mar 31, 2016
This was taken care of in #449.
thirdwing commentedon May 18, 2016
@albap Hi, you need to modify the Makevars first.
thirdwing commentedon May 18, 2016
You need
-D__MUSL__in thePKG_CXXFLAGSto install Rcpp on Alpine.You can add the following line
into Makevars (https://github.com/RcppCore/Rcpp/blob/master/src/Makevars) in the package.
thirdwing commentedon May 18, 2016
You can try with a
~/.R/Makevarswith contenteddelbuettel commentedon May 18, 2016
@thirdwing 's suggestion is what I would do but possibly with
+=rather than=:to ensure C++ and C++11 have it set. That will affect all R builds across all packages; and at least Rcpp should take advantage of it.
jirutka commentedon May 20, 2016
Can we set it in system-wide
Makeconfinstead ofMakevars? What’s difference between them?thirdwing commentedon May 20, 2016
Not everyone has the permission to change system-wide configurations.
kevinushey commentedon May 20, 2016
Basically, when
Rcompiles code in a package, it callsmakeand reads in the systemMakeconf, and then applies (potentially amending or overriding) any variables set in the appropriateMakevarsfiles. If you're able to just edit theMakeconffile, that should be sufficient.Reading the file at
R.home("bin")/configis somewhat helpful (it shows how R looks up and uses the various Makefiles)jirutka commentedon May 20, 2016
That’s not what I’ve asked. I’m maintainer of the R package in Alpine Linux, so I’m about to add
CXXFLAGSandCXX1XFLAGSas the default for the package.@kevinushey, thanks, so I’m gonna add these to the
Makeconf.sgerrand commentedon Jul 14, 2016
@albap @jirutka: 📝 This change now exists in each of the Alpine packages for R which I maintain - https://github.com/sgerrand/alpine-pkg-R/releases. I've updated the value of
R_XTRA_CPPFLAGS, so packages likeRcppnow compile out of the box.Try it out:
eddelbuettel commentedon Jul 14, 2016
Thanks for the update. As it happens, we'll probably release a new Rcpp version within a few days so if you have some cycles to spare, could you try the current master branch here (with version 0.12.5.7 likely to become 0.12.6 'real soon now') ?
jirutka commentedon Jul 14, 2016
@sgerrand I wonder, why do you maintain sgerrand/alpine-pkg-R when we already have R package in official Alpine repository?
sgerrand commentedon Jul 14, 2016
Mainly because that package predated my packaging efforts, it is still only
in the edge branch and not publicly released.
eddelbuettel commentedon Jul 14, 2016
This is all getting a little too inside-baseball for Rcpp so I am going to lock this discussion here.
As it stands, Rcpp appears to be twice compiled right for Alpine we're all a happy family now.