Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#37418 closed defect (fixed)

webkit-gtk: error: too many initializers for 'malloc_introspection_t'

Reported by: EnekoGotzon Owned by: jeremyhu (Jeremy Huddleston Sequoia)
Priority: Normal Milestone:
Component: ports Version: 2.1.2
Keywords: leopard haspatch Cc: dbevans (David B. Evans), dershow, ryandesign (Ryan Carsten Schmidt), johanmattssonm (Johan Mattsson), cooljeanius (Eric Gallager)
Port: webkit-gtk

Description (last modified by ryandesign (Ryan Carsten Schmidt))

Three unsuccessful processing attempts. Port(s) cleaning: done. Affected machine:

  • 2.1 GHz PowerPC G5 (last and more powerful PowerPC iMac).
  • OS X.5.8 (Leopard)
  • MacPorts base version 2.1.2.
  • Ports tree updated.

Same error also on:

  • Power Mac with Leopard.
  • Leopard on Intel Mac.

Terminal output:

--->  Computing dependencies for gimp
--->  Dependencies to be installed: gimp-app gimp2 webkit-gtk gimp-jp2 gimp-lqr-plugin gtk-nodoka-engine gutenprint icns-gimp macclipboard-gimp macfile-gimp ufraw cfitsio dcraw gtkimageview xsane
--->  Fetching archive for webkit-gtk
--->  Attempting to fetch webkit-gtk-1.10.1_0+video.darwin_9.ppc.tbz2 from http://lil.fr.packages.macports.org/webkit-gtk
--->  Attempting to fetch webkit-gtk-1.10.1_0+video.darwin_9.ppc.tbz2 from http://mse.uk.packages.macports.org/sites/packages.macports.org/webkit-gtk
--->  Attempting to fetch webkit-gtk-1.10.1_0+video.darwin_9.ppc.tbz2 from http://packages.macports.org/webkit-gtk
--->  Fetching distfiles for webkit-gtk
--->  Verifying checksum(s) for webkit-gtk
--->  Extracting webkit-gtk
--->  Applying patches to webkit-gtk
--->  Configuring webkit-gtk
--->  Building webkit-gtk
Error: org.macports.build for port webkit-gtk returned: command execution failed
Error: Failed to install webkit-gtk
[…]
Error: The following dependencies were not installed: gimp-app gimp2 webkit-gtk gimp-jp2 gimp-lqr-plugin gtk-nodoka-engine gutenprint icns-gimp macclipboard-gimp macfile-gimp ufraw cfitsio dcraw gtkimageview xsane
[…]
Error: Processing of port gimp failed

Log of webkit-gtk port attached to this ticket.

Attachments (3)

main.log.zip (21.6 KB) - added by EnekoGotzon 12 years ago.
log file
AvailabilityInternal.h (11.0 KB) - added by ryandesign (Ryan Carsten Schmidt) 12 years ago.
AvailabilityInternal.h from Leopard i386
webkit-gtk-leopard.diff (456 bytes) - added by ryandesign (Ryan Carsten Schmidt) 12 years ago.
proposed patch

Download all attachments as: .zip

Change History (31)

Changed 12 years ago by EnekoGotzon

Attachment: main.log.zip added

log file

comment:1 Changed 12 years ago by jmroot (Joshua Root)

Cc: devans@… added; enekogotzon@… removed
Description: modified (diff)
Keywords: command execution failed removed
Owner: changed from macports-tickets@… to jeremyhu@…
Port: gimp removed
Summary: Processing of port gimp failed — Failed to install webkit-gtk: command execution failedwebkit-gtk build failure

Please remember to Cc the maintainers, and to preview and use WikiFormatting. The error in the log is:

