Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-107552

syncqt fails to build with GCC 8.3.0

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.5
    • Build System, Core: Other
    • None
    • Debian 10 WSL
    • Linux/X11
    • 8
    • Foundation PM Prioritized, Foundation Sprint 78, Foundations Sprint 79, Foundations Sprint 80

    Description

      Configured with:

      ../qt5/qtbase/configure -shared -release -c++std c++17
      

      fails with:

      '/home/user/cmake/cmake-3.24.2-linux-x86_64/bin/cmake' '-DBUILD_SHARED_LIBS=ON' '-DCMAKE_BUILD_TYPE=Release' '-DINPUT_cxx14=yes' '-DINPUT_cxx17=yes' '-DINPUT_cxx20=no' '-DINPUT_cxx2b=no' '-G' 'Ninja' '/home/user/qt5/qtbase'
      -- Could NOT find md4c (missing: md4c_DIR)
      CMake Warning (dev) at cmake/3rdparty/extra-cmake-modules/find-modules/FindXCB.cmake:180 (message):
        XINPUT from XCB was requested: this is EXPERIMENTAL and is likely to
        unavailable on many systems!
      Call Stack (most recent call first):
        cmake/QtFindPackageHelpers.cmake:133 (find_package)
        src/gui/configure.cmake:129 (qt_find_package)
        cmake/QtFeature.cmake:576 (include)
        src/CMakeLists.txt:15 (qt_feature_evaluate_features)
      This warning is for project developers.  Use -Wno-dev to suppress it.
      
      CMake Error at cmake/QtExecutableHelpers.cmake:460 (message):
        Unable to build syncqt: Change Dir:
        /home/user/qtbuild/src/tools/syncqt/configure_time_bins
      
      
      
        Run Build Command(s):/usr/bin/ninja && [1/1] Linking CXX executable syncqt
      
        FAILED: syncqt
      
        : && /usr/bin/c++ -O2 -g -DNDEBUG CMakeFiles/syncqt.dir/main.cpp.o -o
        syncqt && :
      
        /usr/bin/ld: CMakeFiles/syncqt.dir/main.cpp.o: in function
        `SyncScanner::generateAliasedHeaderFileIfTimestampChanged(std::__cxx11::basic_string<char,
        std::char_traits<char>, std::allocator<char> > const&,
        std::__cxx11::basic_string<char, std::char_traits<char>,
        std::allocator<char> > const&,
        std::chrono::time_point<std::chrono::_V2::system_clock,
        std::chrono::duration<long, std::ratio<1l, 1000000000l> > > const&)':
      
        /usr/include/c++/8/bits/fs_ops.h:121: undefined reference to
        `std::filesystem::status(std::filesystem::__cxx11::path const&)'
      
        /usr/bin/ld: CMakeFiles/syncqt.dir/main.cpp.o: in function
        `SyncScanner::generateAliasedHeaderFileI-- Configuring incomplete, errors occurred!
      See also "/home/user/qtbuild/CMakeFiles/CMakeOutput.log".
      See also "/home/user/qtbuild/CMakeFiles/CMakeError.log".
      fTimestampChanged(std::__cxx11::basic_string<char,
        std::char_traits<char>, std::allocator<char> > const&,
        std::__cxx11::basic_string<char, std::char_traits<char>,
        std::allocator<char> > const&,
        std::chrono::time_point<std::chrono::_V2::system_clock,
        std::chrono::duration<long, std::ratio<1l, 1000000000l> > > const&)':
      
        /home/user/qt5/qtbase/src/tools/syncqt/main.cpp:1497: undefined
        reference to
        `std::filesystem::last_write_time(std::filesystem::__cxx11::path const&)'
      
        /usr/bin/ld: CMakeFiles/syncqt.dir/main.cpp.o: in function
        `utils::normilizedPath(std::__cxx11::basic_string<char,
        std::char_traits<char>, std::allocator<char> > const&)':
      
        /home/user/qt5/qtbase/src/tools/syncqt/main.cpp:109: undefined
        reference to `std::filesystem::absolute(std::filesystem::__cxx11::path
        const&)'
      
        /usr/bin/ld: CMakeFiles/syncqt.dir/main.cpp.o: in function
        `utils::normilizedPath(std::__cxx11::basic_string<char,
        std::char_traits<char>, std::allocator<char> > const&)':
      
        /usr/include/c++/8/bits/fs_path.h:177: undefined reference to
        `std::filesystem::__cxx11::path::_M_split_cmpts()'
      
        /usr/bin/ld: CMakeFiles/syncqt.dir/main.cpp.o: in function
        `SyncScanner::makeHeaderAbsolute(std::__cxx11::basic_string<char,
        std::char_traits<char>, std::allocator<char> > const&) const':
      
        /usr/include/c++/8/bits/fs_path.h:380: undefined reference to
        `std::filesystem::__cxx11::path::has_root_directory() const'
      
        /usr/bin/ld: CMakeFiles/syncqt.dir/main.cpp.o: in function
        `SyncScanner::updateOrCopy(std::filesystem::__cxx11::path const&,
        std::filesystem::__cxx11::path const&)':
      
        /usr/include/c++/8/bits/fs_path.h:545: undefined reference to
        `std::filesystem::__cxx11::path::compare(std::filesystem::__cxx11::path
        const&) const'
      
        /usr/bin/ld: CMakeFiles/syncqt.dir/main.cpp.o: in function
        `SyncScanner::updateOrCopy(std::filesystem::__cxx11::path const&,
        std::filesystem::__cxx11::path const&)':
      
        /home/user/qt5/qtbase/src/tools/syncqt/main.cpp:1446: undefined
        reference to `std::filesystem::copy(std::filesystem::__cxx11::path const&,
        std::filesystem::__cxx11::path const&, std::filesystem::copy_options,
        std::error_code&)'
      
        /usr/bin/ld:
        /home/user/qt5/qtbase/src/tools/syncqt/main.cpp:1449: undefined
        reference to `std::filesystem::remove(std::filesystem::__cxx11::path
        const&, std::error_code&)'
      
        /usr/bin/ld:
        /home/user/qt5/qtbase/src/tools/syncqt/main.cpp:1458: undefined
        reference to `std::filesystem::copy(std::filesystem::__cxx11::path const&,
        std::filesystem::__cxx11::path const&, std::filesystem::copy_options,
        std::error_code&)'
      
        /usr/bin/ld: CMakeFiles/syncqt.dir/main.cpp.o: in function
        `SyncScanner::writeIfDifferent(std::__cxx11::basic_string<char,
        std::char_traits<char>, std::allocator<char> > const&,
        std::__cxx11::basic_string<char, std::char_traits<char>,
        std::allocator<char> > const&)':
      
        /home/user/qt5/qtbase/src/tools/syncqt/main.cpp:1522: undefined
        reference to `std::filesystem::__cxx11::path::parent_path() const'
      
        /usr/bin/ld: CMakeFiles/syncqt.dir/main.cpp.o: in function
        `SyncScanner::writeIfDifferent(std::__cxx11::basic_string<char,
        std::char_traits<char>, std::allocator<char> > const&,
        std::__cxx11::basic_string<char, std::char_traits<char>,
        std::allocator<char> > const&)':
      
        /usr/include/c++/8/bits/fs_ops.h:121: undefined reference to
        `std::filesystem::status(std::filesystem::__cxx11::path const&)'
      
        /usr/bin/ld: /usr/include/c++/8/bits/fs_ops.h:121: undefined reference to
        `std::filesystem::status(std::filesystem::__cxx11::path const&)'
      
        /usr/bin/ld: CMakeFiles/syncqt.dir/main.cpp.o: in function
        `SyncScanner::writeIfDifferent(std::__cxx11::basic_string<char,
        std::char_traits<char>, std::allocator<char> > const&,
        std::__cxx11::basic_string<char, std::char_traits<char>,
        std::allocator<char> > const&)':
      
        /home/user/qt5/qtbase/src/tools/syncqt/main.cpp:1524: undefined
        reference to
        `std::filesystem::create_directories(std::filesystem::__cxx11::path
        const&)'
      
        /usr/bin/ld:
        /home/user/qt5/qtbase/src/tools/syncqt/main.cpp:1527: undefined
        reference to `std::filesystem::file_size(std::filesystem::__cxx11::path
        const&)'
      
        /usr/bin/ld: CMakeFiles/syncqt.dir/main.cpp.o: in function
        `std::filesystem::__cxx11::path::path(std::__cxx11::basic_string<char,
        std::char_traits<char>, std::allocator<char> >&&,
        std::filesystem::__cxx11::path::format)':
      
        /usr/include/c++/8/bits/fs_path.h:177: undefined reference to
        `std::filesystem::__cxx11::path::_M_split_cmpts()'
      
        /usr/bin/ld: CMakeFiles/syncqt.dir/main.cpp.o: in function
        `std::filesystem::__cxx11::path::path<std::__cxx11::basic_string<char,
        std::char_traits<char>, std::allocator<char> >,
        std::filesystem::__cxx11::path>(std::__cxx11::basic_string<char,
        std::char_traits<char>, std::allocator<char> > const&,
        std::filesystem::__cxx11::path::format)':
      
        /usr/include/c++/8/bits/fs_path.h:184: undefined reference to
        `std::filesystem::__cxx11::path::_M_split_cmpts()'
      
        /usr/bin/ld: CMakeFiles/syncqt.dir/main.cpp.o: in function
        `SyncScanner::copyGeneratedHeadersToStagingDirectory(std::__cxx11::basic_string<char,
        std::char_traits<char>, std::allocator<char> > const&, bool)':
      
        /usr/include/c++/8/bits/fs_ops.h:121: undefined reference to
        `std::filesystem::status(std::filesystem::__cxx11::path const&)'
      
        /usr/bin/ld: CMakeFiles/syncqt.dir/main.cpp.o: in function
        `SyncScanner::copyGeneratedHeadersToStagingDirectory(std::__cxx11::basic_string<char,
        std::char_traits<char>, std::allocator<char> > const&, bool)':
      
        /usr/include/c++/8/bits/fs_path.h:177: undefined reference to
        `std::filesystem::__cxx11::path::_M_split_cmpts()'
      
        /usr/bin/ld: /usr/include/c++/8/bits/fs_path.h:177: undefined reference to
        `std::filesystem::__cxx11::path::_M_split_cmpts()'
      
        /usr/bin/ld: CMakeFiles/syncqt.dir/main.cpp.o: in function
        `SyncScanner::copyGeneratedHeadersToStagingDirectory(std::__cxx11::basic_string<char,
        std::char_traits<char>, std::allocator<char> > const&, bool)':
      
        /home/user/qt5/qtbase/src/tools/syncqt/main.cpp:660: undefined
        reference to
        `std::filesystem::create_directories(std::filesystem::__cxx11::path
        const&)'
      
        /usr/bin/ld: CMakeFiles/syncqt.dir/main.cpp.o: in function
        `SyncScanner::copyGeneratedHeadersToStagingDirectory(std::__cxx11::basic_string<char,
        std::char_traits<char>, std::allocator<char> > const&, bool)':
      
        /usr/include/c++/8/bits/fs_dir.h:441: undefined reference to
        `std::filesystem::__cxx11::recursive_directory_iterator::recursive_directory_iterator(std::filesystem::__cxx11::path
        const&, std::filesystem::directory_options, std::error_code*)'
      
        /usr/bin/ld: /usr/include/c++/8/bits/fs_dir.h:456: undefined reference to
        `std::filesystem::__cxx11::recursive_directory_iterator::~recursive_directory_iterator()'
      
      
        /usr/bin/ld: CMakeFiles/syncqt.dir/main.cpp.o: in function
        `SyncScanner::copyGeneratedHeadersToStagingDirectory(std::__cxx11::basic_string<char,
        std::char_traits<char>, std::allocator<char> > const&, bool)':
      
        /usr/include/c++/8/bits/shared_ptr_base.h:614: undefined reference to
        `std::filesystem::__cxx11::recursive_directory_iterator::~recursive_directory_iterator()'
      
      
        /usr/bin/ld: CMakeFiles/syncqt.dir/main.cpp.o: in function
        `SyncScanner::copyGeneratedHeadersToStagingDirectory(std::__cxx11::basic_string<char,
        std::char_traits<char>, std::allocator<char> > const&, bool)':
      
        /home/user/qt5/qtbase/src/tools/syncqt/main.cpp:663: undefined
        reference to
        `std::filesystem::__cxx11::recursive_directory_iterator::~recursive_directory_iterator()'
      
      
        /usr/bin/ld: /home/user/qt5/qtbase/src/tools/syncqt/main.cpp:663:
        undefined reference to
        `std::filesystem::__cxx11::recursive_directory_iterator::~recursive_directory_iterator()'
      
      
        /usr/bin/ld: /home/user/qt5/qtbase/src/tools/syncqt/main.cpp:663:
        undefined reference to
        `std::filesystem::__cxx11::recursive_directory_iterator::~recursive_directory_iterator()'
      
      
        /usr/bin/ld: /home/user/qt5/qtbase/src/tools/syncqt/main.cpp:663:
        undefined reference to
        `std::filesystem::__cxx11::recursive_directory_iterator::operator*() const'
      
        /usr/bin/ld: /home/user/qt5/qtbase/src/tools/syncqt/main.cpp:663:
        undefined reference to
        `std::filesystem::__cxx11::recursive_directory_iterator::operator++()'
      
        /usr/bin/ld: /home/user/qt5/qtbase/src/tools/syncqt/main.cpp:666:
        undefined reference to
        `std::filesystem::remove(std::filesystem::__cxx11::path const&)'
      
        /usr/bin/ld: /home/user/qt5/qtbase/src/tools/syncqt/main.cpp:663:
        undefined reference to
        `std::filesystem::__cxx11::recursive_directory_iterator::~recursive_directory_iterator()'
      
      
        /usr/bin/ld: /home/user/qt5/qtbase/src/tools/syncqt/main.cpp:663:
        undefined reference to
        `std::filesystem::__cxx11::recursive_directory_iterator::~recursive_directory_iterator()'
      
      
        /usr/bin/ld: /home/user/qt5/qtbase/src/tools/syncqt/main.cpp:663:
        undefined reference to
        `std::filesystem::__cxx11::recursive_directory_iterator::~recursive_directory_iterator()'
      
      
        /usr/bin/ld: CMakeFiles/syncqt.dir/main.cpp.o: in function
        `SyncScanner::parseVersionScriptContent(std::__cxx11::basic_string<char,
        std::char_traits<char>, std::allocator<char> >,
        SyncScanner::ParsingResult&)':
      
        /home/user/qt5/qtbase/src/tools/syncqt/main.cpp:876: undefined
        reference to `std::filesystem::relative(std::filesystem::__cxx11::path
        const&, std::filesystem::__cxx11::path const&)'
      
        /usr/bin/ld: /home/user/qt5/qtbase/src/tools/syncqt/main.cpp:878:
        undefined reference to
        `std::filesystem::relative(std::filesystem::__cxx11::path const&,
        std::filesystem::__cxx11::path const&)'
      
        /usr/bin/ld: CMakeFiles/syncqt.dir/main.cpp.o: in function
        `SyncScanner::processHeader(std::filesystem::__cxx11::path const&)':
      
        /home/user/qt5/qtbase/src/tools/syncqt/main.cpp:728: undefined
        reference to
        `std::filesystem::last_write_time(std::filesystem::__cxx11::path const&,
        std::error_code&)'
      
        /usr/bin/ld: CMakeFiles/syncqt.dir/main.cpp.o: in function
        `SyncScanner::processHeader(std::filesystem::__cxx11::path const&)':
      
        /usr/include/c++/8/bits/fs_ops.h:121: undefined reference to
        `std::filesystem::status(std::filesystem::__cxx11::path const&)'
      
        /usr/bin/ld: /usr/include/c++/8/bits/fs_ops.h:121: undefined reference to
        `std::filesystem::status(std::filesystem::__cxx11::path const&)'
      
        /usr/bin/ld: CMakeFiles/syncqt.dir/main.cpp.o: in function
        `SyncScanner::processHeader(std::filesystem::__cxx11::path const&)':
      
        /home/user/qt5/qtbase/src/tools/syncqt/main.cpp:751: undefined
        reference to `std::filesystem::relative(std::filesystem::__cxx11::path
        const&, std::filesystem::__cxx11::path const&)'
      
        /usr/bin/ld: /home/user/qt5/qtbase/src/tools/syncqt/main.cpp:747:
        undefined reference to
        `std::filesystem::create_directories(std::filesystem::__cxx11::path
        const&)'
      
        /usr/bin/ld: CMakeFiles/syncqt.dir/main.cpp.o: in function
        `SyncScanner::processHeader(std::filesystem::__cxx11::path const&)':
      
        /usr/include/c++/8/bits/fs_ops.h:121: undefined reference to
        `std::filesystem::status(std::filesystem::__cxx11::path const&)'
      
        /usr/bin/ld: CMakeFiles/syncqt.dir/main.cpp.o: in function
        `SyncScanner::sync()':
      
        /home/user/qt5/qtbase/src/tools/syncqt/main.cpp:599: undefined
        reference to
        `std::filesystem::last_write_time(std::filesystem::__cxx11::path const&,
        std::error_code&)'
      
        /usr/bin/ld: CMakeFiles/syncqt.dir/main.cpp.o: in function
        `SyncScanner::sync()':
      
        /usr/include/c++/8/bits/fs_dir.h:441: undefined reference to
        `std::filesystem::__cxx11::recursive_directory_iterator::recursive_directory_iterator(std::filesystem::__cxx11::path
        const&, std::filesystem::directory_options, std::error_code*)'
      
        /usr/bin/ld: /usr/include/c++/8/bits/fs_dir.h:456: undefined reference to
        `std::filesystem::__cxx11::recursive_directory_iterator::~recursive_directory_iterator()'
      
      
        /usr/bin/ld: CMakeFiles/syncqt.dir/main.cpp.o: in function
        `SyncScanner::sync()':
      
        /usr/include/c++/8/bits/shared_ptr_base.h:614: undefined reference to
        `std::filesystem::__cxx11::recursive_directory_iterator::~recursive_directory_iterator()'
      
      
        /usr/bin/ld: CMakeFiles/syncqt.dir/main.cpp.o: in function
        `SyncScanner::sync()':
      
        /home/user/qt5/qtbase/src/tools/syncqt/main.cpp:538: undefined
        reference to
        `std::filesystem::__cxx11::recursive_directory_iterator::~recursive_directory_iterator()'
      
      
        /usr/bin/ld: /home/user/qt5/qtbase/src/tools/syncqt/main.cpp:538:
        undefined reference to
        `std::filesystem::__cxx11::recursive_directory_iterator::~recursive_directory_iterator()'
      
      
        /usr/bin/ld: /home/user/qt5/qtbase/src/tools/syncqt/main.cpp:538:
        undefined reference to
        `std::filesystem::__cxx11::recursive_directory_iterator::~recursive_directory_iterator()'
      
      
        /usr/bin/ld: /home/user/qt5/qtbase/src/tools/syncqt/main.cpp:538:
        undefined reference to
        `std::filesystem::__cxx11::recursive_directory_iterator::operator*() const'
      
        /usr/bin/ld: /home/user/qt5/qtbase/src/tools/syncqt/main.cpp:538:
        undefined reference to
        `std::filesystem::__cxx11::recursive_directory_iterator::operator++()'
      
        /usr/bin/ld: CMakeFiles/syncqt.dir/main.cpp.o: in function
        `SyncScanner::sync()':
      
        /usr/include/c++/8/bits/fs_dir.h:260: undefined reference to
        `std::filesystem::status(std::filesystem::__cxx11::path const&)'
      
        /usr/bin/ld: CMakeFiles/syncqt.dir/main.cpp.o: in function
        `SyncScanner::sync()':
      
        /usr/include/c++/8/bits/fs_path.h:1055: undefined reference to
        `std::filesystem::__cxx11::path::_M_find_extension() const'
      
        /usr/bin/ld: CMakeFiles/syncqt.dir/main.cpp.o: in function
        `SyncScanner::sync()':
      
        /home/user/qt5/qtbase/src/tools/syncqt/main.cpp:538: undefined
        reference to
        `std::filesystem::__cxx11::recursive_directory_iterator::~recursive_directory_iterator()'
      
      
        /usr/bin/ld: /home/user/qt5/qtbase/src/tools/syncqt/main.cpp:538:
        undefined reference to
        `std::filesystem::__cxx11::recursive_directory_iterator::~recursive_directory_iterator()'
      
      
        /usr/bin/ld: /home/user/qt5/qtbase/src/tools/syncqt/main.cpp:538:
        undefined reference to
        `std::filesystem::__cxx11::recursive_directory_iterator::~recursive_directory_iterator()'
      
      
        collect2: error: ld returned 1 exit status
      
        ninja: build stopped: subcommand failed.
      
      
      
      Call Stack (most recent call first):
        cmake/QtToolHelpers.cmake:638 (qt_internal_add_configure_time_executable)
        src/tools/syncqt/CMakeLists.txt:16 (qt_internal_add_configure_time_tool)
      
      
      CMake Error at /home/user/qt5/qtbase/cmake/QtProcessConfigureArgs.cmake:978 (message):
        CMake exited with code 1.
      

      gcc -v:

      Using built-in specs.
      COLLECT_GCC=gcc
      COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/8/lto-wrapper
      OFFLOAD_TARGET_NAMES=nvptx-none
      OFFLOAD_TARGET_DEFAULT=1
      Target: x86_64-linux-gnu
      Configured with: ../src/configure -v --with-pkgversion='Debian 8.3.0-6' --with-bugurl=file:///usr/share/doc/gcc-8/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-8 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
      Thread model: posix
      gcc version 8.3.0 (Debian 8.3.0-6)
      

      Manually adding -lstdc++fs to the linker command for the generated /qtbuild/src/tools/syncqt/configure_time_bins/CMakeFiles/rules.ninja file, and then running ninja inside of /qtbuild/src/tools/syncqt/configure_time_bins works, but a new configure will of course overwrite this.

      So it seems that for GCC 8, one must manually add -lstdc++fs. This was always the case, but only became an issue since syncqt switched from Perl to C++.

      Attachments

        For Gerrit Dashboard: QTBUG-107552
        # Subject Branch Project Status CR V

        Activity

          People

            mmutz Marc Mutz
            jkauffmann Johannes Kauffmann
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There is 1 open Gerrit change