Opened 18 months ago

Last modified 8 months ago

#72078 new defect

mesa fails to build on Leopard

Reported by: rmottola (Riccardo) Owned by:
Priority: Normal Milestone:
Component: ports Version:
Keywords: leopard Cc:
Port: mesa

Description

with clang-11 on 64bit 10.5

../mesa-24.3.4/src/util/os_misc.c:401:4: error: unknown type name 'vm_statistics64_data_t'; did you mean 'vm_statistics_data_t'?
   vm_statistics64_data_t vm_stats;
   ^~~~~~~~~~~~~~~~~~~~~~
   vm_statistics_data_t
/usr/include/mach/vm_statistics.h:100:30: note: 'vm_statistics_data_t' declared here
typedef struct vm_statistics    vm_statistics_data_t;
                                ^
../mesa-24.3.4/src/util/os_misc.c:402:35: error: use of undeclared identifier 'HOST_VM_INFO64_COUNT'
   mach_msg_type_number_t count = HOST_VM_INFO64_COUNT;
                                  ^
../mesa-24.3.4/src/util/os_misc.c:403:8: error: implicit declaration of function 'host_statistics64' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
   if (host_statistics64(mach_host_self(), HOST_VM_INFO,
       ^
../mesa-24.3.4/src/util/os_misc.c:403:8: note: did you mean 'host_statistics'?
/usr/include/mach/mach_host.h:267:15: note: 'host_statistics' declared here
kern_return_t host_statistics
              ^
../mesa-24.3.4/src/util/os_misc.c:404:11: error: use of undeclared identifier 'host_info64_t'
         (host_info64_t)&vm_stats, &count) != KERN_SUCCESS) {
          ^
4 errors generated.

Attachments (1)

mesa_os_misc.diff (879 bytes) - added by rmottola (Riccardo) 18 months ago.
10.5 patch

Download all attachments as: .zip

Change History (5)

comment:1 Changed 18 months ago by rmottola (Riccardo)

I remeber off-head a similar issue, my first guess would be that 10.5 in 64bit is unexpected.

comment:2 Changed 18 months ago by rmottola (Riccardo)

I crafted a patch shich should be used only on 10.5, essentially using 32bit structures even on 64bit. Makes no sense on 10.4, since it is 32bit only. If no issues are reported, neither on 10.6 or later, but in case, possibly just extend.

I didn't make a complicated ifdef stuff, so it is not generelly applicable or upstreamable.

Changed 18 months ago by rmottola (Riccardo)

Attachment: mesa_os_misc.diff added

10.5 patch

comment:3 Changed 16 months ago by rmottola (Riccardo)

may be add this patch? I just used it again, confirm it still applies.

comment:4 Changed 8 months ago by Dave-Allured (Dave Allured)

Has duplicate: #72373

Note: See TracTickets for help on using tickets.