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

USE_SYSTEM_FMTLIB seems to be non functional #5428

Closed
autoantwort opened this issue Jul 9, 2023 · 3 comments · Fixed by #5429
Closed

USE_SYSTEM_FMTLIB seems to be non functional #5428

autoantwort opened this issue Jul 9, 2023 · 3 comments · Fixed by #5429

Comments

@autoantwort
Copy link
Contributor

Describe the bug
I have specified USE_SYSTEM_FMTLIB but it looks like fmtlib is built anyway.
I get the following error:

[43/230] /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++  -I/Users/leanderSchulten/git_projekte/vcpkg/buildtrees/wpilib/src/868759e556-81ce2d8562.clean/wpiutil/src/main/native/include -I/Users/leanderSchulten/git_projekte/vcpkg/buildtrees/wpilib/src/868759e556-81ce2d8562.clean/wpiutil/src/main/native/thirdparty/memory/include -I/Users/leanderSchulten/git_projekte/vcpkg/buildtrees/wpilib/src/868759e556-81ce2d8562.clean/wpiutil/src/main/native/thirdparty/json/include -I/Users/leanderSchulten/git_projekte/vcpkg/buildtrees/wpilib/src/868759e556-81ce2d8562.clean/wpiutil/src/main/native/thirdparty/llvm/include -I/Users/leanderSchulten/git_projekte/vcpkg/buildtrees/wpilib/src/868759e556-81ce2d8562.clean/wpiutil/src/main/native/thirdparty/mpack/include -I/Users/leanderSchulten/git_projekte/vcpkg/buildtrees/wpilib/src/868759e556-81ce2d8562.clean/wpiutil/src/main/native/thirdparty/sigslot/include -isystem /Users/leanderSchulten/git_projekte/vcpkg/vcpkg_installed/arm64-osx/include -fPIC -g -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk -Wall -pedantic -Wextra -Werror -Wno-unused-parameter -Wno-deprecated-anon-enum-enum-conversion -std=gnu++20 -MD -MT wpiutil/CMakeFiles/wpiutil.dir/src/main/native/thirdparty/fmtlib/src/format.cpp.o -MF wpiutil/CMakeFiles/wpiutil.dir/src/main/native/thirdparty/fmtlib/src/format.cpp.o.d -o wpiutil/CMakeFiles/wpiutil.dir/src/main/native/thirdparty/fmtlib/src/format.cpp.o -c /Users/leanderSchulten/git_projekte/vcpkg/buildtrees/wpilib/src/868759e556-81ce2d8562.clean/wpiutil/src/main/native/thirdparty/fmtlib/src/format.cpp
FAILED: wpiutil/CMakeFiles/wpiutil.dir/src/main/native/thirdparty/fmtlib/src/format.cpp.o 
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++  -I/Users/leanderSchulten/git_projekte/vcpkg/buildtrees/wpilib/src/868759e556-81ce2d8562.clean/wpiutil/src/main/native/include -I/Users/leanderSchulten/git_projekte/vcpkg/buildtrees/wpilib/src/868759e556-81ce2d8562.clean/wpiutil/src/main/native/thirdparty/memory/include -I/Users/leanderSchulten/git_projekte/vcpkg/buildtrees/wpilib/src/868759e556-81ce2d8562.clean/wpiutil/src/main/native/thirdparty/json/include -I/Users/leanderSchulten/git_projekte/vcpkg/buildtrees/wpilib/src/868759e556-81ce2d8562.clean/wpiutil/src/main/native/thirdparty/llvm/include -I/Users/leanderSchulten/git_projekte/vcpkg/buildtrees/wpilib/src/868759e556-81ce2d8562.clean/wpiutil/src/main/native/thirdparty/mpack/include -I/Users/leanderSchulten/git_projekte/vcpkg/buildtrees/wpilib/src/868759e556-81ce2d8562.clean/wpiutil/src/main/native/thirdparty/sigslot/include -isystem /Users/leanderSchulten/git_projekte/vcpkg/vcpkg_installed/arm64-osx/include -fPIC -g -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk -Wall -pedantic -Wextra -Werror -Wno-unused-parameter -Wno-deprecated-anon-enum-enum-conversion -std=gnu++20 -MD -MT wpiutil/CMakeFiles/wpiutil.dir/src/main/native/thirdparty/fmtlib/src/format.cpp.o -MF wpiutil/CMakeFiles/wpiutil.dir/src/main/native/thirdparty/fmtlib/src/format.cpp.o.d -o wpiutil/CMakeFiles/wpiutil.dir/src/main/native/thirdparty/fmtlib/src/format.cpp.o -c /Users/leanderSchulten/git_projekte/vcpkg/buildtrees/wpilib/src/868759e556-81ce2d8562.clean/wpiutil/src/main/native/thirdparty/fmtlib/src/format.cpp
/Users/leanderSchulten/git_projekte/vcpkg/buildtrees/wpilib/src/868759e556-81ce2d8562.clean/wpiutil/src/main/native/thirdparty/fmtlib/src/format.cpp:35:75: error: expected '(' for function-style cast or type construction
                                 basic_format_args<FMT_BUFFER_CONTEXT(char)>,
                                                                      ~~~~^
/Users/leanderSchulten/git_projekte/vcpkg/buildtrees/wpilib/src/868759e556-81ce2d8562.clean/wpiutil/src/main/native/thirdparty/fmtlib/src/format.cpp:34:23: error: explicit instantiation of 'vformat_to' does not refer to a function template, variable template, member function, member class, or static data member
template FMT_API void vformat_to(buffer<char>&, string_view,
                      ^
/Users/leanderSchulten/git_projekte/vcpkg/vcpkg_installed/arm64-osx/include/fmt/format.h:4554:6: note: candidate template ignored: failed template argument deduction
void vformat_to(buffer<Char>& buf, basic_string_view<Char> fmt,
     ^
2 errors generated.

To Reproduce
Steps to reproduce the behavior:
Specify -DUSE_SYSTEM_FMTLIB=ON and have fmtlib 10.0.0 installed.

Expected behavior
Do not build fmtlib and use the provided one.

Additional context
Happens with the code from the main branch. Used code: microsoft/vcpkg#32461

@autoantwort autoantwort changed the title USE_SYSTEM_FMTLIB not functional USE_SYSTEM_FMTLIB seems to be non functional Jul 9, 2023
@calcmogul
Copy link
Member

calcmogul commented Jul 9, 2023

It worked for Arch Linux packages as of 2023.4.3: https://aur.archlinux.org/packages/wpimath

@calcmogul
Copy link
Member

Looks like the wpiutil add_library() call still lists the local fmtlib files.

@autoantwort
Copy link
Contributor Author

Yes that is what I also discovered. I have created #5429

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.

2 participants