[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Minor but annoying bug in ld.so.conf/ld.so.conf.d parsing in libtool
From: |
Ralf Wildenhues |
Subject: |
Re: Minor but annoying bug in ld.so.conf/ld.so.conf.d parsing in libtool.m4 |
Date: |
Tue, 28 Mar 2006 10:27:32 +0200 |
User-agent: |
Mutt/1.5.11 |
Hi Orion,
* Orion Poplawski wrote on Tue, Mar 28, 2006 at 01:07:49AM CEST:
>
> lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2));
> skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf |
> $SED -e 's/#.*//;s/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr
> '\n' ' '`
>
> outputs:
>
> cat: ld.so.conf.d/*.conf: No such file or directory
>
> when /etc/ld.so.conf contains:
>
> include ld.so.conf.d/*.conf
>
> and /etc/ld.so.conf.d/ is empty. So you get:
>
> checking dynamic linker characteristics... cat: ld.so.conf.d/*.conf: No
> such file or directory
> GNU/Linux ld.so
>
> which is kind of annoying though ultimately harmless.
Thanks for reporting this. How about this instead?
lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null",
\$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf |
$SED -e 's/#.*//;s/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
Please note the \t should be an actual TAB as the former is not
portable sed; and also you'll have encountered the need for M4
escaping within libtool.m4.
Cheers,
Ralf