Bug 5213

Summary: check on Solaris requires /usr/xpg4/bin/sed
Product: pkg-config Reporter: Diab Jerius <djerius>
Component: srcAssignee: Tollef Fog Heen <tfheen>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: high CC: dmacks
Version: unspecified   
Hardware: SPARC   
OS: Solaris   
Whiteboard:
i915 platform: i915 features:

Description Diab Jerius 2005-12-02 05:22:55 UTC
pkg-config-0.20, Solaris 2.8

/usr/bin/sed doesn't appear to remove all of the trailing blanks in the check
tests, but /usr/xpg4/bin/sed does:

% R=$(env PKG_CONFIG_PATH=. ../pkg-config --static --libs simple)

% echo ">$R<"
>-lsimple -lm  <

% echo '>'$(echo "$R" | /usr/bin/sed -e 's,^[[:space:]]*,,' -e
's,[[:space:]]*$,,')'<'
>-lsimple -lm <

% echo '>'$(echo "$R" | /usr/xpg4/bin/sed -e 's,^[[:space:]]*,,' -e
's,[[:space:]]*$,,')'<'
>-lsimple -lm<
Comment 1 Daniel Macks 2005-12-08 09:19:55 UTC
I wonder if the problem here is that [[:space:]] is not recognized at all? What
if you do   R=" $R" after the initial assignment...does the leading space have
the same problem as the trailing one you noticed?

Sounds like "checking for non-broken sed..." is a good ./configure test, and
then see how sed performs, or else check $host. A bad idea is to use "no ~root
dir" as a surrogate test and force /usr/xpg4/bin/sed based on that, since other
platforms may not have ~root.

Comment 2 Diab Jerius 2006-06-13 14:45:00 UTC
% echo ">$R<"
>-lsimple -lm  <
% R=" $R"
% echo ">$R<"
> -lsimple -lm  <
% echo '>'$(echo "$R" | /usr/bin/sed -e 's,^[[:space:]]*,,' -e
's,[[:space:]]*$,,')'<'
> -lsimple -lm <

looks like [[:space:]] isn't recognized at all.
Comment 3 Tollef Fog Heen 2009-12-06 13:22:20 UTC
This should be fixed in the latest version where we set PATH to what getconf PATH returns.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.