Skip to content

Visibility settings in apple-clang #323

Open
@tkoskela

Description

@tkoskela

There are a lot of compiler warnings in our apple-clang builds of the type

2022-12-09T09:20:13.0853400Z ld: warning: direct access in function 'char const* fmt::v8::detail::parse_replacement_field<char, void fmt::v8::detail::vformat_to<char>(fmt::v8::detail::buffer<char>&, fmt::v8::basic_string_view<char>, fmt::v8::basic_format_args<fmt::v8::basic_format_context<std::__1::conditional<std::is_same<fmt::v8::type_identity<char>::type, char>::value, fmt::v8::appender, std::__1::back_insert_iterator<fmt::v8::detail::buffer<fmt::v8::type_identity<char>::type> > >::type, fmt::v8::type_identity<char>::type> >, fmt::v8::detail::locale_ref)::format_handler&>(char const*, char const*, void fmt::v8::detail::vformat_to<char>(fmt::v8::detail::buffer<char>&, fmt::v8::basic_string_view<char>, fmt::v8::basic_format_args<fmt::v8::basic_format_context<std::__1::conditional<std::is_same<fmt::v8::type_identity<char>::type, char>::value, fmt::v8::appender, std::__1::back_insert_iterator<fmt::v8::detail::buffer<fmt::v8::type_identity<char>::type> > >::type, fmt::v8::type_identity<char>::type> >, fmt::v8::detail::locale_ref)::format_handler&)' from file '/Users/runner/.conan/data/fmt/8.0.1/_/_/package/db14d83fb6d5b354ad734851c8c78016652c0ce0/lib/libfmt.a(format.cc.o)' to global weak symbol 'fmt::v8::appender fmt::v8::detail::write<char, fmt::v8::appender, double, 0>(fmt::v8::appender, double)::specs' from file 'CMakeFiles/test_sdmm.dir/sdmm.cc.o' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.

Based on stackoverflow and a linked thread it's to do with boost (or the c++ standard library?) being compiled with different visibilty settings to our code. They suggest adding -fvisibility=default to cxxflags on apple-clang. Does not seem to be breaking anything though.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions