[SOLVED] odd problem at building qt5 on slackware64 current
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
root@darkstar64-2:/etc/rc.d# ./rc.local start
/etc/rc.d/rc.swapinzram: ligne 25 : echo: erreur d'écriture : Ne peut allouer de la mémoire
mkswap: erreur*: la zone d'échange (swap) doit être d'au moins 40*Kio
swapon: /dev/zram2*: échec de lecture d'en-tête d'espace d'échange
Have you kept the defaut settings ?
It works well here, even without a swap
Code:
blackstar:~:# swapoff /dev/nvme0n1p2
blackstar:~:# /etc/rc.d/rc.swapinzram start
Setting up swapspace version 1, size = 22.6 GiB (24252043264 bytes)
no label, UUID=8163cbe0-300e-4fe8-b43e-aa289607f20c
I only change that:
Code:
blackstar:~:# sed -E '/^(#|$)/d' /etc/swapinzram.conf
PERCENTAGE=150
Code:
# grep -i zram .config
CONFIG_ZRAM=m
CONFIG_ZRAM_DEF_COMP_LZORLE=y
# CONFIG_ZRAM_DEF_COMP_ZSTD is not set
# CONFIG_ZRAM_DEF_COMP_LZ4 is not set
# CONFIG_ZRAM_DEF_COMP_LZO is not set
# CONFIG_ZRAM_DEF_COMP_LZ4HC is not set
# CONFIG_ZRAM_DEF_COMP_842 is not set
CONFIG_ZRAM_DEF_COMP="lzo-rle"
# CONFIG_ZRAM_WRITEBACK is not set
# CONFIG_ZRAM_MEMORY_TRACKING is not set
Distribution: slackware, slackware from scratch, LFS, slackware [arm], linux Mint...
Posts: 1,564
Original Poster
Rep:
same errors, here my conf file:
Code:
# Didier Spaier 2020
# Dedicated to the public domain as stated in https://unlicense.org/
# This file records your zram settings for swap. It is sourced by
# /etc/rc.d/swapinzram
# The values set by default in /etc/r.d/swapinzram are commented.
# For more information read:
# /usr/src/linux-<version>/Documentation/admin-guide/blockev/zram.rst
# where <version> is the output of the command: uname -r
# Read also: man swapon
# To set different values put them after the '=' sign and uncomment the relevant
# lines, removing the '#' sign at their beginning.
# The compression algorithm in use.
# Default: zstd
COMPRESSION_ALGORITHM=zstd
# The percentage of the physical ram allocated to the zram swap device
# This is the not compressed size. The actual (compressed) size depend on the
# compression factor (at most one half of the compressed size).
# Default: 50
PERCENTAGE=150
# The priority is the one of the zram swap device among the swpa spaces.
# We want it to be bigger that that of swap partitions and files so that the
# swap on zram be used first and other swap spaces be used if it becomes full.
# The minimum is -1, the maximum 32567.
# Default: 32657
PRIORITY=32567
# The swappiness tells the kernel how aggressively it should swap memory pages.
# We set it greater than the global default (60) so that swap in zram be used
# soon when the available RAM becomes low.
# Default: 80
SWAPPINESS=100
root@darkstar64-2:~/scripts# ls -la /dev/zram*
brw-rw---- 1 root disk 251, 0 mars 12 13:22 /dev/zram0
brw-rw---- 1 root disk 251, 1 mars 12 13:22 /dev/zram1
Distribution: slackware, slackware from scratch, LFS, slackware [arm], linux Mint...
Posts: 1,564
Original Poster
Rep:
Code:
root@darkstar64-2:/etc/rc.d# ./rc.swapinzram status
No active zram swap block device.
root@darkstar64-2:/etc/rc.d# zramctl
root@darkstar64-2:/etc/rc.d#
root@darkstar64-2:/mnt/sfs/source/l/qt5# zramctl
NAME ALGORITHM DISKSIZE DATA COMPR TOTAL STREAMS MOUNTPOINT
/dev/zram1 lzo-rle 512M 0B 0B 0B 32
/dev/zram0 lzo-rle 512M 0B 0B 0B 32
modified swapinzram file:
Code:
# Didier Spaier 2020
# Dedicated to the public domain as stated in https://unlicense.org/
# This file records your zram settings for swap. It is sourced by
# /etc/rc.d/swapinzram
# The values set by default in /etc/r.d/swapinzram are commented.
# For more information read:
# /usr/src/linux-<version>/Documentation/admin-guide/blockev/zram.rst
# where <version> is the output of the command: uname -r
# Read also: man swapon
# To set different values put them after the '=' sign and uncomment the relevant
# lines, removing the '#' sign at their beginning.
# The compression algorithm in use.
# Default: zstd
# COMPRESSION_ALGORITHM=zstd
COMPRESSION_ALGORITHM=lzo-rle
# The percentage of the physical ram allocated to the zram swap device
# This is the not compressed size. The actual (compressed) size depend on the
# compression factor (at most one half of the compressed size).
# Default: 50
PERCENTAGE=150
# The priority is the one of the zram swap device among the swpa spaces.
# We want it to be bigger that that of swap partitions and files so that the
# swap on zram be used first and other swap spaces be used if it becomes full.
# The minimum is -1, the maximum 32567.
# Default: 32657
PRIORITY=32567
# The swappiness tells the kernel how aggressively it should swap memory pages.
# We set it greater than the global default (60) so that swap in zram be used
# soon when the available RAM becomes low.
# Default: 80
SWAPPINESS=100
Code:
root@darkstar64-2:/etc/rc.d# ./rc.swapinzram status
NAME ALGORITHM DISKSIZE DATA COMPR TOTAL STREAMS MOUNTPOINT
/dev/zram3 lzo-rle 47G 4K 74B 12K 32 [SWAP]
/dev/zram1 lzo-rle 512M 0B 0B 0B 32
/dev/zram0 lzo-rle 512M 0B 0B 0B 32
It should be ok now, I hope
Thanks in advance @marav for your time and help.
Distribution: slackware, slackware from scratch, LFS, slackware [arm], linux Mint...
Posts: 1,564
Original Poster
Rep:
It worked:
Code:
WARNING: zero length file usr/include/qt5/QtXmlPatterns/5.15.3/QtXmlPatterns/private/qtxmlpatterns-config_p.h
WARNING: zero length file usr/include/qt5/QtQuickTemplates2/qtquicktemplates2-config.h
WARNING: zero length file usr/lib64/qt5/qml/QtQuick/Controls/Styles/Flat/plugins.qmltypes
Slackware package /tmp/qt5-5.15.3_20220304_a657406f-x86_64-1_sfs.txz created.
real 56m41,216s
user 1172m26,384s
sys 314m10,803s
Distribution: slackware, slackware from scratch, LFS, slackware [arm], linux Mint...
Posts: 1,564
Original Poster
Rep:
the original qt5 slackware package builds without any patch, but with swapinzram which is definitively a must have package for slackware (thanks to D. Spaier):
Code:
WARNING: zero length file usr/include/qt5/QtXmlPatterns/5.15.3/QtXmlPatterns/private/qtxmlpatterns-config_p.h
WARNING: zero length file usr/include/qt5/QtQuickTemplates2/qtquicktemplates2-config.h
WARNING: zero length file usr/lib64/qt5/qml/QtQuick/Controls/Styles/Flat/plugins.qmltypes
Slackware package /tmp/qt5-5.15.3_20220304_a657406f-x86_64-1.txz created.
real 56m7,718s
user 1172m47,610s
sys 302m38,705s
Finally with the aid of swapinzram (thanks Didier and Marav!) qt5 has built:
Code:
WARNING: zero length file usr/include/qt5/QtXml/5.15.3/QtXml/private/qtxml-config_p.h
WARNING: zero length file usr/lib64/qt5/qml/QtQuick/Controls/Styles/Flat/plugins.qmltypes
Slackware package /tmp/qt5-5.15.3_20220304_a657406f-x86_64-1.txz created.
real 77m31.380s
user 1758m6.027s
sys 329m23.351s
root@ilium/home/andrew/ssd2/Slackware/slackware64-current/source/l/qt5#
So all this time it was simply a memory issue? BTW Marav if you ever want to polish the SlackBuild I saw in passing that you created a place for the docs but no docs. Looks like only README.md.
Edit: And I am a little curious as to how much actual RAM is required to compile this version of qt5 without swapping out? I am a little peeved that my own setup failed with physical RAM
Fascinating, I will set up zram and have another go later today. It would be nice to know how PV manages his compile?
Pat described it on LQ somewhere, mainly with icecream/JOBS=40 and some buildmachines with plenty of ram if i remember correctly.
A note to zram:
I use it on all my devices since some months, in a similar way Didier does(no udev invoked).
I have no swap-partition/file at all anymore, which especially is helpful on old devices(2gb ram) where e.g. firefox is unusable with swap on a harddisc.
I start zram via rc.zram in rc.S, just where the system-swap is enabled. This way it may be used additionally to harddisc-swap or even exclusive.
Having multible zram devices like
Code:
# zramctl
NAME ALGORITHM DISKSIZE DATA COMPR TOTAL STREAMS MOUNTPOINT
/dev/zram1 lzo-rle 512M 0B 0B 0B 32
/dev/zram0 lzo-rle 512M 0B 0B 0B 32
has no performance advantages(anymore), all cpu-cores may just be used with a single-zram device.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.