bugmake - Bugs: bug #39825, bad redirection with >

 
 

bug #39825: bad redirection with >

Submitted by:  None
Submitted on:  Tue 20 Aug 2013 01:37:12 PM UTC  
 
Severity:  3 - Normal Item Group:  Bug
Status:  Not A Bug Privacy:  Public
Assigned to:  None Open/Closed:  Closed
Component Version:  3.81 Operating System:  MS Windows
Fixed Release:  None Triage Status:  None

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 22 Aug 2013 03:01:11 PM UTC, comment #5: 

I can explain why sh.exe makes the difference.  GNU Make on Windows always prefers a Unixy shell if it can find it.  If it cannot find it, it uses cmd.exe.

Also, Make does not invoke the shell if there are no shell features, such as quoting and redirection, on the command line it needs to invoke.  That is why objdump worked correctly for you without redirection, even when sh.exe was on PATH.

The conclusion is that your sh.exe did something wrong with redirection, I don't know why.  (In general, the number of non-buggy ports of Unixy shells to Windows is very small.)

Eli Zaretskii <eliz>
Project Member
Thu 22 Aug 2013 08:03:40 AM UTC, comment #4: 

I found sh.exe and renamed it. Now objdump works properly. I can not however explain, why it works now.

Thank you for help and sorry for bad identification, this bug seems to be really connected to sh.exe and not gmake itself.

Anonymous
Wed 21 Aug 2013 03:17:35 PM UTC, comment #3: 

Yes, it's clear now, thanks.

However, I cannot reproduce this problem on my machine, neither with Make 3.80 nor with 3.81.  Redirection or not, objdump works fine for me here.

Is the problem specific to objdump, or does any program fail when redirection is in use?

Do you have a sh.exe somewhere on your PATH?  If so, perhaps remove it from PATH or rename it, and try again.

Eli Zaretskii <eliz>
Project Member
Wed 21 Aug 2013 07:42:09 AM UTC, comment #2: 

If I use objdump inside makefile, arguments are passed incorrectly so objdump thinks that there is no parameter. That is why USAGE is shown.

If I use objdump just from the command line, everything is OK - ELF is not found but that does not matter now.

If I use objdump inside makefile WITHOUT redirection, it works correctly.

So, from my point of view, redirection with '>' does not work correctly in GNU Make.

Hopefully now it is more clear.

Anonymous
Tue 20 Aug 2013 02:36:57 PM UTC, comment #1: 

I'm sorry, but what does objdump have to do with Make?

Is there any problem with Make?  If so, please describe it.

Eli Zaretskii <eliz>
Project Member
Tue 20 Aug 2013 01:37:12 PM UTC, original submission:  

Redirection is badly interpreted on MS Windows in version 3.81 and older (I tried 3.80, too). If I do not use redirection, objdump works correctly from Makefile

D:\>make -version
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for i686-pc-mingw32

D:\>make
arm-none-eabi-objdump -S kvak.elf > kvak.lst
Usage: d:\optm\yagarto\bin\arm-none-eabi-objdump.exe <option(s)> <file(s)>
 Display information from object <file(s)>.
 At least one of the following switches must be given:
  -a, --archive-headers    Display archive header information
  -f, --file-headers       Display the contents of the overall file header
  -p, --private-headers    Display object format specific file header contents
  -h, --[section-]headers  Display the contents of the section headers
  -x, --all-headers        Display the contents of all headers
  -d, --disassemble        Display assembler contents of executable sections
  -D, --disassemble-all    Display assembler contents of all sections
  -S, --source             Intermix source code with disassembly
  -s, --full-contents      Display the full contents of all sections requested
  -g, --debugging          Display debug information in object file
  -e, --debugging-tags     Display debug information using ctags style
  -G, --stabs              Display (in raw form) any STABS info in the file
  -W[lLiaprmfFsoRt] or
  --dwarf[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,

          =frames-interp,=str,=loc,=Ranges,=pubtypes,
          =trace_info,=trace_abbrev,=trace_aranges]
                           Display DWARF info in the file
  -t, --syms               Display the contents of the symbol table(s)
  -T, --dynamic-syms       Display the contents of the dynamic symbol table
  -r, --reloc              Display the relocation entries in the file
  -R, --dynamic-reloc      Display the dynamic relocation entries in the file
  @<file>                  Read options from <file>
  -v, --version            Display this program's version number
  -i, --info               List object formats and architectures supported
  -H, --help               Display this information
make: *** [uIPTest.bin] Error 2

D:\>arm-none-eabi-objdump -S kvak.elf > kvak.lst
arm-none-eabi-objdump: 'kvak.elf': No such file

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by eliz (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-08-22 eliz StatusNone => Not A Bug
        Open/ClosedOpen => Closed

    Back to the top


    Powered by Savane 3.5