Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1138982 - debuginfo of Haskell packages do not include source files
Summary: debuginfo of Haskell packages do not include source files
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: ghc-rpm-macros
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jens Petersen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1139050 (view as bug list)
Depends On:
Blocks: DebugInfo
TreeView+ depends on / blocked
 
Reported: 2014-09-07 07:28 UTC by Ville Skyttä
Modified: 2015-02-27 13:21 UTC (History)
5 users (show)

Fixed In Version: ghc-rpm-macros-1.4.0-1.fc22
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-02-27 13:21:27 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Ville Skyttä 2014-09-07 07:28:26 UTC
ShellCheck-debuginfo-0.3.3-2.fc22 contains no sources. Usually this is a sign of $RPM_OPT_FLAGS not being used, but I don't know how to affect compiler flags to use with ghc packages.

Comment 1 Jens Petersen 2014-09-09 01:09:44 UTC
Let me move this to ghc-rpm-macros since I think that is the right
place to deal with this.

Comment 2 Jens Petersen 2014-09-09 01:10:47 UTC
*** Bug 1139050 has been marked as a duplicate of this bug. ***

Comment 3 Ville Skyttä 2014-09-09 07:33:33 UTC
(In reply to Jens Petersen from bug 1139050 comment 1)
> Hmm need to look into why the debuginfo is empty - probably need
> to pass -g to gcc somehow.

While at it, I suppose it'd be best to make sure that all of $RPM_OPT_FLAGS end up being passed to the C compiler, ditto $RPM_LD_FLAGS to the linker if applicable.

Comment 4 Ville Skyttä 2014-09-24 18:05:06 UTC
ghc-hjsmin-0.1.4.7-3.fc22 has grown an empty -debuginfo as well.

Comment 5 Ville Skyttä 2014-10-05 10:01:35 UTC
Ditto ghc-reflection 1.5.1-1.fc22.

Comment 6 Jens Petersen 2014-10-06 02:40:57 UTC
Just a few more comments:

- Rawhide will move soon to ghc-7.8 and all packages using ghc-rpm-macros will be rebuilt.
- I am not sure how rpm debuginfo generation works - presumably it uses elfutils etc
  to pull out the source filenames from the debug obj files?  So I need to check
  if the Haskell generated debuginfo files contain the source filenames too.
  Perhaps they don't which might be why no source files are being included.
  Otherwise I am not really sure how to do it, but let me look at least.
- I am not sure how useful the debuginfo .so files are but they might still
  be better than nothing - so I feel it is better to ship debuginfo .so files
  even without source files for now if it is hard to include them
  but if there are strong objections I don't mind to revert to no debuginfo.
  Alternatively maybe some hack^Wmacro could be added to the debuginfo generation
  for Haskell to add the C source files to the debuginfo subpackage.

Comment 7 Jens Petersen 2014-10-06 02:45:19 UTC
One more:

The debuginfo files are only empty on arm since it currently does not
have shared libraries, but it will have once we move to ghc-7.8.

I should check: is the complaint about the empty debuginfo packages (on ARM)
or the lack of source files, or both? :)

Comment 8 Ville Skyttä 2014-10-06 07:14:54 UTC
I hadn't even looked at ARM packages, but examined x86_64 ones only. Comments 4 and 5 are incorrect in mentioning empty debuginfos, what I really meant was that they lack sources.

Comment 9 Ville Skyttä 2014-10-20 18:22:49 UTC
Not sure if it's the same issue, but an empty (yes, completely empty this time) gtk2hs-buildtools-debuginfo-0.13.0.1-1.fc22 has surfaced.

Comment 10 Jens Petersen 2014-10-24 02:56:58 UTC
Thanks, I committed a change to gtk2hs-buildtools to disable debuginfo.

http://pkgs.fedoraproject.org/cgit/gtk2hs-buildtools.git/commit/?id=ec87fbb2c39d4444547a9bbac882ff175cee8f0b

Maybe we should just disable debuginfo again for Haskell packages,
if it is not useful?  The total amount of C code is really small
and mostly just wrappers and things.

Do you use some script to track debuginfo content?
Is it available it somewhere?

Comment 11 Ville Skyttä 2014-10-24 06:13:59 UTC
By all means disable debuginfos if they cannot be made useful.

More info about the script I use:
http://lists.baseurl.org/pipermail/yum/2009-April/022537.html
https://phab.qadevel.cloud.fedoraproject.org/T63
(Not 100% certain if the fedorapeople copy is the latest one, will check later.)

Comment 12 Ville Skyttä 2014-10-25 07:10:07 UTC
(In reply to Ville Skyttä from comment #11)
> Not 100% certain if the fedorapeople copy is the latest one

It is.

Comment 13 Jens Petersen 2014-10-27 03:58:51 UTC
I made a bit of progress finally.

ghc-rpm-macros-1.3.9-1.fc22 should now generate proper debuginfo
for Haskell libraries with cbits in them.  I am not sure yet
why it is not working for Haskell executables, which are
still completely empty as you observed.

In the worst case we could disable debuginfo still for executables
(eg for gtk2hs-buildtools, etc).

Quite a number of spec files also need to be refreshed to disable debuginfo
since they don't contain C files: eg ghc-hjsmin and ghc-reflection
mentioned earlier.

Comment 14 Fedora Update System 2014-11-14 09:48:02 UTC
ghc-rpm-macros-1.2.17-1.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/ghc-rpm-macros-1.2.17-1.fc21

Comment 15 Fedora Update System 2014-12-13 09:48:43 UTC
ghc-rpm-macros-1.2.17-1.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 16 Jens Petersen 2015-01-17 06:11:38 UTC
I disabled debuginfo again for rawhide in ghc-rpm-macros-1.4.0-1.fc22
which is going into f22-ghc now.

ghc-7.10 will have some support for dwarf debugging output
so we can revisit this again when we come to build 7.10.

I will close this bug after the fix goes into f22,
having verified no (empty) debuginfo is being generated for Haskell packages.


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