Menu

#985 Problem with "`cmd ...` $var ..."

MSYS
pending
None
later
Known_bugs
2013-02-04
2006-11-24
No

Hi guys,

I'm using an MSYS + GnuWin32 environment to compile the entire Gtk suite. Works great, until I launch the Gtk configure script. The problem seems to be because of the shell but I cannot really understand why it fails in this one case and nowhere else.

I'm attaching a tiny script which fails the same way to show what happens. (well... hopefully you can reproduce the problem!) Let me know if I can help. The shell code is a bit out of my scope right now... and it probably isn't too easy to fix such a bug!

The attached file also includes the MSYS & Shell versions.

Thank you,
Alexis Wilke

Discussion

  • Alexis Wilke

    Alexis Wilke - 2006-11-24

    Small script which fails because it inserts a Ctrl-A in the output

     
  • Earnie Boyd

    Earnie Boyd - 2006-11-24
    • status: open --> pending
     
  • SourceForge Robot

    Logged In: YES
    user_id=1312539
    Originator: NO

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 30 days (the time period specified by
    the administrator of this Tracker).

     
  • SourceForge Robot

    • status: pending --> closed
     
  • Alexis Wilke

    Alexis Wilke - 2006-12-29

    Logged In: YES
    user_id=554061
    Originator: YES

    Hi Earnie,

    I finally checked out this problem with version 1.0.11 and the 2006 fix to the dll (and tar/ps tools thought these have nothing to do with it.) Maybe I'm missing something?!

    I created a tarball that you can download from my ftp site here:

    ftp://ftp.m2osw.com/misc/MSYS-break.tar.bz2

    This is a large file (about 3Mb) which includes the whole test and MSYS 1.0.11. That way you can see whether I have the correct files. If you have problems downloading it, let me know and I will only put the extras I added to run my test.

    To run the test, start rxvt and then type the following:

    export PATH=/mingw/bin:/bin
    ./reproduce.sh

    I assume you won't cd anywhere, the reproduce script is in /bin.

    I did check pkg-config inside out (and I can tell you that's quite a piece of ugly code!!!) and there is no bug in pkg-config. The problem is in the handling of the variable in the shell.

    Let me know if you need more info.

    Thank you,
    Alexis

     
  • Alexis Wilke

    Alexis Wilke - 2006-12-29
    • status: closed --> open
     
  • Earnie Boyd

    Earnie Boyd - 2012-10-26

    This is still an issue. The work around is to create a script like so.

    <file name=”/mingw/bin/pkg-config”>
    <contents>
    #! /bin/sh

    echo `pkg-config.exe “$@”`
    </contents>
    </file>

     
  • Earnie Boyd

    Earnie Boyd - 2012-10-26
    • assigned_to: earnie --> cstrauss
    • status: open --> pending-remind
     
  • Earnie Boyd

    Earnie Boyd - 2013-02-04
    • labels: MSYS -->
    • status: pending-remind --> pending
    • resolution: --> later
    • category: --> Known_bugs
    • milestone: component_package --> MSYS
     
  • Keith Marshall

    Keith Marshall - 2013-02-04

    Am I missing something? I don't have time to research this, but isn't it a manifestation of the issue where command expansion with output from native (CRLF) tools substituted Ctrl-A for CR in the substitution text, when the substitution was a non-terminal substring of an enclosing quoted argument? I thought that disappeared when we moved from bash-2.x to bash-3.x