LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-12-2022, 05:47 AM   #61
marav
LQ Sage
 
Registered: Sep 2018
Location: Gironde
Distribution: Slackware
Posts: 5,366

Rep: Reputation: 4081Reputation: 4081Reputation: 4081Reputation: 4081Reputation: 4081Reputation: 4081Reputation: 4081Reputation: 4081Reputation: 4081Reputation: 4081Reputation: 4081

Quote:
Originally Posted by nobodino View Post
error message?

Code:
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

Last edited by marav; 03-12-2022 at 05:53 AM.
 
Old 03-12-2022, 06:16 AM   #62
nobodino
Senior Member
 
Registered: Jul 2010
Location: Near Bordeaux in France
Distribution: slackware, slackware from scratch, LFS, slackware [arm], linux Mint...
Posts: 1,564

Original Poster
Rep: Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892
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
my fstab now:

Code:
# /dev/sda2        swap             swap        defaults         0   0
/dev/nvme0n1p2   /                ext4        defaults,noatime,discard         1   1
/dev/sda1        /boot/efi        vfat        defaults         1   0
#/dev/cdrom      /mnt/cdrom       auto        noauto,owner,ro,comment=x-gvfs-show 0   0
/dev/fd0         /mnt/floppy      auto        noauto,owner     0   0
devpts           /dev/pts         devpts      gid=5,mode=620   0   0
proc             /proc            proc        defaults         0   0
tmpfs
Code:
root@darkstar64-2:/mnt/sfs/source/l/qt5# df
Sys. de fichiers blocs de 1K  Utilisé Disponible Uti% Monté sur
tmpfs                  32768     1560      31208   5% /run
devtmpfs                8192        0       8192   0% /dev
/dev/nvme0n1p2      90130888 69282708   16223796  82% /
tmpfs               16427884        0   16427884   0% /dev/shm
cgroup_root             8192        0       8192   0% /sys/fs/cgroup
/dev/sda1             766448    11032     755416   2% /boot/efi
tmpfs                3285576       12    3285564   1% /run/user/0
/dev/nvme0n1p3      50080660 26144492   21359784  56% /mnt/sfs
Code:
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

Last edited by nobodino; 03-12-2022 at 06:24 AM.
 
Old 03-12-2022, 06:24 AM   #63
marav
LQ Sage
 
Registered: Sep 2018
Location: Gironde
Distribution: Slackware
Posts: 5,366

Rep: Reputation: 4081Reputation: 4081Reputation: 4081Reputation: 4081Reputation: 4081Reputation: 4081Reputation: 4081Reputation: 4081Reputation: 4081Reputation: 4081Reputation: 4081
Do you have a custom kernel or use the stock one ?

You could try the version of Didier:
http://slackware.uk/slint/x86_64/sli...ce/swapinzram/

but except it's not a slackbuild, I think it's the same

Last edited by marav; 03-12-2022 at 06:28 AM.
 
Old 03-12-2022, 06:29 AM   #64
nobodino
Senior Member
 
Registered: Jul 2010
Location: Near Bordeaux in France
Distribution: slackware, slackware from scratch, LFS, slackware [arm], linux Mint...
Posts: 1,564

Original Poster
Rep: Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892
modified /ets/fstab

Code:
# /dev/sda2        swap             swap        defaults         0   0
/dev/zram0 none swap defaults 0 0
/dev/zram1 none swap defaults 0 0
/dev/nvme0n1p2   /                ext4        defaults,noatime,discard         1   1
/dev/sda1        /boot/efi        vfat        defaults         1   0
#/dev/cdrom      /mnt/cdrom       auto        noauto,owner,ro,comment=x-gvfs-show 0   0
/dev/fd0         /mnt/floppy      auto        noauto,owner     0   0
devpts           /dev/pts         devpts      gid=5,mode=620   0   0
proc             /proc            proc        defaults         0   0
tmpfs            /dev/shm         tmpfs       nosuid,nodev,noexec 0   0
but df doesn't show the /dev/zram* ?

standard kernel with initrd.
 
Old 03-12-2022, 06:38 AM   #65
marav
LQ Sage
 
Registered: Sep 2018
Location: Gironde
Distribution: Slackware
Posts: 5,366

Rep: Reputation: 4081Reputation: 4081Reputation: 4081Reputation: 4081Reputation: 4081Reputation: 4081Reputation: 4081Reputation: 4081Reputation: 4081Reputation: 4081Reputation: 4081
Quote:
Originally Posted by nobodino View Post
modified /ets/fstab

Code:
# /dev/sda2        swap             swap        defaults         0   0
/dev/zram0 none swap defaults 0 0
/dev/zram1 none swap defaults 0 0
/dev/nvme0n1p2   /                ext4        defaults,noatime,discard         1   1
/dev/sda1        /boot/efi        vfat        defaults         1   0
#/dev/cdrom      /mnt/cdrom       auto        noauto,owner,ro,comment=x-gvfs-show 0   0
/dev/fd0         /mnt/floppy      auto        noauto,owner     0   0
devpts           /dev/pts         devpts      gid=5,mode=620   0   0
proc             /proc            proc        defaults         0   0
tmpfs            /dev/shm         tmpfs       nosuid,nodev,noexec 0   0
but df doesn't show the /dev/zram* ?

standard kernel with initrd.
Nope,
You can display the information with: zramctl

Last edited by marav; 03-12-2022 at 06:40 AM.
 
Old 03-12-2022, 06:42 AM   #66
nobodino
Senior Member
 
Registered: Jul 2010
Location: Near Bordeaux in France
Distribution: slackware, slackware from scratch, LFS, slackware [arm], linux Mint...
Posts: 1,564

Original Poster
Rep: Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892
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#
 
Old 03-12-2022, 06:55 AM   #67
nobodino
Senior Member
 
Registered: Jul 2010
Location: Near Bordeaux in France
Distribution: slackware, slackware from scratch, LFS, slackware [arm], linux Mint...
Posts: 1,564

Original Poster
Rep: Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892
followed piece of advice of this page : https://wiki.archlinux.org/title/Imp...#zram_or_zswap

Code:
/etc/modprobe.d/zram.conf

options zram num_devices=2
then :

Code:
/etc/udev/rules.d/99-zram.rules

KERNEL=="zram0", ATTR{disksize}="512M" RUN="/usr/bin/mkswap /dev/zram0"
KERNEL=="zram1", ATTR{disksize}="512M" RUN="/usr/bin/mkswap /dev/zram1"
added to the /etc/fstab:

Code:
/dev/zram0 none swap defaults 0 0
/dev/zram1 none swap defaults 0 0
rebooted and now :

Code:
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.

Last edited by nobodino; 03-12-2022 at 07:05 AM.
 
Old 03-12-2022, 07:15 AM   #68
marav
LQ Sage
 
Registered: Sep 2018
Location: Gironde
Distribution: Slackware
Posts: 5,366

Rep: Reputation: 4081Reputation: 4081Reputation: 4081Reputation: 4081Reputation: 4081Reputation: 4081Reputation: 4081Reputation: 4081Reputation: 4081Reputation: 4081Reputation: 4081
Quote:
Originally Posted by nobodino View Post
followed piece of advice of this page : https://wiki.archlinux.org/title/Imp...#zram_or_zswap

It should be ok now, I hope
Thanks in advance @marav for your time and help.
Yep ;-)
Sorry for my poor support for zram
I just did the slackbuild because Didier said he didn't have time. But my skills end there

Let's hope QT5 will build for you now

Last edited by marav; 03-12-2022 at 07:24 AM.
 
Old 03-12-2022, 09:38 AM   #69
nobodino
Senior Member
 
Registered: Jul 2010
Location: Near Bordeaux in France
Distribution: slackware, slackware from scratch, LFS, slackware [arm], linux Mint...
Posts: 1,564

Original Poster
Rep: Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892
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
 
2 members found this post helpful.
Old 03-12-2022, 09:57 AM   #70
marav
LQ Sage
 
Registered: Sep 2018
Location: Gironde
Distribution: Slackware
Posts: 5,366

Rep: Reputation: 4081Reputation: 4081Reputation: 4081Reputation: 4081Reputation: 4081Reputation: 4081Reputation: 4081Reputation: 4081Reputation: 4081Reputation: 4081Reputation: 4081
FTR,

I found the patch here:
Code:
https://ftp.lysator.liu.se/pub/opensuse/source/tumbleweed/repo/oss/src/qt6-webengine-6.2.3-1.3.src.rpm
It was previously available for qt5
qt5-webengine source rpm is no longer available in the repo, but the patch is the same
 
Old 03-12-2022, 10:41 AM   #71
nobodino
Senior Member
 
Registered: Jul 2010
Location: Near Bordeaux in France
Distribution: slackware, slackware from scratch, LFS, slackware [arm], linux Mint...
Posts: 1,564

Original Poster
Rep: Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892
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

Last edited by nobodino; 03-12-2022 at 11:02 AM.
 
2 members found this post helpful.
Old 03-12-2022, 10:57 AM   #72
nobodino
Senior Member
 
Registered: Jul 2010
Location: Near Bordeaux in France
Distribution: slackware, slackware from scratch, LFS, slackware [arm], linux Mint...
Posts: 1,564

Original Poster
Rep: Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892
Now, I need to build SFS with that configuration and see what will happen.
 
Old 03-12-2022, 03:17 PM   #73
andrew.46
Senior Member
 
Registered: Oct 2007
Distribution: Slackware
Posts: 1,365

Rep: Reputation: 493Reputation: 493Reputation: 493Reputation: 493Reputation: 493
Fascinating, I will set up zram and have another go later today. It would be nice to know how PV manages his compile?
 
Old 03-13-2022, 12:13 AM   #74
andrew.46
Senior Member
 
Registered: Oct 2007
Distribution: Slackware
Posts: 1,365

Rep: Reputation: 493Reputation: 493Reputation: 493Reputation: 493Reputation: 493
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: I see what has happened, you have:

Code:
cp $CWD/README $PKG/usr/doc/${PRGNAM}-${VERSION}
where you should have:

Code:
cp $CWD/README.md $PKG/usr/doc/${PRGNAM}-${VERSION}

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

Last edited by andrew.46; 03-13-2022 at 03:38 AM.
 
1 members found this post helpful.
Old 03-13-2022, 12:32 AM   #75
franzen
Member
 
Registered: Nov 2012
Distribution: slackware
Posts: 535

Rep: Reputation: 379Reputation: 379Reputation: 379Reputation: 379
Quote:
Originally Posted by andrew.46 View Post
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.
 
2 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
qt5-5.15.2-i586-10 /usr/lib/qt5/bin/uic -h = Segfault . babydr Slackware 9 09-02-2021 07:08 PM
Digikam-5.4.0 and QT5 problem 3rensho Linux - Software 2 02-15-2017 09:11 AM
problem building qt5 itsgregman Slackware 42 01-18-2017 06:57 AM
Odd situation with raid10 array, odd number of drives, and it took, can't regrow now Red Squirrel Linux - Software 9 08-08-2014 02:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:45 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration