Opened 3 months ago

Closed 2 months ago

#15968 closed bug (fixed)

configure doesn't error out when --enable-dwarf-unwind is given but libdw cannot be found

Reported by: nh2 Owned by:
Priority: normal Milestone: 8.8.1
Component: Build System (make) Version: 8.6.2
Keywords: Cc: nh2, bgamari
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Other Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s): Phab:D5424
Wiki Page:

Description

Against expectations, the GHC bindist supposedly having DWARF support provided at

https://downloads.haskell.org/~ghc/8.4.4/ghc-8.4.4-x86_64-deb9-linux-dwarf.tar.xz

doesn't actually have DWARF support.

According to bgamari, this is because ./configure --enable-dwarf-unwind doesn't actually complain when the required dependency libdw isn't found; instead, it continues silently.

Most programs I know will barf out when something isn't found but also *explicitly* requested via the command line; for the cases where this wasn't, the project maintainers did consider this a bug.

GHC's ./configure suite should fail hard when --enable-dwarf-unwind is given but libdw cannot be found.

Change History (6)

comment:1 Changed 2 months ago by harpocrates

Differential Rev(s): Phab:D5424
Status: newpatch

comment:2 Changed 2 months ago by Ben Gamari <ben@…>

In cb882fc/ghc:

Require 'libdw' for '--enable-dwarf-unwind'

This causes './configure --enable-dwarf-unwind' to exit with a helpful
error message when 'libdw' cannot be found (compared to the previous
behaviour of silently pretending the user hadn't requested DWARF support
at all).

Test Plan: ./configure --enable-dwarf-unwind # on systems with/without
libdw

Reviewers: bgamari, nh2

Reviewed By: nh2

Subscribers: nh2, rwbarton, erikd, carter

GHC Trac Issues: #15968

Differential Revision: https://phabricator.haskell.org/D5424

comment:3 Changed 2 months ago by bgamari

Resolution: fixed
Status: patchclosed

comment:4 Changed 2 months ago by nh2

Resolution: fixed
Status: closednew

Reopening because the merged patch has a syntax error (missing , that none of us spotted, including autoconf).

comment:5 Changed 2 months ago by Ben Gamari <ben@…>

In 126aa79/ghc:

Add missing comma in 'libdw' configure check

Fix a bug from cb882fc993b4972f7f212b291229ef9e9ade0af9. Without the
comma, all non-diverging codepaths set 'UseLibdw=NO'.

Reviewers: bgamari, nh2

Reviewed By: nh2

Subscribers: rwbarton, erikd, carter

GHC Trac Issues: #15968

Differential Revision: https://phabricator.haskell.org/D5459

comment:6 Changed 2 months ago by bgamari

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.