Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#54643 closed defect (fixed)

Mesa@17.1.6 fails to build with Apple GCC 4.2 on PPC Leopard, Mac OS X 10.6.8, because "thread-local storage not supported for this target"

Reported by: ballapete (Peter "Pete" Dyballa) Owned by: jeremyhu (Jeremy Huddleston Sequoia)
Priority: Normal Milestone:
Component: ports Version: 2.4.1
Keywords: leopard Cc: rlhamil, MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Port: mesa

Description

Making all in src
make[1]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_x11_mesa/mesa/work/mesa-17.1.6/src'
updating git_sha1.h
/usr/bin/make  all-recursive
make[2]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_x11_mesa/mesa/work/mesa-17.1.6/src'
Making all in .
make[3]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_x11_mesa/mesa/work/mesa-17.1.6/src'
depbase=`echo mesa/main/extensions_table.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
	/bin/sh ../libtool  --tag=CC   --mode=compile /opt/local/bin/gcc-apple-4.2 -DPACKAGE_NAME=\"Mesa\" -DPACKAGE_TARNAME=\"mesa\" -DPACKAGE_VERSION=\"17.1.6\" -DPACKAGE_STRING=\"Mesa\ 17.1.6\" -DPACKAGE_BUGREPORT=\"https://bugs.freedesktop.org/enter_bug.cgi\?product=Mesa\" -DPACKAGE_URL=\"\" -DPACKAGE=\"mesa\" -DVERSION=\"17.1.6\" -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_FUNC_ATTRIBUTE_CONST=1 -DHAVE_FUNC_ATTRIBUTE_FLATTEN=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_VISIBILITY=1 -DHAVE_FUNC_ATTRIBUTE_WARN_UNUSED_RESULT=1 -DHAVE_FUNC_ATTRIBUTE_WEAK=1 -DHAVE_DLADDR=1 -DHAVE_PTHREAD_PRIO_INHERIT=1 -DHAVE_PTHREAD=1 -I.  -I../include/ -I../src/mapi/ -I../src/mesa/ -I../src/gallium/include -I../src/gallium/auxiliary -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DMISSING_64BIT_ATOMICS -DNDEBUG -DHAVE_XLOCALE_H -DHAVE_SYS_SYSCTL_H -DHAVE_STRTOF -DHAVE_DLOPEN -DGLX_USE_APPLEGL -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DGLX_USE_TLS -DHAVE_X11_PLATFORM -DBUILDING_MESA -DENABLE_SHADER_CACHE  -fvisibility=hidden -pipe -Os -arch ppc -Wall -std=gnu99 -fno-math-errno -fno-trapping-math  -MT mesa/main/extensions_table.lo -MD -MP -MF $depbase.Tpo -c -o mesa/main/extensions_table.lo mesa/main/extensions_table.c &&\
	mv -f $depbase.Tpo $depbase.Plo
libtool: compile:  /opt/local/bin/gcc-apple-4.2 -DPACKAGE_NAME=\"Mesa\" -DPACKAGE_TARNAME=\"mesa\" -DPACKAGE_VERSION=\"17.1.6\" "-DPACKAGE_STRING=\"Mesa 17.1.6\"" "-DPACKAGE_BUGREPORT=\"https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa\"" -DPACKAGE_URL=\"\" -DPACKAGE=\"mesa\" -DVERSION=\"17.1.6\" -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_FUNC_ATTRIBUTE_CONST=1 -DHAVE_FUNC_ATTRIBUTE_FLATTEN=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_VISIBILITY=1 -DHAVE_FUNC_ATTRIBUTE_WARN_UNUSED_RESULT=1 -DHAVE_FUNC_ATTRIBUTE_WEAK=1 -DHAVE_DLADDR=1 -DHAVE_PTHREAD_PRIO_INHERIT=1 -DHAVE_PTHREAD=1 -I. -I../include/ -I../src/mapi/ -I../src/mesa/ -I../src/gallium/include -I../src/gallium/auxiliary -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DMISSING_64BIT_ATOMICS -DNDEBUG -DHAVE_XLOCALE_H -DHAVE_SYS_SYSCTL_H -DHAVE_STRTOF -DHAVE_DLOPEN -DGLX_USE_APPLEGL -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DGLX_USE_TLS -DHAVE_X11_PLATFORM -DBUILDING_MESA -DENABLE_SHADER_CACHE -fvisibility=hidden -pipe -Os -arch ppc -Wall -std=gnu99 -fno-math-errno -fno-trapping-math -MT mesa/main/extensions_table.lo -MD -MP -MF mesa/main/.deps/extensions_table.Tpo -c mesa/main/extensions_table.c  -fno-common -DPIC -o mesa/main/.libs/extensions_table.o
In file included from ../src/mesa/main/mtypes.h:43,
                 from mesa/main/extensions_table.c:26:
../src/mapi/glapi/glapi.h:92: error: thread-local storage not supported for this target
../src/mapi/glapi/glapi.h:92: warning: 'tls_model' attribute ignored
../src/mapi/glapi/glapi.h:95: error: thread-local storage not supported for this target
../src/mapi/glapi/glapi.h:95: warning: 'tls_model' attribute ignored
make[3]: *** [mesa/main/extensions_table.lo] Error 1
make[3]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_x11_mesa/mesa/work/mesa-17.1.6/src'
make[2]: *** [all-recursive] Error 1

Attachments (2)

main.log (50.4 KB) - added by ballapete (Peter "Pete" Dyballa) 7 years ago.
Main.log from PPC Leopard
mesa.log (53.4 KB) - added by mrkapqa 7 years ago.

Download all attachments as: .zip

Change History (17)

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

Attachment: main.log added

Main.log from PPC Leopard

comment:1 Changed 7 years ago by kencu (Ken)

That one thing with mesa is easy to fix:

configure.args-append --disable-glx-tls

The other things are not necessarily so easy.

comment:2 in reply to:  1 Changed 7 years ago by ballapete (Peter "Pete" Dyballa)

Replying to kencu:

That one thing with mesa is easy to fix:

configure.args-append --disable-glx-tls

Wouldn't be using cxx_stdlib libc++ the better choice?

Trying to upgrade mesa with configure.compiler=macports-gcc-6 leads to

libtool: compile:  /opt/local/bin/gcc-mp-6 -DPACKAGE_NAME=\"Mesa\" -DPACKAGE_TARNAME=\"mesa\" -DPACKAGE_VERSION=\"17.1.6\" "-DPACKAGE_STRING=\"Mesa 17.1.6\"" "-DPACKAGE_BUGREPORT=\"https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa\"" -DPACKAGE_URL=\"\" -DPACKAGE=\"mesa\" -DVERSION=\"17.1.6\" -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_FLATTEN=1 -DHAVE_FUNC_ATTRIBUTE_FORMAT=1 -DHAVE_FUNC_ATTRIBUTE_MALLOC=1 -DHAVE_FUNC_ATTRIBUTE_PACKED=1 -DHAVE_FUNC_ATTRIBUTE_PURE=1 -DHAVE_FUNC_ATTRIBUTE_RETURNS_NONNULL=1 -DHAVE_FUNC_ATTRIBUTE_UNUSED=1 -DHAVE_FUNC_ATTRIBUTE_VISIBILITY=1 -DHAVE_FUNC_ATTRIBUTE_WARN_UNUSED_RESULT=1 -DHAVE_FUNC_ATTRIBUTE_WEAK=1 -DHAVE_DLADDR=1 -DHAVE_PTHREAD_PRIO_INHERIT=1 -DHAVE_PTHREAD=1 -I. -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DUSE_GCC_ATOMIC_BUILTINS -DMISSING_64BIT_ATOMICS -DNDEBUG -DHAVE_XLOCALE_H -DHAVE_SYS_SYSCTL_H -DHAVE_STRTOF -DHAVE_DLOPEN -DGLX_USE_APPLEGL -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DGLX_USE_TLS -DHAVE_X11_PLATFORM -DBUILDING_MESA -DENABLE_SHADER_CACHE -I../../include -I../../src -I../../src/mapi -I../../src/mesa -I../../src/gallium/include -I../../src/gallium/auxiliary -fvisibility=hidden -Werror=pointer-arith -Werror=vla -pipe -Os -m32 -Wall -std=c99 -fno-math-errno -fno-trapping-math -MT libmesautil_la-disk_cache.lo -MD -MP -MF .deps/libmesautil_la-disk_cache.Tpo -c disk_cache.c  -fno-common -DPIC -o .libs/libmesautil_la-disk_cache.o
In file included from ../../src/util/u_queue.h:38:0,
                 from disk_cache.c:45:
../../src/util/list.h:163:0: warning: "LIST_ENTRY" redefined
 #define LIST_ENTRY(__type, __item, __field)   \
 
In file included from /usr/include/sys/file.h:71:0,
                 from disk_cache.c:31:
/usr/include/sys/queue.h:356:0: note: this is the location of the previous definition
 #define LIST_ENTRY(type)      \
 
disk_cache.c: In function 'disk_cache_create':
disk_cache.c:263:39: error: 'O_CLOEXEC' undeclared (first use in this function)
    fd = open(path, O_RDWR | O_CREAT | O_CLOEXEC, 0644);
                                       ^~~~~~~~~
disk_cache.c:263:39: note: each undeclared identifier is reported only once for each function it appears in
disk_cache.c: In function 'choose_lru_file_matching':
disk_cache.c:465:11: warning: implicit declaration of function 'fstatat' [-Wimplicit-function-declaration]
       if (fstatat(dirfd(dir), entry->d_name, &sb, 0) == 0) {
           ^~~~~~~
disk_cache.c: In function 'cache_put':
disk_cache.c:798:39: error: 'O_CLOEXEC' undeclared (first use in this function)
    fd = open(filename_tmp, O_WRONLY | O_CLOEXEC | O_CREAT, 0644);
                                       ^~~~~~~~~
disk_cache.c: In function 'disk_cache_get':
disk_cache.c:971:35: error: 'O_CLOEXEC' undeclared (first use in this function)
    fd = open(filename, O_RDONLY | O_CLOEXEC);
                                   ^~~~~~~~~
make[5]: *** [libmesautil_la-disk_cache.lo] Error 1
make[5]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_x11_mesa/mesa/work/mesa-17.1.6/src/util'

and O_CLOEXEC is defined in your /opt/local/include/snowleopardfixes.h:#define O_CLOEXEC 0.

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

You can't reliably combine c++ ports built with libc++ and gcc's libstdc++ without eventually running into some kind of disaster, especially when you have something that is as integrated into other ports as much as mesa is. So you should build it with clang, and disable TLS.

To build mesa on 10.6 with libc++, the following additions to the portfile are necessary, but not sufficient:

configure.args-append --disable-llvm-shared-libs
configure.args-append --disable-glx-tls
configure.cppflags-append -DO_CLOEXEC=0

after doing the steps mentioned, it will still fail to build due to 54638, which so far has no solution.

comment:4 Changed 7 years ago by mf2k (Frank Schima)

Cc: jeremyhu@… removed
Keywords: removed
Owner: set to jeremyhu
Status: newassigned

comment:5 Changed 7 years ago by rlhamil

Cc: rlhamil added

comment:6 in reply to:  1 Changed 7 years ago by ballapete (Peter "Pete" Dyballa)

Replying to kencu:

That one thing with mesa is easy to fix:

configure.args-append --disable-glx-tls

This does not seem to work when given on the command line at invocation time. Mesa still is being built with Macros: … -DGLX_USE_TLS ….

comment:7 in reply to:  3 Changed 7 years ago by ballapete (Peter "Pete" Dyballa)

Replying to kencu:

configure.args-append --disable-llvm-shared-libs
configure.args-append --disable-glx-tls
configure.cppflags-append -DO_CLOEXEC=0

Just to document the steps take with two configure arguments the failure with /opt/local/bin/gcc-apple-4.2 is:

disk_cache.c: In function 'disk_cache_create':
disk_cache.c:263: error: 'O_CLOEXEC' undeclared (first use in this function)
disk_cache.c:263: error: (Each undeclared identifier is reported only once
disk_cache.c:263: error: for each function it appears in.)
disk_cache.c: In function 'choose_lru_file_matching':
disk_cache.c:465: warning: implicit declaration of function 'fstatat'
disk_cache.c: In function 'cache_put':
disk_cache.c:798: error: 'O_CLOEXEC' undeclared (first use in this function)
disk_cache.c: In function 'disk_cache_get':
disk_cache.c:971: error: 'O_CLOEXEC' undeclared (first use in this function)

comment:8 Changed 7 years ago by mrkapqa

deleted

Last edited 7 years ago by mrkapqa (previous) (diff)

comment:9 Changed 7 years ago by mrkapqa

deleted

Last edited 7 years ago by mrkapqa (previous) (diff)

Changed 7 years ago by mrkapqa

Attachment: mesa.log added

comment:10 Changed 7 years ago by mrkapqa

some day ago i could build mpv on imac 2009 running 10.6.8 using command

sudo port install mpv +audiocd+bundle+dvd+libarchive+network+opengl+osd+python27+rubberband+x11

today i tried again on different partition and it does not build anymore due to

Error: Failed to build mesa: command execution failed
Last edited 7 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:11 in reply to:  10 Changed 7 years ago by ballapete (Peter "Pete" Dyballa)

Replying to mrkapqa:

some day ago i could build mpv on imac 2009 running 10.6.8 using command

sudo port install mpv +audiocd+bundle+dvd+libarchive+network+opengl+osd+python27+rubberband+x11

Some days ago you had the up-to-date version of Mesa installed, now it's outdated and cannot yet build on Mac OS X because only macOS provides the library function fstatat (see #54638).

Port decides to build Mesa first because mpv has a dependency of xorg-libXext. And this port depends on Mesa…

Maybe it helps to edit mesa's Portfile and reset the version…

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

comment:12 Changed 7 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Cc: MarcusCalhoun-Lopez added

comment:13 Changed 7 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

In ec7db4f8f3638a645c96b5498ef21245a63630fe/macports-ports:

mesa: disable functionality to build on old systems

No revbump since port either builds correctly or not at all.
See #54638
See #54643

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

Resolution: fixed
Status: assignedclosed

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

Thanks for pushing that.

Note: See TracTickets for help on using tickets.