While trying to stabilize =www-servers/lighttpd-1.4.31, bug #430902, I hit this issue since rrdtool is a dep of libhttpd. The problem has to do with the way pkgconf and pkg-config return a "no flags" answer to LUA_CFLAGS=`$PKGCONFIG --cflags $f 2>/dev/null` on line 772 of rrdtool-1.4.5-r1's configure.ac. This is supposed to be "blank" but not empty, so that later on line 790, the test # if not set with pkg-config, use default values if test "$LUA_CFLAGS" = ""; then fails for pkg-config but succeeds for pkgconf. rrdtool's configure.ac assumes that if $PKGCONFIG --cflags succeeds in running, but does not return any cflags, then a single blank space is returned. pkg-config provides this behaviour while pkgconf does not. When that test passes, then LUA_INSTALL_CMOD is set to the /usr/local/ path causing the problem. The easiest way to demonstrate the different behavior is as follows: # echo "|`pkg-config --cflags lua`|" | | # echo "|`pkgconf --cflags lua`|" ||
Is there any standard to which pkgconfig must conform?
(In reply to comment #1) > Is there any standard to which pkgconfig must conform? http://cgit.freedesktop.org/pkg-config/tree/pkg-config-guide.html and http://cgit.freedesktop.org/pkg-config/tree/pkg-config.1 are probably the closest that pkgconfig has to a specification.
(In reply to comment #2) > (In reply to comment #1) > > Is there any standard to which pkgconfig must conform? > > http://cgit.freedesktop.org/pkg-config/tree/pkg-config-guide.html and > http://cgit.freedesktop.org/pkg-config/tree/pkg-config.1 are probably the > closest that pkgconfig has to a specification. nod, those are it. pkgconf needs to be fixed to get same result.
Created attachment 326492 [details, diff] Make sure at least one space is printted for cflags/libs I've looked at all the specific pkg-config database fields and compared pkgconf to pkg-config. Of these, its seems only the following must print out at least one space: --cflags print required CFLAGS to stdout --cflags-only-I print required include-dir CFLAGS to stdout --cflags-only-other print required non-include-dir CFLAGS to stdout --libs print required linker flags to stdout --libs-only-L print required LDPATH linker flags to stdout --libs-only-l print required LIBNAME linker flags to stdout --libs-only-other print required other linker flags to stdout Digging through all their linked lists, I came up with a very simple solution. Just make sure at least one space is printed out for any --cflags* or --libs*. This can't go wrong :) I'll push it upstream.
Created attachment 326506 [details, diff] Improved patch format for committing to git
Comment on attachment 326506 [details, diff] Improved patch format for committing to git jdhore is on devaway, so I will handle this bug. net-analyzer/rrdtool-1.4.5-r1 fails to build on my system in what is likely another bug. net-analyzer/rrdtool-1.4.7-r1 works perfectly. This issue appears to have already been fixed in pkgconf 0.8.9. I have committed dev-util/pkgconf-0.8.9 to portage. I will leave this bug open until dev-util/pkgconf-0.8.9 is stabilized.
(In reply to comment #6) > Comment on attachment 326506 [details, diff] [details, diff] > Improved patch format for committing to git > > jdhore is on devaway, so I will handle this bug. > > net-analyzer/rrdtool-1.4.5-r1 fails to build on my system in what is likely > another bug. net-analyzer/rrdtool-1.4.7-r1 works perfectly. > > This issue appears to have already been fixed in pkgconf 0.8.9. I have > committed dev-util/pkgconf-0.8.9 to portage. I will leave this bug open > until dev-util/pkgconf-0.8.9 is stabilized. Hurricane Sandy caused me to get behind on handling bugs. Anyway, bug #443788 has been opened to ahndle stabilization. I am closing this as fixed.