bitlbee icon indicating copy to clipboard operation
bitlbee copied to clipboard

Support using system libjsonparser

Open jelmer opened this issue 3 years ago • 8 comments

Support using system libjsonparser.

jelmer avatar Aug 30 '20 20:08 jelmer

Not sure if this is safe. We're using a version from 2014 with a few bugfixes from our side. I'd prefer to update the bundled version and have that everywhere instead of having debian use a different version.

dequis avatar Sep 01 '20 09:09 dequis

So there is only Debian in the world?

Thaodan avatar Sep 30 '20 18:09 Thaodan

Jelmer is the debian maintainer of the bitlbee package.

dequis avatar Oct 01 '20 07:10 dequis

Sure but this isn't about debian but about everyone that uses bitlbee

Thaodan avatar Oct 01 '20 07:10 Thaodan

@Thaodan What prompted that comment, do you have other reasons for wanting to use the system libjsonparser?

jelmer avatar Oct 01 '20 09:10 jelmer

@Thaodan What prompted that comment, do you have other reasons for wanting to use the system libjsonparser?

Just wondered if it makes sense to use system libjsonparser on all systems if it does make sense on Debian.

Thaodan avatar Dec 25 '21 00:12 Thaodan

For security reasons it may make sense for other distribution as well to use the system version rather than having to keep the bundled version up to date.

jelmer avatar Dec 31 '21 23:12 jelmer

I get following error with this PR

./configure: line 160: external-json-parser=1: command not found

It is probably due to dashes in parameter. I works for me when I change it to --externaljsonparser=0/1/auto and all $external_json_parser to $externaljsonparser.

arkamar avatar Aug 01 '22 13:08 arkamar

It is not possible to build tests with this change, the make check fails with following error:

* Linking check
gcc -O2 -pipe -I/var/tmp/portage/net-im/bitlbee-3.6-r3/work/bitlbee-3.6 -I/var/tmp/portage/net-im/bitlbee-3.6-r3/work/bitlbee-3.6/lib -I/var/tmp/portage/net-im/bitlbee-3.6-r3/work/bitlbee-3.6/protocols -I. -DHAVE_CONFIG_H -D_GNU_SOURCE -Wall -Wformat -Werror=format-security -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -pthread  -I/usr/include/json-parser  -MMD -MF .depend/check.d -pthread  -o check check.o check_util.o check_nick.o check_md5.o check_arc.o check_irc.o check_help.o check_user.o check_set.o check_jabber_sasl.o check_jabber_util.o ../bitlbee.o ../conf.o ../dcc.o ../help.o ../ipc.o ../irc.o ../irc_cap.o ../irc_channel.o ../irc_commands.o ../irc_im.o ../irc_send.o ../irc_user.o ../irc_util.o ../log.o ../nick.o ../query.o ../root_commands.o ../set.o ../storage.o ../storage_xml.o ../auth.o ../protocols/protocols.o ../lib/lib.o -lcheck  -Wl,-O1 -Wl,--as-needed -lm -Wl,-O1 -Wl,--as-needed -Wl,--export-dynamic -lgmodule-2.0 -pthread -lglib-2.0 -lglib-2.0  -Wl,-O1 -Wl,--as-needed -lgnutls  -lgcrypt -lgpg-error -Wl,-O1 -Wl,--as-needed -lresolv -Wl,-O1 -Wl,--as-needed
/usr/lib/gcc/x86_64-pc-linux-gnu/11.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: ../lib/lib.o: in function `oauth2_access_token_done':
oauth2.c:(.text+0x4eb7): undefined reference to `json_parse'
/usr/lib/gcc/x86_64-pc-linux-gnu/11.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: oauth2.c:(.text+0x4ee0): undefined reference to `json_value_free'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:23: check] Error 1
make[1]: Leaving directory '/var/tmp/portage/net-im/bitlbee-3.6-r3/work/bitlbee-3.6/tests'
make: *** [Makefile:65: check] Error 2

arkamar avatar Aug 18 '22 09:08 arkamar

It is not possible to build tests with this change, the make check fails with following error:

* Linking check
gcc -O2 -pipe -I/var/tmp/portage/net-im/bitlbee-3.6-r3/work/bitlbee-3.6 -I/var/tmp/portage/net-im/bitlbee-3.6-r3/work/bitlbee-3.6/lib -I/var/tmp/portage/net-im/bitlbee-3.6-r3/work/bitlbee-3.6/protocols -I. -DHAVE_CONFIG_H -D_GNU_SOURCE -Wall -Wformat -Werror=format-security -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -pthread  -I/usr/include/json-parser  -MMD -MF .depend/check.d -pthread  -o check check.o check_util.o check_nick.o check_md5.o check_arc.o check_irc.o check_help.o check_user.o check_set.o check_jabber_sasl.o check_jabber_util.o ../bitlbee.o ../conf.o ../dcc.o ../help.o ../ipc.o ../irc.o ../irc_cap.o ../irc_channel.o ../irc_commands.o ../irc_im.o ../irc_send.o ../irc_user.o ../irc_util.o ../log.o ../nick.o ../query.o ../root_commands.o ../set.o ../storage.o ../storage_xml.o ../auth.o ../protocols/protocols.o ../lib/lib.o -lcheck  -Wl,-O1 -Wl,--as-needed -lm -Wl,-O1 -Wl,--as-needed -Wl,--export-dynamic -lgmodule-2.0 -pthread -lglib-2.0 -lglib-2.0  -Wl,-O1 -Wl,--as-needed -lgnutls  -lgcrypt -lgpg-error -Wl,-O1 -Wl,--as-needed -lresolv -Wl,-O1 -Wl,--as-needed
/usr/lib/gcc/x86_64-pc-linux-gnu/11.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: ../lib/lib.o: in function `oauth2_access_token_done':
oauth2.c:(.text+0x4eb7): undefined reference to `json_parse'
/usr/lib/gcc/x86_64-pc-linux-gnu/11.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: oauth2.c:(.text+0x4ee0): undefined reference to `json_value_free'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:23: check] Error 1
make[1]: Leaving directory '/var/tmp/portage/net-im/bitlbee-3.6-r3/work/bitlbee-3.6/tests'
make: *** [Makefile:65: check] Error 2

I've fixed this in the updated branch.

jelmer avatar Aug 20 '22 00:08 jelmer

Thanks, now it works for me.

arkamar avatar Aug 20 '22 08:08 arkamar

Hrm, sorry I've (more or less) abandoned BitlBee by now but this one popped up again due to this recent activity.

I guess you were waiting for dx or me to hit merge for 2y? :(

Wilm0r avatar Aug 21 '22 23:08 Wilm0r