[MacPorts] #37418: webkit-gtk build failure
MacPorts
noreply at macports.org
Wed Jan 9 16:37:19 PST 2013
#37418: webkit-gtk build failure
----------------------------+------------------------
Reporter: enekogotzon@… | Owner: jeremyhu@…
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.1.2
Resolution: | Keywords: leopard
Port: webkit-gtk |
----------------------------+------------------------
Comment (by sonsie_yin@…):
Replying to [comment:10 ryandesign@…]:
> Replying to [comment:8 jeremyhu@…]:
> > It's a private struct that changes with each update of the OS.
>
> Ok, I see malloc_introspection_t is defined in
/usr/include/malloc/malloc.h. In Tiger and Leopard it's defined as:
>
> {{{
> typedef struct malloc_introspection_t {
> kern_return_t (*enumerator)(task_t task, void *, unsigned type_mask,
vm_address_t zone_address, memory_reader_t reader, vm_range_recorder_t
recorder); /* enumerates all the malloc pointers in use */
> size_t (*good_size)(malloc_zone_t *zone, size_t size);
> boolean_t (*check)(malloc_zone_t *zone); /* Consistency checker */
> void (*print)(malloc_zone_t *zone, boolean_t verbose); /*
Prints zone */
> void (*log)(malloc_zone_t *zone, void *address); /* Enables
logging of activity */
> void (*force_lock)(malloc_zone_t *zone); /* Forces locking
zone */
> void (*force_unlock)(malloc_zone_t *zone); /* Forces
unlocking zone */
> void (*statistics)(malloc_zone_t *zone, malloc_statistics_t
*stats); /* Fills statistics */
> } malloc_introspection_t;
> }}}
>
> In Snow Leopard, zone_locked is added:
>
> {{{
> typedef struct malloc_introspection_t {
> kern_return_t (*enumerator)(task_t task, void *, unsigned type_mask,
vm_address_t zone_address, memory_reader_t reader, vm_range_recorder_t
recorder); /* enumerates all the malloc pointers in use */
> size_t (*good_size)(malloc_zone_t *zone, size_t size);
> boolean_t (*check)(malloc_zone_t *zone); /* Consistency checker */
> void (*print)(malloc_zone_t *zone, boolean_t verbose); /*
Prints zone */
> void (*log)(malloc_zone_t *zone, void *address); /* Enables
logging of activity */
> void (*force_lock)(malloc_zone_t *zone); /* Forces locking
zone */
> void (*force_unlock)(malloc_zone_t *zone); /* Forces
unlocking zone */
> void (*statistics)(malloc_zone_t *zone, malloc_statistics_t
*stats); /* Fills statistics */
> boolean_t (*zone_locked)(malloc_zone_t *zone); /* Are any zone locks
held */
> } malloc_introspection_t;
> }}}
>
> In Lion and Mountain Lion, discharge checking is added:
>
> {{{
> typedef struct malloc_introspection_t {
> kern_return_t (*enumerator)(task_t task, void *, unsigned type_mask,
vm_address_t zone_address, memory_reader_t reader, vm_range_recorder_t
recorder); /* enumerates all the malloc pointers in use */
> size_t (*good_size)(malloc_zone_t *zone, size_t size);
> boolean_t (*check)(malloc_zone_t *zone); /* Consistency checker */
> void (*print)(malloc_zone_t *zone, boolean_t verbose); /*
Prints zone */
> void (*log)(malloc_zone_t *zone, void *address); /* Enables
logging of activity */
> void (*force_lock)(malloc_zone_t *zone); /* Forces locking
zone */
> void (*force_unlock)(malloc_zone_t *zone); /* Forces
unlocking zone */
> void (*statistics)(malloc_zone_t *zone, malloc_statistics_t
*stats); /* Fills statistics */
> boolean_t (*zone_locked)(malloc_zone_t *zone); /* Are any zone
locks held */
>
> /* Discharge checking. Present in version >= 7. */
> boolean_t (*enable_discharge_checking)(malloc_zone_t *zone);
> void (*disable_discharge_checking)(malloc_zone_t *zone);
> void (*discharge)(malloc_zone_t *zone, void *memory);
> #ifdef __BLOCKS__
> void (*enumerate_discharged_pointers)(malloc_zone_t *zone,
void (^report_discharged)(void *memory, void *info));
> #else
> void *enumerate_unavailable_without_blocks;
> #endif /* __BLOCKS__ */
> } malloc_introspection_t;
> }}}
>
>
>
>
> > That code is probably just doing something like:
> > {{{
> > if building for earlier than Lion {
> > do it the Snow Leopard Way
> > } else if Lion {
> > do it the Lion Way
> > } else {
> > do it the Mountain Lion Way
> > }
> > }}}
> >
> > ...
> >
> > so you need to see what changed in that struct between Leopard and SL
and update it accordingly.
>
> The code in webkit-gtk 1.10.2 in Source/WTF/wtf/FastMalloc.cpp, which is
the only place malloc_introspection_t is used, uses it this way:
>
> {{{
> extern "C" {
> malloc_introspection_t jscore_fastmalloc_introspection = {
&FastMallocZone::enumerate, &FastMallocZone::goodSize,
&FastMallocZone::check, &FastMallocZone::print,
> &FastMallocZone::log, &FastMallocZone::forceLock,
&FastMallocZone::forceUnlock, &FastMallocZone::statistics
>
> #if OS(IOS) || __MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
> , 0 // zone_locked will not be called on the zone unless it
advertises itself as version five or higher.
> #endif
> #if OS(IOS) || __MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
> , 0, 0, 0, 0 // These members will not be used unless the zone
advertises itself as version seven or higher.
> #endif
>
> };
> }
> }}}
>
> To me that looks correct for all versions of OS X. But it does depend on
`__MAC_OS_X_VERSION_MAX_ALLOWED`. How can I check to see what value that
has?
On leopard, the macro `__MAC_OS_X_VERSION_MAX_ALLOWED` seems to be
`MAC_OS_X_VERSION_MAX_ALLOWED`, no double underline prefix, really?
Then encounter
{{{
:info:build ./Source/JavaScriptCore/offlineasm/offsets.rb:112:in
`offsetsAndConfigurationIndex': undefined method `getbyte' for
#<File:Programs/LLIntOffsetsExtractor (closed)> (NoMethodError)
}}}
It seems that "No IO#getbyte method on OS X 10.5 Leopard/Ruby 1.8", how to
solve the problem, help me please.
--
Ticket URL: <https://trac.macports.org/ticket/37418#comment:11>
MacPorts <http://www.macports.org/>
Ports system for Mac OS
More information about the macports-tickets
mailing list