:info:build /bin/sh ./libtool  --tag=CXX   --mode=compile /usr/bin/g++-4.2 -DHAVE_CONFIG_H -I.  -Wall -W -Wcast-align -Wchar-subscripts -Wreturn-type -Wformat -Wformat-security -Wno-format-y2k -Wundef -Wmissing-format-attribute -Wpointer-arith -Wwrite-strings -Wno-unused-parameter -Wno-parentheses -fno-exceptions -DENABLE_GLIB_SUPPORT=1 -DBUILDING_CAIRO__=1 -DBUILDING_GTK__=1 -DBUILDING_SOUP__=1 -DWTF_CHANGES   -DXP_UNIX -DMOZ_X11  -DWTF_USE_ICU_UNICODE=1   -DWTF_USE_GSTREAMER=1  -DWTF_USE_ACCELERATED_COMPOSITING=1 -DENABLE_3D_RENDERING=1  -DWTF_USE_TEXTURE_MAPPER=1 -DWTF_USE_TEXTURE_MAPPER_GL=1  -DWTF_USE_GLX=1 -DWTF_USE_OPENGL=1 -DGTK_API_VERSION_2=1 -DNDEBUG   -I./Source -I./Source/WTF -I./Source/WTF/wtf  -fno-rtti -fstrict-aliasing -O3  -D_REENTRANT -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include   -I/opt/local/include  -pipe -O2 -arch ppc -O2 -MT Source/WTF/wtf/libWTF_la-FastMalloc.lo -MD -MP -MF Source/WTF/wtf/.deps/libWTF_la-FastMalloc.Tpo -c -o Source/WTF/wtf/libWTF_la-FastMalloc.lo `test -f 'Source/WTF/wtf/FastMalloc.cpp' || echo './'`Source/WTF/wtf/FastMalloc.cpp
:info:build libtool: compile:  /usr/bin/g++-4.2 -DHAVE_CONFIG_H -I. -Wall -W -Wcast-align -Wchar-subscripts -Wreturn-type -Wformat -Wformat-security -Wno-format-y2k -Wundef -Wmissing-format-attribute -Wpointer-arith -Wwrite-strings -Wno-unused-parameter -Wno-parentheses -fno-exceptions -DENABLE_GLIB_SUPPORT=1 -DBUILDING_CAIRO__=1 -DBUILDING_GTK__=1 -DBUILDING_SOUP__=1 -DWTF_CHANGES -DXP_UNIX -DMOZ_X11 -DWTF_USE_ICU_UNICODE=1 -DWTF_USE_GSTREAMER=1 -DWTF_USE_ACCELERATED_COMPOSITING=1 -DENABLE_3D_RENDERING=1 -DWTF_USE_TEXTURE_MAPPER=1 -DWTF_USE_TEXTURE_MAPPER_GL=1 -DWTF_USE_GLX=1 -DWTF_USE_OPENGL=1 -DGTK_API_VERSION_2=1 -DNDEBUG -I./Source -I./Source/WTF -I./Source/WTF/wtf -fno-rtti -fstrict-aliasing -O3 -D_REENTRANT -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -I/opt/local/include -pipe -O2 -arch ppc -O2 -MT Source/WTF/wtf/libWTF_la-FastMalloc.lo -MD -MP -MF Source/WTF/wtf/.deps/libWTF_la-FastMalloc.Tpo -c Source/WTF/wtf/FastMalloc.cpp  -fno-common -DPIC -o Source/WTF/wtf/.libs/libWTF_la-FastMalloc.o
:info:build Source/WTF/wtf/FastMalloc.cpp:4664: error: too many initializers for 'malloc_introspection_t'

comment:2 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

I verified this problem on Leopard ppc G4 and Leopard i386.

comment:3 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Keywords: leopard added

comment:4 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)

comment:5 Changed 12 years ago by dershow

Cc: dersh@… added

Cc Me!

comment:6 Changed 12 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Ok, well... someone with Leopard will need to provide a patch. I no longer have any machines older than Snow Leopard. It should be rather trivial...

comment:7 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added

Could you give some pointers? I don't know what an initializer is or what malloc_introspection_t is.

comment:8 Changed 12 years ago by jeremyhu (Jeremy Huddleston Sequoia)

It's a private struct that changes with each update of the OS. 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.

I thought I did at one point, but maybe that was for a different port...

comment:9 Changed 12 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Optionally, there may be a way to just disable that codepath on Leopard and earlier (like --disable-fastmalloc)

