-
-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compilation issues on macOS at CRAN repositories #189
Comments
I should add that the R package, as shipped, using your sources, also builds perfectly fine on the macOS builds at a parallel setup provided by rOpenSci at r-universe.dev: https://eddelbuettel.r-universe.dev/RcppTOML The grid of builds is perfectly fine and complete there (screenshot for convenience): Let's see what light @s-u can shed on this when he has a moment. |
One more piece of information: a friend installed the package from source without a hitch on current intel-based macOS machine. So this points again to the CRAN setup rather than to toml++ so please don't rush and let's wait til we hear from @s-u. |
Ah, Apple clang. The black sheep of the clang family. 😅
Alrighty :) |
According to the R discussion this points to a bug in TOML++ treating Apple clang based clang 6 as clang 10 which it is not. Manually changing |
Thanks for looking into it, Simon. Can you suggest another condition Mark could or should use to adjust the value? I presume we are talking about refining this #ifdef __clang__
#define TOML_CLANG __clang_major__
#else to a more fine-grained setting? As I understand it / you document it the |
@s-u a diff would be welcome. What is "the correct version" ? A first naive trial from where just failed. |
You'll have to ask the TOML++ team - I don't know since only they know what is the condition they are expecting. https://en.wikipedia.org/wiki/Xcode (Toolchain version history table) is a good reference listing the corresponding Apple clang and LLVM clang versions (the columns "LLVM" and "Clang version string"). |
Just to clarify - I was only trying to find out if it would work if
which works because Apple clang 12 is based on LLVM 10. Again, TOML's team call - there seem to be several different versions checked and I don't know if they are actually clang related or run-time related or what. As it stands now, the conditions simply don't work when Apple compilers are used, because they check the wrong version. |
Thanks for looking into this gentlemen, I'll do some investigating of my own later today and come up with something. |
Ah, OK, so the crux of the issue is that apple clang hijacks the values for |
d00464a is a tentative fix for this, but I have no way to test it on apple clang myself @eddelbuettel so I'll have to wait and see how you go with it. |
Thumbs up -- when I carry d00464a over (along with what came before, by One minor and final (and not urgent) wish: CRAN Repository Policy prohibits compiler diagnostic suppression so I have comment out three lines with |
Only three lines? There's more warning suppression in the library than that, just that most of it uses the I see this:
That is just bad policy, because it presupposes that compiler diagnostics are always correct and infallible. In practice that is very much not the case, heh. Oh well. Sure I can add something around those. |
Yes I believe it is a regexp in the checker code R uses in edd@rob:~/git/rcpptoml(master)$ diff -ru ../tomlplusplus/include/toml++/ inst/include/toml++/
diff -ru ../tomlplusplus/include/toml++/toml.h inst/include/toml++/toml.h
--- ../tomlplusplus/include/toml++/toml.h 2023-01-29 07:10:34.151464261 -0600
+++ inst/include/toml++/toml.h 2023-01-29 07:16:11.867945604 -0600
@@ -24,12 +24,12 @@
#pragma warning(disable : 4251) // dll exports for std lib types
#endif
#elif TOML_CLANG
-#pragma clang diagnostic ignored "-Wheader-hygiene"
+//#pragma clang diagnostic ignored "-Wheader-hygiene"
#if TOML_CLANG >= 12
-#pragma clang diagnostic ignored "-Wc++20-extensions"
+//#pragma clang diagnostic ignored "-Wc++20-extensions"
#endif
#if TOML_CLANG == 13 && !defined(__APPLE__)
-#pragma clang diagnostic ignored "-Wreserved-identifier"
+//#pragma clang diagnostic ignored "-Wreserved-identifier"
#endif
#endif
edd@rob:~/git/rcpptoml(master)$ No biggie but a little tedious. (And I kind-of disagree with the policy, though I understand its intend, so it hurts a little each time. 😉 ) |
Hmmn actually it will probably suffice for me to just use the |
And all green at r-universe too so I will roll this up as 0.2.2. I'll close this now -- should anything 'unusual' come up again at CRAN (and I cannot test all permutations prior to uploading) I will report back. Big thanks for the quick fix. |
You may want to hold off on a new release - I'm about to make a new one of my own that includes a conformance fix. It'll be up later this afternoon. |
Dang. Already shipped 0.2.2 ... But I can ask CRAN to disregard and do a rebuild once you roll 3.2.1 or 3.3.0 or whichever it will be. |
@eddelbuettel 3.3.0 is live now :) here's hoping there's no more teething problems, heh 🤞🏼 |
Super -- will update, and I prompted CRAN so I hope we can base 0.2.2 on it. Will work on it in a bit. |
@marzer cool, that's a nice fix. It's a useful piece of code to have around, I'm sure you're not the only one dealing with this. The latest version achieved parity with clang, so we can only hope that Apple stops changing the versions from now on ... |
And we're all set. toml++ 3.3.0 is on CRAN as part of RcppTOML 0.2.2. Thanks to everybody for the prompt and on-point help! |
@s-u your two machines are lagging a little (along with one machine in Vienna). If you can give them a little nudge we can fill this in and confirm that all system are green (including the macOS one setting 10.13 as a build env): |
"Patience you must have" ;) The package has passed the last nightly build:
There are several cron-based rsyncs involved between the build machine, report server and CRAN, so it will get there in due time. |
Environment
toml++ 3.2.0 rolled forward to commit d8bb717 (six days ago) as discussed in the most recent comments in #178
Compiler:
See the overview page at https://cloud.r-project.org/web/checks/check_results_RcppTOML.html for the aggregated results. We fail on current R ("r-release") and the previous R ("r-oldrel") on the macos-x86_64 platform. If we follow the link there we get to
https://cloud.r-project.org/web/checks/check_flavors.html#r-release-macos-x86_64 and it states Apple LLVM version 10.0.0 (clang-1000.10.44.4); GNU Fortran (GCC) 8.2.0
I have now been told that "Apple and LLVM clang have numbering systems which diverged years ago." but I do not have anything more
C++ standard mode:
C++17. We hardwire it https://github.com/eddelbuettel/rcpptoml/blob/master/src/Makevars#L2 and each compilation attempt gets it. The compiler on the machine may change, those macos-x86_64 machines have been held back on purpose to compile binaries for the widest possible set of macOS machines.
Target arch:
macOS
Library configuration overrides:
As per the discussion in #178 we now set
-DTOML_ENABLE_FLOAT16=0
unconditinally but nothing else.Relevant compilation flags:
None.
Describe the bug
Compilation failure. Fuller logs eg at https://www.r-project.org/nosvn/R.check/r-release-macos-x86_64/RcppTOML-00install.html and a partial quote is here.
Steps to reproduce (or a small repro code sample)
You would need a mac set up for R. I can easily submit modified version.
Additional information
None. But I am CCing @s-u who has been looking after macOS builds (and more) for R for 20+ years and is the one behind the
-mmacosx-version-min=10.13
choice. He lets me get away with setting it to-mmacosx-version-min=10.13
in one other package which (and maybe that matters) also uses C++17. "Maybe" that would help here too. But it is also possibly that the tests forTOML_CLANG
need an accomodation. I, as a mere R package developer, have no input in what CRAN uses. It would be tremendous to get this squared away as RcppTOML with toml++ compiles swimmingly on all other platforms.The text was updated successfully, but these errors were encountered: