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
-stdlib=libc++ should be conditional on compiler and not hardcoded on macOS #120
P. S. I am aware that latest versions of GCC can be configured to support libc++, but a) that is not default behavior, AFAIU, b) it does not work on some archs (ppc, ppcc64), c) older version of GCC do not support that at all, but can be used with R (C++11 support is there), d) using libc++ with GCC is largely untested even on Intel.
Right, I see it's GCC 12. I'm wondering, though, what does the mp mean in gcc-mp-12?
I also see that you are building for ppc. It may be true that, strictly speaking, the flags in the Makefile should be conditional on the compiler. I'll note, though, that Makefile comes directly from a very widely used (though now dormant) project, libsass, and we would really prefer not to maintain our own fork of the code. There would have to be a very compelling reason for us to do that, and I don't think that supporting a dead platform like PowerPC merits modifying, testing, and maintaining our own version of libsass.
The problem is not PPC-specific though. Most of versions of GCC on Intel won’t support linking to libc++, and even those which do, it is an untested and undesirable behavior. The code gets away with these wrong settings simply because most people use Clang on MacOS. That does not make the code correct though.
The test should not be OS-based, but either test for compiler used or C++ library directly.
It's seems that #130 might fix this. It'd be much appreciated if you could confirm @barracuda156 by installing the latest dev version -- remotes::install_github("rstudio/sass")
Why is that flag even hardcoded? Any sane compiler adds its primary runtime libs automatically. I think this is the only R package out of some 3000+ tested so far which has this bug.
Activity
wch commentedon Dec 7, 2022
This is similar to #116 (which was fixed) but I think it's a separate issue, since the lines you're referring to are in the Makefile from libsass itself: https://github.com/sass/libsass/blob/2102188d21d2b7577c2b3edb12832e90786a2831/Makefile#L112-L116
What compiler are you using?
barracuda156 commentedon Dec 7, 2022
@wch It is seen in the log above, GCC 12.
P. S. I am aware that latest versions of GCC can be configured to support
libc++, but a) that is not default behavior, AFAIU, b) it does not work on some archs (ppc, ppcc64), c) older version of GCC do not support that at all, but can be used with R (C++11 support is there), d) usinglibc++with GCC is largely untested even on Intel.wch commentedon Dec 7, 2022
Right, I see it's GCC 12. I'm wondering, though, what does the
mpmean ingcc-mp-12?I also see that you are building for ppc. It may be true that, strictly speaking, the flags in the Makefile should be conditional on the compiler. I'll note, though, that Makefile comes directly from a very widely used (though now dormant) project, libsass, and we would really prefer not to maintain our own fork of the code. There would have to be a very compelling reason for us to do that, and I don't think that supporting a dead platform like PowerPC merits modifying, testing, and maintaining our own version of libsass.
barracuda156 commentedon Dec 8, 2022
@wch mp is for Macports.
The problem is not PPC-specific though. Most of versions of GCC on Intel won’t support linking to libc++, and even those which do, it is an untested and undesirable behavior. The code gets away with these wrong settings simply because most people use Clang on MacOS. That does not make the code correct though.
The test should not be OS-based, but either test for compiler used or C++ library directly.
cpsievert commentedon Jul 7, 2023
It's seems that #130 might fix this. It'd be much appreciated if you could confirm @barracuda156 by installing the latest dev version --
remotes::install_github("rstudio/sass")barracuda156 commentedon Jul 7, 2023
@cpsievert Thank you, I will try this out soon (and also re-run tests to see if that example still fails).
barracuda156 commentedon Jul 7, 2023
It is still broken, since it still hardcodes the wrong runtime for C++, and the source uses C++:
barracuda156 commentedon Jul 7, 2023
Why is that flag even hardcoded? Any sane compiler adds its primary runtime libs automatically. I think this is the only R package out of some 3000+ tested so far which has this bug.