bugGNU Octave - Bugs: bug #55281, [MXE Octave] Cannot strip script...

 
 

bug #55281: [MXE Octave] Cannot strip script files

Submitter:  Avinoam Kalma <avinoam>
Submitted:  Tue 25 Dec 2018 09:42:34 PM UTC
   
 
Category:  Configuration and Build System Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Avinoam Open/Closed:  * Closed
Release:  * 5.0.0 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Mon 31 Dec 2018 04:34:02 PM UTC, comment #12: 
Rik <rik5>
Group administrator
Mon 31 Dec 2018 03:05:38 PM UTC, comment #11: 

The fix worked.
Marking as fixed and closing.

Avinoam Kalma <avinoam>
Group Member
Mon 31 Dec 2018 12:35:56 AM UTC, comment #10: 

Marking as Ready for Test by Avinoam.

Rik <rik5>
Group administrator
Sun 30 Dec 2018 11:50:38 PM UTC, comment #9: 

I pushed it up

John Donoghue <lostbard>
Group Member
Sun 30 Dec 2018 10:57:12 PM UTC, comment #8: 

I can't push to mxe-octave (at least I don't know how).

Markus Mützel <mmuetzel>
Group administrator
Sun 30 Dec 2018 09:32:16 PM UTC, comment #7: 

@Markus: The patch looks good.  I don't have a working MXE build directory anymore so can you push the changes and have Avinoam verify that it works?

Rik <rik5>
Group administrator
Sun 30 Dec 2018 02:30:56 PM UTC, comment #6: 

The attached patch should run on any POSIX-compatible system. Thanks for the hint to head [1] and cut [2].

If I understand correctly, using "head" to read the first line of a binary file could potentially be quite slow (if the first LF character happens to occur very late in a very large file). But I don't know of any POSIX-compatible syntax to read only a certain number of bytes from a file.
FWIW, I didn't notice any slowdown on my system.

[1]: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/head.html
[2]: https://pubs.opengroup.org/onlinepubs/007904875/utilities/cut.html

(file #45789)

Markus Mützel <mmuetzel>
Group administrator
Sun 30 Dec 2018 01:33:33 PM UTC, comment #5: 

Are head and cut portable?  You could string those together easily enough and avoid read completely.

Rik <rik5>
Group administrator
Sun 30 Dec 2018 01:27:11 PM UTC, comment #4: 

Something like this is probably the right idea but "read -n" is not portable shell.  It won't work on FreeBSD or OpenBSD platforms.

@Markus: Can you rework the patch?

Rik <rik5>
Group administrator
Fri 28 Dec 2018 08:09:23 PM UTC, comment #3: 

Using your patch, there was no warning at the end.

Avinoam Kalma <avinoam>
Group Member
Fri 28 Dec 2018 10:59:49 AM UTC, comment #2: 

The attached patch checks all files if they start with a shebang #! and omits stripping files that do.

I don't know how portable this shell script magic is. But it works on my Ubuntu 18.10.

(file #45757)

Markus Mützel <mmuetzel>
Group administrator
Thu 27 Dec 2018 01:34:42 PM UTC, comment #1: 

That started appearing a while ago after an update of gdb, where for whatever reason they renamed a a script file to an exe exension.

The easiest thing to do in the case is filter out gdb-add-index.exe from the list of files that get stripped.


John Donoghue <lostbard>
Group Member
Tue 25 Dec 2018 09:42:34 PM UTC, original submission:  


At the end of the build of MXE-Octave I get


stripping files...
/home/avinoam/mxe-octave/usr/bin/x86_64-w64-mingw32-strip:/home/avinoam/mxe-octave/dist/octave-2018-12-25-07-54-w64-64/mingw64/bin/gdb-add-index.exe: File format not recognized
no octave wrapper scripts to install for this system...


The octave exe is build well.

See also bug #55262.

Avinoam Kalma <avinoam>
Group Member

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #45789:  bug55281_strip_no_scripts_v2.patch added by mmuetzel (898B - application/octet-stream)
file #45757:  bug55281_strip_no_scripts.patch added by mmuetzel (910B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by mmuetzel (Updated the item)
  • -email is unavailable- added by lostbard (Posted a comment)
  • -email is unavailable- added by avinoam (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-12-31 avinoam StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2018-12-31 rik5 StatusPatch Reviewed Ready For Test
    2018-12-30 mmuetzel Attached File- Added bug55281_strip_no_scripts_v2.patch, #45789
    2018-12-28 avinoam StatusPatch Submitted Patch Reviewed
    2018-12-28 mmuetzel Attached File- Added bug55281_strip_no_scripts.patch, #45757
        StatusNone Patch Submitted
        Summary[MXE Octave] - warning at the end of the building. [MXE Octave] Cannot strip script files
    2018-12-25 avinoam Summary]MXE Octave] - warning at the end of the building. [MXE Octave] - warning at the end of the building.

    Back to the top

    Powered by Savane 3.13-cf05.
    Corresponding source code