comment:10 in reply to:  8 ; Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to 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?

Last edited 12 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:11 in reply to:  10 Changed 12 years ago by sonsie_yin@…

Replying to ryandesign@…:

Replying to 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.

comment:12 in reply to:  10 ; Changed 12 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Replying to ryandesign@…:

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?

That code looks correct. __MAC_OS_X_VERSION_MAX_ALLOWED should be determined by the SDK being used.

I'd recommend just adding this to sanity check:

#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
#error __MAC_OS_X_VERSION_MAX_ALLOWED has an unexpected value
#endif
Last edited 12 years ago by jeremyhu (Jeremy Huddleston Sequoia) (previous) (diff)

comment:13 Changed 12 years ago by EnekoGotzon

Just to give you thanks for your work, really generous Byte Masters. Thanks.

comment:14 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: johan.mattsson.m@… added
Summary: webkit-gtk build failurewebkit-gtk: error: too many initializers for 'malloc_introspection_t'

Has duplicate #37689.

comment:15 in reply to:  12 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to jeremyhu@…:

I'd recommend just adding this to sanity check:

#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
#error __MAC_OS_X_VERSION_MAX_ALLOWED has an unexpected value
#endif

Yes, this error was triggered, on Leopard i386. How do I determine what value __MAC_OS_X_VERSION_MAX_ALLOWED had?

comment:16 Changed 12 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Hmm... so something is causing __MAC_OS_X_VERSION_MAX_ALLOWED to be set incorrectly...

I don't see __MAC_OS_X_VERSION_MAX_ALLOWED defined directly in webkitgtk's sources.

What is the output of:

echo "#include <Availability.h>" | /usr/bin/g++-4.2 -E - -dM  | grep VERSION

__MAC_OS_X_VERSION_MAX_ALLOWED should be set by AvailabilityInternal.h to 1050.

comment:17 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

You're right. I have:

$ echo "#include <Availability.h>" | /usr/bin/g++-4.2 -E - -dM  | grep VERSION
#define __GXX_ABI_VERSION 1002
#define __MAC_OS_X_VERSION_MIN_REQUIRED __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
#define __VERSION__ "4.2.1 (Apple Inc. build 5577)"
#define __MAC_OS_X_VERSION_MAX_ALLOWED __MAC_10_6
#define __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ 1058

And predictably:

$ echo "#include <Availability.h>" | /usr/bin/g++-4.2 -E - -dM  | grep 'define __MAC_10_6'
#define __MAC_10_6 1060

Lots of references to __MAC_10_6 in AvailabilityInternal.h. I'll attach it for your reference.

Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: AvailabilityInternal.h added

AvailabilityInternal.h from Leopard i386

comment:18 Changed 12 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Well, your AvailabilityInternal.h is where it's getting set:

 #ifndef __MAC_OS_X_VERSION_MAX_ALLOWED
        #define __MAC_OS_X_VERSION_MAX_ALLOWED __MAC_10_6
#endif

It looks like you have a Snow Leopard /usr/include/AvailabilityInternal.h but a Leopard /usr/include/malloc/malloc.h

What is the output of:

pkgutil  --file-info /usr/include/malloc/malloc.h
pkgutil  --file-info /usr/include/AvailabilityInternal.h

comment:19 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

$ pkgutil  --file-info /usr/include/malloc/malloc.h
volume: /
path: usr/include/malloc/malloc.h

pkgid: com.apple.pkg.DevSDKLeo
pkg-version: 4.0.0.9000000000.1.1192168948
install-time: 1349136143
uid: 0
gid: 0
mode: 100444
$ pkgutil  --file-info /usr/include/AvailabilityInternal.h
volume: /
path: usr/include/AvailabilityInternal.h

pkgid: com.apple.pkg.DevSDKLeo
pkg-version: 4.0.0.9000000000.1.1192168948
install-time: 1349136143
uid: 0
gid: 0
mode: 100644
$ 

comment:20 Changed 12 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Hmm... yep... it looks like the final version of the Leopard SDK has an identity crisis. That's highly unfortunate.

Try:

