ecdye / zram-config

A complete zram-config utility for swap, directories, and logs to reduce SD, NAND and eMMC block wear.
MIT License
412 stars 53 forks source link

master version is not building. #19

Closed yutayu closed 4 years ago

yutayu commented 4 years ago

root@raspberrypi:/home/pi/Documents/zram-config# sh install.sh install.sh: 4: install.sh: Syntax error: "(" unexpected (expecting "}")

I cannot install zram-config in raspbian buster.

pi@raspberrypi:~/Documents/zram-config $ uname -r 4.19.58-v7+

StuartIanNaylor commented 4 years ago

Yeah my bad I thought I was working in a branch and updated master by mistake earlier, its the first line from mem } to the end

Did a quick copy and paste to repair and must of missed the last character from the first line. Please give us a shout if anything else as wasn't supposed to be working on master.

PS I have been wondering if I should but IRQ lines in ztab so you can also add affinity to cores? Bad or good idea?

yutayu commented 4 years ago

still it occurs same errors. I want to try to use it -> IRQ line

StuartIanNaylor commented 4 years ago

I have not got a Pi setup check tomoz as it should be a simple fix but will need to run. Its prob OK now

yutayu commented 4 years ago

before this change, we can install this to pi. https://github.com/StuartIanNaylor/zram-config/commit/90f2bbfc84583673cf2c2b141d51fc7af2032c14#diff-3fbb47e318cd8802bd325e7da9aaabe8

StuartIanNaylor commented 4 years ago

The line 1 error should be clear just rm the zram-config dir clone again and try I will have a look in the morning, plus it will have irq affinity lines so you can set affinity to say usb drive or network...

yutayu commented 4 years ago

pi@raspberrypi:~/Documents/zram-config $ sudo sh install.sh Reading package lists... Done Building dependency tree
Reading state information... Done libattr1-dev is already the newest version (1:2.4.48-4). 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Cloning into 'overlayfs-tools'... remote: Enumerating objects: 14, done. remote: Counting objects: 100% (14/14), done. remote: Compressing objects: 100% (14/14), done. remote: Total 110 (delta 5), reused 0 (delta 0), pack-reused 96 Receiving objects: 100% (110/110), 40.44 KiB | 154.00 KiB/s, done. Resolving deltas: 100% (61/61), done. gcc -Wall -std=c99 -c main.c In file included from main.c:16: /usr/include/linux/stat.h:56:8: error: redefinition of ‘struct statx_timestamp’ struct statx_timestamp { ^~~~~~~ In file included from /usr/include/arm-linux-gnueabihf/sys/stat.h:446, from main.c:14: /usr/include/arm-linux-gnueabihf/bits/statx.h:25:8: note: originally defined here struct statx_timestamp ^~~~~~~ In file included from main.c:16: /usr/include/linux/stat.h:99:8: error: redefinition of ‘struct statx’ struct statx { ^~~~~ In file included from /usr/include/arm-linux-gnueabihf/sys/stat.h:446, from main.c:14: /usr/include/arm-linux-gnueabihf/bits/statx.h:36:8: note: originally defined here struct statx ^~~~~ make: *** [makefile:11: main.o] Error 1 install: cannot stat 'overlayfs-tools/overlay': No such file or directory

Reboot to activate zram-config
edit /etc/ztab to configure options

I don't hurry :) Good Night.

StuartIanNaylor commented 4 years ago

Yeah looks like my push to the wrong branch I will have to just run up a Pi in the morn. Thanks though and apols

Had a look and unsure how to change overlayfs-tools so that stretch and buster don't have header problems. So just did a grep for os-release and install on that.

irq affinity to my surprise is not supported on pi to 3, 4 don't know but not going to include I tried buster on a Pi4 and stretch on a Pi0 and all went well

fingers crossed that should sort things problem

yutayu commented 4 years ago

No error occurs :) Perfect.

StuartIanNaylor commented 4 years ago

Apols about that I was working in the wrong branch but actually made me use /etc/os-release which is far better. I just wish the same libs with the same functionality would stop swapping function removals I guess its all optimisation and tidying but actually my c knowledge is extremely minimal. :)

Shame about IRQs on the PI until I tried I would of never expected affinity can not be set. PS please feel free to branch clone copy so you have a version that is static and your own.