-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
addpkg(x11/qt-creator): 18.0.0 #27309
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
addpkg(x11/qt-creator): 18.0.0 #27309
Conversation
| @@ -62,6 +63,7 @@ TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" | |||
| -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=ARC;CSKY;M68k;VE | |||
| -DPERL_EXECUTABLE=$(command -v perl) | |||
| -DLLVM_ENABLE_FFI=ON | |||
| -DLLVM_ENABLE_RTTI=ON | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fingolfin @finagolfin is it ok with you to add this? When I didn't add this, an error happened to qt-creator that I recorded in the commit message here, but when I do this to libllvm it makes the error in qt-creator stop.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you pinged the wrong user
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes I'm really sorry... typo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm unaware of the tradeoffs of adding RTTI to LLVM, @Grimler91, @truboxl, @licy183, anyone else know about this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What I know so far in favor other than that qt-creator needs it:
- Arch Linux has it enabled https://gitlab.archlinux.org/archlinux/packaging/packages/llvm/-/blob/1130c251988f9e44a4d9af402cfcf42978b6d881/PKGBUILD#L93
What I know so far against this:
- You previously rejected this libllvm: Enable RTTI #8031
Based on the discussion linked above, it sounds like if I try adding -fno-rtti to qt-creator, that might also fix the problem. I haven't tried that yet, so I will try that now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I do the calculation using only the packages that are pulled as dependencies when pkg install clang is used, clang, libcompiler-rt, libllvm, lld and llvm, the numbers are:
without -DLLVM_ENABLE_RTTI=ON: 480 MB
with -DLLVM_ENABLE_RTTI=ON: 490 MB
2% size increase
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That sounds fine to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Size is not the main issue, the supposed performance hit was.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on the current error message, _ZTIN4llvm3vfs10FileSystemE means the typeinfo for llvm::vfs::FileSystem, which means QtCreator is using FileSystem's typeinfo in some code paths. It would be better to find out where it is being used and patch it, rather than enabling RTTI for libllvm.
I share the same concern as finagolfin. Enabling RTTI might cause significant performance degradation, so it's best to avoid enabling RTTI if possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have now tested building mesa on Samsung Galaxy S8+ SM-G955F using both libllvm with -DLLVM_ENABLE_RTTI=ON and libllvm with -DLLVM_ENABLE_RTTI=OFF and compared the amount of time to build using the time command, but there did not appear to be a significant difference in the amount of time each build took.
Also, I know that, for example, Mesa is a software which itself involves LLVM_ENABLE_RTTI somehow and is not just a random software, because when libllvm has -DLLVM_ENABLE_RTTI=ON, the argument -Dcpp_rtti=false must be removed from the mesa build.sh to prevent a build error, and vice versa.
I wonder what the way is to reproduce a situation where the performance of libllvm is impacted.
When I tried this change in qt-creator,
--- a/src/plugins/clangformat/CMakeLists.txt
+++ b/src/plugins/clangformat/CMakeLists.txt
@@ -25,6 +25,8 @@ if(MSVC AND TARGET ClangFormat)
target_compile_options(ClangFormat PUBLIC /wd4267 /wd4624)
endif()
+target_compile_options(ClangFormat PRIVATE -fno-rtti)
+
extend_qtc_plugin(ClangFormat
CONDITION UNIX AND NOT APPLE
PROPERTIES LINK_FLAGS "-Wl,--exclude-libs,ALL"This error occurred.
/home/builder/.termux-build/qt-creator/src/src/plugins/clangformat/clangformatutils.cpp:202:31: error: use of dynamic_cast requires -frtti
202 | if (auto ccpPreferences = dynamic_cast<const CppEditor::CppCodeStylePreferences *>(preferences))
| ^
1 error generated.
so unfortunatley, just -fno-rtti will not work, and to build qt-creator without requiring -DLLVM_ENABLE_RTTI=ON, it will be necessary to somehow remove the dependency on -DLLVM_ENABLE_RTTI=ON from it at a lower level, possibly somewhere in this file https://github.com/qt-creator/qt-creator/blob/master/src/plugins/clangformat/llvmfilesystem.h
I will continue trying to remove the dependency on -DLLVM_ENABLE_RTTI=ON from qt-creator.
|
It is not possible to build both packages in under 6 hours, so if the |
|
Theoretically, enabling RTTI would cause significant performance degradation, but it may not happen in tests. I guess it may happen when try compiling a very, very large C++ file. |
|
I checked most of the major distributions, such as Arch, Debian, Fedora, etc., and they all have libllvm's RTTI enabled. I don't object to enabling the RTTI option for |
|
Ok, I will try that, Also, it can be mentioned that the other libc++-based Linux distro, Chimera, also has it enabled, And libc++-based UNIX-like operating system FreeBSD has it enabled, and libc++-based UNIX operating system MacOS has it enabled.. It seems to me like it can be assumed that if there is a performance penalty, it is considered by other operating systems to be not bad enough to prevent the use of |
- Necessary to fix this error that otherwise would occur when attempting to launch the software `qt-creator`: ``` qtc.extensionsystem.plugin: [ ClangFormat ] Plugin error: /data/data/com.termux/files/usr/lib/qtcreator/plugins/libClangFormat.so: Cannot load library /data/data/com.termux/files/usr/lib/qtcreator/plugins/libClangFormat.so: dlopen failed: cannot locate symbol "_ZTIN4llvm3vfs10FileSystemE" referenced by "/data/data/com.termux/files/usr/lib/qtcreator/plugins/libClangFormat.so"... ``` - All other major UNIX-like operating systems enable this. See #27309 (comment)
- Change `TERMUX_PKG_GIT_BRANCH` to be equal to `TERMUX_PKG_VERSION` because it works
- Reverts termux#27289 - The software changed completely since the older version, so it is necessary to delete all the old patches and make new ones.
b58f290 to
b4cdcfd
Compare
0dda4a8 to
73eaea7
Compare
- Necessary to fix this error that otherwise would occur when attempting to launch the software `qt-creator`: ``` qtc.extensionsystem.plugin: [ ClangFormat ] Plugin error: /data/data/com.termux/files/usr/lib/qtcreator/plugins/libClangFormat.so: Cannot load library /data/data/com.termux/files/usr/lib/qtcreator/plugins/libClangFormat.so: dlopen failed: cannot locate symbol "_ZTIN4llvm3vfs10FileSystemE" referenced by "/data/data/com.termux/files/usr/lib/qtcreator/plugins/libClangFormat.so"... ``` - All other major UNIX-like operating systems enable this. See termux/termux-packages#27309 (comment)
|
So we are not going to investigate RTTI=OFF with qt-creator? |
I will continue to, sure |
Given all the other distros he listed enabling it, I am fine with trying it and rolling back if we see any serious problems. |
|
I tried some things, but unfortunately I still don't know any way to make the error stop without either using One of the things I tried is removing all instances of I will proceed to merge this soon unless someone can find a way to remove the dependency on |
|
I asked in the LLVM Discord server what they think about this problem and someone there said this:
This is that person's GitHub Account: https://github.com/zero9178 They have made PRs in LLVM that are merged, so I am inclined to believe their opinion about this. I will merge this in 24 hours if there are no objections to this. |
|
I will look into the qt-creator with RTTI=OFF separately. https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/refs/heads/main/clang-r530567/lib/cmake/llvm/LLVMConfig.cmake#201 So I am fine with this. |
It is true, and we should keep that in mind, though it seems to me that this is something that is ok if it's different between the cross-compiler and the non-cross-compiler, because, I noticed:
|



Reverts rmpkg(x11/qt-creator): Remove outdated package #27289
The software changed completely since the older version, so it is necessary to delete all the old patches and make new ones.
Necessary to enable RTTI in
libllvmto fix this error that otherwise would occur when attempting to launchqtcreator: