Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#52811 closed defect (fixed)

mesa @12.0.1_1 fails to build on Leopard i386

Reported by: arboz Owned by: jeremyhu (Jeremy Huddleston Sequoia)
Priority: Normal Milestone:
Component: ports Version: 2.3.4
Keywords: leopard haspatch Cc: udbraumann, ballapete (Peter Dyballa)
Port: mesa

Description

compile fails with this error

In file included from glxcmds.c:57:
../../include/GL/mesa_glinterop.h:62: error: redefinition of typedef 'GLXContext'
../../include/GL/glx.h:165: error: previous declaration of 'GLXContext' was here
make[4]: *** [glxcmds.lo] Error 1

include/GL/mesa_glinterop.h has a block where it appears that glx.h is not expected to be included

/* Forward declarations to avoid inclusion of GL/glx.h */
 typedef struct _XDisplay Display;
 typedef struct __GLXcontextRec *GLXContext;

However it will be included if Apple GL headers are used so, I patched it there to stop the double reference it seemed logical to test for definition of

#ifndef APPLE_GLX_CONTEXT_H

Then it built and installed for me

--->  Activating mesa @12.0.1_1+osmesa+python27

Attachments (2)

patch-include-GL-mesa_glinterop_h.diff (459 bytes) - added by arboz 4 years ago.
Patch to avoid duplicate declaration of 'GLXContext' error
mesa-10.7libcxx-buildfail.log.gz (59.2 KB) - added by ken-cunningham-webuse 4 years ago.

Download all attachments as: .zip

Change History (22)

Changed 4 years ago by arboz

Patch to avoid duplicate declaration of 'GLXContext' error

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

Cc: jeremyhu@… openmaintainer@… removed
Owner: changed from macports-tickets@… to jeremyhu
Status: newassigned

comment:2 Changed 4 years ago by ken-cunningham-webuse

same error on 10.7 x86_64

	/bin/sh ../../libtool  --tag=CC   --mode=compile /usr/bin/clang -DPACKAGE_NAME=\"Mesa\" -DPACKAGE_TARNAME=\"mesa\" -DPACKAGE_VERSION=\"12.0.1\" -DPACKAGE_STRING=\"Mesa\ 12.0.1\" -DPACKAGE_BUGREPORT=\"https://bugs.freedesktop.org/enter_bug.cgi\?product=Mesa\" -DPACKAGE_URL=\"\" -DPACKAGE=\"mesa\" -DVERSION=\"12.0.1\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DYYTEXT_POINTER=1 -DHAVE___BUILTIN_BSWAP32=1 -DHAVE___BUILTIN_BSWAP64=1 -DHAVE___BUILTIN_CLZ=1 -DHAVE___BUILTIN_CLZLL=1 -DHAVE___BUILTIN_CTZ=1 -DHAVE___BUILTIN_EXPECT=1 -DHAVE___BUILTIN_FFS=1 -DHAVE___BUILTIN_FFSLL=1 -DHAVE___BUILTIN_POPCOUNT=1 -DHAVE___BUILTIN_POPCOUNTLL=1 -DHAVE___BUILTIN_UNREACHABLE=1 -DHAVE_FUNC_ATTRIBUTE_CONST=1 -DHAVE_FUNC_ATTRIBUTE_FORMAT=1 -DHAVE_FUNC_ATTRIBUTE_MALLOC=1 -DHAVE_FUNC_ATTRIBUTE_PACKED=1 -DHAVE_FUNC_ATTRIBUTE_PURE=1 -DHAVE_FUNC_ATTRIBUTE_UNUSED=1 -DHAVE_FUNC_ATTRIBUTE_WARN_UNUSED_RESULT=1 -DHAVE_FUNC_ATTRIBUTE_WEAK=1 -DHAVE_DLADDR=1 -DHAVE_PTHREAD_PRIO_INHERIT=1 -DHAVE_PTHREAD=1 -DHAVE_SHA1_IN_COMMONCRYPTO=1 -I.    -I../../include -I../../include/GL/internal -I../../src -I../../src/loader -I../../src/mapi -I../../src/mapi/glapi -I../../src/mapi -I../../src/mapi/glapi -fvisibility=hidden -DGLX_SHARED_GLAPI -DXF86VIDMODE -D_REENTRANT -DDEFAULT_DRIVER_DIR=\"/opt/local/lib/dri\" -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -DUSE_SSE41 -DNDEBUG -DHAVE_XLOCALE_H -DHAVE_SYS_SYSCTL_H -DHAVE_STRTOF -DHAVE_DLOPEN -DHAVE_POSIX_MEMALIGN -DHAVE_SHA1 -DGLX_USE_APPLEGL -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DGLX_ALIAS_UNSUPPORTED -DBUILDING_MESA -DMESA_EGL_NO_X11_HEADERS   -I/opt/local/include -I/opt/local/include  -DGL_LIB_NAME=\"libGL.so.1\" -pipe -Os -arch x86_64 -Wall -std=c99 -Werror=implicit-function-declaration -Werror=missing-prototypes -fno-strict-aliasing -fno-math-errno -fno-trapping-math -fno-builtin-memcmp -Qunused-arguments  -MT glxconfig.lo -MD -MP -MF $depbase.Tpo -c -o glxconfig.lo glxconfig.c &&\
	mv -f $depbase.Tpo $depbase.Plo
