Qt Creator runs clangd many times and the demons don't finish - qt-creator

I had left turned on Ubuntu and Qt Creator for a night, next day the htop showed:
Qt Creator 7.0.0 (GCC 10.3.1 20210422 (Red Hat 10.3.1-1), 64).
Built Mar 22 2022 в 02:18:16.
Revision 638b93591b.
clangd version 14.0.0 (git://code.qt.io/clang/llvm-project.git a8ed6c28965138fa1f2449e4ce3e9f391380d17b)
Features: linux
Platform: x86_64-unknown-linux-gnu
What would you advise in the situation? Thanks.

Related

Building libwebsockets for OP-TEE

I've been trying to build libwebsockets for OP-TEE running on a TI AM437x HS (an arm platform). I'm using Yocto to build; here's the version string for OP-TEE, which is displayed on boot:
I/TC: OP-TEE version: ti2019.05-rc1-dev (gcc version 8.3.0 (GNU Toolchain for the A-profile Architecture 8.3-2019.03 (arm-rel-8.36))) #1 Tue Nov 29 17:49:12 UTC 2022 arm
I'm using libwebsockets version 4.3.2.
OP-TEE support is documented for libwebsockets:
https://libwebsockets.org/lws-api-doc-main/html/md_READMEs_README_build.html#optee
I'm specifying -DLWS_PLAT_OPTEE=1 to CMake, but a number of libwebsockets source files include errno.h, which is not provided by OP-TEE's minimal libc. I have tried specifying an additional -I/-isystem option to pick up the errno.h that comes with the toolchain (gcc) but this causes further problems with headers included by it, and I think it should only by used with GNU's libc.
Is OP-TEE still a supported platform for libwebsockets? If so, how should I resolve the issue with errno.h?
Thank you for your help!

How to upgrade gcc 4.7.2 in centos 6.9 to gcc 4.8

I am running centos version 6.9 and had installed gcc using command sudo yum install -y gcc gcc-c++ which installed gcc version 4.7.2. However i need to use gcc version 4.8.5. How do i upgrade gcc to the required version?
CentOS 6 does not come with GCC 4.7, so you must have installed something else.
You can upgrade to CentOS 7. This will give you GCC 4.8.5 (plus extensive backports, including at least one new backend). But the binaries you compile on CentOS 7 will not run on CentOS 6.
If you need just a newer GCC, and not version 4.8.5 exactly, you can use Developer Toolset. Version 7 gives you GCC 7. For C and C++ at least, the compiled code will run on any CentOS 6 system.

How to install two GCC versions for cuda 5.0 on centos7

I need to install cuda 5.0 in centos7 x64. But, I have a problem with GCC, as the current version installed is (GCC) 4.8.5 20150623 (Red Hat 4.8.5-11).
What is the supported version of GCC for Cuda 5.0 and how to install this older GCC version with my actual compiler ((GCC) 4.8.5).
Thanks in advance
#talonmies has provided a list of maximum GCC version supported by different versions of CUDA. Specifically: CUDA 5.0 supports GCC up to 4.6 - and that's what you should install.
There's an answer here on SO which explains how to get GCC 4.6(.3) installed by building from sources. Essentially you need to build some libraries with any C compiler before you can build GCC itself.
Good luck.

How to update LLVM and Clang on Mac OS X

On my version of Mac OS X (10.7.1 (Lion) and Xcode 4.1), there is LLVM 3.0svn and Clang 2.1.
The current versions are LLVM 3.0 and Clang 3.0.
From the Xcode web site, it seems that the latest version (4.2.1) still uses LLVM 2.0, and this seems to be a mistake.
If installing the latest Xcode, will I get a more recent version of LLVM/Clang?
Are there any possible issues installing Clang manually?
Once installed, will the new Clang be used automatically by all the IDEs I have (e.g., NetBeans)?
The web site is incorrect. Xcode 4.2.1 and 4.2 include LLVM 3.0 and Clang 3.0:
clang --version
Apple clang version 3.0 (tags/Apple/clang-211.12) (based on LLVM 3.0svn)
clang++ --version
Apple clang version 3.0 (tags/Apple/clang-211.12) (based on LLVM 3.0svn)
llvm-g++ --version
i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00)
llvm-gcc --version
i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00)
You can comfortably build your own LLVM using Homebrew:
brew install llvm
There are also versioned packages in case you need a specific version:
llvm#3.7
llvm#3.8
llvm#3.9
llvm#4
Software vendors are traditionally conservative about updating build tools and with good reason. If you want to use the latest publicly-supported versions of build tools supplied and modified by Apple, you should stick to those in the latest version of Xcode for the OS X release you are running.
There are usually good reasons why Apple has not yet updated to the latest cutting-edge versions of open source components, like serious bugs.
If you don't need the Apple-supplied modifications and don't mind living on the edge - i.e., no support from Apple and possibly (re-)discovering known problems - and are not planning to ship compiled files to other people's systems, you could install your own versions in, say, /usr/local/bin or by using third-party package managers, like MacPorts http://www.macports.org/ports.php?by=name&substr=clang). You should definitely not try to replace the files at the paths installed by Xcode.
Is it worth it? Only you can decide that.
I highly recommend against replacing the system compiler on macOS:
Many build processes you will see (e.g. Xcode) rely on Apple-specific extensions. For example, last I checked Apple have their own linker.
Also, Linuxes do not enforce binary compatibility -- generally, people build software from source, or download specific binaries for each operating system version. As an end-user (as opposed to developer/professional user) operating system, macOS goes to great effort to maintain compatibility with binaries built on older macOS versions.
Replacing the compiler, or worse, system libraries, will break these compatibility guarantees. It may also break your system in subtle, non-obvious ways.
But feel free to install a second copy of clang in /usr/local or so and explore new features, but leave the system compiler alone.
Also note that Apple do not support submitting software to the app stores that aren't built with Xcode and the compiler it includes. While you may go unnoticed if you do that, you may get rejected during app store review if your compiler fails to do anything that Apple's compiler does.
On 10.8.2 (Mountain Lion) with Xcode 4.6, the versions are:
$ clang --version
Apple LLVM version 4.2 (clang-425.0.24) (based on LLVM 3.2svn)
Target: x86_64-apple-darwin12.2.0
Thread model: posix
$ clang++ --version
Apple LLVM version 4.2 (clang-425.0.24) (based on LLVM 3.2svn)
Target: x86_64-apple-darwin12.2.0
Thread model: posix
$ llvm-g++ --version
i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ llvm-gcc --version
i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
You can update Xcode for Lion too from the App Store or Apple Developer Account direct download, and install the command line tools, which will update Clang and LLVM to the above versions.
OS X Update version 10.9.2 (Mavericks) brings Xcode to version 5.1 (5B130a), and Clang to the latest stable (for OS X):
clang --version
Output:
Apple LLVM version 5.1 (clang-503.0.38) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.1.0
Thread model: posix
On my Mac, llvm-gcc and llvm-g++ are symbolic link to this Clang:
lrwxr-xr-x 1 root wheel 5B 25 Oct 16:48 /usr/bin/llvm-gcc -> clang
lrwxr-xr-x 1 root wheel 7B 25 Oct 16:48 /usr/bin/llvm-g++ -> clang++
My latest R installation is configured to use llvm-gcc-4.2 which would cause error when building SHLIB. Creating symbolic links for llvm-gcc-4.2 and llvm-g++-4.2 the same way, instead of replacing LLVM or CLANG, is enough to resolve the errors.

Will app built with gcc 4.x on CentOS/RHEL 4.8 run on completely un-updated CentOS/RHEL 4?

We have a commercial application that we build on 32-bit CentOS 4.8 (equivalent to Red Hat Enterprise Linux (RHEL) 4 update 8.
The default gcc compiler is at 3.4.6
We are able to run our binary on both 32- and 64-bit CentOS/RHEL 4 and 5 including completely un-updated RHEL 4.
THE QUESTION: If we update to a newer gcc 4 version, will the binary still run on a completely un-updated RHEL 4
The newest gcc appears to be 4.5.1 and 4.4.5
(And yes there are customers who install the intial version, run on an isolated network with no Internet access, and NEVER update from the as-shipped version.)
This issue has arisen because we are now porting to 64-bit FreeBSD 8.1 for amd64 and the default gcc there is gcc 4.2.1
As long as you're compiling against the same runtime libraries (like glibc) you'll be fine.

Resources