Opened 2 years ago

Closed 2 years ago

#66269 closed defect (fixed)

mesa @22.1.7 does not build on PPC Tiger, Mac OS X 10.4.11, because of inappropriate format specifiers

Reported by: ballapete (Peter "Pete" Dyballa) Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.8.0
Keywords: tiger ppc Cc: jeremyhu@…
Port: mesa

Description

[926/980] /opt/local/bin/gcc-mp-7 -Isrc/glx/apple/libglxapple.a.p -Isrc/glx/apple -I../mesa-22.1.7/src/glx/apple -Isrc/mesa -I../mesa-22.1.7/src/mesa -Isrc/glx -I../mesa-22.1.7/src/glx -Isrc -I../mesa-22.1.7/src -Iinclude -I../mesa-22.1.7/include -Isrc/mapi/glapi -I../mesa-22.1.7/src/mapi/glapi -Isrc/loader -I../mesa-22.1.7/src/loader -Isrc/mapi/glapi/gen -I/opt/local/include/LegacySupport -I/opt/local/include -I/opt/local/var/macports/sources/nue.de.rsync.macports.org/macports/release/tarballs/ports/x11/mesa/files/include -fvisibility=hidden -fdiagnostics-color=always -Wall -Winvalid-pch -std=c11 -O2 -g -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS '-DPACKAGE_VERSION="22.1.7"' '-DPACKAGE_BUGREPORT="https://gitlab.freedesktop.org/mesa/mesa/-/issues"' -DHAVE_SWRAST -DBUILDING_MESA -DHAVE_X11_PLATFORM -DHAVE_XCB_PLATFORM -DUSE_ELF_TLS -DENABLE_ST_OMX_BELLAGIO=0 -DENABLE_ST_OMX_TIZONIA=0 -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DGLX_USE_APPLEGL -DENABLE_SHADER_CACHE -DHAVE___BUILTIN_BSWAP32 -DHAVE___BUILTIN_BSWAP64 -DHAVE___BUILTIN_CLZ -DHAVE___BUILTIN_CLZLL -DHAVE___BUILTIN_CTZ -DHAVE___BUILTIN_EXPECT -DHAVE___BUILTIN_FFS -DHAVE___BUILTIN_FFSLL -DHAVE___BUILTIN_POPCOUNT -DHAVE___BUILTIN_POPCOUNTLL -DHAVE___BUILTIN_UNREACHABLE -DHAVE_FUNC_ATTRIBUTE_CONST -DHAVE_FUNC_ATTRIBUTE_FLATTEN -DHAVE_FUNC_ATTRIBUTE_MALLOC -DHAVE_FUNC_ATTRIBUTE_PURE -DHAVE_FUNC_ATTRIBUTE_UNUSED -DHAVE_FUNC_ATTRIBUTE_WARN_UNUSED_RESULT -DHAVE_FUNC_ATTRIBUTE_WEAK -DHAVE_FUNC_ATTRIBUTE_FORMAT -DHAVE_FUNC_ATTRIBUTE_PACKED -DHAVE_FUNC_ATTRIBUTE_RETURNS_NONNULL -DHAVE_FUNC_ATTRIBUTE_NORETURN -DHAVE_FUNC_ATTRIBUTE_VISIBILITY -DUSE_GCC_ATOMIC_BUILTINS -DMISSING_64BIT_ATOMICS -DHAS_SCHED_H -DHAVE_SYS_SYSCTL_H -DHAVE_XLOCALE_H -DHAVE_DLFCN_H -DHAVE_SYS_SHM_H -DHAVE_STRTOF -DHAVE_TIMESPEC_GET -DHAVE_FLOCK -DHAVE_STRTOK_R -DHAVE_QSORT_R -DHAVE_POSIX_MEMALIGN -DHAVE_DIRENT_D_TYPE -DHAVE_STRTOD_L -DHAVE_DLADDR -DHAVE_ZLIB -DHAVE_ZSTD -DHAVE_COMPRESSION -DHAVE_PTHREAD -DMESA_EXECMEM -DVK_USE_PLATFORM_XCB_KHR -DVK_USE_PLATFORM_XLIB_KHR -DVK_USE_PLATFORM_MACOS_MVK -DVK_USE_PLATFORM_METAL_EXT -DVK_ENABLE_BETA_EXTENSIONS -Werror=implicit-function-declaration -Werror=missing-prototypes -Werror=return-type -Werror=empty-body -Werror=incompatible-pointer-types -Werror=int-conversion -Wimplicit-fallthrough -Wno-missing-field-initializers -Wno-format-truncation -fno-math-errno -fno-trapping-math -fno-common -Werror=format -Wformat-security -pipe -Os -arch ppc -MD -MQ src/glx/apple/libglxapple.a.p/apple_cgl.c.o -MF src/glx/apple/libglxapple.a.p/apple_cgl.c.o.d -o src/glx/apple/libglxapple.a.p/apple_cgl.c.o -c ../mesa-22.1.7/src/glx/apple/apple_cgl.c
FAILED: src/glx/apple/libglxapple.a.p/apple_cgl.c.o 
/opt/local/bin/gcc-mp-7 -Isrc/glx/apple/libglxapple.a.p -Isrc/glx/apple -I../mesa-22.1.7/src/glx/apple -Isrc/mesa -I../mesa-22.1.7/src/mesa -Isrc/glx -I../mesa-22.1.7/src/glx -Isrc -I../mesa-22.1.7/src -Iinclude -I../mesa-22.1.7/include -Isrc/mapi/glapi -I../mesa-22.1.7/src/mapi/glapi -Isrc/loader -I../mesa-22.1.7/src/loader -Isrc/mapi/glapi/gen -I/opt/local/include/LegacySupport -I/opt/local/include -I/opt/local/var/macports/sources/nue.de.rsync.macports.org/macports/release/tarballs/ports/x11/mesa/files/include -fvisibility=hidden -fdiagnostics-color=always -Wall -Winvalid-pch -std=c11 -O2 -g -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS '-DPACKAGE_VERSION="22.1.7"' '-DPACKAGE_BUGREPORT="https://gitlab.freedesktop.org/mesa/mesa/-/issues"' -DHAVE_SWRAST -DBUILDING_MESA -DHAVE_X11_PLATFORM -DHAVE_XCB_PLATFORM -DUSE_ELF_TLS -DENABLE_ST_OMX_BELLAGIO=0 -DENABLE_ST_OMX_TIZONIA=0 -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DGLX_USE_APPLEGL -DENABLE_SHADER_CACHE -DHAVE___BUILTIN_BSWAP32 -DHAVE___BUILTIN_BSWAP64 -DHAVE___BUILTIN_CLZ -DHAVE___BUILTIN_CLZLL -DHAVE___BUILTIN_CTZ -DHAVE___BUILTIN_EXPECT -DHAVE___BUILTIN_FFS -DHAVE___BUILTIN_FFSLL -DHAVE___BUILTIN_POPCOUNT -DHAVE___BUILTIN_POPCOUNTLL -DHAVE___BUILTIN_UNREACHABLE -DHAVE_FUNC_ATTRIBUTE_CONST -DHAVE_FUNC_ATTRIBUTE_FLATTEN -DHAVE_FUNC_ATTRIBUTE_MALLOC -DHAVE_FUNC_ATTRIBUTE_PURE -DHAVE_FUNC_ATTRIBUTE_UNUSED -DHAVE_FUNC_ATTRIBUTE_WARN_UNUSED_RESULT -DHAVE_FUNC_ATTRIBUTE_WEAK -DHAVE_FUNC_ATTRIBUTE_FORMAT -DHAVE_FUNC_ATTRIBUTE_PACKED -DHAVE_FUNC_ATTRIBUTE_RETURNS_NONNULL -DHAVE_FUNC_ATTRIBUTE_NORETURN -DHAVE_FUNC_ATTRIBUTE_VISIBILITY -DUSE_GCC_ATOMIC_BUILTINS -DMISSING_64BIT_ATOMICS -DHAS_SCHED_H -DHAVE_SYS_SYSCTL_H -DHAVE_XLOCALE_H -DHAVE_DLFCN_H -DHAVE_SYS_SHM_H -DHAVE_STRTOF -DHAVE_TIMESPEC_GET -DHAVE_FLOCK -DHAVE_STRTOK_R -DHAVE_QSORT_R -DHAVE_POSIX_MEMALIGN -DHAVE_DIRENT_D_TYPE -DHAVE_STRTOD_L -DHAVE_DLADDR -DHAVE_ZLIB -DHAVE_ZSTD -DHAVE_COMPRESSION -DHAVE_PTHREAD -DMESA_EXECMEM -DVK_USE_PLATFORM_XCB_KHR -DVK_USE_PLATFORM_XLIB_KHR -DVK_USE_PLATFORM_MACOS_MVK -DVK_USE_PLATFORM_METAL_EXT -DVK_ENABLE_BETA_EXTENSIONS -Werror=implicit-function-declaration -Werror=missing-prototypes -Werror=return-type -Werror=empty-body -Werror=incompatible-pointer-types -Werror=int-conversion -Wimplicit-fallthrough -Wno-missing-field-initializers -Wno-format-truncation -fno-math-errno -fno-trapping-math -fno-common -Werror=format -Wformat-security -pipe -Os -arch ppc -MD -MQ src/glx/apple/libglxapple.a.p/apple_cgl.c.o -MF src/glx/apple/libglxapple.a.p/apple_cgl.c.o.d -o src/glx/apple/libglxapple.a.p/apple_cgl.c.o -c ../mesa-22.1.7/src/glx/apple/apple_cgl.c
In file included from ../mesa-22.1.7/src/glx/apple/apple_glx.h:40:0,
                 from ../mesa-22.1.7/src/glx/apple/apple_cgl.c:36:
