Ticket #4155 (closed bug: fixed)

Opened 3 years ago

Last modified 3 years ago

HAVE_LIBM test doesn't work

Reported by: donn Owned by:
Priority: high Milestone: 7.0.1
Component: Build System Version: 6.12.3
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Building GHC failed Difficulty:
Test Case: Blocked By:
Blocking: Related Tickets:

Description

The AC_SEARCH_LIBS test in configure.ac will always set HAVE_LIBM=1, whether the platform supports -lm or not. It's really testing whether atan works, and it will indeed normally work -- the question is just whether it requires an explicit -lm. The mechanics of this can be seen in the generated configure script: look for "none required".

The preceding test for HAVE_MINGWEX does work, and of course that formula works for HAVE_LIBM too.

Change History

  Changed 3 years ago by igloo

  • os changed from Other to Unknown/Multiple
  • architecture changed from x86 to Unknown/Multiple
  • milestone set to 6.16.1

If we're always setting HAVE_LIBM=1, is there a reason not to drop the test and just always use -lm?

follow-up: ↓ 3   Changed 3 years ago by donn

Yes, we aren't always setting HAVE_LIBM=1. GHC won't build on my platform unless I fix this. I can't believe it's the only such platform, -lm always seemed to me like a nuisance that you'd have only for the sake of extreme '70s period authenticity.

It's a simple fix - use CHECK_LIB, just like with mingwex right above it.

in reply to: ↑ 2   Changed 3 years ago by igloo

Replying to donn:

Yes, we aren't always setting HAVE_LIBM=1

Do you mean "we shouldn't be always setting HAVE_LIBM=1"?

What is your platform?

  Changed 3 years ago by donn

I mean, "we're either not setting HAVE_LIBM=1, or we're not building GHC on my platform."

The platform is Haiku, which inherited this practice from BeOS.

  Changed 3 years ago by igloo

  • priority changed from normal to high
  • milestone changed from 6.16.1 to 6.14.1

  Changed 3 years ago by igloo

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

Fixed:

Thu Aug  5 15:25:08 BST 2010  Ian Lynagh <igloo@earth.li>
  * Fix the -lm configure test; fixes #4155
Note: See TracTickets for help on using tickets.