Package Details: trickle-git r23.09a1d95-4

Git Clone URL: https://aur.archlinux.org/trickle-git.git (read-only, click to copy)
Package Base: trickle-git
Description: Lightweight userspace bandwidth shaper
Upstream URL: https://github.com/mariusae/trickle
Licenses: BSD
Conflicts: trickle
Provides: trickle
Submitter: jonathon
Maintainer: mkurz
Last Packager: mkurz
Votes: 9
Popularity: 0.000072
First Submitted: 2018-04-12 13:09 (UTC)
Last Updated: 2025-03-22 20:04 (UTC)

Latest Comments

HMK commented on 2025-08-05 18:54 (UTC) (edited on 2025-08-07 12:54 (UTC) by HMK)

This is how I fixed the build:

PKGBUILD

diff --git a/PKGBUILD b/PKGBUILD
index e7d7535..5dace0a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,28 +3,26 @@
 # Contributor: Romain Bouchaud-Leduc <r0m1.bl@camaris.org>

 pkgname=trickle-git
-pkgver=r23.09a1d95
-pkgrel=4
+pkgver=r34.26cfa5d
+pkgrel=1
 pkgdesc="Lightweight userspace bandwidth shaper"
 arch=('i686' 'x86_64' 'armv6h' 'armv7h' 'aarch64')
