Tag Archives: Linux

How to run ARM64(aarch64) Qt auto tests on x86_64

Assume you have a host(x86_64) build of qtbase, like following:

Some extra work to setup system:

Continue reading

Build Qt dev/5.15/5.12/4.8 on Ubuntu 23.10

Install Ubuntu 23.10, for me, it’s an VM via VMware Fusion 13.5.0 on MacBook Pro 2019.

Install some needed packages,

Default gcc/g++ is 13.2.0.

Add following in env:

Continue reading

Note for fixing network setup in vm

I normally run several linux vms in VMware Fusion on MacBook Pro 2019. Recently during a trip, the system stuck. I forced a shutdown and reboot. Then I lost network in a Ubuntu 23.04 vm, there is no ethernet interfaces in Network section in Settings(GNOME), and there is no related icon in top-right corner.

I googled a few times, I found one article helped me. Something is wrong in this file:

Anyway, I just followed the steps in the article, it works for me.

Install Vim 9.0 and enable Qml syntax

(Ubuntu 22.04/23.04)

Reference: How to Install Latest Vim 9.0 on Ubuntu Based Linux Distributions

Configure vim to enable Qml syntax

Add the following line:

Configure nvim and nvim-qt

Reference: How to share config between Vim and Neovim

Help to test KDE/Plasma 6 Wayland

KDE developers are working hard on Plasma 6 Wayland. See also KDE Plasma 6 Development Progressing Well, Plasma 6 Beta Possible In A Few Months and KDE Plasma 6 Wayland Session: “It’s Been Working Great!”.

For example, you can install Neon Developer Edition via KDE neon: Live Images. After installation, you can upgrade it to KDE/Plasma 6,


sudo apt update
sudo apt install neon-settings-2
sudo apt full-upgrade

See also Neon Unstable now using Qt 6 Builds of Frameworks and Plasma.

If you find any bug, please help to report to KDE bugtracker. Here is my first ticket recently.

Sway on VMware Fusion

With Manjaro(Arch based, Xfce edition), installed as a vm in VMware Fusion on macOS. You can install sway or sway-git.

sudo pacman -S sway

or

git clone https://aur.archlinux.org/wlroots-git.git
cd wlroots-git
makepkg -si
git clone https://aur.archlinux.org/swaybg-git.git
cd swaybg-git
makepkg -si
git clone https://aur.archlinux.org/sway-git.git
cd sway-git
makepkg -si

If you want to use gnome-terminal,

sudo pacman -S gnome-terminal

Modify /etc/sway/config , the line

set $term foot

to

set $term gnome-terminal

Modify /usr/share/wayland-sessions/sway.desktop , the line

Exec=sway

to

Exec=env WLR_NO_HARDWARE_CURSORS=1 /usr/bin/sway

If you want to restart display manager to login again,

sudo systemctl restart lightdm

Reference

系统升级备忘

这个VPS当时安装的是Ubuntu 15.04,非LTS。最近发现很多软件没法装最新版本。想升级吧,系统提示的do-release-upgrade还不行。搜了搜,发现得走这样的路径:15.04->15.10->16.04 LTS。

然后发现系统提示php的包不需要了,就删掉了… 然后我的wordpress就起不来了。继续搜,原来出了php7。

备忘一下。

参考:

Distributed Compilation the build of Qt

Qt is a huge project, especially like the module, QtWebKit. If you happen to be in a computer farm, it is very useful to use distributed complation to speed up the build of Qt.

Here I suggest to use icecream on Linux and Mac OS X, and IncrediBuild on Windows(at least for Microsoft’s Visual Studio compilers). About IncrediBuild, more details perhaps will be updated in the future. See also qtrepotools: publish ibmake.bat, incredibuild xge wrapper for make/buildconsole.

Today, this blog is more about icecc/icecream.

Preparation

Linux

icecream is maintained by the SUSE people. Then there are less issues in OpenSUSE than in Ubuntu. But Ubuntu is more popular one. I just use Ubuntu as example here.

  • Install your compiler, like gcc and clang.
  • Install icecc and icemon(optional). icemon is the monitor of icecream build, better to check it when you setup the enviroments. It’s an GUI application based on Qt 4.8. Note: you need to install 0.9.8~git2012121601-0ubuntu2 and later version for icecc. More details in “icecc” package in Ubuntu.

  • For clang users, if you want to make icecream compiler package, better to do:
    • 13.04: $ sudo ln -s /usr/include/clang/3.2/include /usr/lib/clang/3.2/
    • 12.04: $ sudo ln -s /usr/include/clang /usr/lib/
  • Create compiler package: please do it. Here is the example for 13.04:

  • Enviroment settings before build:

  • Run icecc-scheduler in one of your Ubuntus:
    • Edit /etc/default/icecc, set START_ICECC_SCHEDULER="true".
  • Start icecc service: sudo /etc/init.d/icecc start, icecc-scheduler service also could be started with this. Not suggest to run multiple icecc-scheduler in same network with default values, you could edit /etc/icecc/icecc.conf with more options.
  • Stop icecc service(optional): sudo /etc/init.d/icecc stop

Mac OS X

  • Create a ‘qt’ user. Open System Preferences -> Users & Groups -> “+” under the list of users (you might need to click the lock icon first and type in your password), add a user “qt” with your standard password.
  • Install HomeBrew

  • Install XCode and command line tools.
  • Install icecc and icemon(optional).
  • Create compiler package: please do it. Here is the example for 10.8:

  • Enviroment settings before build: (Note: looks like it doesn’t work well with a compiler package. 2013-06-19)

  • Copy com.github.iceccd.plist into into /Library/LaunchDaemons .
  • sudo chown root /Library/LaunchDaemons/com.github.iceccd.plist
  • Start icecc service: sudo launchctl load /Library/LaunchDaemons/com.github.iceccd.plist
  • Stop icecc service(optional): sudo launchctl unload /Library/LaunchDaemons/com.github.iceccd.plist

Building Qt

Normally just do source ~/.icecc_rc, configure and make.

  • For clang build(both Linux and Mac OS X), please keep in mind to use -no-pch when configure.
  • For Qt4 build, the -arch argument that Qt 4 passes to the compiler confuses icecream. So for now, if you use Qt4, you need to patch your mkspec to not add that (if you build for your local architecture only), eg. in mkspecs/common/gcc-base-macx.conf.(Note: looks like it’s only on Mac OS X, I haven’t tried it yet.)

Known Issues

  • Using icecream currently screws up debug information for all object files that we compiled remotely!(Mac OS X only)

Thanks