Bug 927608 - RPM is ignoring debug_package %{nil}
RPM is ignoring debug_package %{nil}
Status: NEW
Product: Fedora
Classification: Fedora
Component: gcc (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Jakub Jelinek
Fedora Extras Quality Assurance
: FutureFeature, Tracking
Depends On:
Blocks: 967258
  Show dependency treegraph
 
Reported: 2013-03-26 06:26 EDT by Patrick Uiterwijk
Modified: 2016-04-20 08:57 EDT (History)
11 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
GNU Compiler Collection 57194 None None None Never

  None (edit)
Description Patrick Uiterwijk 2013-03-26 06:26:14 EDT
Description of problem:
Rpmbuild is ignoring the %define debug_package %{nil} statement.

Version-Release number of selected component (if applicable):
rpm

How reproducible:
Always, since some recent version (the same build did succeed a little while ago)

Steps to Reproduce:
1. Try to build a package that cannot produce debug information
  
Actual results:
no debug info in ELF executable errno -1

Expected results:
A correctly built package

Additional info:
I am aware that I should change it to %global, but that does not fix the problem.
An example build that displays this problem is: https://koji.fedoraproject.org/koji/taskinfo?taskID=5169239.
devtodo2 can not produce debug information, because gcc-go does not support this.
Comment 1 Panu Matilainen 2013-03-27 03:18:16 EDT
Disabling the debuginfo package from rpm is still working fine AFAICS, but that error comes from gcc (libbacktrace), not rpm. Reassigning.
Comment 2 Panu Matilainen 2013-03-27 03:19:09 EDT
Oh and FWIW, the package builds fine on F18 so this is probably something specific to gcc 4.8.x.
Comment 3 Allan 2013-05-01 10:24:05 EDT
FYI, I have had what is essentially the same issue reported in Arch Linux with gcc-4.8 (hence nothing to do with RPM) [1].

Summary:
gccgo -g foo.go -> GOOD
gccgo foo.go -> BAD
gccgo foo.go + strip -> BAD

[1] https://bugs.archlinux.org/task/35048
Comment 4 Christopher Meng 2013-08-08 04:51:40 EDT
Hitting same issue here.

-g is the solution but we should let gcc automatically "add" it.
Comment 5 Fedora End Of Life 2013-09-16 09:19:32 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 20 development cycle.
Changing version to '20'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora20
Comment 6 Jan Kratochvil 2015-01-20 13:54:17 EST
(In reply to Christopher Meng from comment #4)
> -g is the solution but we should let gcc automatically "add" it.

This is not valid, gcc just historically does not default to -g.

This should be rather addressed in:
  https://fedoraproject.org/wiki/PackagingDrafts/Go
+
  Go Packaging Guidelines Draft
  https://fedorahosted.org/fpc/ticket/382
And currently Fedora seems to use golang instead of gccgo for whatever reason.

Suggesting to close this Bug.
Comment 7 Thomas Moschny 2015-02-04 10:11:01 EST
(In reply to Jan Kratochvil from comment #6)
> (In reply to Christopher Meng from comment #4)
> > -g is the solution but we should let gcc automatically "add" it.
> 
> This is not valid, gcc just historically does not default to -g.
> 
> This should be rather addressed in:
>   https://fedoraproject.org/wiki/PackagingDrafts/Go
> +
>   Go Packaging Guidelines Draft
>   https://fedorahosted.org/fpc/ticket/382
> And currently Fedora seems to use golang instead of gccgo for whatever
> reason.
> 
> Suggesting to close this Bug.

Sorry, but I have to disagree.

From a user's pov, gccgo simply doesn't work as expected: one has to pass '-g' to it to actually produce working binaries.

This has nothing to do with the Go Packaging Guidelines or the question whether Fedora uses golang for compiling *other packages*.
Comment 8 Jakub Jelinek 2015-02-04 10:32:01 EST
gcc-go-5.0.0-* gccgo defaults to -g1 if no -g is passed.
And, doesn't fail miserably at startup if debug info is missing, though some features like backtrace might not work properly.

Note You need to log in before you can comment on or make changes to this bug.