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 symbol _ZN3fmt2v86detail13error_handler8on_errorEPKc #2695

Closed
saraedum opened this issue Jan 4, 2022 · 4 comments · Fixed by #2696
Closed

Undefined symbol _ZN3fmt2v86detail13error_handler8on_errorEPKc #2695

saraedum opened this issue Jan 4, 2022 · 4 comments · Fixed by #2696

Comments

@saraedum
Copy link
Contributor

saraedum commented Jan 4, 2022

Upgrading fmt from 8.0.1 to 8.1.0 breaks a CI run here: https://github.com/flatsurf/flatsurf/runs/4698212878?check_suite_focus=true#step:6:554

In that CI run, we are trying to load a library, libintervalxt, which was built against fmt 8.0.1 with fmt 8.1.0 installed.

While the missing symbol is not part of the public API of fmt, it used to have FMT_API set in 8.0.1 but not anymore in 8.1.0. At least in the setup that the conda-forge distribution uses, this made that symbol disappear from the library. Since libraries such as libintervalxt build against the old ABI (without using this symbol explicitly in the code of course) this seems like a breaking ABI change was introduced in the 8.1.0 release.

Or maybe conda-forge's libintervalxt and fmt are using the wrong compiler flags somehow?

@saraedum
Copy link
Contributor Author

saraedum commented Jan 4, 2022

So, I guess any inline (e.g. template) function in any of the header files that calls on_error produced a reference to the on_error symbol if it decided not to inline it. So it seems to me that there is nothing wrong with our build of fmt 8.0.1. Also libraries that built against fmt 8.0.1 will reference that symbol even if they don't call it directly. So, again, nothing seems to be wrong with our libintervalxt build here.

saraedum added a commit to saraedum/fmt that referenced this issue Jan 4, 2022
this fixes a breaking ABI change that was introduce in the upgrade from
8.0.1 to 8.1.0.

Fixes fmtlib#2695.
@zhsj
Copy link
Contributor

zhsj commented Jan 4, 2022

Same issue for Debian, https://release.debian.org/britney/pseudo-excuses-experimental.html

fmtlib (8.0.1+ds1-4 to 8.1.0+ds1-1)
Migration status for fmtlib (8.0.1+ds1-4 to 8.1.0+ds1-1): BLOCKED: Rejected/violates migration policy/introduces a regression
Issues preventing migration:
autopkgtest for bear/3.0.17-1: amd64: Regression ♻ (reference ♻), arm64: Regression ♻ (reference ♻)
autopkgtest for ceph/16.2.7+ds-1: amd64: Regression ♻ (reference ♻), arm64: Regression ♻ (reference ♻)
autopkgtest for cryfs/0.11.0-2: amd64: Regression ♻ (reference ♻), arm64: Regression ♻ (reference ♻)
autopkgtest for spdlog/1:1.9.2+ds-0.2: amd64: Regression ♻ (reference ♻), arm64: Regression ♻ (reference ♻)
autopkgtest for therion/6.0.4-1: amd64: Regression ♻ (reference ♻), arm64: Regression ♻ (reference ♻)
Additional info:
Cannot be tested by piuparts (not a blocker) - (no link yet)
1 days old

spdlog seems to use this symbol as well.

/usr/bin/c++ -O2 CMakeFiles/spdlog-utests.dir/test_file_helper.cpp.o CMakeFiles/spdlog-utests.dir/test_file_logging.cpp.o CMakeFiles/spdlog-utests.dir/test_daily_logger.cpp.o CMakeFiles/spdlog-utests.dir/test_misc.cpp.o CMakeFiles/spdlog-utests.dir/test_eventlog.cpp.o CMakeFiles/spdlog-utests.dir/test_pattern_formatter.cpp.o CMakeFiles/spdlog-utests.dir/test_async.cpp.o CMakeFiles/spdlog-utests.dir/test_registry.cpp.o CMakeFiles/spdlog-utests.dir/test_macros.cpp.o CMakeFiles/spdlog-utests.dir/utils.cpp.o CMakeFiles/spdlog-utests.dir/main.cpp.o CMakeFiles/spdlog-utests.dir/test_mpmc_q.cpp.o CMakeFiles/spdlog-utests.dir/test_dup_filter.cpp.o CMakeFiles/spdlog-utests.dir/test_fmt_helper.cpp.o CMakeFiles/spdlog-utests.dir/test_stdout_api.cpp.o CMakeFiles/spdlog-utests.dir/test_backtrace.cpp.o CMakeFiles/spdlog-utests.dir/test_create_dir.cpp.o CMakeFiles/spdlog-utests.dir/test_cfg.cpp.o CMakeFiles/spdlog-utests.dir/test_time_point.cpp.o CMakeFiles/spdlog-utests.dir/test_stopwatch.cpp.o CMakeFiles/spdlog-utests.dir/test_errors.cpp.o -o spdlog-utests  /usr/lib/x86_64-linux-gnu/libspdlog.so.1.9.2 -lpthread /usr/lib/x86_64-linux-gnu/libfmt.so.8.1.0 -Wl,--as-needed 
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libspdlog.so.1.9.2: undefined reference to `fmt::v8::detail::error_handler::on_error(char const*)'

vitaut pushed a commit that referenced this issue Jan 4, 2022
this fixes a breaking ABI change that was introduce in the upgrade from
8.0.1 to 8.1.0.

Fixes #2695.
@zhsj
Copy link
Contributor

zhsj commented Jan 5, 2022

I backported #2696 to Debian, but this symbol still doesn't get exported.

@vitaut vitaut reopened this Jan 5, 2022
@vitaut
Copy link
Contributor

vitaut commented Jan 5, 2022

Should be fixed in 98cbb6a. Thanks for reporting!

@vitaut vitaut closed this as completed Jan 5, 2022
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

Successfully merging a pull request may close this issue.

3 participants