[GH-ISSUE #10706] Reporting compiler WARNING messages during build of ollama main branch using gcc 15.1.0 #32795

Closed
opened 2026-04-22 14:37:59 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @ovalerio on GitHub (May 14, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/10706

Hello ollama Developers,

Thanks for all the effort that you are putting in this project. I'm looking to integrate ollama as part of my developer toolset. I downloaded the project and I did a build using the main branch.

I saw a few warnings. I don't know if you are already aware of them, therefore I am posting them here:

(ollama) /gpfs/soma_fs/scratch/conda_ollama/ollama $ go clean
(ollama) /gpfs/soma_fs/scratch/conda_ollama/ollama $ go build
# github.com/ollama/ollama/llama/llama.cpp/src
In file included from ../../../anaconda3/envs/ollama/lib/gcc/x86_64-conda-linux-gnu/15.1.0/include/c++/x86_64-conda-linux-gnu/bits/c++allocator.h:33,
                 from ../../../anaconda3/envs/ollama/lib/gcc/x86_64-conda-linux-gnu/15.1.0/include/c++/bits/allocator.h:46,
                 from ../../../anaconda3/envs/ollama/lib/gcc/x86_64-conda-linux-gnu/15.1.0/include/c++/string:45,
                 from llama-vocab.h:5,
                 from llama-vocab.cpp:1:
In member function 'void std::__new_allocator<_Tp>::deallocate(_Tp*, size_type) [with _Tp = std::__cxx11::basic_string<char>]',
    inlined from 'static void std::allocator_traits<std::allocator<_CharT> >::deallocate(allocator_type&, pointer, size_type) [with _Tp = std::__cxx11::basic_string<char>]' at ../../../anaconda3/envs/ollama/lib/gcc/x86_64-conda-linux-gnu/15.1.0/include/c++/bits/alloc_traits.h:649:23,
    inlined from 'void std::_Vector_base<_Tp, _Alloc>::_M_deallocate(pointer, std::size_t) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >]' at ../../../anaconda3/envs/ollama/lib/gcc/x86_64-conda-linux-gnu/15.1.0/include/c++/bits/stl_vector.h:396:19,
    inlined from 'void std::_Vector_base<_Tp, _Alloc>::_M_deallocate(pointer, std::size_t) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >]' at ../../../anaconda3/envs/ollama/lib/gcc/x86_64-conda-linux-gnu/15.1.0/include/c++/bits/stl_vector.h:392:7,
    inlined from 'std::_Vector_base<_Tp, _Alloc>::~_Vector_base() [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >]' at ../../../anaconda3/envs/ollama/lib/gcc/x86_64-conda-linux-gnu/15.1.0/include/c++/bits/stl_vector.h:375:15,
    inlined from 'std::vector<_Tp, _Alloc>::~vector() [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >]' at ../../../anaconda3/envs/ollama/lib/gcc/x86_64-conda-linux-gnu/15.1.0/include/c++/bits/stl_vector.h:805:7,
    inlined from 'void llama_vocab::impl::load(llama_model_loader&, const LLM_KV&)' at llama-vocab.cpp:2085:26:
../../../anaconda3/envs/ollama/lib/gcc/x86_64-conda-linux-gnu/15.1.0/include/c++/bits/new_allocator.h:172:66: warning: 'void operator delete(void*, std::size_t)' called on pointer '__result' with nonzero offset 32 [-Wfree-nonheap-object]
  172 |         _GLIBCXX_OPERATOR_DELETE(_GLIBCXX_SIZED_DEALLOC(__p, __n));
      |                                                                  ^
llama-vocab.cpp: In member function 'void llama_vocab::impl::load(llama_model_loader&, const LLM_KV&)':
llama-vocab.cpp:1372:6: note: declared here
 1372 | void llama_vocab::impl::load(llama_model_loader & ml, const LLM_KV & kv) {
      |      ^~~~~~~~~~~
In member function 'void std::__new_allocator<_Tp>::deallocate(_Tp*, size_type) [with _Tp = std::__cxx11::basic_string<char>]',
    inlined from 'static void std::allocator_traits<std::allocator<_CharT> >::deallocate(allocator_type&, pointer, size_type) [with _Tp = std::__cxx11::basic_string<char>]' at ../../../anaconda3/envs/ollama/lib/gcc/x86_64-conda-linux-gnu/15.1.0/include/c++/bits/alloc_traits.h:649:23,
    inlined from 'void std::_Vector_base<_Tp, _Alloc>::_M_deallocate(pointer, std::size_t) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >]' at ../../../anaconda3/envs/ollama/lib/gcc/x86_64-conda-linux-gnu/15.1.0/include/c++/bits/stl_vector.h:396:19,
    inlined from 'void std::_Vector_base<_Tp, _Alloc>::_M_deallocate(pointer, std::size_t) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >]' at ../../../anaconda3/envs/ollama/lib/gcc/x86_64-conda-linux-gnu/15.1.0/include/c++/bits/stl_vector.h:392:7,
    inlined from 'std::_Vector_base<_Tp, _Alloc>::~_Vector_base() [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >]' at ../../../anaconda3/envs/ollama/lib/gcc/x86_64-conda-linux-gnu/15.1.0/include/c++/bits/stl_vector.h:375:15,
    inlined from 'std::vector<_Tp, _Alloc>::~vector() [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >]' at ../../../anaconda3/envs/ollama/lib/gcc/x86_64-conda-linux-gnu/15.1.0/include/c++/bits/stl_vector.h:805:7,
    inlined from 'void llama_vocab::impl::load(llama_model_loader&, const LLM_KV&)' at llama-vocab.cpp:2087:33:
../../../anaconda3/envs/ollama/lib/gcc/x86_64-conda-linux-gnu/15.1.0/include/c++/bits/new_allocator.h:172:66: warning: 'void operator delete(void*, std::size_t)' called on pointer '__result' with nonzero offset 32 [-Wfree-nonheap-object]
  172 |         _GLIBCXX_OPERATOR_DELETE(_GLIBCXX_SIZED_DEALLOC(__p, __n));
      |                                                                  ^
llama-vocab.cpp: In member function 'void llama_vocab::impl::load(llama_model_loader&, const LLM_KV&)':
llama-vocab.cpp:1372:6: note: declared here
 1372 | void llama_vocab::impl::load(llama_model_loader & ml, const LLM_KV & kv) {
      |      ^~~~~~~~~~~
# github.com/ollama/ollama/llama/llama.cpp/src
unicode.cpp: In function 'std::wstring unicode_wstring_from_utf8(const std::string&)':
unicode.cpp:229:10: warning: 'template<class _Codecvt, class _Elem, class _Wide_alloc, class _Byte_alloc> class std::__cxx11::wstring_convert' is deprecated [-Wdeprecated-declarations]
  229 |     std::wstring_convert<std::codecvt_utf8<wchar_t>> conv;
      |          ^~~~~~~~~~~~~~~
In file included from ../../../anaconda3/envs/ollama/lib/gcc/x86_64-conda-linux-gnu/15.1.0/include/c++/locale:47,
                 from unicode.cpp:18:
../../../anaconda3/envs/ollama/lib/gcc/x86_64-conda-linux-gnu/15.1.0/include/c++/bits/locale_conv.h:262:33: note: declared here
  262 |     class _GLIBCXX17_DEPRECATED wstring_convert
      |                                 ^~~~~~~~~~~~~~~
Originally created by @ovalerio on GitHub (May 14, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/10706 Hello `ollama` Developers, Thanks for all the effort that you are putting in this project. I'm looking to integrate `ollama` as part of my developer toolset. I downloaded the project and I did a build using the main branch. I saw a few warnings. I don't know if you are already aware of them, therefore I am posting them here: ```bash (ollama) /gpfs/soma_fs/scratch/conda_ollama/ollama $ go clean (ollama) /gpfs/soma_fs/scratch/conda_ollama/ollama $ go build # github.com/ollama/ollama/llama/llama.cpp/src In file included from ../../../anaconda3/envs/ollama/lib/gcc/x86_64-conda-linux-gnu/15.1.0/include/c++/x86_64-conda-linux-gnu/bits/c++allocator.h:33, from ../../../anaconda3/envs/ollama/lib/gcc/x86_64-conda-linux-gnu/15.1.0/include/c++/bits/allocator.h:46, from ../../../anaconda3/envs/ollama/lib/gcc/x86_64-conda-linux-gnu/15.1.0/include/c++/string:45, from llama-vocab.h:5, from llama-vocab.cpp:1: In member function 'void std::__new_allocator<_Tp>::deallocate(_Tp*, size_type) [with _Tp = std::__cxx11::basic_string<char>]', inlined from 'static void std::allocator_traits<std::allocator<_CharT> >::deallocate(allocator_type&, pointer, size_type) [with _Tp = std::__cxx11::basic_string<char>]' at ../../../anaconda3/envs/ollama/lib/gcc/x86_64-conda-linux-gnu/15.1.0/include/c++/bits/alloc_traits.h:649:23, inlined from 'void std::_Vector_base<_Tp, _Alloc>::_M_deallocate(pointer, std::size_t) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >]' at ../../../anaconda3/envs/ollama/lib/gcc/x86_64-conda-linux-gnu/15.1.0/include/c++/bits/stl_vector.h:396:19, inlined from 'void std::_Vector_base<_Tp, _Alloc>::_M_deallocate(pointer, std::size_t) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >]' at ../../../anaconda3/envs/ollama/lib/gcc/x86_64-conda-linux-gnu/15.1.0/include/c++/bits/stl_vector.h:392:7, inlined from 'std::_Vector_base<_Tp, _Alloc>::~_Vector_base() [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >]' at ../../../anaconda3/envs/ollama/lib/gcc/x86_64-conda-linux-gnu/15.1.0/include/c++/bits/stl_vector.h:375:15, inlined from 'std::vector<_Tp, _Alloc>::~vector() [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >]' at ../../../anaconda3/envs/ollama/lib/gcc/x86_64-conda-linux-gnu/15.1.0/include/c++/bits/stl_vector.h:805:7, inlined from 'void llama_vocab::impl::load(llama_model_loader&, const LLM_KV&)' at llama-vocab.cpp:2085:26: ../../../anaconda3/envs/ollama/lib/gcc/x86_64-conda-linux-gnu/15.1.0/include/c++/bits/new_allocator.h:172:66: warning: 'void operator delete(void*, std::size_t)' called on pointer '__result' with nonzero offset 32 [-Wfree-nonheap-object] 172 | _GLIBCXX_OPERATOR_DELETE(_GLIBCXX_SIZED_DEALLOC(__p, __n)); | ^ llama-vocab.cpp: In member function 'void llama_vocab::impl::load(llama_model_loader&, const LLM_KV&)': llama-vocab.cpp:1372:6: note: declared here 1372 | void llama_vocab::impl::load(llama_model_loader & ml, const LLM_KV & kv) { | ^~~~~~~~~~~ In member function 'void std::__new_allocator<_Tp>::deallocate(_Tp*, size_type) [with _Tp = std::__cxx11::basic_string<char>]', inlined from 'static void std::allocator_traits<std::allocator<_CharT> >::deallocate(allocator_type&, pointer, size_type) [with _Tp = std::__cxx11::basic_string<char>]' at ../../../anaconda3/envs/ollama/lib/gcc/x86_64-conda-linux-gnu/15.1.0/include/c++/bits/alloc_traits.h:649:23, inlined from 'void std::_Vector_base<_Tp, _Alloc>::_M_deallocate(pointer, std::size_t) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >]' at ../../../anaconda3/envs/ollama/lib/gcc/x86_64-conda-linux-gnu/15.1.0/include/c++/bits/stl_vector.h:396:19, inlined from 'void std::_Vector_base<_Tp, _Alloc>::_M_deallocate(pointer, std::size_t) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >]' at ../../../anaconda3/envs/ollama/lib/gcc/x86_64-conda-linux-gnu/15.1.0/include/c++/bits/stl_vector.h:392:7, inlined from 'std::_Vector_base<_Tp, _Alloc>::~_Vector_base() [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >]' at ../../../anaconda3/envs/ollama/lib/gcc/x86_64-conda-linux-gnu/15.1.0/include/c++/bits/stl_vector.h:375:15, inlined from 'std::vector<_Tp, _Alloc>::~vector() [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >]' at ../../../anaconda3/envs/ollama/lib/gcc/x86_64-conda-linux-gnu/15.1.0/include/c++/bits/stl_vector.h:805:7, inlined from 'void llama_vocab::impl::load(llama_model_loader&, const LLM_KV&)' at llama-vocab.cpp:2087:33: ../../../anaconda3/envs/ollama/lib/gcc/x86_64-conda-linux-gnu/15.1.0/include/c++/bits/new_allocator.h:172:66: warning: 'void operator delete(void*, std::size_t)' called on pointer '__result' with nonzero offset 32 [-Wfree-nonheap-object] 172 | _GLIBCXX_OPERATOR_DELETE(_GLIBCXX_SIZED_DEALLOC(__p, __n)); | ^ llama-vocab.cpp: In member function 'void llama_vocab::impl::load(llama_model_loader&, const LLM_KV&)': llama-vocab.cpp:1372:6: note: declared here 1372 | void llama_vocab::impl::load(llama_model_loader & ml, const LLM_KV & kv) { | ^~~~~~~~~~~ # github.com/ollama/ollama/llama/llama.cpp/src unicode.cpp: In function 'std::wstring unicode_wstring_from_utf8(const std::string&)': unicode.cpp:229:10: warning: 'template<class _Codecvt, class _Elem, class _Wide_alloc, class _Byte_alloc> class std::__cxx11::wstring_convert' is deprecated [-Wdeprecated-declarations] 229 | std::wstring_convert<std::codecvt_utf8<wchar_t>> conv; | ^~~~~~~~~~~~~~~ In file included from ../../../anaconda3/envs/ollama/lib/gcc/x86_64-conda-linux-gnu/15.1.0/include/c++/locale:47, from unicode.cpp:18: ../../../anaconda3/envs/ollama/lib/gcc/x86_64-conda-linux-gnu/15.1.0/include/c++/bits/locale_conv.h:262:33: note: declared here 262 | class _GLIBCXX17_DEPRECATED wstring_convert | ^~~~~~~~~~~~~~~ ```
Author
Owner

@rick-github commented on GitHub (May 14, 2025):

This code is imported from the llama.cpp project, their issue tracker is here.

<!-- gh-comment-id:2879717827 --> @rick-github commented on GitHub (May 14, 2025): This code is imported from the llama.cpp project, their issue tracker is [here](https://github.com/ggml-org/llama.cpp/issues).
Author
Owner

@fanyang89 commented on GitHub (Jun 18, 2025):

@ovalerio I'm creating a PR to fix warnings

https://github.com/ggml-org/llama.cpp/pull/14261

<!-- gh-comment-id:2984118776 --> @fanyang89 commented on GitHub (Jun 18, 2025): @ovalerio I'm creating a PR to fix warnings https://github.com/ggml-org/llama.cpp/pull/14261
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#32795