../mesa-22.1.7/src/glx/apple/apple_cgl.c: In function 'apple_cgl_init':
../mesa-22.1.7/src/glx/apple/apple_cgl.c:92:25: error: format '%d' expects argument of type 'int', but argument 6 has type 'GLint {aka long int}' [-Werror=format=]
    apple_glx_diagnostic("CGL major %d minor %d\n", apple_cgl.version_major, apple_cgl.version_minor);
                         ^                          ~~~~~~~~~~~
../mesa-22.1.7/src/glx/apple/apple_glx_log.h:42:53: note: in definition of macro 'apple_glx_log'
     _apple_glx_log(l, __FILE__, __func__, __LINE__, f, ## args)
                                                     ^
../mesa-22.1.7/src/glx/apple/apple_cgl.c:92:4: note: in expansion of macro 'apple_glx_diagnostic'
    apple_glx_diagnostic("CGL major %d minor %d\n", apple_cgl.version_major, apple_cgl.version_minor);
    ^~~~~~~~~~~~~~~~~~~~
../mesa-22.1.7/src/glx/apple/apple_cgl.c:92:25: error: format '%d' expects argument of type 'int', but argument 7 has type 'GLint {aka long int}' [-Werror=format=]
    apple_glx_diagnostic("CGL major %d minor %d\n", apple_cgl.version_major, apple_cgl.version_minor);
                         ^                                                   ~~~~~~~~~~~
../mesa-22.1.7/src/glx/apple/apple_glx_log.h:42:53: note: in definition of macro 'apple_glx_log'
     _apple_glx_log(l, __FILE__, __func__, __LINE__, f, ## args)
                                                     ^
../mesa-22.1.7/src/glx/apple/apple_cgl.c:92:4: note: in expansion of macro 'apple_glx_diagnostic'
    apple_glx_diagnostic("CGL major %d minor %d\n", apple_cgl.version_major, apple_cgl.version_minor);
    ^~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
ninja: build stopped: subcommand failed.
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_x11_mesa/mesa/work/build" && /opt/local/bin/ninja -j1 -v 

Attachments (2)

main.log (2.4 MB) - added by ballapete (Peter "Pete" Dyballa) 2 years ago.
Main.log from PPC Tiger, Mac OS X 10.4.11
patch-tiger-format-specifier.diff (555 bytes) - added by ballapete (Peter "Pete" Dyballa) 2 years ago.
Corrected patch

Change History (5)

Changed 2 years ago by ballapete (Peter "Pete" Dyballa)

Attachment: main.log added

Main.log from PPC Tiger, Mac OS X 10.4.11

comment:1 Changed 2 years ago by ballapete (Peter "Pete" Dyballa)

With this patch, applied manually to mesa-22.1.7/src/glx/apple/apple_cgl.c the port built.

Changed 2 years ago by ballapete (Peter "Pete" Dyballa)

Corrected patch

comment:3 Changed 2 years ago by kencu (Ken)

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.