From: Richard H Lee <ricardohenrylee@gmail.com>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: dash@vger.kernel.org
Subject: Re: Command parsing problem and tracefile
Date: Fri, 08 Jun 2012 22:20:37 +0100 [thread overview]
Message-ID: <4FD26CA5.6090602@gmail.com> (raw)
In-Reply-To: <20120608171730.GG10380@burratino>
Hi Jonathan,
On 08/06/12 18:17, Jonathan Nieder wrote:
> Thanks for writing. Who is setting _pkg_config to 'pkg-config
> --static', what are they trying to do, and can it be done another way?
I'm compiling mplayer2. I'm basically running ./configure
--enable-static . I assume without the --enable-static flag the
configure script sets _pkg_config to just 'pkg-config' .
I want to try and statically compile it as there is a bug with one of
the libraries. So I'm planning to compile a modified libav library first
and then compile mplayer2 statically against them. I guess I could do it
dynamically, but then I would have modified libraries floating around my
system.
> This doesn't look like a dash-specific phenomenon. I get the same
> result with
>
> $ "pkg-config --static" foo bar
> dash: 1: pkg-config --static: not found
>
> which looks right to me. (You can test with 'CONFIG_SHELL=/bin/ksh
> ksh ./configure'.)
[Note: I don't think CONFIG_SHELL is used here as the configure script
is not autotools generated.]
It didn't occur to me to try other shells. I get the same error with
bash. It makes me wonder why it occurs on three different shells? Is
this defined behaviour? Or they just happen to share the same parsing
code/algorithm.
I also tried running the following script:
<<EOF
#!/bin/sh
_pkg_config='pkg-config --static'
if $_pkg_config --exists --print-errors libavutil ; then
echo success
fi
EOF
Which does print out 'success' (replace libavutil with any other
pkg-config library you have installed). I get the feeling, some sort of
flag was set that changes the parsing behaviour in the configure script.
>> I would like to get some more info as to what in going on. IIRC, I
>> saw in show.c, there was some sort for tracefile that dash to dump
>> to. How do I enable this?
>
> "dash -o debug" after a compile with DEBUG enabled. Though "dash -x"
> tends to be more helpful if you are debugging a shell script rather
> than trying to find a bug in dash itself.
From shell.h:
define DEBUG=1 to compile in debugging ('set -o debug' to turn on)
define DEBUG=2 to compile in and turn on debugging.
When debugging is on, debugging info will be written to ./trace and a
quit signal will generate a core dump.
This is exactly what I was looking for.
As to compiling with DEBUG enabled, how would I do this?
I couldn't see any reference in dash's ./configure --help (nor any clear
reference in the configure file itself).
Thanks,
Richard
next prev parent reply other threads:[~2012-06-08 21:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-08 16:58 Command parsing problem and tracefile Richard H Lee
2012-06-08 17:17 ` Jonathan Nieder
2012-06-08 21:20 ` Richard H Lee [this message]
2012-06-08 21:30 ` Jonathan Nieder
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4FD26CA5.6090602@gmail.com \
--to=ricardohenrylee@gmail.com \
--cc=dash@vger.kernel.org \
--cc=jrnieder@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.