Package Details: libfastjson 1.2304.0-1

Git Clone URL: https://aur.archlinux.org/libfastjson.git (read-only, click to copy)
Package Base: libfastjson
Description: A performance-focused json library for C
Upstream URL: https://github.com/rsyslog/libfastjson
Licenses: GPL
Submitter: Barthalion
Maintainer: fordprefect
Last Packager: fordprefect
Votes: 8
Popularity: 0.090728
First Submitted: 2018-01-07 12:39 (UTC)
Last Updated: 2023-07-22 08:47 (UTC)

Latest Comments

1 2 Next › Last »

itamarperdomo commented on 2026-09-02 18:59 (UTC)

for rsyslog this works https://github.com/hartmark/libfastjson-aur perfectly

fordprefect commented on 2026-07-24 06:37 (UTC)

@harre: Thanks for taking the issue upstream, where it belongs. As a fixed release sounds likely, I'll wait for that.

harre commented on 2026-07-22 21:58 (UTC)

@fordprefect no worries, I just thought didn't maintain the package any more as it was a month ago it stopped working. I thought the out-of-date was to flag the package that it is no longer buildable.

It seems debian picked the fix already and a new release is probably on the way https://github.com/rsyslog/libfastjson/pull/171

fordprefect commented on 2026-07-22 20:20 (UTC)

@Harre: please don't flag packages out-of-date for build issues. I'll look into your fixes and pull them in case. An outright orphan request is pretty rude, imo.

harre commented on 2026-07-22 20:00 (UTC) (edited on 2026-07-22 20:03 (UTC) by harre)

sent request for orphan here's working build in the meantime https://github.com/hartmark/libfastjson-aur

thx1138 commented on 2026-07-01 01:17 (UTC) (edited on 2026-07-01 01:20 (UTC) by thx1138)

With a little help from Google AI, and running updpkgsums, it is not necessary, and better to not use, the libfastjson.pc.in.patch file in fixing the rsyslog seg fault. Just add the configure.ac.patch. The resulting PKGBUILD is:

pkgname=libfastjson
pkgver=1.2304.0
pkgrel=1
pkgdesc="A performance-focused json library for C"
arch=('x86_64' 'i686' 'aarch64' 'armv7h')
url="https://github.com/rsyslog/libfastjson"
license=('GPL')
source=("$pkgname-$pkgver.tar.gz::https://github.com/rsyslog/$pkgname/archive/v$pkgver.tar.gz"
                "configure.ac.patch")
sha256sums=('6c18848c75b179108429fc2818273551c68ffe6ddd5e414c20c071c844befbc1'
            'a853d4d09ffcdd62fb60521d4f6f08080ac7f05873e858de82f9099ba6ee60b4')

prepare() {
  cd "$pkgname-$pkgver"
  patch -Np1 -i "$srcdir/configure.ac.patch"
  autoreconf -fiv
}

build() {
  cd "$pkgname-$pkgver"
  autoreconf -fvi
  ./configure --prefix=/usr
  make
}

package() {
  cd "$pkgname-$pkgver"
  make DESTDIR="$pkgdir/" install
}

The prepare() section, especially with the autoreconf -fvi is essential.

Verify the new libfastjson package with:

$ objdump -x /usr/lib/libfastjson.so.4 | grep NEEDED | grep libm
  NEEDED               libm.so.6

You may need to rebuild the rsyslog package. Then run $ rsyslogd -dn, which should no longer seg fault.

Many thanks to @Network_Jack!

Network_Jack commented on 2026-06-30 06:11 (UTC)

This was fixed in this branch here:

https://github.com/rsyslog/libfastjson/pull/171

libfastjson.pc.in.patch

@@ -8,5 +8,5 @@
 Version: @VERSION@
 Requires:
 Libs.private: @LIBS@
-Libs:  -L${libdir} -lfastjson
+Libs:  -L${libdir} -lfastjson -lm
 Cflags: -I${includedir}/libfastjson

configure.ac.patch

@@ -105,9 +105,8 @@ AC_FUNC_VPRINTF
 AC_FUNC_MEMCMP
 AC_CHECK_FUNCS(strcasecmp strdup strerror snprintf vsnprintf vasprintf open vsyslog strncasecmp setlocale)

-if test "$ac_cv_have_decl_isnan" = "yes" ; then
-   AC_TRY_LINK([#include <math.h>], [float f = 0.0; return isnan(f)], [], [LIBS="$LIBS -lm"])
-fi
+# Force linking against libm (needed for modf on glibc >= 2.42)
+AC_CHECK_LIB([m], [modf], [LIBS="$LIBS -lm"],[AC_MSG_ERROR([libm (math library) is required for modf()])])

 #check if .section.gnu.warning accepts long strings (for __warn_references)
 AC_LANG_PUSH([C])

Add to PKGBUILD

sha256sums=('6c18848c75b179108429fc2818273551c68ffe6ddd5e414c20c071c844befbc1'
            'ed19a261247da18763f2b7b3064c538894a6fd82b74cc713f984594776db289a'
            'f4d4312a0a03fc39eb8acf1b4d633386c2de18b1229c72ce93b591f62b6f0ea2')

prepare(){
  cd "$pkgname-$pkgver"
  patch -N libfastjson.pc.in ../libfastjson.pc.in.patch
  patch -N configure.ac ../configure.ac.patch
}

IOAOI commented on 2025-08-20 14:14 (UTC)

$ sudo rc-service rsyslogd restart rsyslogd | * Starting rsyslogd ... rsyslogd |/usr/bin/rsyslogd: Relink /usr/lib/libfastjson.so.4' with/usr/lib/libm.so.6' for IFUNC symbol modf' rsyslogd | * start-stop-daemon: failed to start/usr/bin/rsyslogd' rsyslogd | * Failed to start rsyslogd [ !! ] rsyslogd | * ERROR: rsyslogd failed to start