-url="https://github.com/mariusae/trickle"
+url="https://github.com/Zapeth/trickle"
 license=('BSD')
 depends=('libevent' 'libtirpc')
 makedepends=('git')
 provides=("${pkgname/-git/}")
 conflicts=("${pkgname/-git/}")
 source=("git+$url.git"
-        "remove-libtrickle.patch"
         "fix-trickle-overload.patch"
-        "$url/pull/28/commits/4171f1716eb2e37d36fb9189800c53b83723569d.patch"
         "$url/pull/29/commits/29de2a4704d9843d3c6cba1d4a4ac177f2d6e568.patch"
-        "trickle-gcc14.patch")
+        "trickle-gcc14.patch"
+        "atomicio.patch")
 sha256sums=('SKIP'
-            '7e148c9526dbd6667c94ce3ee4f1a1fd550e61ab185735939c4d5312cf13b7a1'
             'd3f91fa4b05777c936cb95fbfee04b5955e366755e682368e626d004f07d9c75'
-            'dfffeb04a403e7eeb67e0fd5e611f2e428569b68139324fe7af8dee7e7b7cacb'
             '0b5ae4357c8b383b30235172a10b673eb2bfa5d640cfe86dd0b890d0d8c3dcc0'
-            '07614e2a07ab61e95572da44b22b7a05b14d958ec62f4c400f7527104ff3492f')
+            '07614e2a07ab61e95572da44b22b7a05b14d958ec62f4c400f7527104ff3492f'
+            '4bbab93f96e90aac3ad4c623210dbeab637ed6962abdd4f4ecb10309e0b2f4c8')

 pkgver() {
    cd ${pkgname/-git/}
@@ -38,27 +36,23 @@ pkgver() {
 prepare() {
    cd ${pkgname/-git/}

-   # https://github.com/mariusae/trickle/issues/16
-   patch -Np1 -i ../remove-libtrickle.patch
-
    # https://aur.archlinux.org/packages/trickle-git#comment-885736
    # https://github.com/mariusae/trickle/pull/29
    patch -Np1 -i ../fix-trickle-overload.patch

-   # Fix rpc support, https://github.com/mariusae/trickle/pull/28
-   patch -Np1 -i ../4171f1716eb2e37d36fb9189800c53b83723569d.patch
-
    # Use $libdir for preload object lookup, https://github.com/mariusae/trickle/pull/29
    patch -Np1 -i ../29de2a4704d9843d3c6cba1d4a4ac177f2d6e568.patch

    # https://github.com/mariusae/trickle/issues/34
    # https://bbs.archlinux.org/viewtopic.php?id=295783
    patch -Np1 -i ../trickle-gcc14.patch
+   patch -p1 -i ../atomicio.patch
 }

 build() {
    cd ${pkgname/-git/}

+   export CFLAGS="-Wno-incompatible-pointer-types"
    autoreconf -if
    ./configure --prefix=/usr \
        --mandir=/usr/share/man

and patching atomicio:

atomicio.patch

diff --git a/atomicio.c b/atomicio.c
index 3930a07..81a14a4 100644
--- a/atomicio.c
+++ b/atomicio.c
@@ -37,11 +37,7 @@
  * ensure all of data on socket comes through. f==read || f==write
  */
 ssize_t
-atomicio(f, fd, _s, n)
-   ssize_t (*f) ();
-   int fd;
-   void *_s;
-   size_t n;
+atomicio(ssize_t (*f)(int, const void *, size_t), int fd, const void *_s, size_t n)
 {
    char *s = _s;
    ssize_t res, pos = 0;
diff --git a/util.h b/util.h
index b00059c..f24d0c3 100644
--- a/util.h
+++ b/util.h
@@ -41,7 +41,7 @@
 #define MAX(a, b) ((a) > (b) ? (a) : (b))
 #define MIN(a, b) ((a) < (b) ? (a) : (b))

-ssize_t    atomicio(ssize_t (*)(), int, void *, size_t);
+ssize_t    atomicio(ssize_t (*f)(int, const void *, size_t), int fd, const void *s, size_t n);
 char      *get_progname(char *);



Edit: I hate markdown syntax. "simply indent every line of the block by at least 4 spaces or 1 tab" How about no.

Edit2: Changed URL to Zapeth fork which is a few commits ahead

Segel commented on 2025-07-18 17:35 (UTC)

gcc -DHAVE_CONFIG_H -I.    -Wall -Icompat -I/usr/include/tirpc -ltirpc  -march=native -O3 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -flto=auto -c -o atomicio.o atomicio.c
atomicio.c: In function ‘atomicio’:
atomicio.c:40:1: warning: old-style function definition [-Wold-style-definition]
   40 | atomicio(f, fd, _s, n)
      | ^~~~~~~~
atomicio.c:50:23: error: too many arguments to function ‘f’; expected 0, have 3
   50 |                 res = (f) (fd, s + pos, n - pos);
      |                       ^    ~~
make[1]: *** [Makefile:527: atomicio.o] Error 1
make[1]: Leaving directory '/home/user/.cache/yay/trickle-git/src/trickle'
make: *** [Makefile:410: all] Error 2

Maybe the issue is because newer GCC handles K&R-style functions differently? Not really sure though.

ABelliqueux commented on 2022-11-02 18:49 (UTC) (edited on 2022-11-02 18:59 (UTC) by ABelliqueux)

Building fails with :

make[1]: Entering directory '/tmp/trizen-ab/trickle-git/src/trickle'
/bin/sh ./libtool --mode=link clang -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -o libtmptrickle-overload.so.la                \
    -rpath /usr/lib/trickle strlcat.lo strlcpy.lo trickle-overload.lo bwstat.lo trickledu.lo atomicio.lo xdr.lo -lnsl  -ldl     \
    -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -module -avoid-version -nostdlib -ldl
libtool: link: rm -fr  .libs/libtmptrickle-overload.so.a .libs/libtmptrickle-overload.so.la .libs/libtmptrickle-overload.so.lai
libtool: link: ar cr .libs/libtmptrickle-overload.so.a  strlcat.o strlcpy.o trickle-overload.o bwstat.o trickledu.o atomicio.o xdr.o
libtool: link: ranlib .libs/libtmptrickle-overload.so.a
libtool: link: ( cd ".libs" && rm -f "libtmptrickle-overload.so.la" && ln -s "../libtmptrickle-overload.so.la" "libtmptrickle-overload.so.la" )
cp: cannot stat '.libs/libtmptrickle-overload.so': No such file or directory
make[1]: *** [Makefile:1066: trickle-overload.so] Error 1
make[1]: Leaving directory '/tmp/trizen-ab/trickle-git/src/trickle'
make: *** [Makefile:406: all] Error 2

FWIW, fork from echiu64 builds fine from source : https://github.com/echiu64/trickle

dougvj commented on 2022-10-18 18:43 (UTC)

This admittedly hacky patch fixes the problem for me:

diff --git a/trickle.c b/trickle.c
index 63cc11f..de908da 100644
--- a/trickle.c
+++ b/trickle.c
@@ -51,6 +51,8 @@ main(int argc, char **argv)
        char *trypaths[]  = {
                LIBNAME,
                LIBDIR "/" LIBNAME,
+               "/usr/local/lib/trickle/" LIBNAME,
+               "/usr/lib/trickle/" LIBNAME,
                NULL
        };

Looks like LIBDIR has an unexpanded variable, it looks for ${exec_prefix}/lib/trickle/trickle-overload.so

johnjohn commented on 2022-01-19 12:44 (UTC)

I am having the same issue as @gunar

gunar commented on 2021-10-13 20:02 (UTC)

After install, fails for me:

$ trickle -s -d 100 curl https://archlinux.org
trickle: Could not find overload object

Raansu commented on 2018-05-24 00:23 (UTC)

Thank you for making the change

Raansu commented on 2018-05-23 14:30 (UTC)

I had issues building the non-git version of this package on my Raspberry Pi 3B+ running Arch Linux ARM with a Aarch64 kernel. But this one builds fine. Would you consider adding the following to your PKGBUILD?

arch=('i686' 'x86_64' 'armv6h' 'armv7h' 'aarch64')