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

libfmt version conflict causing the build to fail #271

Closed
Dromader2137 opened this issue Feb 4, 2024 · 4 comments
Closed

libfmt version conflict causing the build to fail #271

Dromader2137 opened this issue Feb 4, 2024 · 4 comments

Comments

@Dromader2137
Copy link

When compiling form source or from AUR the following errors appear:

/usr/bin/ld: warning: libfmt.so.10, needed by /usr/lib/libspdlog.so.1.13.0, may conflict with libfmt.so.9
/usr/bin/ld: CMakeFiles/abaddon.dir/src/abaddon.cpp.o: in function `void spdlog::logger::log_<Snowflake const&, unsigned int const&>(spdlog::source_loc, spdlog::level::level_enum, fmt::v9::basic_string_view<char>, Snowflake const&, unsigned int const&)':
abaddon.cpp:(.text._ZN6spdlog6logger4log_IJRK9SnowflakeRKjEEEvNS_10source_locENS_5level10level_enumEN3fmt2v917basic_string_viewIcEEDpOT_[_ZN6spdlog6logger4log_IJRK9SnowflakeRKjEEEvNS_10source_locENS_5level10level_enumEN3fmt2v917basic_string_viewIcEEDpOT_]+0x140): undefined reference to `spdlog::details::log_msg::log_msg(spdlog::source_loc, fmt::v9::basic_string_view<char>, spdlog::level::level_enum, fmt::v9::basic_string_view<char>)'
/usr/bin/ld: CMakeFiles/abaddon.dir/src/audio/devices.cpp.o: in function `AudioDevices::SetDevices(ma_device_info*, unsigned int, ma_device_info*, unsigned int)':
devices.cpp:(.text+0x8e4): undefined reference to `spdlog::details::log_msg::log_msg(spdlog::source_loc, fmt::v9::basic_string_view<char>, spdlog::level::level_enum, fmt::v9::basic_string_view<char>)'
/usr/bin/ld: devices.cpp:(.text+0xa34): undefined reference to `spdlog::details::log_msg::log_msg(spdlog::source_loc, fmt::v9::basic_string_view<char>, spdlog::level::level_enum, fmt::v9::basic_string_view<char>)'
/usr/bin/ld: CMakeFiles/abaddon.dir/src/audio/manager.cpp.o: in function `mgr_log_callback(void*, unsigned int, char const*)':
manager.cpp:(.text+0x78b): undefined reference to `spdlog::details::log_msg::log_msg(spdlog::source_loc, fmt::v9::basic_string_view<char>, spdlog::level::level_enum, fmt::v9::basic_string_view<char>)'
/usr/bin/ld: manager.cpp:(.text+0x831): undefined reference to `spdlog::details::log_msg::log_msg(spdlog::source_loc, fmt::v9::basic_string_view<char>, spdlog::level::level_enum, fmt::v9::basic_string_view<char>)'
/usr/bin/ld: CMakeFiles/abaddon.dir/src/audio/manager.cpp.o:manager.cpp:(.text+0x8c9): more undefined references to `spdlog::details::log_msg::log_msg(spdlog::source_loc, fmt::v9::basic_string_view<char>, spdlog::level::level_enum, fmt::v9::basic_string_view<char>)' follow

I tried uninstalling fmt9, but I found out it is needed.

@ouwou
Copy link
Member

ouwou commented Feb 6, 2024

this is probably an issue with your installation. try giving everything a clean rebuild and clean reinstall spdlog? it looks like your build system is using fmt v9 headers but linking against fmt v10

@Dromader2137
Copy link
Author

Can I force the build system to use fmt 10 for both? Asking, because reinstalling spdlog would be a pain as many programs depend on it.

@ouwou
Copy link
Member

ouwou commented Feb 7, 2024

you could try to force abaddon's build to use the bundled version of fmt with -DSPDLOG_FMT_EXTERNAL=ON passed to cmake. it should use the bundled version by default, though (idk why it doesnt. im not too good with arch). not sure if that causes issues but maybe you can find something if that doesnt work on spdlog's repo

@Dromader2137
Copy link
Author

Yeah, using the bundled version worked. Thanks

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