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

SEACAS: Fix build with embedded/non-installed fmt library #12875

Closed
wants to merge 3 commits into from

Conversation

gsjaardema
Copy link
Contributor

@trilinos/seacas

Motivation

Trilinos does not require the TPL fmt and instead there is an embedded copy of the fmt library in the seacas ioss source code. However, this embedded version is not installed, so is not available for applications using a Trilinos installation and therefore, there can be no includes of fmt/{anything}.h in the installed seacas ioss include files. This removes the include that is causing problems.

Stakeholder Feedback

Testing

@gsjaardema gsjaardema added pkg: seacas impacting: configure or build The issue is primarily related to configuring or building AT: RETEST Causes the PR autotester to run a new round of PR tests on the next iteration AT: AUTOMERGE Causes the PR autotester to automatically merge the PR branch once approvals are completed PA: Data Services Issues that fall under the Trilinos Data Services Product Area client: Albany Issue impacting the Albany project labels Apr 1, 2024
@gsjaardema gsjaardema requested a review from ikalash April 1, 2024 20:37
@gsjaardema gsjaardema self-assigned this Apr 1, 2024
@gsjaardema gsjaardema requested a review from a team as a code owner April 1, 2024 20:37
@github-actions github-actions bot added the AT: WIP Causes the PR autotester to not test the PR. (Remove to allow testing to occur.) label Apr 1, 2024
Copy link

github-actions bot commented Apr 1, 2024

You seem to have created a PR on master. This is not allowed behavior, so we've blocked your PR. Please switch your PR to target the develop branch and remove the AT: WIP label.

@sebrowne sebrowne changed the title Fix build with embedded/non-installed fmt library SEACAS: Fix build with embedded/non-installed fmt library Apr 1, 2024
@ikalash
Copy link
Contributor

ikalash commented Apr 1, 2024

I just tested this and there are other related errors, e.g.,

/home/ikalash/Trilinos_Albany/nightlyAlbanyTests/Results/Trilinos/build/install/include/Ioss_ZoneConnectivity.h:13:10: fatal error: fmt/core.h: No such file or directory
   13 | #include <fmt/core.h>
      |          ^~~~~~~~~~~~

Looks like there are other includes causing issues.

@gsjaardema
Copy link
Contributor Author

There are some other fmt uses in Iohb_Layout.h, but I don't think you would be including this file... Hope this gets all the ones affecting you.

@gsjaardema gsjaardema closed this Apr 1, 2024
@gsjaardema
Copy link
Contributor Author

Wrong branch...

@gsjaardema gsjaardema deleted the gsjaardema-patch-1 branch April 1, 2024 21:37
@ikalash
Copy link
Contributor

ikalash commented Apr 1, 2024

Now I am getting build errors in Trilinos that look like the following:

[ 99%] Built target piro
In file included from /home/ikalash/Trilinos_Albany/nightlyAlbanyTests/Results/Trilinos/packages/seacas/libraries/ioss/src/main/io_info.C:13:
/home/ikalash/Trilinos_Albany/nightlyAlbanyTests/Results/Trilinos/packages/seacas/libraries/ioss/src/private_copy_fmt/fmt/core.h: In instantiation of 'constexpr fmt::v9::detail::value<Context> fmt::v9::detail::make_value(T&&) [with Context = fmt::v9::basic_format_context<fmt::v9::appender, char>; T = const Ioss::ZoneConnectivity&]':
/home/ikalash/Trilinos_Albany/nightlyAlbanyTests/Results/Trilinos/packages/seacas/libraries/ioss/src/private_copy_fmt/fmt/core.h:1795:29:   required from 'constexpr fmt::v9::detail::value<Context> fmt::v9::detail::make_arg(T&&) [with bool IS_PACKED = true; Context = fmt::v9::basic_format_context<fmt::v9::appender, char>; fmt::v9::detail::type <anonymous> = fmt::v9::detail::type::custom_type; T = const Ioss::ZoneConnectivity&; typename std::enable_if<IS_PACKED, int>::type <anonymous> = 0]'
/home/ikalash/Trilinos_Albany/nightlyAlbanyTests/Results/Trilinos/packages/seacas/libraries/ioss/src/private_copy_fmt/fmt/core.h:1919:77:   required from 'constexpr fmt::v9::format_arg_store<Context, Args>::format_arg_store(T&& ...) [with T = {const Ioss::ZoneConnectivity&}; Context = fmt::v9::basic_format_context<fmt::v9::appender, char>; Args = {Ioss::ZoneConnectivity}]'
/home/ikalash/Trilinos_Albany/nightlyAlbanyTests/Results/Trilinos/packages/seacas/libraries/ioss/src/private_copy_fmt/fmt/core.h:1936:31:   required from 'constexpr fmt::v9::format_arg_store<Context, fmt::v9::remove_cvref_t<Args>...> fmt::v9::make_format_args(Args&& ...) [with Context = fmt::v9::basic_format_context<fmt::v9::appender, char>; Args = {const Ioss::ZoneConnectivity&}]'
/home/ikalash/Trilinos_Albany/nightlyAlbanyTests/Results/Trilinos/packages/seacas/libraries/ioss/src/private_copy_fmt/fmt/core.h:3314:44:   required from 'void fmt::v9::print(fmt::v9::format_string<T ...>, T&& ...) [with T = {const Ioss::ZoneConnectivity&}; fmt::v9::format_string<T ...> = fmt::v9::basic_format_string<char, const Ioss::ZoneConnectivity&>]'
/home/ikalash/Trilinos_Albany/nightlyAlbanyTests/Results/Trilinos/packages/seacas/libraries/ioss/src/main/io_info.C:311:33:   required from here
/home/ikalash/Trilinos_Albany/nightlyAlbanyTests/Results/Trilinos/packages/seacas/libraries/ioss/src/private_copy_fmt/fmt/core.h:1775:7: error: static assertion failed: Cannot format an argument. To make type T formattable provide a formatter<T> specialization: https://fmt.dev/latest/api.html#udt
 1775 |       formattable,
      |       ^~~~~~~~~~~
/home/ikalash/Trilinos_Albany/nightlyAlbanyTests/Results/Trilinos/packages/seacas/libraries/ioss/src/private_copy_fmt/fmt/core.h: In instantiation of 'constexpr fmt::v9::detail::value<Context> fmt::v9::detail::make_value(T&&) [with Context = fmt::v9::basic_format_context<fmt::v9::appender, char>; T = const Ioss::BoundaryCondition&]':
/home/ikalash/Trilinos_Albany/nightlyAlbanyTests/Results/Trilinos/packages/seacas/libraries/ioss/src/private_copy_fmt/fmt/core.h:1795:29:   required from 'constexpr fmt::v9::detail::value<Context> fmt::v9::detail::make_arg(T&&) [with bool IS_PACKED = true; Context = fmt::v9::basic_format_context<fmt::v9::appender, char>; fmt::v9::detail::type <anonymous> = fmt::v9::detail::type::custom_type; T = const Ioss::BoundaryCondition&; typename std::enable_if<IS_PACKED, int>::type <anonymous> = 0]'
/home/ikalash/Trilinos_Albany/nightlyAlbanyTests/Results/Trilinos/packages/seacas/libraries/ioss/src/private_copy_fmt/fmt/core.h:1919:77:   required from 'constexpr fmt::v9::format_arg_store<Context, Args>::format_arg_store(T&& ...) [with T = {const Ioss::BoundaryCondition&}; Context = fmt::v9::basic_format_context<fmt::v9::appender, char>; Args = {Ioss::BoundaryCondition}]'
/home/ikalash/Trilinos_Albany/nightlyAlbanyTests/Results/Trilinos/packages/seacas/libraries/ioss/src/private_copy_fmt/fmt/core.h:1936:31:   required from 'constexpr fmt::v9::format_arg_store<Context, fmt::v9::remove_cvref_t<Args>...> fmt::v9::make_format_args(Args&& ...) [with Context = fmt::v9::basic_format_context<fmt::v9::appender, char>; Args = {const Ioss::BoundaryCondition&}]'
/home/ikalash/Trilinos_Albany/nightlyAlbanyTests/Results/Trilinos/packages/seacas/libraries/ioss/src/private_copy_fmt/fmt/core.h:3314:44:   required from 'void fmt::v9::print(fmt::v9::format_string<T ...>, T&& ...) [with T = {const Ioss::BoundaryCondition&}; fmt::v9::format_string<T ...> = fmt::v9::basic_format_string<char, const Ioss::BoundaryCondition&>]'
/home/ikalash/Trilinos_Albany/nightlyAlbanyTests/Results/Trilinos/packages/seacas/libraries/ioss/src/main/io_info.C:329:32:   required from here
/home/ikalash/Trilinos_Albany/nightlyAlbanyTests/Results/Trilinos/packages/seacas/libraries/ioss/src/private_copy_fmt/fmt/core.h:1775:7: error: static assertion failed: Cannot format an argument. To make type T formattable provide a formatter<T> specialization: https://fmt.dev/latest/api.html#udt
make[2]: *** [packages/seacas/libraries/ioss/src/main/CMakeFiles/io_info_lib.dir/io_info.C.o] Error 1
make[1]: *** [packages/seacas/libraries/ioss/src/main/CMakeFiles/io_info_lib.dir/all] Error 2
make: *** [all] Error 2

I'm testing gsjaardema-path-1 branch with the following sha:

commit 5cb3c918ace658a8d5f9ac86754cd218ab1faecd
Author: Greg Sjaardema <[email protected]>
Date:   Mon Apr 1 15:34:18 2024 -0600

    And yet another...

Hopefully it's the right one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AT: AUTOMERGE Causes the PR autotester to automatically merge the PR branch once approvals are completed AT: RETEST Causes the PR autotester to run a new round of PR tests on the next iteration AT: WIP Causes the PR autotester to not test the PR. (Remove to allow testing to occur.) client: Albany Issue impacting the Albany project impacting: configure or build The issue is primarily related to configuring or building PA: Data Services Issues that fall under the Trilinos Data Services Product Area pkg: seacas
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants