From nobody@FreeBSD.org  Mon Nov  8 10:07:34 2010
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A25D8106567A
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  8 Nov 2010 10:07:34 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 904078FC14
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  8 Nov 2010 10:07:34 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id oA8A7Yl3058829
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 8 Nov 2010 10:07:34 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id oA8A7Yis058828;
	Mon, 8 Nov 2010 10:07:34 GMT
	(envelope-from nobody)
Message-Id: <201011081007.oA8A7Yis058828@www.freebsd.org>
Date: Mon, 8 Nov 2010 10:07:34 GMT
From: kenorb <kenorb@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: WITH_DEBUG doesn't work when compiling Firefox
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         152043
>Category:       ports
>Synopsis:       [patch] bsd.gecko.mk: WITH_DEBUG doesn't work when compiling Firefox
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    beat
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Nov 08 10:10:10 UTC 2010
>Closed-Date:    Tue Nov 23 15:35:27 UTC 2010
>Last-Modified:  Tue Nov 23 15:40:12 UTC 2010
>Originator:     kenorb
>Release:        FreeBSD 8.1-STABLE
>Organization:
>Environment:
FreeBSD kenorb 8.1-STABLE FreeBSD 8.1-STABLE #3: Wed Nov  3 14:36:47 GMT 2010     root@kenorb:/usr/obj/usr/src/sys/BRO  amd64

>Description:
I want to compile Firefox with debug symbols.
Makefile doesn't contain special WITH_DEBUG variable.

Here is some instruction:
http://developer.mozilla.org/en/Building_Firefox_with_Debug_Symbols

But anyway ports Makefile should contain WITH_DEBUG to strict to ports standards.
>How-To-Repeat:
cd /usr/ports/www/firefox
make WITH_DEBUG=1

>Fix:
Workaround:
setenv MOZ_DEBUG_SYMBOLS 1 || export MOZ_DEBUG_SYMBOLS=1
setenv CFLAGS "-gdwarf-2" || export CFLAGS="-gdwarf-2"
setenv CXXFLAGS "-gdwarf-2" || export CXXFLAGS="-gdwarf-2"
cd /usr/ports/www/firefox && make
cd `make -V WRKSRC`/browser/app
setenv LD_LIBRARY_PATH $PWD || export LD_LIBRARY_PATH=$PWD
gdb ./firefox-bin

Fix in Makefile?
.if defined(WITH_DEBUG)
WITH_LOGGING=           yes
CONFIGURE_ENV+=         WITH_DEBUG=yes
CONFIGURE_ENV+=         MOZ_DEBUG_SYMBOLS=1 
CONFIGURE_ENV+=         CFLAGS="-gdwarf-2"
CONFIGURE_ENV+=         CXXFLAGS="-gdwarf-2"
.endif # defined(WITH_DEBUG)


>Release-Note:
>Audit-Trail:

From: Anonymous <swell.k@gmail.com>
To: kenorb <kenorb@gmail.com>
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/152043: WITH_DEBUG doesn't work when compiling Firefox
Date: Mon, 08 Nov 2010 18:37:59 +0300

 Does below patch fixes your issue? It should also fix stripping when
 STRIP is defined empty or undefined, i.e. when only DEBUG_FLAGS defined.
 
 --- a.diff begins here ---
 Index: Mk/bsd.gecko.mk
 ===================================================================
 RCS file: /a/.cvsup/ports/Mk/bsd.gecko.mk,v
 retrieving revision 1.22
 diff -u -p -r1.22 bsd.gecko.mk
 --- Mk/bsd.gecko.mk	29 Aug 2010 15:16:20 -0000	1.22
 +++ Mk/bsd.gecko.mk	8 Nov 2010 15:36:36 -0000
 @@ -418,14 +418,14 @@ MOZ_OPTIONS+=	--enable-gnomevfs
  MOZ_OPTIONS+=	--disable-gnomevfs
  .endif
  
 +.if !defined(STRIP) || ${STRIP} == ""
 +MOZ_OPTIONS+=	--disable-strip --disable-install-strip
 +.endif
 +
  .if defined(WITH_DEBUG)
 -MOZ_OPTIONS+=	--enable-debug				\
 -		--disable-strip
 -WITH_LOGGING=	yes
 +MOZ_OPTIONS+=	--enable-debug
  .else
 -MOZ_OPTIONS+=	--disable-debug				\
 -		--enable-optimize=${WITH_OPTIMIZE}	\
 -		--enable-strip
 +MOZ_OPTIONS+=	--disable-debug --enable-optimize=${WITH_OPTIMIZE}
  .endif
  
  .if defined(WITH_JAVA) && defined(_WITH_JAVA)
 --- a.diff ends here ---

From: bronek <kenorb@gmail.com>
To: bug-followup@freebsd.org, kenorb@gmail.com
Cc:  
Subject: Re: ports/152043: WITH_DEBUG doesn't work when compiling Firefox
Date: Mon, 8 Nov 2010 17:21:42 +0000

 --20cf30334c87cb45d704948ddcf4
 Content-Type: text/plain; charset=ISO-8859-1
 
 Yes, it does work!
 
 ---
 Kind Regards,
 Rafal Wieczorek
 
 --20cf30334c87cb45d704948ddcf4
 Content-Type: text/html; charset=ISO-8859-1
 
 Yes, it does work!<br><br clear="all">---<br>Kind Regards,<br>Rafal Wieczorek<br><br>
 
 --20cf30334c87cb45d704948ddcf4--

From: bronek <kenorb@gmail.com>
To: bug-followup@freebsd.org, kenorb@gmail.com
Cc:  
Subject: Re: ports/152043: WITH_DEBUG doesn't work when compiling Firefox
Date: Tue, 9 Nov 2010 11:06:47 +0000

 --20cf300faae5dc1baa04949cbdfb
 Content-Type: text/plain; charset=ISO-8859-1
 
 When it could be committed?
 
 ---
 Kind Regards,
 Rafal Wieczorek
 
 --20cf300faae5dc1baa04949cbdfb--

From: Anonymous <swell.k@gmail.com>
To: bronek <kenorb@gmail.com>
Cc: bug-followup@FreeBSD.org, freebsd-gecko@FreeBSD.org
Subject: Re: ports/152043: WITH_DEBUG doesn't work when compiling Firefox
Date: Thu, 11 Nov 2010 08:01:44 +0300

 bronek <kenorb@gmail.com> writes:
 
 > When it could be committed?
 
 It isn't auto-assigned to gecko@ and no one with GNATS access fixed it yet.
 Unlike bugzilla you can't edit/assign your own PRs. And maintainer may
 not be aware of unassigned PRs.
 
 In future to avoid this either use port's origin in subject line and
 rely on auto-assigner or manually specify >Responsible: when filing PR.
Responsible-Changed-From-To: freebsd-ports-bugs->gecko 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Fri Nov 12 21:25:17 UTC 2010 
Responsible-Changed-Why:  
Reclassify, and note that a patch that seems to work is included. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=152043 
Responsible-Changed-From-To: gecko->beat 
Responsible-Changed-By: beat 
Responsible-Changed-When: Sat Nov 13 10:02:36 UTC 2010 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=152043 
State-Changed-From-To: open->closed 
State-Changed-By: beat 
State-Changed-When: Tue Nov 23 15:35:26 UTC 2010 
State-Changed-Why:  
Committed. Thanks! 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/152043: commit references a PR
Date: Tue, 23 Nov 2010 15:34:57 +0000 (UTC)

 beat        2010-11-23 15:34:52 UTC
 
   FreeBSD ports repository
 
   Modified files:
     Mk                   bsd.gecko.mk 
   Log:
   - Respect STRIP to allow for debugging builds [1]
   - Fix build of upcoming Firefox 4 with recent gcc versions [2]
   
   PR:             ports/152043 [1]
   Submitted by:   Anonymous <swell.k AT gmail.com> [1,2]
   
   Revision  Changes    Path
   1.23      +8 -5      ports/Mk/bsd.gecko.mk
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
