pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/49557: rrdtool-1.4.9 fails to work with glib2+pcre



>Number:         49557
>Category:       pkg
>Synopsis:       rrdtool-1.4.9 fails to work with glib2+pcre
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jan 12 10:00:00 +0000 2015
>Originator:     Havard Eidnes
>Release:        NetBSD 6.1.5
>Organization:
	NORDUnet
>Environment:
System: NetBSD stats3.nordu.net 6.1.5 NetBSD 6.1.5 (SD_VMT_TWEAK) #0: Tue Oct 21 14:11:39 CEST 2014  root%stats3.nordu.net@localhost:/usr/obj/sys/arch/i386/compile/SD_VMT_TWEAK i386
Architecture: i386
Machine: i386
>Description:
	Upgrading just rrdtool from version 1.4.8 to 1.4.9 causes it
	to no longer work.  The error symptom is that glib2 emits this
	warning:

(process:8319): GLib-CRITICAL **: PCRE library is compiled without UTF8 support

(process:8319): GLib-CRITICAL **: PCRE library is compiled without UTF8 properties support

	and rrdtool itself emits an error message saying

Error making RRD graph: cannot compile regular expression: PCRE library is compiled with incompatible options (^(?:[^%]+|%%)*%[-+ 0#]?[0-9]*(?:[.][0-9]+)?l[eEfFgG](?:[^%]+|%%)*(?:%s)?(?:[^%]+|%%)*$)

	This is some of the new checking code in rrdtool which calls
	into glib2 for regexp matching.  The strange thing is that if
	I make a tiny test program to try to replicate the error:

--------------------
#include <stdio.h>
#include <glib.h>

#define PATTERN "(^(?:[^%]+|%%)*%[-+ 0#]?[0-9]*(?:[.][0-9]+)?l[eEfFgG](?:[^%]+|%%)*(?:%s)?(?:[^%]+|%%)*$)"

int
main(int argc, char **argv)
{
        GRegex *re;
        GError *err;

        err = NULL;
        re = g_regex_new(PATTERN, G_REGEX_EXTENDED, 0, &err);
        if (err != NULL) {
                printf("Cannot compile RE: %s\n", err->message);
        }
        if (re == NULL) {
                printf("g_regex_new() returned NULL\n");
        }

        return 0;
}
--------------------

	and build and run this with

	-I /usr/pkg/include
	-I /usr/pkg/include/glib2/glib-2.0
	-I /usr/pkg/lib/glib-2.0/include

	and link with

	-R /usr/pkg/lib
	-L /usr/pkg/lib
	-lglib-2.0 -lpcre

	and run the result, nothing happens, as in no error message is
	emitted.

	I've traced the origin of the glib2 error messages above to
	glib2's glib/gregex.c's g_regex_new(), which is also called by
	the test program above.
	
	I must admit that at this point I don't understand what is
	going on, and why g_regex_new() fails when called from rrdtool
	but succeeds when called from my tiny test program.


>How-To-Repeat:
	Install rrdtool-1.4.9, watch it fail.
	
>Fix:
	Sorry, don't know.	



Home | Main Index | Thread Index | Old Index