POV-Ray : Newsgroups : povray.beta-test : Build povray 3.7 beta40 on mac osx : Re: Build povray 3.7 beta40 on mac osx Server Time
7 May 2024 04:59:34 EDT (-0400)
  Re: Build povray 3.7 beta40 on mac osx  
From: Adam Weyhaupt
Date: 14 Jan 2011 14:50:01
Message: <web.4d30a896ea80a0bb2f451cea0@news.povray.org>
"jonas.bulow" <jon### [at] gmailcom> wrote:
> "xoros" <xor### [at] fakehostcom> wrote:
> > Hello,
> >
> > I would like to build povray 3.7 beta40 on mac osx snow leopard, but it doesn't
> > work.
> > "./configure" works without any problems, but "make" always produces the
> > following error:
> >
> > .../../source/backend/support/task.h:184: error: thread-local storage not
> > supported for this target
> >
> > MacMegaPov isn't an option for me, because I need a command line version of
> > povray.
> >
> > Best regards
>
> The patch below will make povray 3.7 beta40 compile fine on max osx.
> Unfortunately, I'm not allowed to post attachements to this newsgroup so I also
> put it here: http://pastebin.com/TYugP76L .
>
> The idea is to use the thread local storage API defined by POSIX. It's not as
> convenient as gcc's __thread but it is portable on POSIX platforms.
>
> The last part of the patch brings the type uint alive by including sys/types.h.
>


I'm trying to compile RC2 and have the same error as the original poster.  This
patch doesn't seem to be able to be automatically applied to frame.h in RC2, and
I wasn't able to figure out what the changes need to be.  This patch does work
great for me on beta40; I checked today and was able to compile with no
problems.  In frame.h, what in beta40 we had:

#define DECLARE_THREAD_LOCAL_PTR(ptrType, ptrName)
Pthread_Thread_Local_Pointer<ptrType> ptrName;
#else
#efine DECLARE_THREAD_LOCAL_PTR(ptrType, ptrName)       __thread ptrType
*ptrName;
#endif

but in RC2 we now have:

#ifndef DECLARE_THREAD_LOCAL_PTR
#define DECLARE_THREAD_LOCAL_PTR(ptrType, ptrName)
boost::thread_specific_ptr<ptrType> ptrName
#define IMPLEMENT_THREAD_LOCAL_PTR(ptrType, ptrName, ptrCleanup)
boost::thread_specific_ptr<ptrType> ptrName(ptrCleanup)
#define GET_THREAD_LOCAL_PTR(ptrName)
(ptrName.get())
#define SET_THREAD_LOCAL_PTR(ptrName, ptrValue)
(ptrName.reset(ptrValue))
#endif

I'm not knowledgable enough to know how to modify the patch for RC2.  Can
someone help?  I'm trying to compile on Mac OS X 10.6.6 using the llvm-gcc
compiler.

Thanks for any help you can provide,

Adam


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.