platform darwin 9 {
   cppflags-append -D__MAC_OS_X_VERSION_MAX_ALLOWED=1050
}

comment:21 in reply to:  20 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to jeremyhu@…:

Hmm... yep... it looks like the final version of the Leopard SDK has an identity crisis. That's highly unfortunate.

Yup. Looks like this was also discussed on the webkit-dev list last year: http://lists.webkit.org/pipermail/webkit-dev/2012-July/021443.html

Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: webkit-gtk-leopard.diff added

proposed patch

comment:22 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Yes, this patch gets us further, so I'd say commit it. The new error is:

libtool: link: /usr/bin/g++-4.2 -pipe -O2 -arch i386 -O2 -arch i386 -o Programs/LLIntOffsetsExtractor Source/JavaScriptCore/llint/Programs_LLIntOffsetsExtractor-LLIntOffsetsExtractor.o  -L/opt/local/lib ./.libs/libWTF.a -licui18n -licuuc -licudata /opt/local/lib/libgio-2.0.dylib /opt/local/lib/libgmodule-2.0.dylib -lz /opt/local/lib/libgobject-2.0.dylib /opt/local/lib/libgthread-2.0.dylib /opt/local/lib/libffi.dylib /opt/local/lib/libglib-2.0.dylib -lresolv /opt/local/lib/libintl.dylib /opt/local/lib/libiconv.dylib -lc -lm -lpthread -lstdc++
/usr/bin/ruby ./Source/JavaScriptCore/offlineasm/asm.rb ./Source/JavaScriptCore/llint/LowLevelInterpreter.asm Programs/LLIntOffsetsExtractor DerivedSources/JavaScriptCore/LLIntAssembly.h
offlineasm: Parsing ./Source/JavaScriptCore/llint/LowLevelInterpreter.asm and Programs/LLIntOffsetsExtractor and creating assembly file DerivedSources/JavaScriptCore/LLIntAssembly.h.
./Source/JavaScriptCore/offlineasm/offsets.rb:112:in `offsetsAndConfigurationIndex': undefined method `getbyte' for #<File:Programs/LLIntOffsetsExtractor (closed)> (NoMethodError)
	from ./Source/JavaScriptCore/offlineasm/offsets.rb:111:in `loop'
	from ./Source/JavaScriptCore/offlineasm/offsets.rb:111:in `offsetsAndConfigurationIndex'
	from ./Source/JavaScriptCore/offlineasm/offsets.rb:109:in `open'
	from ./Source/JavaScriptCore/offlineasm/offsets.rb:109:in `offsetsAndConfigurationIndex'
	from ./Source/JavaScriptCore/offlineasm/asm.rb:208
make: *** [DerivedSources/JavaScriptCore/LLIntAssembly.h] Error 1

This seems to be a commonly-reported problem with Leopard's ruby, e.g.: https://github.com/mxcl/homebrew/issues/1532

Want to continue here or start a new ticket for this new error?

comment:23 in reply to:  22 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to ryandesign@…:

Yes, this patch gets us further, so I'd say commit it.

My patch does what you said and fixes __MAC_OS_X_VERSION_MAX_ALLOWED in a platform darwin 9 block which will fix the majority of Leopard users who just want to build the port on Leopard. But according to the conversation on webkit-gtk, __MAC_OS_X_VERSION_MAX_ALLOWED refers to the SDK version, so should we also be applying the patch when the 10.5 SDK is being used?

The new error is:

...

Want to continue here or start a new ticket for this new error?

Hey, I should know the answer to this one. :) New issue, new ticket. #37740.

comment:24 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Keywords: haspatch added

comment:25 Changed 12 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Resolution: fixed
Status: newclosed

r101953 should solve this hurdle.

comment:26 in reply to:  25 Changed 12 years ago by mklein-de (Michael Klein)

Replying to jeremyhu@…:

r101953 should solve this hurdle.

Failed to parse file www/webkit-gtk/Portfile: invalid command name "cppflags-append"

did you mean configure.cppflags-append?

comment:27 Changed 12 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Yep, thanks.

r101957

comment:28 Changed 12 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

Note: See TracTickets for help on using tickets.