-
Notifications
You must be signed in to change notification settings - Fork 207
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
Changes from building cleanly on Fedora with GCC 14.2 #1975
Open
kiilerix
wants to merge
5
commits into
OpenLightingProject:master
Choose a base branch
from
kiilerix:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Building ola fails on Fedora with GCC-14: In file included from ./include/ola/Clock.h:32: ./include/ola/base/Macro.h:45:11: error: template-id not allowed for constructor in C++20 [-Werror=template-id-cdtor] 45 | TypeName(const TypeName&); \ | ^ ./include/ola/thread/FuturePrivate.h:92:3: note: in expansion of macro 'DISALLOW_COPY_AND_ASSIGN' 92 | DISALLOW_COPY_AND_ASSIGN(FutureImpl<T>); | ^~~~~~~~~~~~~~~~~~~~~~~~ ./include/ola/base/Macro.h:45:11: note: remove the '< >' 45 | TypeName(const TypeName&); \ | ^ When a class already is templatified, the templification can't be repeated on contained methods.
This will be needed when we start using unique_ptr instead of deprecated auto_ptr: plugins/usbpro/DmxTriWidget.cpp: In member function 'void ola::plugin::usbpro::DmxTriWidgetImpl::HandleRawRDMResponse(uint8_t, const uint8_t*, unsigned int)': plugins/usbpro/DmxTriWidget.cpp:652:55: error: use of deleted function 'std::unique_ptr<_Tp, _Dp>::unique_ptr(const std::unique_ptr<_Tp, _Dp>&) [with _Tp = ola::rdm::RDMRequest; _Dp = std::default_delete<ola::rdm::RDMRequest>]' 652 | unique_ptr<RDMRequest> request(m_pending_rdm_request); | ^ In file included from /usr/include/c++/14/memory:78, from plugins/usbpro/DmxTriWidget.cpp:23: /usr/include/c++/14/bits/unique_ptr.h:516:7: note: declared here 516 | unique_ptr(const unique_ptr&) = delete; | ^~~~~~~~~~
This will be needed when we start using unique_ptr instead of deprecated auto_ptr: libs/acn/TCPTransport.cpp:319:7: error: call of overloaded 'unique_ptr(NULL)' is ambiguous 319 | : m_transport(NULL) { | ^~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/memory:78, from ./libs/acn/TCPTransport.h:34, from libs/acn/TCPTransport.cpp:28: /usr/include/c++/14/bits/unique_ptr.h:353:19: note: candidate: 'constexpr std::unique_ptr<_Tp, _Dp>::unique_ptr(std::nullptr_t) [with _Del = std::default_delete<ola::acn::IncomingStreamTransport>; <template-parameter-2-2> = void; _Tp = ola::acn::IncomingStreamTransport; _Dp = std::default_delete<ola::acn::IncomingStreamTransport>; std::nullptr_t = std::nullptr_t]' 353 | constexpr unique_ptr(nullptr_t) noexcept | ^~~~~~~~~~ This is only fixing up NULL usage where the compiler failed.
Address warning when compiling on Fedora with gcc-14.2: In file included from ./include/ola/rdm/RDMControllerInterface.h:34, from ./include/ola/rdm/MovingLightResponder.h:32, from common/rdm/MovingLightResponder.cpp:31: ./include/ola/rdm/RDMReply.h:147:8: warning: 'template<class> class std::auto_ptr' is deprecated: use 'std::unique_ptr' instead [-Wdeprecated-declarations] 147 | std::auto_ptr<RDMResponse> m_response; | ^~~~~~~~ In file included from /usr/include/c++/14/memory:78, from ./include/ola/rdm/RDMReply.h:30: /usr/include/c++/14/bits/unique_ptr.h:59:28: note: declared here 59 | template<typename> class auto_ptr; | ^~~~~~~~ unique_ptr was introduced in C++11.
@peternewman I understand your concerns for backward compatibility, but we really need to address these couple of PRs (#1889 and #1890). |
kripton
approved these changes
Sep 18, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.