From rfg@tristatelogic.com  Sat Nov  3 03:54:21 2012
Return-Path: <rfg@tristatelogic.com>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id BD9321E7
	for <FreeBSD-gnats-submit@freebsd.org>; Sat,  3 Nov 2012 03:54:21 +0000 (UTC)
	(envelope-from rfg@tristatelogic.com)
Received: from outgoing.tristatelogic.com (segfault.tristatelogic.com [69.62.255.118])
	by mx1.freebsd.org (Postfix) with ESMTP id 8A9398FC08
	for <FreeBSD-gnats-submit@freebsd.org>; Sat,  3 Nov 2012 03:54:21 +0000 (UTC)
Received: by segfault.tristatelogic.com (Postfix, from userid 1237)
	id CA53C5081D; Fri,  2 Nov 2012 20:54:20 -0700 (PDT)
Message-Id: <20121103035420.CA53C5081D@segfault.tristatelogic.com>
Date: Fri,  2 Nov 2012 20:54:20 -0700 (PDT)
From: Ronald F.Guilmette <rfg@tristatelogic.com>
Reply-To: Ronald F.Guilmette <rfg@tristatelogic.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc: rfg@tristatelogic.com
Subject: multimedia/ffmpeg - install with debug info crashes & burns
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         173319
>Category:       ports
>Synopsis:       multimedia/ffmpeg - install with debug info crashes & burns
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    wg
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Nov 03 04:00:00 UTC 2012
>Closed-Date:    
>Last-Modified:  Mon Nov 11 20:00:00 UTC 2013
>Originator:     Ronald F. Guilmette
>Release:        FreeBSD 8.3-RELEASE amd64
>Organization:
entr0py
>Environment:

FreeBSD 8.3-RELEASE GENERIC amd64

>Description:

I was trying to build & install the ffmpeg port with full debugging symbols
(-g).  Note that normally, one has to suppress the default stripping of
the debug symbols on install also if one really wants the debugging info
to be present within the various parts of the installed port.

Online sources suggest that the proper way to (re)install a port with
full debug info is as follows:

	make clean
	make deinstall
	make WITH_DEBUG=yes STRIP= reinstall

(I don't know if this is really correct procedure or not, but it looks
correct.)

So anyway, I did the above with (current?) ffmpeg-0.7.13_6,1 and the
result was a failure to complete the (re)install step:

===>  Installing for ffmpeg-0.7.13_6,1
===>   ffmpeg-0.7.13_6,1 depends on shared library: aacplus.2 - found
===>   ffmpeg-0.7.13_6,1 depends on shared library: faac.0 - found
===>   ffmpeg-0.7.13_6,1 depends on shared library: freetype.9 - found
===>   ffmpeg-0.7.13_6,1 depends on shared library: mp3lame.0 - found
===>   ffmpeg-0.7.13_6,1 depends on shared library: opencv_imgproc.2 - found
===>   ffmpeg-0.7.13_6,1 depends on shared library: openjpeg.2 - found
===>   ffmpeg-0.7.13_6,1 depends on shared library: schroedinger-1.0.11 - found
===>   ffmpeg-0.7.13_6,1 depends on shared library: theora.0 - found
===>   ffmpeg-0.7.13_6,1 depends on shared library: va.1 - found
===>   ffmpeg-0.7.13_6,1 depends on shared library: vorbisenc.2 - found
===>   ffmpeg-0.7.13_6,1 depends on shared library: vpx.1 - found
===>   ffmpeg-0.7.13_6,1 depends on shared library: x264.125 - found
===>   ffmpeg-0.7.13_6,1 depends on shared library: xvidcore.4 - found
===>   Generating temporary packing list
INSTALL doc/ffmpeg.1
INSTALL doc/ffprobe.1
INSTALL libavdevice/libavdevice.a
INSTALL libavdevice/libavdevice.so
STRIP   install-libavdevice-shared
gmake: *** [install-libavdevice-shared] Segmentation fault: 11 (core dumped)
*** Error code 2

Stop in /usr/ports/multimedia/ffmpeg.
*** Error code 1

Stop in /usr/ports/multimedia/ffmpeg.
*** Error code 1

Stop in /usr/ports/multimedia/ffmpeg.


>How-To-Repeat:

See above.

Basically just:

cd /usr/ports/multimedia/ffmpeg
make clean
make deinstall
make WITH_DEBUG=yes STRIP= reinstall

