icedtea7-2.3.2 fails with pkgconf due to not finding xproto #40

Closed
opened 2012-09-03 11:05:20 +00:00 by Dessa · 2 comments
Dessa commented 2012-09-03 11:05:20 +00:00 (Migrated from github.com)

(sorry for too specific example, i have just not seen it anywhere else, feel free to stab me if its upstream stupidness, anyway)

with pkgconfig xproto is found, with pkgconf (latest git) not.

pc file looks like that:

prefix=/usr
exec_prefix=${prefix}
libdir=/usr/lib64
includedir=${prefix}/include
includex11dir=${prefix}/include/X11

Name: Xproto
Description: Xproto headers
Version: 7.0.23
Cflags: -I${includedir}

what configure is doing is (thats what i at least see in config.log):
$PKG_CONFIG --exists --print-errors "xproto"
returncode of that is 0

the whole configure check is below, maybe you can figure out what what is broken, can't see anything wrong there.

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XPROTO" >&5
$as_echo_n "checking for XPROTO... " >&6; }

if test -n "$XPROTO_CFLAGS"; then
    pkg_cv_XPROTO_CFLAGS="$XPROTO_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xproto\""; } >&5
  ($PKG_CONFIG --exists --print-errors "xproto") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_XPROTO_CFLAGS=`$PKG_CONFIG --cflags "xproto" 2>/dev/null`
              test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$XPROTO_LIBS"; then
    pkg_cv_XPROTO_LIBS="$XPROTO_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xproto\""; } >&5
  ($PKG_CONFIG --exists --print-errors "xproto") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_XPROTO_LIBS=`$PKG_CONFIG --libs "xproto" 2>/dev/null`
              test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
            XPROTO_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "xproto" 2>&1`
        else
            XPROTO_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "xproto" 2>&1`
        fi
    # Put the nasty error message in config.log where it belongs
    echo "$XPROTO_PKG_ERRORS" >&5

    XPROTO_FOUND=no
elif test $pkg_failed = untried; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
    XPROTO_FOUND=no
else
    XPROTO_CFLAGS=$pkg_cv_XPROTO_CFLAGS
    XPROTO_LIBS=$pkg_cv_XPROTO_LIBS
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
    XPROTO_FOUND=yes
fi
if test "x${XPROTO_FOUND}" = xno
then
  as_fn_error $? "Could not find Xproto headers - \
  Try installing xorg-x11-proto-devel." "$LINENO" 5
fi

(sorry for too specific example, i have just not seen it anywhere else, feel free to stab me if its upstream stupidness, anyway) with pkgconfig xproto is found, with pkgconf (latest git) not. pc file looks like that: ``` prefix=/usr exec_prefix=${prefix} libdir=/usr/lib64 includedir=${prefix}/include includex11dir=${prefix}/include/X11 Name: Xproto Description: Xproto headers Version: 7.0.23 Cflags: -I${includedir} ``` what configure is doing is (thats what i at least see in config.log): $PKG_CONFIG --exists --print-errors "xproto" returncode of that is 0 the whole configure check is below, maybe you can figure out what what is broken, can't see anything wrong there. ``` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XPROTO" >&5 $as_echo_n "checking for XPROTO... " >&6; } if test -n "$XPROTO_CFLAGS"; then pkg_cv_XPROTO_CFLAGS="$XPROTO_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xproto\""; } >&5 ($PKG_CONFIG --exists --print-errors "xproto") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_XPROTO_CFLAGS=`$PKG_CONFIG --cflags "xproto" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$XPROTO_LIBS"; then pkg_cv_XPROTO_LIBS="$XPROTO_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xproto\""; } >&5 ($PKG_CONFIG --exists --print-errors "xproto") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_XPROTO_LIBS=`$PKG_CONFIG --libs "xproto" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then XPROTO_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "xproto" 2>&1` else XPROTO_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "xproto" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$XPROTO_PKG_ERRORS" >&5 XPROTO_FOUND=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } XPROTO_FOUND=no else XPROTO_CFLAGS=$pkg_cv_XPROTO_CFLAGS XPROTO_LIBS=$pkg_cv_XPROTO_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } XPROTO_FOUND=yes fi if test "x${XPROTO_FOUND}" = xno then as_fn_error $? "Could not find Xproto headers - \ Try installing xorg-x11-proto-devel." "$LINENO" 5 fi ```

Oops. Typo'd.

Oops. Typo'd.

I am unable to reproduce this issue:

rabbit:~/dev-src/pkgconf$ ./pkgconf --exists --print-errors xproto
rabbit:~/dev-src/pkgconf$ echo $?
0
rabbit:~/dev-src/pkgconf$ pkg-config --exists --print-errors xproto
rabbit:~/dev-src/pkgconf$ echo $?
0
I am unable to reproduce this issue: ``` rabbit:~/dev-src/pkgconf$ ./pkgconf --exists --print-errors xproto rabbit:~/dev-src/pkgconf$ echo $? 0 rabbit:~/dev-src/pkgconf$ pkg-config --exists --print-errors xproto rabbit:~/dev-src/pkgconf$ echo $? 0 ```
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: ariadne/pkgconf#40
There is no content yet.