In file included from glxcmds.c:57:
../../include/GL/mesa_glinterop.h:61:26: error: redefinition of typedef 'Display' is invalid in C [-Wtypedef-redefinition]
typedef struct _XDisplay Display;

                         ^
/opt/local/include/X11/Xlib.h:487:26: note: previous definition is here
typedef struct _XDisplay Display;
                         ^
In file included from glxcmds.c:57:
../../include/GL/mesa_glinterop.h:62:33: error: redefinition of typedef 'GLXContext' is invalid in C [-Wtypedef-redefinition]
typedef struct __GLXcontextRec *GLXContext;
                                ^
../../include/GL/glx.h:165:33: note: previous definition is here
typedef struct __GLXcontextRec *GLXContext;

and same patch fixes it. Thanks.

Last edited 4 years ago by ken-cunningham-webuse (previous) (diff)

comment:3 Changed 4 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Thanks. I've got a bit of a queue on my lap. It looks good to me, so if someone can commit, I'd appreciate it.

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

Status: assignedaccepted

comment:5 Changed 4 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Or send a pull request, and I'll merge it.

comment:6 Changed 4 years ago by udbraumann

Cc: udbraumann added

comment:7 in reply to:  2 ; Changed 4 years ago by udbraumann

Replying to ken-cunningham-webuse:

same error on 10.7 x86_64

FWIW, same error on 10.5.8 PPC

comment:8 Changed 4 years ago by ken-cunningham-webuse

I'm not sure over what range of systems this patch needs to be applied. I know it was not needed on 10.12, and it appears to be needed on 10.7 and lower.

10.8 to 10.11 are unclear to me as yet.

I made a PR for 10.7 and lower, but I think the full extent of where it is needed needs to be explored a bit further.

comment:9 Changed 4 years ago by dbevans (David B. Evans)

Per https://packages.macports.org, binary packages where successfully built by the buildbots for darwin 10 through 16 or 10.6+. Both 32 bit and 64 bit builds were successful on 10.6. So looks like the problem is 10.5 and earlier.

comment:10 Changed 4 years ago by ken-cunningham-webuse

and yet I had the problem on 10.7 as above ... I won't pretend to have this one figured out. Rebuilding it on 10.7 now just to see if it still fails on me.

Perhaps this patch can be applied unconditionally, and only will be used if needed?

I set the PR to allow mods from maintainers, if anyone gets deep insight.

Last edited 4 years ago by ken-cunningham-webuse (previous) (diff)

comment:11 in reply to:  7 Changed 4 years ago by udbraumann

Replying to udbraumann:

FWIW, same error on 10.5.8 PPC

Patch also works on 10.5.8 PPC, thanks!

comment:12 Changed 4 years ago by ken-cunningham-webuse

Yep. Build on 10.7 failed again. I have my 10.7 system set up with libcxx enabled. Perhaps that is influencing the build? Build failure log for 10.7 attached...

Changed 4 years ago by ken-cunningham-webuse

comment:13 Changed 4 years ago by ken-cunningham-webuse

I wonder if this error

error: redefinition of typedef 'Display' is invalid in C [-Wtypedef-redefinition]

might be due in part to redefining typedefs only being valid under certain situations. The build that fails on 10.7 is using this standard in the build line...

-std=c99

comment:14 Changed 4 years ago by ken-cunningham-webuse

Resolution: fixed
Status: acceptedclosed

In 041ea9a5/macports-ports:

mesa: Address a build failure on Leopard

Fixes #52811

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

That's a syntax error. You need curly braces instead of parentheses.

comment:16 Changed 4 years ago by ken-cunningham-webuse

crud. Sorry - will fix.

comment:17 Changed 4 years ago by ballapete (Peter Dyballa)

Cc: ballapete added

comment:18 Changed 4 years ago by ballapete (Peter Dyballa)

On Mac OS X 10.6.8, Snow Leopard, I cannot see that patch file patch-include-GL-mesa_glinterop_h.diff​ is applied:

MACOSX_DEPLOYMENT_TARGET='10.6'
DEBUG: Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_x11_mesa/mesa/work/mesa-12.0.1" && /usr/bin/patch -p1'
DEBUG: Executing command line:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_x11_mesa/mesa/work/mesa-12.0.1" && /usr/bin/patch -p1 < '/opt/local/var/macports/sources/nue.de.rsync.macports.org/macports/release/tarballs/ports/x11/mesa/files/0001-mesa-Deal-with-size-differences-between-GLuint-and-G.patch'
patching file src/mesa/main/shaderapi.c
Hunk #1 succeeded at 482 (offset 6 lines).
Hunk #2 succeeded at 1403 (offset 8 lines).
--->  Applying 0002-applegl-Provide-requirements-of-_SET_DrawBuffers.patch
DEBUG: Environment: 
CC_PRINT_OPTIONS='YES'
CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_x11_mesa/mesa/work/.CC_PRINT_OPTIONS'
CPATH='/opt/local/include'
LIBRARY_PATH='/opt/local/lib'
MACOSX_DEPLOYMENT_TARGET='10.6'
DEBUG: Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_x11_mesa/mesa/work/mesa-12.0.1" && /usr/bin/patch -p1'
DEBUG: Executing command line:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_x11_mesa/mesa/work/mesa-12.0.1" && /usr/bin/patch -p1 < '/opt/local/var/macports/sources/nue.de.rsync.macports.org/macports/release/tarballs/ports/x11/mesa/files/0002-applegl-Provide-requirements-of-_SET_DrawBuffers.patch'
patching file src/glx/Makefile.am
Hunk #1 succeeded at 142 with fuzz 1 (offset -1 lines).
patching file src/glx/apple/apple_glapi.c
--->  Applying 0003-glext.h-Add-missing-include-of-stddef.h-for-ptrdiff_.patch
DEBUG: Environment: 
CC_PRINT_OPTIONS='YES'
CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_x11_mesa/mesa/work/.CC_PRINT_OPTIONS'
CPATH='/opt/local/include'
LIBRARY_PATH='/opt/local/lib'
MACOSX_DEPLOYMENT_TARGET='10.6'
DEBUG: Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_x11_mesa/mesa/work/mesa-12.0.1" && /usr/bin/patch -p1'
DEBUG: Executing command line:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_x11_mesa/mesa/work/mesa-12.0.1" && /usr/bin/patch -p1 < '/opt/local/var/macports/sources/nue.de.rsync.macports.org/macports/release/tarballs/ports/x11/mesa/files/0003-glext.h-Add-missing-include-of-stddef.h-for-ptrdiff_.patch'
patching file include/GL/glext.h
--->  Applying no-missing-prototypes-error.patch
DEBUG: Environment: 
CC_PRINT_OPTIONS='YES'
CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_x11_mesa/mesa/work/.CC_PRINT_OPTIONS'
CPATH='/opt/local/include'
LIBRARY_PATH='/opt/local/lib'
MACOSX_DEPLOYMENT_TARGET='10.6'
DEBUG: Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_x11_mesa/mesa/work/mesa-12.0.1" && /usr/bin/patch -p1'
DEBUG: Executing command line:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_x11_mesa/mesa/work/mesa-12.0.1" && /usr/bin/patch -p1 < '/opt/local/var/macports/sources/nue.de.rsync.macports.org/macports/release/tarballs/ports/x11/mesa/files/no-missing-prototypes-error.patch'
patching file configure.ac
Hunk #1 succeeded at 277 with fuzz 2 (offset 95 lines).
--->  Applying static-strndup.patch
DEBUG: Environment: 
CC_PRINT_OPTIONS='YES'
CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_x11_mesa/mesa/work/.CC_PRINT_OPTIONS'
CPATH='/opt/local/include'
LIBRARY_PATH='/opt/local/lib'
MACOSX_DEPLOYMENT_TARGET='10.6'
DEBUG: Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_x11_mesa/mesa/work/mesa-12.0.1" && /usr/bin/patch -p1'
DEBUG: Executing command line:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_x11_mesa/mesa/work/mesa-12.0.1" && /usr/bin/patch -p1 < '/opt/local/var/macports/sources/nue.de.rsync.macports.org/macports/release/tarballs/ports/x11/mesa/files/static-strndup.patch'
patching file src/mesa/drivers/dri/common/xmlconfig.c
Hunk #1 succeeded at 111 (offset 6 lines).
patching file src/util/ralloc.c
Hunk #1 succeeded at 357 with fuzz 2 (offset 4 lines).
patching file src/compiler/glsl/linker.cpp
Hunk #1 succeeded at 520 (offset 2 lines).
DEBUG: Privilege de-escalation not attempted as not running as root.
DEBUG: configure phase started at Sun Nov 27 22:14:13 CET 2016
--->  Configuring mesa

