Skip to content

error: ‘erase’ is not a member of ‘std’; did you mean ‘erase’? #328

Closed

Description

@marillat

When trying to build audacity 4.0.1
Debian unstable amd64
GCC 16.2.0

FAILED: [code=1] muse/framework/draw/CMakeFiles/muse_draw.dir/Unity/unity_1_cxx.cxx.o 
/usr/bin/ccache /usr/lib/ccache/x86_64-linux-gnu-g++ -DAU4_APP_TITLE_VERSION="\"Audacity 4.0\"" -DINSTALL_PREFIX=\"/usr\" -DKORS_LOGGER_QT_SUPPORT -DMUSE_MODULE_DRAW_USE_FONTFACE_FT -DMUSE_MODULE_DRAW_USE_QTTEXTDRAW -DNDEBUG -DQT_CONCURRENT_SUPPORTED -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_QMLINTEGRATION_LIB -DQT_QML_LIB -DQT_QPROCESS_SUPPORTED -DQT_QUICK_LIB -DQT_SUPPORT -DQT_SVG_LIB -I/build/audacity-dmo-4.0.1/obj-x86_64-linux-gnu/muse/framework/draw -I/build/audacity-dmo-4.0.1/muse/framework/draw -I/build/audacity-dmo-4.0.1/obj-x86_64-linux-gnu/muse/framework/draw/muse_draw_autogen/include -I/build/audacity-dmo-4.0.1/obj-x86_64-linux-gnu -I/build/audacity-dmo-4.0.1/src -I/build/audacity-dmo-4.0.1/muse -I/build/audacity-dmo-4.0.1/muse/framework -I/build/audacity-dmo-4.0.1/muse/framework/global -I/build/audacity-dmo-4.0.1/muse/src -I/build/audacity-dmo-4.0.1/muse/src/framework -I/build/audacity-dmo-4.0.1/muse/src/framework/global -I/usr/include/freetype2 -I/usr/include/harfbuzz -isystem /usr/include/x86_64-linux-gnu/qt6/QtCore -isystem /usr/include/x86_64-linux-gnu/qt6 -isystem /usr/lib/x86_64-linux-gnu/qt6/mkspecs/linux-g++ -isystem /usr/include/x86_64-linux-gnu/qt6/QtGui -isystem /usr/include/x86_64-linux-gnu/qt6/QtQuick -isystem /usr/include/x86_64-linux-gnu/qt6/QtQml -isystem /usr/include/x86_64-linux-gnu/qt6/QtQmlIntegration -isystem /usr/include/x86_64-linux-gnu/qt6/QtNetwork -isystem /usr/include/x86_64-linux-gnu/qt6/QtOpenGL -isystem /usr/include/x86_64-linux-gnu/qt6/QtSvg -g -O2 -ffile-prefix-map=/build/audacity-dmo-4.0.1=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -std=gnu++17 -Wdate-time -D_FORTIFY_SOURCE=2 -std=gnu++17 -Wall -Wextra -Winvalid-pch -include /build/audacity-dmo-4.0.1/obj-x86_64-linux-gnu/muse/framework/pch/CMakeFiles/muse_pch.dir/cmake_pch.hxx -MD -MT muse/framework/draw/CMakeFiles/muse_draw.dir/Unity/unity_1_cxx.cxx.o -MF muse/framework/draw/CMakeFiles/muse_draw.dir/Unity/unity_1_cxx.cxx.o.d -o muse/framework/draw/CMakeFiles/muse_draw.dir/Unity/unity_1_cxx.cxx.o -c /build/audacity-dmo-4.0.1/obj-x86_64-linux-gnu/muse/framework/draw/CMakeFiles/muse_draw.dir/Unity/unity_1_cxx.cxx
In file included from /build/audacity-dmo-4.0.1/obj-x86_64-linux-gnu/muse/framework/draw/CMakeFiles/muse_draw.dir/Unity/unity_1_cxx.cxx:25:
/build/audacity-dmo-4.0.1/muse/framework/draw/internal/fontsdatabase.cpp: In member function ‘virtual void muse::draw::FontsDatabase::removeSubstitutions(const muse::String&, const std::vector<muse::String>&)’:
/build/audacity-dmo-4.0.1/muse/framework/draw/internal/fontsdatabase.cpp:72:25: error: ‘erase’ is not a member of ‘std’; did you mean ‘erase’?
   72 |         removed += std::erase(substitutes, FontDataKey(substituteName));
      |                         ^~~~~
In file included from /usr/include/x86_64-linux-gnu/qt6/QtCore/qdebug.h:44,
                 from /usr/include/x86_64-linux-gnu/qt6/QtCore/qvariant.h:13,
                 from /usr/include/x86_64-linux-gnu/qt6/QtCore/QVariant:1,
                 from /build/audacity-dmo-4.0.1/muse/buildscripts/pch/pch.h:77,
                 from /build/audacity-dmo-4.0.1/obj-x86_64-linux-gnu/muse/framework/pch/CMakeFiles/muse_pch.dir/cmake_pch.hxx:5,
                 from <command-line>:
/usr/include/x86_64-linux-gnu/qt6/QtCore/qvarlengtharray.h:1100:11: note: ‘erase’ declared here
 1100 | qsizetype erase(QVarLengthArray<T, Prealloc> &array, const AT &t)
      |           ^~~~~

Activity

  1. kryksyh commented on Oct 2, 2026

    @kryksyh
    Collaborator

    @marillat please make sure, that you are using the correct framework submodule branch, it should be audacity-4.0.1

  2. marillat commented on Oct 2, 2026

    @marillat
    Author

    a git clone https://github.com/musescore/muse_deps isn't enough ?

  3. kryksyh commented on Oct 2, 2026

    @kryksyh
    Collaborator

    That's not how you use submodules, no.

    To checkout master

    git clone --recurse-submodules https://github.com/audacity/audacity.git
    

    to checkout 4.0.1

    git clone --branch release-4.0.1 --recurse-submodules https://github.com/audacity/audacity.git
    
  4. marillat commented on Oct 2, 2026

    @marillat
    Author

    I'm using the Audacity-4.0.1.tar.gz tarball

  5. kryksyh commented on Oct 2, 2026

    @kryksyh
    Collaborator

    I see, it is autogenerated by github and it contains only the main repo snapshot. This is misleading and we can't disable it during release creation, afaik.

    What you need is a full source snapshot audacity-sources-4.0.1.tar.xz, it includes all submodules checked out at the correct commit, and all build time dependencies if you need those.

  6. marillat commented on Oct 2, 2026

    @marillat
    Author

    Yes it's better, but this archive contains 'Apple' files hidden files starting with ._* and Linux don't like that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions