bugzilla.mozilla.org has resumed normal operation. Attachments prior to 2014 will be unavailable for a few days. This is tracked in Bug 1475801.
Please report any other irregularities here.

HAVE_POSIX_MEMALIGN isn't defined on OSX

RESOLVED FIXED in mozilla30

Status

Firefox Build System
General
RESOLVED FIXED
5 years ago
5 months ago

People

(Reporter: mwu, Assigned: glandium)

Tracking

unspecified
mozilla30
All
Mac OS X
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
posix_memalign definitely exists on OSX, but we're not defining HAVE_POSIX_MEMALIGN for some reason.
(Reporter)

Comment 1

5 years ago
It looks like AC_CHECK_FUNCS generally doesn't work on OSX now. clang is too clever.

#line 14154 "configure"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char posix_memalign(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char posix_memalign();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_posix_memalign) || defined (__stub___posix_memalign)
choke me
#else
posix_memalign();
#endif

; return 0; }

mozilla@macmini 1% gcc posix_memalign_conftest.C                              ~
configure:14163:6: error: functions that differ only in their return type cannot
      be overloaded
char posix_memalign();
     ^
/usr/include/stdlib.h:156:7: note: previous declaration is here
int      posix_memalign(void **, size_t, size_t) __OSX_AVAILABLE_STARTIN...
         ^
configure:14173:1: error: no matching function for call to 'posix_memalign'
posix_memalign();
^~~~~~~~~~~~~~
/usr/include/stdlib.h:156:7: note: candidate function not viable: requires 3
      arguments, but 0 were provided
int      posix_memalign(void **, size_t, size_t) __OSX_AVAILABLE_STARTIN...
         ^
2 errors generated.
(Assignee)

Comment 2

5 years ago
Created attachment 8375377 [details] [diff] [review]
Divert AC_CHECK_FUNC so that the #includes it uses can't interfere with the function it tests.
Attachment #8375377 - Flags: review?(gps)
(Assignee)

Updated

5 years ago
Assignee: nobody → mh+mozilla
Status: NEW → ASSIGNED

Updated

5 years ago
Attachment #8375377 - Flags: review?(gps) → review+
(Assignee)

Comment 6

5 years ago
(In reply to Mike Hommey [:glandium] from comment #5)
> And a fixup.
> https://hg.mozilla.org/integration/mozilla-inbound/rev/532299d1368f

This avoids non clobber builds picking the old (wrong) cached value
https://hg.mozilla.org/mozilla-central/rev/95c7723f382f
https://hg.mozilla.org/mozilla-central/rev/532299d1368f
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
Depends on: 973310
(Assignee)

Updated

2 years ago
Depends on: 1260605

Updated

5 months ago
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.