Yeah, got a new work laptop recently, MacBook Pro 16″, M3 Max/36GB/1TB. But Asahi Linux is not ready for M3 yet.
And I have VMware Fusion, then I tried a few linux distributions with arm64/aarch64 support.
Yeah, got a new work laptop recently, MacBook Pro 16″, M3 Max/36GB/1TB. But Asahi Linux is not ready for M3 yet.
And I have VMware Fusion, then I tried a few linux distributions with arm64/aarch64 support.
Assume you have a host(x86_64) build of qtbase, like following:
1 2 3 4 5 6 7 |
cd ~/qt git clone git://code.qt.io/qt/qtbase.git mkdir qtbase-build cd qtbase-build ../qtbase/configure -developer-build -opensource -confirm-license -nomake examples -nomake tests -verbose cmake --build . --parallel -j8 |
Some extra work to setup system:
Install Ubuntu 23.10, for me, it’s an VM via VMware Fusion 13.5.0 on MacBook Pro 2019.
Install some needed packages,
1 2 3 4 5 6 7 8 |
sudo apt install -y zsh build-essential perl python3 git sudo snap install cmake --classic sudo apt install ninja-build sudo apt-get build-dep qtbase-opensource-src sudo apt-get install libxcb-xinerama0-dev sudo apt-get install '^libxcb.*-dev' libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev sudo apt-get install libdbus-1-dev libglib2.0-dev |
Default gcc/g++ is 13.2.0.
Add following in env:
1 2 3 |
export MAKEFLAGS='--jobs=8' export CMAKE_GENERATOR=Ninja |
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:
1 2 3 4 5 6 |
sudo cat /var/lib/NetworkManager/NetworkManager.state [main] NetworkingEnabled=false WirelessEnabled=true WWANEnabled=true |
Anyway, I just followed the steps in the article, it works for me.
1 2 3 4 |
sudo service NetworkManager stop sudo rm /var/lib/NetworkManager/NetworkManager.state sudo service NetworkManager start |
(Ubuntu 22.04/23.04)
1 2 3 |
$ sudo add-apt-repository ppa:jonathonf/vim $ sudo apt install vim |
Reference: How to Install Latest Vim 9.0 on Ubuntu Based Linux Distributions
Configure vim to enable Qml syntax
1 2 3 4 5 6 7 8 9 |
$ cd ~ $ mkdir .vim $ cd .vim $ mkdir ftplugin indent syntax $ wget -O ftplugin/qml.vim https://raw.githubusercontent.com/peterhoeg/vim-qml/master/ftplugin/qml.vim $ wget -O indent/qml.vim https://raw.githubusercontent.com/peterhoeg/vim-qml/master/indent/qml.vim $ wget -O syntax/qml.vim https://raw.githubusercontent.com/peterhoeg/vim-qml/master/syntax/qml.vim $ vi ~/.vimrc |
Add the following line:
1 2 |
autocmd BufRead,BufNewFile *.qml setfiletype qml |
Configure nvim and nvim-qt
1 2 3 4 5 |
$ cd ~/.config $ ln -s ~/.vim ./nvim $ cd nvim $ ln -s ~/.vimrc ./init.vim |
Reference: How to share config between Vim and Neovim
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.
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。
1 2 3 4 5 |
sudo apt-get update sudo apt-get upgrade sudo do-release-upgrade -d sudo do-release-upgrade |
然后发现系统提示php的包不需要了,就删掉了… 然后我的wordpress就起不来了。继续搜,原来出了php7。
1 2 3 4 5 6 |
sudo add-apt-repository ppa:ondrej/php sudo apt-get update sudo apt-get install php7.0 php5.6 php5.6-mysql php-gettext php5.6-mbstring php-xdebug libapache2-mod-php5.6 libapache2-mod-php7.0 sudo a2dismod php7.0 ; sudo a2enmod php5.6 ; sudo service apache2 restart sudo update-alternatives --set php /usr/bin/php5.6 |
备忘一下。
参考:
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.
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.
1 2 |
sudo apt-get install icecc sudo apt-get install icemon (optional) |
$ sudo ln -s /usr/include/clang/3.2/include /usr/lib/clang/3.2/
$ sudo ln -s /usr/include/clang /usr/lib/
1 2 3 4 5 6 7 8 9 10 11 12 13 |
$ gcc --version gcc (Ubuntu/Linaro 4.7.3-1ubuntu1) 4.7.3 $ /usr/lib/icecc/icecc-create-env --gcc /usr/bin/gcc /usr/bin/g++ ... creating 0b6089afb59bbcef327c8ec59b021132.tar.gz $ mv 0b6089afb59bbcef327c8ec59b021132.tar.gz ~/icecc-package-gcc-4.7.3.tar.gz $ clang --version Ubuntu clang version 3.2-1~exp9ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2) $ /usr/lib/icecc/icecc-create-env --clang /usr/bin/clang /usr/lib/icecc/compilerwrapper … creating bbfeb5eb17d851d04a17bed5f9f1f621.tar.gz $ mv bbfeb5eb17d851d04a17bed5f9f1f621.tar.gz ~/icecc-package-clang-3.2-1.tar.gz |
1 2 3 4 5 6 7 8 9 |
$ cat .icecc_rc-gcc export PATH=/usr/lib/icecc/bin:$PATH export ICECC_VERSION=/home/liangqi/icecc-package-gcc-4.7.3.tar.gz alias make="make -j48" $ cat .icecc_rc-clang export PATH=/usr/lib/icecc/bin:$PATH export ICECC_VERSION=/home/liangqi/icecc-package-clang-3.2-1.tar.gz alias make="make -j48" |
/etc/default/icecc
, set START_ICECC_SCHEDULER="true"
.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.sudo /etc/init.d/icecc stop
1 |
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)" |
/usr/local/Library/Formula/
.brew install icecream icemon
1 2 3 4 5 6 7 8 |
$ clang --version Apple LLVM version 4.2 (clang-425.0.24) (based on LLVM 3.2svn) Target: x86_64-apple-darwin12.4.0 Thread model: posix $ /usr/local/opt/icecream/libexec/icecc/icecc-create-env --clang /usr/bin/clang /usr/local/opt/icecream/libexec/icecc/compilerwrapper … creating bbfeb5eb17d851d04a17bed5f9f1f621.tar.gz $ mv bbfeb5eb17d851d04a17bed5f9f1f621.tar.gz ~/icecc-package-clang-3.2-svn.tar.gz |
1 2 3 4 |
$ cat .icecc_rc export PATH=/usr/local/opt/icecream/libexec/icecc/bin:$PATH #export ICECC_VERSION=/Users/liangqi/icecc-package-clang-3.2-svn.tar.gz alias make="make -j48 CC=clang CXX=clang++" |
/Library/LaunchDaemons
.sudo chown root /Library/LaunchDaemons/com.github.iceccd.plist
sudo launchctl load /Library/LaunchDaemons/com.github.iceccd.plist
sudo launchctl unload /Library/LaunchDaemons/com.github.iceccd.plist
Normally just do source ~/.icecc_rc
, configure
and make
.
-no-pch
when configure
.-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.)Here is the official article for it, Installing Qt for the Symbian platform using Linux (experimental).
The basic idea is same on Linux and Mac OS X.
1. For phone, you need to install Application TRK
S60 5.0/Symbian^1 – s60_5_0_app_trk_3_2_7.sisx
Symbian^3 – s60_tb_9_2_app_trk_3_2_8.sisx
2. Use usb cable to connect your phone and computer, Linux or Mac OS X. Remember to set to “PC Suite” mode or “Nokia Ovi Suite” mode on your phone. Then launch your Application TRK via “RnD Tools”->”TRK”.
3. About the device name for your phone on computer
For Linux, see more details in Configuring the USB Serial Driver on the Linux System. After that, you will find /dev/ttyUSBx and maybe another /dev/ttyUSBy, better to “sudo chmod 777 /dev/ttyUSB*” for them(some Linux distribution do not give the access to normal users for it, like Ubuntu).
For Mac, you could find sth like /dev/cu.usbmodemfaXx and /dev/cu.usbmodemfaXy.
4. To build runonphone, you need to have libusb installed.
For Linux, just follow that documentation, “sudo apt-get install libusb-dev” should be ok for Debian/Ubuntu.
For Mac, “sudo brew install libusb-compat” works for me.
5. Build runonphone, use the qmake in your desktop Qt.
cd ~/qt/qt/tools/runonphone
/usr/bin/qmake
make
6. Build and run your autotests, please check previous blog for the EPOCROOT and PATH environments settings.
cd qt/qt/tests/auto/qdatetime
~/build/s3_gcce/bin/qmake -spec ~/qt/qt/mkspecs/symbian-gcce -o Makefile ~/qt/qt/tests/auto/qdatetime/qdatetime.pro
make sis
~/qt/qt/tools/runonphone/runonphone -p /dev/cu.usbmodemfa44 –sis ~/qt/qt/tests/auto/qdatetime/qdatetime.sis qdatetime.exe
NOTE: Here the /dev/cu.usbmodemfa44 is the device on Mac for me. And for Linux, the device is sth like /dev/ttyUSB1.
Enjoy it!