Opened 12 years ago

Last modified 10 years ago

#36172 closed defect

povray 3.7 fails with thread-local storage not supported — at Version 9

Reported by: peyser.alex@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.1.2
Keywords: Cc: ryandesign@…, dersh@…
Port: povray

Description (last modified by ryandesign (Ryan Carsten Schmidt))

Povray was updated in a recent ticket because of libpng. But I can't find a version of gcc on osx lion that actually compiles it --- and as far as I can tell, it may require some version of clang (??? possibly ???).

:info:build /usr/bin/g++-4.2 -DHAVE_CONFIG_H -I. -I../..  -I../.. -I../../source -I../../source -I../../source/base -I../../unix -I../../vfe -I../../vfe/unix -I/opt/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE -D_THREAD_SAFE -I/opt/local/include/OpenEXR   -I/opt/local/../include -I/opt/local/../include -I/opt/local/../include -I/opt/local/../include -I/opt/local/include -pthread -I/opt/local/include  -I/usr/include  -pipe -Wno-multichar -Wno-write-strings -fno-enforce-eh-specs -s -O3 -ffast-math -pipe -O2 -arch x86_64 -D_THREAD_SAFE -MT bbox.o -MD -MP -MF .deps/bbox.Tpo -c -o bbox.o `test -f 'bounding/bbox.cpp' || echo './'`bounding/bbox.cpp
:info:build make[3]: *** [boundingtask.o] Error 1
:info:build make[3]: *** Waiting for unfinished jobs....
:info:build In file included from ../../source/backend/scene/threaddata.h:101,
:info:build                  from bounding/bbox.cpp:107:
:info:build ../../source/backend/support/task.h:187: error: thread-local storage not supported for this target
:info:build make[3]: *** [bbox.o] Error 1

Change History (10)

comment:1 Changed 12 years ago by ci42

Description: modified (diff)
Port: povray added

Please try a clean build and attach the log if it fails:

$ sudo port clean povray
$ sudo port selfupdate
$ sudo port -d install povray

In the future please remember to use WikiFormatting and fill in the port field.

Changed 12 years ago by peyser.alex@…

Attachment: main.log added

Log file

comment:2 Changed 12 years ago by peyser.alex@…

Tried with mp-gcc47, mp-gcc46, llvm-gcc42 (I think, since I set port select gcc before port install)

comment:3 in reply to:  description ; Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to peyser.alex@…:

Povray was updated in a recent ticket because of libpng. But I can't find a version of gcc on osx lion that actually compiles it --- and as far as I can tell, it may require some version of clang (??? possibly ???).

The log you attached shows that you are on OS X 10.6 Snow Leopard, not Lion.

:info:build /usr/bin/g++-4.2 -DHAVE_CONFIG_H -I. -I../..  -I../.. -I../../source -I../../source -I../../source/base -I../../unix -I../../vfe -I../../vfe/unix -I/opt/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE -D_THREAD_SAFE -I/opt/local/include/OpenEXR   -I/opt/local/../include -I/opt/local/../include -I/opt/local/../include -I/opt/local/../include -I/opt/local/include -pthread -I/opt/local/include  -I/usr/include  -pipe -Wno-multichar -Wno-write-strings -fno-enforce-eh-specs -s -O3 -ffast-math -pipe -O2 -arch x86_64 -D_THREAD_SAFE -MT bbox.o -MD -MP -MF .deps/bbox.Tpo -c -o bbox.o `test -f 'bounding/bbox.cpp' || echo './'`bounding/bbox.cpp

The povray port does not specify a compiler, so it uses the default compiler MacPorts specifies. You appear to have Xcode 3.x, because MacPorts has chosen to use GCC 4.2 to compile this port.

:info:build make[3]: *** [boundingtask.o] Error 1
:info:build make[3]: *** Waiting for unfinished jobs....
:info:build In file included from ../../source/backend/scene/threaddata.h:101,
:info:build                  from bounding/bbox.cpp:107:
:info:build ../../source/backend/support/task.h:187: error: thread-local storage not supported for this target
:info:build make[3]: *** [bbox.o] Error 1

You should report this problem to the developers of povray; they need to fix it to be compatible with GCC on OS X. You could point them to this page which seems to explain the problem. It compiled fine for me on Mountain Lion with Xcode 4.4 and clang, so presumably clang does now have an implementation of thread-local storage (and that page does not mention that).

Replying to peyser.alex@…:

Tried with mp-gcc47, mp-gcc46, llvm-gcc42 (I think, since I set port select gcc before port install)

Most ports including povray deliberately do not use what you set with "port select gcc". If you want to specify a different compiler, you would do it like this:

sudo port clean povray
sudo port install povray configure.compiler=clang

or:

sudo port clean povray
sudo port install povray configure.compiler=llvm-gcc42

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

Cc: ryandesign@… added

Cc Me!

comment:5 in reply to:  3 Changed 12 years ago by peyser.alex@…

You should report this problem to the developers of povray; they need to fix it to be compatible with GCC on OS X. You could point them to this page which seems to explain the problem. It compiled fine for me on Mountain Lion with Xcode 4.4 and clang, so presumably clang does now have an implementation of thread-local storage (and that page does not mention that).

From the mailing lists, they've known about it for several years and have decided that that's not going to happen (fixing it to work on old gcc's). So apparently the resolution is that this port will only work with Xcode > 4, unless anyone happens to know a variety of gcc or clang from earlier versions where thread local variables have crept in. Clang-3.1 from macports fails here as well, using configure.compiler and configure.cxx.

comment:6 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Ok. Then you could install the clang-3.2 port and compile with:

sudo port clean povray
sudo port install povray configure.compiler=macports-clang-3.2

If that works, we can modify the port accordingly.

comment:7 in reply to:  6 Changed 12 years ago by peyser.alex@…

Replying to ryandesign@…:

Ok. Then you could install the clang-3.2 port and compile with:

sudo port clean povray
sudo port install povray configure.compiler=macports-clang-3.2

I'll try when Ticket #36042 is resolved....

comment:8 Changed 12 years ago by dershow

Cc: dersh@… added

Cc Me!

comment:9 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)
Note: See TracTickets for help on using tickets.