Or else if you have not previously installed ffmpeg, this should do it:

cd /usr/ports/multimedia/ffmpeg
make WITH_DEBUG=yes STRIP= install


**** NOTE ****  The failure DOES NOT occur if the "STRIP=" part is left out
of the make command line.  So the failure only occurs when one is trying
to get the thing install without stripping.

>Fix:

I really do not know to fix this.  I tried myself to hack a conditional into
the main ffmpeg Makefile, but that didn't work for reasons that are still
mysterious to me.
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->mm 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Sat Nov 3 04:00:09 UTC 2012 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=173319 
Responsible-Changed-From-To: mm->wg 
Responsible-Changed-By: mm 
Responsible-Changed-When: Mon Oct 14 17:54:10 UTC 2013 
Responsible-Changed-Why:  
Reassign to new maintainer 

http://www.freebsd.org/cgi/query-pr.cgi?pr=173319 

From: William Grzybowski <william88@gmail.com>
To: bug-followup@FreeBSD.org, rfg@tristatelogic.com
Cc:  
Subject: Re: ports/173319: multimedia/ffmpeg - install with debug info crashes
 &amp; burns
Date: Sun, 10 Nov 2013 08:54:24 -0200

 Is this still an issue with newer ffmpeg?
 
 -- 
 William Grzybowski
 ------------------------------------------
 Curitiba/PR - Brasil

From: "Ronald F. Guilmette" <rfg@tristatelogic.com>
To: William Grzybowski <william88@gmail.com>
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/173319: multimedia/ffmpeg - install with debug info crashes &amp; burns
Date: Sun, 10 Nov 2013 18:09:14 -0800

 In message <CAHtVNLM+af4zhkkpO-u+UOrzHmoDAGFjES6GmtA6ET-Dh+jwHw@mail.gmail.com>
 , you wrote:
 
 >Is this still an issue with newer ffmpeg?
 
 
 I don't know what you mean by "newer", but yes, it appears that it is
 still an issue in the current ports tree:
 
 ...
 ffmpeg.c: In function 'write_frame':
 ffmpeg.c:576: warning: 'destruct' is deprecated (declared at ./libavcodec/avcodec.h:1088)
 CC      ffmpeg_opt.o
 In file included from ffmpeg_opt.c:2584:
 cmdutils_common_opts.h:17: warning: initialization from incompatible pointer type
 ffmpeg_opt.c: In function 'init_output_filter':
 ffmpeg_opt.c:1527: warning: 'ost' may be used uninitialized in this function
 ffmpeg_opt.c: In function 'open_output_file':
 ffmpeg_opt.c:1961: warning: 'm' may be used uninitialized in this function
 CC      ffmpeg_filter.o
 CC      cmdutils.o
 LD      ffmpeg_g
 CP      ffmpeg
 STRIP   ffmpeg
 CC      ffprobe.o
 In file included from ffprobe.c:2557:
 cmdutils_common_opts.h:17: warning: initialization from incompatible pointer type
 ffprobe.c: In function 'value_string':
 ffprobe.c:205: warning: 'vali' may be used uninitialized in this function
 LD      ffprobe_g
 CP      ffprobe
 STRIP   ffprobe
 CC      ffserver.o
 In file included from ffserver.c:4683:
 cmdutils_common_opts.h:17: warning: initialization from incompatible pointer type
 LD      ffserver_g
 CP      ffserver
 STRIP   ffserver
 ===>  Staging for ffmpeg-2.1,1
 ===>   Generating temporary packing list
 INSTALL libavdevice/libavdevice.a
 INSTALL libavdevice/libavdevice.so
 STRIP   install-libavdevice-shared
 gmake: *** [install-libavdevice-shared] Segmentation fault: 11 (core dumped)
 *** [do-install] Error code 2
 
 Stop in /usr/ports/multimedia/ffmpeg.
 *** [install] Error code 1
 
 Stop in /usr/ports/multimedia/ffmpeg.
 

From: William Grzybowski <william88@gmail.com>
To: bug-followup@FreeBSD.org, rfg@tristatelogic.com
Cc:  
Subject: Re: ports/173319: multimedia/ffmpeg - install with debug info crashes
 &amp; burns
Date: Mon, 11 Nov 2013 09:31:51 -0200

 It works just fine on my end.
 Make sure to just enable debug with make config, you cant set any
 options with WITH_DEBUG or STRIP=.
 
 -- 
 William Grzybowski
 ------------------------------------------
 Curitiba/PR - Brasil

