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

Please update fmtlib to recent version #93

Open
jspanchu opened this issue Jan 28, 2025 · 4 comments
Open

Please update fmtlib to recent version #93

jspanchu opened this issue Jan 28, 2025 · 4 comments

Comments

@jspanchu
Copy link
Contributor

jspanchu commented Jan 28, 2025

The version 7.1.3 of thirdparty/fmt is old. Please bring it up to date because it currently uses the deprecated base char_traits<T> template which has now been removed from LLVM's libc++ last year llvm/llvm-project#72694.

Because of this, we are unable to update the compiler for VTK.wasm

https://open.cdash.org/viewBuildError.php?buildid=10174349

[ThirdParty/diy2/vtkdiy2/include/vtkdiy2/fmt/core.h:272](https://gitlab.kitware.com/vtk/vtk/blob/ad4a5650d180f480be86fc8c98fa509e8013ee44/ThirdParty/diy2/vtkdiy2/include/vtkdiy2/fmt/core.h#L272):30: error: implicit instantiation of undefined template 'std::char_traits<fmt::char8_t>'
  272 |       : data_(s), size_(std::char_traits<Char>::length(s)) {}
      |                              ^
[ThirdParty/diy2/vtkdiy2/include/vtkdiy2/fmt/format.h:487](https://gitlab.kitware.com/vtk/vtk/blob/ad4a5650d180f480be86fc8c98fa509e8013ee44/ThirdParty/diy2/vtkdiy2/include/vtkdiy2/fmt/format.h#L487):9: note: in instantiation of member function 'fmt::basic_string_view<fmt::char8_t>::basic_string_view' requested here
  487 |       : basic_string_view<char8_t>(reinterpret_cast<const char8_t*>(s)) {}
      |         ^
@jspanchu jspanchu changed the title Please update fmtlib to recent versions Please update fmtlib to recent version Jan 28, 2025
@mrzv
Copy link
Member

mrzv commented Jan 28, 2025

@jspanchu @vicentebolea Can you comment on this? Per @MehdiChinoune comment, this seems like the same issue with DIY being outdated in VTK. Can you update it, so this doesn't keep coming up?

@jspanchu
Copy link
Contributor Author

I am right now working on updating VTK's copy of diy to 3.6.0 to test the theory that diy==3.6.0 solves my issue. Right now, there are some VTK classes which fail to compile, will look into fixing it.

C:\Users\jaswant.panchumarti\dev\vtk\Filters\ParallelDIY2\vtkPResampleToImage.cxx(340): error C2440: 'initializing': cannot convert from 'vtkdiy2::Master::Proxy::IncomingQueues' to 'vtkdiy2::Master::IncomingQueues &'
C:\Users\jaswant.panchumarti\dev\vtk\Filters\ParallelDIY2\vtkPResampleToImage.cxx(343): error C2451: a conditional expression of type '_Ty2' is not valid
        with
        [
            _Ty2=vtkdiy2::Master::RecordQueue
        ]
C:\Users\jaswant.panchumarti\dev\vtk\Filters\ParallelDIY2\vtkPResampleToImage.cxx(343): note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called

@jspanchu
Copy link
Contributor Author

jspanchu commented Jan 28, 2025

Not sure if it will work, but I replaced vtkdiy2::Master::IncomingQueues with vtkdiy2::Master::Proxy::IncomingQueues and it compiled. I see that the proxy type is actually totally different std::map<int, MemoryBuffer> vs concurrent_map<int, RecordQueue>

Just one more error now, should be fixable with block->BlockBounds.resize(srp.in_link().size(), diy::ContinuousBounds(0)); instead of block->BlockBounds.resize(srp.in_link().size()

C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.42.34433\include\xmemory(700): error C2248: 'vtkdiy2::Bounds<float>::Bounds': cannot access private member declared in class 'vtkdiy2::Bounds<float>'
C:\Users\jaswant.panchumarti\dev\vtk\ThirdParty\diy2\vtkdiy2\include\vtkdiy2\mpi\../types.hpp(60): note: see declaration of 'vtkdiy2::Bounds<float>::Bounds'
C:\Users\jaswant.panchumarti\dev\vtk\ThirdParty\diy2\vtkdiy2\include\vtkdiy2\mpi\../types.hpp(20): note: see declaration of 'vtkdiy2::Bounds<float>'
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.42.34433\include\xmemory(700): note: the template instantiation context (the oldest one first) is
C:\Users\jaswant.panchumarti\dev\vtk\ThirdParty\diy2\vtkdiy2\include\vtkdiy2\link.hpp(250): note: see reference to class template instantiation 'vtkdiy2::RegularLink<vtkdiy2::ContinuousBounds>' being compiled
C:\Users\jaswant.panchumarti\dev\vtk\ThirdParty\diy2\vtkdiy2\include\vtkdiy2\link.hpp(142): note: see reference to class template instantiation 'std::vector<vtkdiy2::Bounds<float>,std::allocator<vtkdiy2::Bounds<float>>>' being compiled
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.42.34433\include\vector(1584): note: while compiling class template member function 'void std::vector<vtkdiy2::Bounds<float>,std::allocator<vtkdiy2::Bounds<float>>>::resize(const unsigned __int64)'
C:\Users\jaswant.panchumarti\dev\vtk\Filters\ParallelDIY2\vtkDIYKdTreeUtilities.cxx(266): note: see the first reference to 'std::vector<vtkdiy2::Bounds<float>,std::allocator<vtkdiy2::Bounds<float>>>::resize' in 'vtkDIYKdTreeUtilities::GenerateCuts::<lambda_3f0ffc7440bc0030650058e712d7c2b7>::operator ()'

@vicentebolea
Copy link
Contributor

I see, thanks @jspanchu for point this out, update it in VTK and fix the build errors, let me know if you need help to bring the changes back to DIY.

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

3 participants