Opened 5 years ago
Closed 5 years ago
#58524 closed defect (fixed)
gegl-0.4 @0.4.16_0+x11: error: unknown type name 'vm_statistics64_data_t'
Reported by: | kencu (Ken) | Owned by: | dbevans (David B. Evans) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | haspatch | Cc: | |
Port: | gegl-0.4 |
Description
I noticed this on PPC Leopard, and I assume it applies to all 32bit/universal builds. I haven't yet tried a 32bit/universal build on a system > 10.5 to confirm that, however.
There has been a new memory-evaluation function added to gegl-config.c
<https://github.com/GNOME/gegl/commit/ac331b5c0e3d940b64bb811b0f54e86c7d312917#diff-c462b14ada961cc89bb7257fe62d6365> and it appears that it does not consider 32bit builds.
It delivers this error:
libtool: compile: /opt/local/bin/gcc-mp-6 -m32 -DHAVE_CONFIG_H -I. -I.. -I.. -I../gegl -I../gegl -I../gegl/buffer -I../gegl/buffer -I../gegl/graph -I../gegl/graph -I../gegl/operation -I../gegl/operation -I../gegl/opencl -I../gegl/opencl -I../gegl/process -I../gegl/process -I../gegl/property-types -I../gegl/property-types -DLIBDIR=\"/opt/local/lib\" -DG_LOG_DOMAIN=\"GEGL\" -DGEGL_LOCALEDIR=\"/opt/local/share/locale\" -I/opt/local/include -I/opt/local/include/LegacySupport -I/opt/local/include/LegacySupport -D_REENTRANT -I/opt/local/include/json-glib-1.0 -I/opt/local/include/gio-unix-2.0/ -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include/babl-0.1 -pipe -Os -I/opt/local/include/LegacySupport -fno-altivec -I/opt/local/include/LegacySupport -m32 -Wall -Wdeclaration-after-statement -Wmissing-prototypes -Wmissing-declarations -Winit-self -Wpointer-arith -Wold-style-definition -MT gegl-config.lo -MD -MP -MF .deps/gegl-config.Tpo -c gegl-config.c -fno-common -DPIC -o .libs/gegl-config.o gegl-config.c: In function 'gegl_config_class_init': gegl-config.c:263:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] vm_size_t page_size = sysconf (_SC_PAGESIZE); ^~~~~~~~~ gegl-config.c:265:5: error: unknown type name 'vm_statistics64_data_t' vm_statistics64_data_t vm_stat; ^~~~~~~~~~~~~~~~~~~~~~ gegl-config.c:267:36: error: 'HOST_VM_INFO64_COUNT' undeclared (first use in this function) unsigned int count = HOST_VM_INFO64_COUNT; ^~~~~~~~~~~~~~~~~~~~ gegl-config.c:267:36: note: each undeclared identifier is reported only once for each function it appears in gegl-config.c:269:12: warning: implicit declaration of function 'host_statistics64' [-Wimplicit-function-declaration] kret = host_statistics64 (host, HOST_VM_INFO64, (host_info64_t)&vm_stat, &count); ^~~~~~~~~~~~~~~~~ gegl-config.c:269:37: error: 'HOST_VM_INFO64' undeclared (first use in this function) kret = host_statistics64 (host, HOST_VM_INFO64, (host_info64_t)&vm_stat, &count); ^~~~~~~~~~~~~~ gegl-config.c:269:54: error: 'host_info64_t' undeclared (first use in this function) kret = host_statistics64 (host, HOST_VM_INFO64, (host_info64_t)&vm_stat, &count); ^~~~~~~~~~~~~ gegl-config.c:273:38: error: request for member 'free_count' in something not a structure or union mem_available = (long) (vm_stat.free_count + vm_stat.active_count ^ gegl-config.c:273:59: error: request for member 'active_count' in something not a structure or union mem_available = (long) (vm_stat.free_count + vm_stat.active_count ^ gegl-config.c:274:40: error: request for member 'inactive_count' in something not a structure or union + vm_stat.inactive_count ^ make[3]: *** [gegl-config.lo] Error 1
I'll attach a simple patch that fixes the build by enabling a 32bit pathway.
Attachments (1)
Change History (9)
Changed 5 years ago by kencu (Ken)
Attachment: | patch-gegl-32bit-host-statistics.diff added |
---|
comment:1 Changed 5 years ago by kencu (Ken)
Keywords: | haspatch added |
---|
comment:2 Changed 5 years ago by rmottola (Riccardo)
comment:3 Changed 5 years ago by rmottola (Riccardo)
Any news on this? I have just been hit by this again during an upgrade and it still applies&works.
@kencu did you by change also request inclusion upstream?
comment:4 Changed 5 years ago by kencu (Ken)
I did not, but I think Dave would consider it locally here in MacPorts.
comment:5 Changed 5 years ago by dbevans (David B. Evans)
comment:6 Changed 5 years ago by dbevans (David B. Evans)
As you can see, gegl-0.4 is now obsolete, replaced by new port gegl @0.4.18 which now builds using meson. Nonetheless, this patch applies cleanly (with a small offset) to the current code and has no ill effects on the 64bit build. I'll go ahead and apply it to the gegl port but will leave this ticket open for confirmation that it still fixes 32 bit builds of the current version. Let me know. Thanks.
comment:7 Changed 5 years ago by dbevans (David B. Evans)
comment:8 Changed 5 years ago by dbevans (David B. Evans)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Assuming this is fixed by the commit above.
I confirm this patch is needed on 10.5 x86 and allows compilation!