From: William Grzybowski <william88@gmail.com>
To: "Ronald F. Guilmette" <rfg@tristatelogic.com>
Cc: "bug-followup@FreeBSD.org" <bug-followup@freebsd.org>
Subject: Re: ports/173319: multimedia/ffmpeg - install with debug info crashes
 &amp; burns
Date: Mon, 11 Nov 2013 17:28:23 -0200

 On Mon, Nov 11, 2013 at 5:22 PM, Ronald F. Guilmette
 <rfg@tristatelogic.com> wrote:
 >
 > In message <CAHtVNLOLppNKitGqCM9Zx51pSgBPD8vwPcsTAXmGNs+sbihQkw@mail.gmail.com>
 > , you wrote:
 >
 >>It works just fine on my end.
 >
 > Not here.
 >
 >>Make sure to just enable debug with make config,
 >
 > Please elaborate and be specific.
 
 More specific than run "make config" and check DEBUG?
 
 >
 >>you cant set any
 >>options with WITH_DEBUG or STRIP=.
 >
 > It would appear that you are correct about that.  But then that _is_
 > precisely the bug I reported.
 
 Things change, welcome to the world :)
 
 
 
 -- 
 William Grzybowski
 ------------------------------------------
 Curitiba/PR - Brasil

From: "Ronald F. Guilmette" <rfg@tristatelogic.com>
To: William Grzybowski <william88@gmail.com>
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/173319: multimedia/ffmpeg - install with debug info crashes &amp; burns
Date: Mon, 11 Nov 2013 11:22:55 -0800

 In message <CAHtVNLOLppNKitGqCM9Zx51pSgBPD8vwPcsTAXmGNs+sbihQkw@mail.gmail.com>
 , you wrote:
 
 >It works just fine on my end.
 
 Not here.
 
 >Make sure to just enable debug with make config,
 
 Please elaborate and be specific.
 
 >you cant set any
 >options with WITH_DEBUG or STRIP=.
 
 It would appear that you are correct about that.  But then that _is_
 precisely the bug I reported.
 

From: "Ronald F. Guilmette" <rfg@tristatelogic.com>
To: William Grzybowski <william88@gmail.com>
Cc: "bug-followup@FreeBSD.org" <bug-followup@freebsd.org>
Subject: Re: ports/173319: multimedia/ffmpeg - install with debug info crashes &amp; burns
Date: Mon, 11 Nov 2013 11:49:45 -0800

 In message <CAHtVNLPgQUUtOmn+aVTnu92xOi5q9aV-j0HwrRyiWBTsKdG8Hw@mail.gmail.com>
 , you wrote:
 
 >On Mon, Nov 11, 2013 at 5:22 PM, Ronald F. Guilmette
 ><rfg@tristatelogic.com> wrote:
 >>
 >> In message <CAHtVNLOLppNKitGqCM9Zx51pSgBPD8vwPcsTAXmGNs+sbihQkw@mail.gmail.c
 >om>
 >> , you wrote:
 >>
 >>>It works just fine on my end.
 >>
 >> Not here.
 >>
 >>>Make sure to just enable debug with make config,
 >>
 >> Please elaborate and be specific.
 >
 >More specific than run "make config" and check DEBUG?
 >
 >>
 >>>you cant set any
 >>>options with WITH_DEBUG or STRIP=.
 >>
 >> It would appear that you are correct about that.  But then that _is_
 >> precisely the bug I reported.
 >
 >Things change, welcome to the world :)
 
 Have things changed?
 
 Are you affirmatively asserting that the old stock instructions for how
 to build a port (*and* install it) with debugging symbols are no longer
 valid?  (If so, I am sorta hoping that is documented somewhere.)
 
 Or are you merely asserting that in the singular case of this one port
 those old general rules (for how to build&install a port with debugging
 symbols) do not work?
 
 I'm just trying to understand.
 
 Also, I do believe that I can handle doing "make config" and then checking
 any option that mentions "debug", however as far as I know, such options
 would only affect how the thing gets built... *not* how it gets installed.
 
 So, is that still true?  And if so, and if one wishes the debug info to be
 present within the *installed* version of this port, is it still ultimately
 necessary to do:
 
 	make STRIP= install
 
 ?
>Unformatted:
