Ticket #552 (closed enhancement: duplicate)

Opened 4 years ago

Last modified 17 months ago

Cabal fails because header file is missing. But in fact the header file is erroneous.

Reported by: mgross Owned by:
Priority: normal Milestone: Cabal-1.8
Component: Cabal library Version: 1.6.0.2
Severity: normal Keywords:
Cc: Difficulty: normal
GHC Version: Platform:

Description

When trying to install HERA 0.2 the

runhaskell Setup.hs configure

command fails with:

Setup.hs: Missing dependency on a foreign library:
* Missing header file: hsmpfr.h
This problem can usually be solved by installing the system package that
provides this library (you may need the "-dev" version). If the library is
already installed but in a non-standard location then you can use the flags
--extra-include-dirs= and --extra-lib-dirs= to specify where it is.

But in fact the header file is present. The real problem is an include in the header file.

The include

#include <malloc.h>

fails on Mac OS systems.

It would be better if Cabal would report the compile error.

Change History

Changed 4 years ago by duncan

  • difficulty changed from unknown to normal
  • version changed from 1.6.0.1 to 1.6.0.2
  • component changed from cabal-install tool to Cabal library
  • platform Mac OS deleted
  • milestone set to Cabal-1.8

We would like to distinguish failing to find a header file from failing to compile that header.

Perhaps we should split the test into two, first get gcc to pre-process the test file. If this fails then it's much more likely to be due to missing headers. If preprocessing works then we can try compiling the file. If that fails then we can report more accurately.

Changed 3 years ago by duncan

  • status changed from new to closed
  • resolution set to duplicate

Same as #532, which has slightly more useful info.

Changed 17 months ago by elga

Note: See TracTickets for help on using tickets.