Package Details: ect 0.9.5-4

Git Clone URL: https://aur.archlinux.org/ect.git (read-only, click to copy)
Package Base: ect
Description: File compressor, supports postcompression of PNG, JPEG, GZIP and ZIP files
Upstream URL: https://github.com/fhanau/efficient-compression-tool
Licenses: Apache-2.0
Submitter: wilbowma
Maintainer: SunRed
Last Packager: SunRed
Votes: 13
Popularity: 1.21
First Submitted: 2018-06-30 04:29 (UTC)
Last Updated: 2026-02-25 18:40 (UTC)

Latest Comments

1 2 Next › Last »

SunRed commented on 2026-02-25 18:45 (UTC)

@Marcouney Thanks for the hint! I couldn't reproduce it at first with my makepkg.conf I use but using the stock Arch one and compiling it results in a segfault indeed on optimizing random PNGs.

Cheers

Marcouney commented on 2026-02-22 15:29 (UTC) (edited on 2026-02-22 16:40 (UTC) by Marcouney)

Segmentation faults occur almost systematically with PNG files. The problem is described in GitHub issue #145 and a patch has been provided.

Patch ect-gcc-15-O3-fix.patch
diff --git a/src/LzFind.c b/src/LzFind.c
index 98d0ac6..f1bee55 100755
--- a/src/LzFind.c
+++ b/src/LzFind.c
@@ -229,7 +229,7 @@ static unsigned short * GetMatches2(UInt32 lenLimit, UInt32 curMatch, UInt32 pos
     const unsigned char* _min = min;
     unsigned cnt = 0;
     if (_min < pb - (rle_len - len)) {_min = pb - (rle_len - len);}
-    while (rle_pos > _min && *(uint64_t*)(rle_pos - 8) == starter_full) {rle_pos-=8; cnt+=8;}
+    while (rle_pos > _min && *(__typeof__(const uint64_t __attribute__((aligned(1))))*)(rle_pos - 8) == starter_full) {rle_pos-=8; cnt+=8;}
     if (cnt) {
       if (cnt + len > rle_len - 1) {cnt = rle_len - 1 - len;}
       curMatch_rle -= cnt;

Adaptation of PKGBUILD
source=("git+$url.git#tag=v$pkgver"
    'git+https://github.com/glennrp/libpng.git#commit=f135775ad4e5d4408d2e12ffcc71bb36e6b48551'
    'git+https://github.com/fhanau/mozjpeg.git#commit=182457e3e26e1e078d5dbd09137cf04865be2e49'
    'ect-gcc-15-O3-fix.patch')
sha512sums=('a1d0ad86aa8e6d720575daf7e833c3b787ac51595774b99b6fd4a8ece616150c2e2c174aa97a2bc0b89e16d6cd93ec0c0d657430c1a41bf08b121368af0a4abc'
            '13e286cf091b284d15888a959a8be5a90977bed92d861fd72d465199bd6112641b47d74a525d4100868d528a25921958e9ab579643b705befe48e5756ffa301f'
            '1bdd9efa8d9c49a16cf5f2135ed29dc120bc1b31eec7130802d22b3d09bf10fe337f734b39b38e422bbe6e1719aca6744d49e2b435c2cb94cbf401d89086947a'
            '6384aa4a0102229b9499ae3608d600080cc2f9b953ddde947a866b27308b16be374c8ae47bd7b91d3f10805485c2e05f97fc4e758a2b212c02596d7a6dde44f6')

prepare() {
    cd "$_pkgname"
    git submodule init
    git config submodule.src/libpng.url "$srcdir"/libpng
    git config submodule.src/mozjpeg.url "$srcdir"/mozjpeg
    git -c protocol.file.allow=always submodule update
    patch -Np1 < ../ect-gcc-15-O3-fix.patch
}

SunRed commented on 2024-09-23 18:20 (UTC)

@sparr Thanks, that is a really strange issue. As you say, the commit hash hasn't changed and the updpkgsums tool from pacman-contrib hasn't been updated in quite a while that could have resulted in some change for generating the checksum. It's probably some dependency of these tools for generating the actual checksum (like makepkg) that has been updated but I haven't looked deep enough into this yet.

sparr commented on 2024-09-22 14:12 (UTC)

==> Validating source files with sha512sums... efficient-compression-tool ... Passed libpng ... Passed mozjpeg ... FAILED ==> ERROR: One or more files did not pass the validity check!

I ran updpkgsums and it says the new sha512sum for mozjpeg is as follows:

1bdd9efa8d9c49a16cf5f2135ed29dc120bc1b31eec7130802d22b3d09bf10fe337f734b39b38e422bbe6e1719aca6744d49e2b435c2cb94cbf401d89086947a

I'm not sure how/why the checksum would have changed when the commit hash being retrieved hasn't changed.

haawda commented on 2023-07-12 22:31 (UTC)

Builds fine here and also fetches submodules. File it upstream, if you have persistent problems with the submodules.

dreieck commented on 2023-07-12 20:28 (UTC)

Fails to clone libpng and mozjpeg repositories:

==> Starting prepare()...
Submodule 'src/libpng' (https://github.com/glennrp/libpng.git) registered for path 'src/libpng'
Submodule 'src/mozjpeg' (https://github.com/fhanau/mozjpeg.git) registered for path 'src/mozjpeg'
Cloning into '/home/felics/.cache/yay/ect/src/Efficient-Compression-Tool/src/libpng'...
fatal: unable to access 'https://github.com/glennrp/libpng.git/': Failed to connect to github.com port 443 after 5 ms: Couldn't connect to server
fatal: clone of 'https://github.com/glennrp/libpng.git' into submodule path '/home/felics/.cache/yay/ect/src/Efficient-Compression-Tool/src/libpng' failed
Failed to clone 'src/libpng'. Retry scheduled
Cloning into '/home/felics/.cache/yay/ect/src/Efficient-Compression-Tool/src/mozjpeg'...
fatal: unable to access 'https://github.com/fhanau/mozjpeg.git/': Failed to connect to github.com port 443 after 6 ms: Couldn't connect to server
fatal: clone of 'https://github.com/fhanau/mozjpeg.git' into submodule path '/home/felics/.cache/yay/ect/src/Efficient-Compression-Tool/src/mozjpeg' failed
Failed to clone 'src/mozjpeg'. Retry scheduled
Cloning into '/home/felics/.cache/yay/ect/src/Efficient-Compression-Tool/src/libpng'...
fatal: unable to access 'https://github.com/glennrp/libpng.git/': Failed to connect to github.com port 443 after 6 ms: Couldn't connect to server
fatal: clone of 'https://github.com/glennrp/libpng.git' into submodule path '/home/felics/.cache/yay/ect/src/Efficient-Compression-Tool/src/libpng' failed
Failed to clone 'src/libpng' a second time, aborting
==> ERROR: A failure occurred in prepare().

Regards!

nathanielcwm commented on 2023-05-30 12:56 (UTC) (edited on 2023-05-30 13:00 (UTC) by nathanielcwm)

Could you put: "efficient compression tool" or "efficient-compression-tool" in the description to make it easier to find the package?

Presently using the default search settings "ect" pulls in a lot of unrelated packages which makes it harder to find this package and this problem was brought up by a Discord user of a Discord server that i'm in - this is easily fixable by changing the search filters to look for an exact match though.

veganvelociraptr commented on 2022-06-02 12:21 (UTC)

As @sekret wrote, this package is broken.

sekret commented on 2022-06-01 20:59 (UTC) (edited on 2022-06-01 21:10 (UTC) by sekret)


…
==> Retrieving sources...
  -> Found Efficient-Compression-Tool-0.9.1.tar.gz
==> WARNING: Skipping all source file integrity checks.
==> Extracting sources...
  -> Extracting Efficient-Compression-Tool-0.9.1.tar.gz with bsdtar
bsdtar: Failed to set default locale
==> Starting prepare()...
/startdir/PKGBUILD: line 18: cd: Efficient-Compression-Tool: No such file or directory
==> ERROR: A failure occurred in prepare().
    Aborting...
==> ERROR: Build failed, check /mnt/chroot/sekret/build

The directory also has the pkgver in it, which you'll need to add.

edit: Oh ok, that PKGBUILD is completely broken! Looks like you've changed quite a lot. Please test your PKGBUILDs on your machine before you upload them.

haawda commented on 2020-04-02 08:35 (UTC)

Thanks, done.