Skip to content
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

Undefined symbols for architecture x86_64: "___builtin_addcll" on Mac using intel compiler #2543

Closed
billcxx opened this issue Nov 10, 2022 · 3 comments

Comments

@billcxx
Copy link

billcxx commented Nov 10, 2022

I'm trying to compile spdlog with intel oneapi and gnu compiler on different platforms.
Here are the results.

System Intel onapi Compiler Status
Linux icc/icx Good
Win10 icl/icx Good
Mac icc Fail
System GNU Compiler Status
Linux gnu Good
Win10 gnu(mingw64 with msys2) Good
Mac gnu12(homebrew) Good

So only the intel classic compiler on Mac fails.
It fails when linking the example

[1/1] Linking CXX executable example/example
FAILED: example/example 
: && /opt/intel/oneapi/compiler/2022.0.0/mac/bin/intel64/icpc -O3 -DNDEBUG -Wl,-search_paths_first -Wl,-headerpad_max_install_names  example/CMakeFiles/example.dir/example.cpp.o -o example/example  libspdlog.a && :
Undefined symbols for architecture x86_64:
  "___builtin_addcll", referenced from:
      __ZN3fmt2v96detail9dragonbox10to_decimalIdEENS2_10decimal_fpIT_EES5_ in libspdlog.a(bundled_fmtlib_format.cpp.o)
ld: symbol(s) not found for architecture x86_64
ninja: build stopped: subcommand failed.

There are also some warnings that I don't see on other platforms, such as this one:

[8/10] Building CXX object CMakeFiles/spdlog.dir/src/spdlog.cpp.o
/Users/xcheng/Documents/spdlog/include/spdlog/fmt/bundled/core.h(3055): warning #3924: attribute namespace "clang" is unrecognized
        FMT_FALLTHROUGH;
        ^
          detected during:
            instantiation of "auto fmt::v9::detail::parse_format_specs<T,ParseContext>(ParseContext &)->decltype((<expression>)) [with T=fmt::v9::remove_cvref_t<int &>={int}, ParseContext=fmt::v9::detail::compile_parse_context<fmt::v9::remove_cvref_t<const char &>={char}, fmt::v9::detail::error_handler>]" at line 2954
            instantiation of "fmt::v9::detail::format_string_checker<Char, ErrorHandler, Args...>::format_string_checker(fmt::v9::basic_string_view<Char>, ErrorHandler) [with Char=fmt::v9::remove_cvref_t<const char &>={char}, ErrorHandler=fmt::v9::detail::error_handler, Args=<fmt::v9::remove_cvref_t<int &>={int}>]" at line 3008
            instantiation of "void fmt::v9::detail::check_format_string<Args...,S,<unnamed>>(S) [with Args=<int &>, S=FMT_COMPILE_STRING, <unnamed>=0]" at line 3162
            instantiation of "fmt::v9::basic_format_string<Char, Args...>::basic_format_string(const S &) [with Char=char, Args=<int &>, S=FMT_COMPILE_STRING, <unnamed>=0]" at line 110 of "/Users/xcheng/Documents/spdlog/include/spdlog/details/fmt_helper.h"

Maybe this is intel compiler's problem? I just want to report this and see if anybody can reproduce this problem.

@gabime
Copy link
Owner

gabime commented Jan 3, 2023

@billcxx Any news about this?

@billcxx
Copy link
Author

billcxx commented Jan 5, 2023

@gabime Sorry, I didn't try to resolve the Mac ICC problem. My primary platform is Linux, Mac support for my program is something nice to have but not really necessary(also gnu already works on Mac).

I forgot to give the information about my system and the compiler version. I tested on two Mac both failed with the same error (the library file is compiled, but fails when linking the example).

System: Mac 11.6.2 intel core
Compiler: icpc version 2021.5.0 (gcc version 4.9.0 compatibility)

Also tested on,

System: Mac 13.1 M1 core
Compiler: icpc version 2021.4.0 (gcc version 4.9.0 compatibility)

@gabime
Copy link
Owner

gabime commented May 28, 2023

Closed due to inactivity

@gabime gabime closed this as completed May 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants