Skip to content

Compilation issues on macOS at CRAN repositories #189

@eddelbuettel

Description

@eddelbuettel

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.

clang++ -mmacosx-version-min=10.13 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I../inst/include -DTOML_ENABLE_FLOAT16=0 -I'/Volumes/Builds/packages/high-sierra-x86_64/Rlib/4.2/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c parse.cpp -o parse.o
In file included from parse.cpp:22:
../inst/include/toml++/toml.h:16:1: warning: unknown warning group '-Wctad-maybe-unsupported', ignored [-Wunknown-warning-option]
TOML_DISABLE_SPAM_WARNINGS;
^
../inst/include/toml++/impl/preprocessor.h:455:2: note: expanded from macro 'TOML_DISABLE_SPAM_WARNINGS'
        TOML_PRAGMA_CLANG_GE_9(diagnostic ignored "-Wctad-maybe-unsupported")                                              \
        ^
../inst/include/toml++/impl/preprocessor.h:201:38: note: expanded from macro 'TOML_PRAGMA_CLANG_GE_9'
#define TOML_PRAGMA_CLANG_GE_9(decl) TOML_PRAGMA_CLANG(decl)
                                     ^
../inst/include/toml++/impl/preprocessor.h:196:33: note: expanded from macro 'TOML_PRAGMA_CLANG'
#define TOML_PRAGMA_CLANG(decl) _Pragma(TOML_MAKE_STRING(clang decl))
                                ^
<scratch space>:3:27: note: expanded from here
 clang diagnostic ignored "-Wctad-maybe-unsupported"
                          ^
In file included from parse.cpp:22:
In file included from ../inst/include/toml++/toml.h:44:
../inst/include/toml++/impl/path.h:45:11: error: use of undeclared identifier '__builtin_launder'
                        return TOML_LAUNDER(reinterpret_cast<Type*>(s.bytes));
                               ^
../inst/include/toml++/impl/std_new.h:13:25: note: expanded from macro 'TOML_LAUNDER'
#define TOML_LAUNDER(x) __builtin_launder(x)
                        ^
../inst/include/toml++/impl/path.h:61:5: note: in instantiation of function template specialization 'toml::v3::path_component::get_as<std::__1::basic_string<char> >' requested here
                                get_as<std::string>(value_storage_)->~basic_string();
                                ^
../inst/include/toml++/impl/path.h:45:11: error: use of undeclared identifier '__builtin_launder'
                        return TOML_LAUNDER(reinterpret_cast<Type*>(s.bytes));
                               ^
../inst/include/toml++/impl/std_new.h:13:25: note: expanded from macro 'TOML_LAUNDER'
#define TOML_LAUNDER(x) __builtin_launder(x)
                        ^
../inst/include/toml++/impl/path.h:68:12: note: in instantiation of function template specialization 'toml::v3::path_component::get_as<unsigned long>' requested here
                        return *get_as<size_t>(value_storage_);
                                ^
../inst/include/toml++/impl/path.h:45:11: error: use of undeclared identifier '__builtin_launder'
                        return TOML_LAUNDER(reinterpret_cast<Type*>(s.bytes));
                               ^
../inst/include/toml++/impl/std_new.h:13:25: note: expanded from macro 'TOML_LAUNDER'
#define TOML_LAUNDER(x) __builtin_launder(x)
                        ^
../inst/include/toml++/impl/path.h:158:12: note: in instantiation of function template specialization 'toml::v3::path_component::get_as<const unsigned long>' requested here
                        return *get_as<const size_t>(value_storage_);
                                ^
../inst/include/toml++/impl/path.h:45:11: error: use of undeclared identifier '__builtin_launder'
                        return TOML_LAUNDER(reinterpret_cast<Type*>(s.bytes));
                               ^
../inst/include/toml++/impl/std_new.h:13:25: note: expanded from macro 'TOML_LAUNDER'
#define TOML_LAUNDER(x) __builtin_launder(x)
                        ^
../inst/include/toml++/impl/path.h:180:12: note: in instantiation of function template specialization 'toml::v3::path_component::get_as<const std::__1::basic_string<char> >' requested here
                        return *get_as<const std::string>(value_storage_);
                                ^
In file included from parse.cpp:22:
In file included from ../inst/include/toml++/toml.h:51:
../inst/include/toml++/impl/table.h:54:12: error: use of undeclared identifier '__builtin_launder'
                                return TOML_LAUNDER(reinterpret_cast<proxy_type*>(proxy_));
                                       ^
../inst/include/toml++/impl/std_new.h:13:25: note: expanded from macro 'TOML_LAUNDER'
#define TOML_LAUNDER(x) __builtin_launder(x)
                        ^
../inst/include/toml++/impl/table.h:135:11: note: in instantiation of member function 'toml::v3::impl::table_iterator<false>::get_proxy' requested here
                        return get_proxy();
                               ^
../inst/include/toml++/impl/parser.inl:3185:36: note: in instantiation of member function 'toml::v3::impl::table_iterator<false>::operator->' requested here
                                if (pit != parent->end() && pit->first == segment)
                                                               ^
In file included from parse.cpp:22:
In file included from ../inst/include/toml++/toml.h:51:
../inst/include/toml++/impl/table.h:54:12: error: use of undeclared identifier '__builtin_launder'
                                return TOML_LAUNDER(reinterpret_cast<proxy_type*>(proxy_));
                                       ^
../inst/include/toml++/impl/std_new.h:13:25: note: expanded from macro 'TOML_LAUNDER'
#define TOML_LAUNDER(x) __builtin_launder(x)
                        ^
../inst/include/toml++/impl/table.h:129:12: note: in instantiation of member function 'toml::v3::impl::table_iterator<true>::get_proxy' requested here
                        return *get_proxy();
                                ^
../inst/include/toml++/impl/toml_formatter.inl:37:24: note: in instantiation of member function 'toml::v3::impl::table_iterator<true>::operator*' requested here
                                for (auto&& [k, v] : tbl)
                                                   ^
1 warning and 6 errors generated.

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 for TOML_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.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions