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

Build issue with gcc >= 11 #92

Closed
mhasself opened this issue Nov 10, 2022 · 2 comments
Closed

Build issue with gcc >= 11 #92

mhasself opened this issue Nov 10, 2022 · 2 comments
Assignees
Labels

Comments

@mhasself
Copy link
Member

Got errors like the ones shown below. On gcc version 12.2.0, boost 1.74.

Had to add -Wno-mismatched-new-delete flag. Happy to PR -- I don't know how safe it is to just add -Wno flags for everyone whenever things like this happen. Probably this is transient due to older boost / newer gcc.

In file included from /home/mhasse/code/public/anaconda3/envs/py38/include/boost/checked_delete.hpp:15,
                 from /home/mhasse/code/public/anaconda3/envs/py38/include/boost/smart_ptr/detail/sp_counted_impl.hpp:27,
                 from /home/mhasse/code/public/anaconda3/envs/py38/include/boost/smart_ptr/detail/shared_count.hpp:27,
                 from /home/mhasse/code/public/anaconda3/envs/py38/include/boost/smart_ptr/shared_ptr.hpp:17:
In function ‘void boost::checked_delete(T*) [with T = float]’,
    inlined from ‘boost::detail::shared_count::shared_count(Y*) [with Y = float]’ at /home/mhasse/code/public/anaconda3/envs/py38/include/boost/smart_ptr/detail/shared_count.hpp:154:34,
    inlined from ‘void boost::detail::sp_pointer_construct(boost::shared_ptr<X>*, Y*, shared_count&) [with T = float; Y = float]’ at /home/mhasse/code/public/anaconda3/envs/py38/include/boost/smart_ptr/shared_ptr.hpp:279:20,
    inlined from ‘boost::shared_ptr<T>::shared_ptr(Y*) [with Y = float; T = float]’ at /home/mhasse/code/public/anaconda3/envs/py38/include/boost/smart_ptr/shared_ptr.hpp:373:44,
    inlined from ‘static G3TimestreamPtr G3Timestream::G3TimestreamPythonHelpers::timestream_from_iterable(boost::python::api::object, G3Timestream::TimestreamUnits)’ at /home/mhasse/work/code/simonso/spt3g_software/core/src/G3Timestream.cxx:929:31:
/home/mhasse/code/public/anaconda3/envs/py38/include/boost/core/checked_delete.hpp:36:5: error: ‘void operator delete(void*, std::size_t)’ called on pointer returned from a mismatched allocation function [-Werror=mismatched-new-delete]
   36 |     delete x;
      |     ^~~~~~~~
@nwhitehorn
Copy link
Member

Is this resolved now? I believe it was fixed but am not set up to test it.

@mhasself
Copy link
Member Author

Yes, resolved by c45570 and 4f4b57. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants