Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Sep 1999 09:27:19 -0700 (PDT)
From:      papowell@astart.com
To:        freebsd-gnats-submit@freebsd.org
Subject:   ports/13729: strip(1) exits with an error on script file - causes severe portability problems
Message-ID:  <19990913162719.9248414CAC@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         13729
>Category:       ports
>Synopsis:       strip(1) exits with an error on script file - causes severe portability problems
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Sep 13 09:30:01 PDT 1999
>Closed-Date:
>Last-Modified:
>Originator:     Patrick Powell
>Release:        3.2-Release, 4-Current
>Organization:
Astart Technologies
>Environment:
>Description:
strip(1) fails with an error when asked to strip shell
scripts.  This behavior is documented as follows:

DESCRIPTION
       GNU strip discards all symbols from the object files
       objfile.  The list of object files may include archives.
       At least one object file must be given.


       strip modifies the files named in its argument, rather
       than writing modified copies under different names.

In many install scripts for code you have:
  $(INSTALL) -s .... 
              ^^^ -s specified for ALL installable executable
              objects including perl scripts, shell, scripts,
              etc.


This requires a huge amount of effort when porting to FreeBSD because
you now have to determine which executables can or cannot be stripped.

I strongly recommend you do a test in the strip code for ALLOWABLE
magic numbers,  strip those,  and ignore the rest.I 
>How-To-Repeat:
strip a shell script - you get an error.
More seri
>Fix:
1. modify man page to indicate that strip only works on object
    files or executable files,  and ignores others
2. modify action so that it checks to see if it has an allowable
     item to strip and then does it.

In the strip code,  find the place where it checks for 'magic numbers'
of allowable executables,  and rather than exiting with a non-zero
error code, simply exit with a 0 error code or continue to the
next file to strip.

>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990913162719.9248414CAC>