I cannot build and action aborts due to some file in Swift/QtUI/UserSearch folder. I get
In file included from Swift/QtUI/UserSearch/moc_QtUserSearchWindow.cc:9:
Swift/QtUI/UserSearch/QtUserSearchWindow.h:94:13: error: 'QAbstractItemModel' does not name a type; did you mean 'QAbstractButton'?
QAbstractItemModel* model_;
^~~~~~~~~~~~~~~~~~
QAbstractButton
MOC Swift/QtUI/moc_QtContactEditWidget.cc
MOC Swift/QtUI/moc_QtContactEditWindow.cc
MOC Swift/QtUI/moc_QtEditBookmarkWindow.cc
CXX Swift/QtUI/moc_QtContactEditWidget.o
In file included from Swift/QtUI/UserSearch/QtUserSearchWindow.cpp:7:
./Swift/QtUI/UserSearch/QtUserSearchWindow.h:94:13: error: 'QAbstractItemModel' does not name a type; did you mean 'QAbstractButton'?
QAbstractItemModel* model_;
^~~~~~~~~~~~~~~~~~
QAbstractButton
CXX Swift/QtUI/moc_QtContactEditWindow.o
scons: *** [Swift/QtUI/UserSearch/moc_QtUserSearchWindow.o] Error 1
Swift/QtUI/UserSearch/QtUserSearchWindow.cpp: In constructor 'Swift::QtUserSearchWindow::QtUserSearchWindow(Swift::UIEventStream*, Swift::UserSearchWindow::Type, const std::set<std::__cxx11::basic_string<char> >&, Swift::SettingsProvider*)':
Swift/QtUI/UserSearch/QtUserSearchWindow.cpp:37:212: error: class 'Swift::QtUserSearchWindow' does not have any field named 'model_'
e type, const std::set<std::string>& groups, SettingsProvider* settingsProvider) : eventStream_(eventStream), type_(type), model_(nullptr), firstPage_(nullptr), firstMultiJIDPage_(nullptr), settings_(settingsProvider), searchNext_(false), supportsImpromptu_(false) {
^~~~~~
Swift/QtUI/UserSearch/QtUserSearchWindow.cpp: In destructor 'virtual Swift::QtUserSearchWindow::~QtUserSearchWindow()':
Swift/QtUI/UserSearch/QtUserSearchWindow.cpp:75:12: error: 'model_' was not declared in this scope
delete model_;
^~~~~~
Swift/QtUI/UserSearch/QtUserSearchWindow.cpp:75:12: note: suggested alternative: 'mode_t'
delete model_;
^~~~~~
mode_t
Swift/QtUI/UserSearch/QtUserSearchWindow.cpp: In member function 'Swift::JID Swift::QtUserSearchWindow::getContactJID() const':
Swift/QtUI/UserSearch/QtUserSearchWindow.cpp:282:44: error: 'model_' was not declared in this scope
if (dynamic_cast<UserSearchModel*>(model_)) {
^~~~~~
Swift/QtUI/UserSearch/QtUserSearchWindow.cpp:282:44: note: suggested alternative: 'mode_t'
if (dynamic_cast<UserSearchModel*>(model_)) {
^~~~~~
mode_t
Swift/QtUI/UserSearch/QtUserSearchWindow.cpp:287:63: error: cannot dynamic_cast 'model_' (of type '<type error>') to type 'class Swift::QtFormResultItemModel*' (source is not a pointer)
} else if (dynamic_cast<QtFormResultItemModel*>(model_)) {
^
Swift/QtUI/UserSearch/QtUserSearchWindow.cpp:290:78: error: cannot dynamic_cast 'model_' (of type '<type error>') to type 'class Swift::QtFormResultItemModel*' (source is not a pointer)
Form::FormItem item = dynamic_cast<QtFormResultItemModel*>(model_)->getForm()->getItems().at(row);
^
Swift/QtUI/UserSearch/QtUserSearchWindow.cpp: In member function 'virtual void Swift::QtUserSearchWindow::setResults(const std::vector<Swift::UserSearchResult>&)':
Swift/QtUI/UserSearch/QtUserSearchWindow.cpp:488:12: error: 'model_' was not declared in this scope
delete model_;
^~~~~~
Swift/QtUI/UserSearch/QtUserSearchWindow.cpp:488:12: note: suggested alternative: 'mode_t'
delete model_;
^~~~~~
mode_t
Swift/QtUI/UserSearch/QtUserSearchWindow.cpp: In member function 'virtual void Swift::QtUserSearchWindow::setResultsForm(Swift::Form::ref)':
Swift/QtUI/UserSearch/QtUserSearchWindow.cpp:505:12: error: 'model_' was not declared in this scope
delete model_;
^~~~~~
Swift/QtUI/UserSearch/QtUserSearchWindow.cpp:505:12: note: suggested alternative: 'mode_t'
delete model_;
^~~~~~
mode_t
Swift/QtUI/UserSearch/QtUserSearchWindow.cpp: In member function 'virtual void Swift::QtUserSearchWindow::clear()':
Swift/QtUI/UserSearch/QtUserSearchWindow.cpp:613:12: error: 'model_' was not declared in this scope
delete model_;
^~~~~~
Swift/QtUI/UserSearch/QtUserSearchWindow.cpp:613:12: note: suggested alternative: 'mode_t'
delete model_;
^~~~~~
any idea how to fix this? thx
Pinned Comments
xiota commented on 2023-12-31 14:56 (UTC) (edited on 2024-07-13 07:31 (UTC) by xiota)
While I was able to build this in a clean chroot, consider this package to be a wip.
According to this comment, swift does need swift to build. So if you haven't previously built this package, you'll need
aur/swift-bin
.This package attempts to install only
swift
to/usr/lib/swift
.cmark
andllvm
are built, but not installed. If they are installed, space requirement increases to 20GB, package is 2GB, and installed size 7GB.swift-bin
, especially since it's already needed to build this.)This package does not make debug symbols. With debugging enabled, over 70GB would be required to build. I don't know package or install size because I hadn't figured out how to install at that time.
soloturn commented on 2020-09-06 22:25 (UTC) (edited on 2023-02-05 07:39 (UTC) by soloturn)
to speed up check out of the repositories, use shallow or sparse clone, e.g.:
other options to install swift are currently:
swift-bin, which repackages tachoknights official released centos8 build: https://aur.archlinux.org/packages/swift-bin/. the install is quick, no hours of waiting until everything is compiled.
latest from git, in swift-language-git. there is a binary built with github actions, but this build is not particularly stable, sometimes it uses more resources than github allows, sometimes it fails for a change upstream. the version number is taken out of the official tag on apple/swift main branch: e.g. swift-language-git-swift.DEVELOPMENT.SNAPSHOT.2020.09.28.a.r208.g6651f6e55d4-1-x86_64.pkg.tar.zst. so this one is the development tag from sep 28 + 208 commits, the commit hash is g6651f: aur - https://aur.archlinux.org/packages/swift-language-git. gh-actions: https://github.com/soloturn/swift-aur/releases/tag/latest
there was an 5.4.1 binary build, native arch, by fanjiang, built on GCE: https://github.com/ProfFan/swift-aur/releases