When I add additionally that patch file to the patchfiles block earlier in Portfile it gets applied:

MACOSX_DEPLOYMENT_TARGET='10.6'
DEBUG: Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_x11_mesa/mesa/work" && /opt/local/bin/xz -dc '/opt/local/var/macports/distfiles/mesa/mesa-12.0.1.tar.xz' | /usr/bin/gnutar --no-same-owner -xf -'
DEBUG: Executing command line:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_x11_mesa/mesa/work" && /opt/local/bin/xz -dc '/opt/local/var/macports/distfiles/mesa/mesa-12.0.1.tar.xz' | /usr/bin/gnutar --no-same-owner -xf - 
DEBUG: euid/egid changed to: 0/0
DEBUG: chowned /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_x11_mesa/mesa/work to macports
DEBUG: euid/egid changed to: 504/501
DEBUG: Privilege de-escalation not attempted as not running as root.
DEBUG: patch phase started at Sun Nov 27 22:28:31 CET 2016
DEBUG: Executing org.macports.patch (mesa)
--->  Applying patches to mesa
--->  Applying 0001-mesa-Deal-with-size-differences-between-GLuint-and-G.patch
DEBUG: Environment: 
CC_PRINT_OPTIONS='YES'
CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_x11_mesa/mesa/work/.CC_PRINT_OPTIONS'
CPATH='/opt/local/include'
LIBRARY_PATH='/opt/local/lib'
MACOSX_DEPLOYMENT_TARGET='10.6'
DEBUG: Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_x11_mesa/mesa/work/mesa-12.0.1" && /usr/bin/patch -p1'
DEBUG: Executing command line:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_x11_mesa/mesa/work/mesa-12.0.1" && /usr/bin/patch -p1 < '/opt/local/var/macports/sources/nue.de.rsync.macports.org/macports/release/tarballs/ports/x11/mesa/files/0001-mesa-Deal-with-size-differences-between-GLuint-and-G.patch'
patching file src/mesa/main/shaderapi.c
Hunk #1 succeeded at 482 (offset 6 lines).
Hunk #2 succeeded at 1403 (offset 8 lines).
--->  Applying 0002-applegl-Provide-requirements-of-_SET_DrawBuffers.patch
DEBUG: Environment: 
CC_PRINT_OPTIONS='YES'
CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_x11_mesa/mesa/work/.CC_PRINT_OPTIONS'
CPATH='/opt/local/include'
LIBRARY_PATH='/opt/local/lib'
MACOSX_DEPLOYMENT_TARGET='10.6'
DEBUG: Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_x11_mesa/mesa/work/mesa-12.0.1" && /usr/bin/patch -p1'
DEBUG: Executing command line:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_x11_mesa/mesa/work/mesa-12.0.1" && /usr/bin/patch -p1 < '/opt/local/var/macports/sources/nue.de.rsync.macports.org/macports/release/tarballs/ports/x11/mesa/files/0002-applegl-Provide-requirements-of-_SET_DrawBuffers.patch'
patching file src/glx/Makefile.am
Hunk #1 succeeded at 142 with fuzz 1 (offset -1 lines).
patching file src/glx/apple/apple_glapi.c
--->  Applying 0003-glext.h-Add-missing-include-of-stddef.h-for-ptrdiff_.patch
DEBUG: Environment: 
CC_PRINT_OPTIONS='YES'
CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_x11_mesa/mesa/work/.CC_PRINT_OPTIONS'
CPATH='/opt/local/include'
LIBRARY_PATH='/opt/local/lib'
MACOSX_DEPLOYMENT_TARGET='10.6'
DEBUG: Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_x11_mesa/mesa/work/mesa-12.0.1" && /usr/bin/patch -p1'
DEBUG: Executing command line:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_x11_mesa/mesa/work/mesa-12.0.1" && /usr/bin/patch -p1 < '/opt/local/var/macports/sources/nue.de.rsync.macports.org/macports/release/tarballs/ports/x11/mesa/files/0003-glext.h-Add-missing-include-of-stddef.h-for-ptrdiff_.patch'
patching file include/GL/glext.h
--->  Applying patch-include-GL-mesa_glinterop_h.diff
DEBUG: Environment: 
CC_PRINT_OPTIONS='YES'
CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_x11_mesa/mesa/work/.CC_PRINT_OPTIONS'
CPATH='/opt/local/include'
LIBRARY_PATH='/opt/local/lib'
MACOSX_DEPLOYMENT_TARGET='10.6'
DEBUG: Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_x11_mesa/mesa/work/mesa-12.0.1" && /usr/bin/patch -p1'
DEBUG: Executing command line:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_x11_mesa/mesa/work/mesa-12.0.1" && /usr/bin/patch -p1 < '/opt/local/var/macports/sources/nue.de.rsync.macports.org/macports/release/tarballs/ports/x11/mesa/files/patch-include-GL-mesa_glinterop_h.diff'
patching file include/GL/mesa_glinterop.h
--->  Applying no-missing-prototypes-error.patch
DEBUG: Environment: 
CC_PRINT_OPTIONS='YES'
CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_x11_mesa/mesa/work/.CC_PRINT_OPTIONS'
CPATH='/opt/local/include'
LIBRARY_PATH='/opt/local/lib'
MACOSX_DEPLOYMENT_TARGET='10.6'
DEBUG: Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_x11_mesa/mesa/work/mesa-12.0.1" && /usr/bin/patch -p1'
DEBUG: Executing command line:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_x11_mesa/mesa/work/mesa-12.0.1" && /usr/bin/patch -p1 < '/opt/local/var/macports/sources/nue.de.rsync.macports.org/macports/release/tarballs/ports/x11/mesa/files/no-missing-prototypes-error.patch'
patching file configure.ac
Hunk #1 succeeded at 277 with fuzz 2 (offset 95 lines).
--->  Applying static-strndup.patch
DEBUG: Environment: 
CC_PRINT_OPTIONS='YES'
CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_x11_mesa/mesa/work/.CC_PRINT_OPTIONS'
CPATH='/opt/local/include'
LIBRARY_PATH='/opt/local/lib'
MACOSX_DEPLOYMENT_TARGET='10.6'
DEBUG: Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_x11_mesa/mesa/work/mesa-12.0.1" && /usr/bin/patch -p1'
DEBUG: Executing command line:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_x11_mesa/mesa/work/mesa-12.0.1" && /usr/bin/patch -p1 < '/opt/local/var/macports/sources/nue.de.rsync.macports.org/macports/release/tarballs/ports/x11/mesa/files/static-strndup.patch'
patching file src/mesa/drivers/dri/common/xmlconfig.c
Hunk #1 succeeded at 111 (offset 6 lines).
patching file src/util/ralloc.c
Hunk #1 succeeded at 357 with fuzz 2 (offset 4 lines).
patching file src/compiler/glsl/linker.cpp
Hunk #1 succeeded at 520 (offset 2 lines).
DEBUG: Privilege de-escalation not attempted as not running as root.
DEBUG: configure phase started at Sun Nov 27 22:28:32 CET 2016
--->  Configuring mesa

… and it built!

Mac OS X 10.6.8, Snow Leopard, x86_64.

comment:19 Changed 4 years ago by ken-cunningham-webuse

I just tried this patch on Sierra, and mesa builds and destroots without error with the patch applied.

So I suspect this patch might just be applied unconditionally to all systems, therefore -- but I don't fully understand the implications of doing so, if any.

comment:20 in reply to:  13 Changed 4 years ago by arboz

Replying to ken-cunningham-webuse:

I wonder if this error

error: redefinition of typedef 'Display' is invalid in C [-Wtypedef-redefinition]

might be due in part to redefining typedefs only being valid under certain situations. The build that fails on 10.7 is using this standard in the build line...

-std=c99

As I noted earlier it seem to be related to including the APPLE GL headers

it seems ths would not be true if using some other platform (linux or BSD), however since this is macports it seems correct to include the patch.

Since I am an oldguy I barely know whether compiling with

-std=c++11

and without the

[-Wtypedef-redefinition]

would work.

The most recent revision built just fine for me on Leopard i386

#52958 seems to be about this same issue

Last edited 4 years ago by arboz (previous) (diff)
Note: See TracTickets for help on using tickets.