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

Fails to build on Debian 12 (gcc 12) #18383

Open
VinnyVicious opened this issue Oct 14, 2024 · 0 comments
Open

Fails to build on Debian 12 (gcc 12) #18383

VinnyVicious opened this issue Oct 14, 2024 · 0 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. sig/build Categorizes an issue or PR as relevant to SIG Build.

Comments

@VinnyVicious
Copy link

VinnyVicious commented Oct 14, 2024

In file included from /var/dev/o3de/Code/Framework/AzQtComponents/AzQtComponents/Components/StyledBusyLabel.cpp:9:
In file included from /var/dev/o3de/Code/Framework/AzQtComponents/./AzQtComponents/Components/StyledBusyLabel.h:11:
In file included from /var/dev/o3de/Code/Framework/AzQtComponents/./AzQtComponents/AzQtComponentsAPI.h:25:
In file included from /var/dev/o3de/Code/Framework/AzCore/./AzCore/PlatformDef.h:238:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/memory:67:
/usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/stl_tempbuf.h:263:8: error: 'get_temporary_buffer<QVector<AzQtComponents::StyledDetailsTableModel::InternalTableData> *>' is deprecated [-Werror,-Wdeprecated-declarations]
  263 |                 std::get_temporary_buffer<value_type>(_M_original_len));

This function is part of the C++ Standard Library and has been marked as deprecated in modern C++ standards (C++17 and later). The purpose of get_temporary_buffer was to allocate uninitialized memory, but it has been deprecated due to the availability of better alternatives for managing dynamic memory.

You can allocate memory dynamically and want automatic cleanup, you can use std::unique_ptr:

std::unique_ptr<QVector<AzQtComponents::StyledDetailsTableModel::InternalTableData>[]> buffer = std::make_unique<QVector<AzQtComponents::StyledDetailsTableModel::InternalTableData>[]>(n);
@VinnyVicious VinnyVicious added kind/bug Categorizes issue or PR as related to a bug. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Oct 14, 2024
@jhanca-robotecai jhanca-robotecai added sig/build Categorizes an issue or PR as relevant to SIG Build. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. sig/build Categorizes an issue or PR as relevant to SIG Build.
Projects
None yet
Development

No branches or pull requests

2 participants