povray 3.7 on Solaris

The povray folks recently released a
beta source code of povray 3.7.
I thought to try it with the Sun compiler.


I used the latest released version
of SunStudio 12 Express - February 2008 Build.


Povray 3.7 needs a few libraries, all of which bar one are bundled with
Solaris Express.


The missing one being the Boost library which can be compiled as
per instructions here at Simon's blog.


I used boost v1_34_1. Povray 3.7 uses the thread library of Boost.


What I used to configure povray:



CXXFLAGS="-mt -D__FUNCTION__=NULL -D_POSIX_PTHREAD_SEMANTICS -library=stlport4" CC=cc CXX=CC ./configure COMPILED_BY="XXXXXX" --with-boost-thread=boost_thread-sw-mt NON_REDISTRIBUTABLE_BUILD=yes --with-boost=/usr/local/boost_1_34_1 --prefix=/usr/local/povray-3.7.0.b25b



Its beta code so hopefully the above diffs and warnings may 'go away' soon :)


I have '-D__FUNCTION__=NULL' since I wasn't yet able to convince the compiler to use

__FUNCTION__ instead of __func__.


Its a hack just to get the thing compiled.


There were three source code changes, two if which were just to include a header

file. The third was to avoid some yet to be finished error handling, theres a TODO

in the source file.


Heres the diffs:




--- ./orig/./povray-3.7.0.beta.25b/vfe/unix/unixoptions.cpp Mon Feb 4 14:28:51 2008
+++ ./povray-3.7.0.beta.25b/vfe/unix/unixoptions.cpp Sun Mar 23 23:21:54 2008
@@ -454,13 +454,16 @@
char \*errormsg =
"Cannot determine the current working directory.\\n"
"Check that the PWD environment variable does exist and is valid.\\n";
+ int no_error_call = 1;
if(no_error_call)
{
fprintf(stderr, "%s: %s\\n", PACKAGE, errormsg);
exit(EXIT_FAILURE);
}
+#ifdef USE_ERROR
else
Error("%s", errormsg);
+#endif
}
#endif

--- ./orig/./povray-3.7.0.beta.25b/vfe/vfeconf.h Mon Feb 4 14:28:52 2008
+++ ./povray-3.7.0.beta.25b/vfe/vfeconf.h Sun Mar 23 23:00:22 2008
@@ -105,6 +105,7 @@
#define POVMS_Sys_Thread_Type unsigned int

#include <string>
+#include <stdio.h>

namespace vfe
{
./povray-3.7.0.beta.25b/vfe/vfecontrol.cpp
--- ./orig/./povray-3.7.0.beta.25b/vfe/vfecontrol.cpp Mon Feb 11 14:13:02 2008
+++ ./povray-3.7.0.beta.25b/vfe/vfecontrol.cpp Sun Mar 23 23:24:01 2008
@@ -92,6 +92,7 @@
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*/

#include "vfe.h"
+#include <string.h>

/\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*/
/\* TODO FIXME: we should call into the POVMS code to do this lookup, but as Thorsten's \*/



With that compiling went reasonable, though with warnings; mainly of the type:



"../../source/base/povms.h", line 231: Warning: Identifier expected instead of "}".
"../../source/base/povmsgid.h", line 232: Warning: Identifier expected instead of "}".
"../../source/base/povmsgid.h", line 244: Warning: Identifier expected instead of "}".
"../../source/base/povmsgid.h", line 311: Warning: Identifier expected instead of "}".
"../../source/backend/frame.h", line 1550: Warning: v hides pov::Intersection::v.
"../../source/backend/frame.h", line 1562: Warning: v hides pov::Intersection::v.
"../../source/backend/frame.h", line 1573: Warning: v hides pov::Intersection::v.
"../../source/backend/frame.h", line 1585: Warning: v hides pov::Intersection::v.
"../../source/backend/frame.h", line 1597: Warning: v hides pov::Intersection::v.
"../../source/backend/frame.h", line 1609: Warning: v hides pov::Intersection::v.
"../../source/backend/frame.h", line 1620: Warning: v hides pov::Intersection::v.
"../../source/backend/frame.h", line 1631: Warning: v hides pov::Intersection::v.
"../../source/backend/frame.h", line 1643: Warning: v hides pov::Intersection::v.
"../../source/backend/frame.h", line 1655: Warning: v hides pov::Intersection::v.
"../../source/backend/frame.h", line 1668: Warning: v hides pov::Intersection::v.
"../../source/backend/frame.h", line 1705: Warning: Identifier expected instead of "}".


I was able to render this from a tiny povray file.


Comments:

Hello,

seeing your explanation about __FUNCTION__, why not use -D__FUNCTION__=__func__ ?

Cool picture.

Posted by Marc on March 27, 2008 at 06:10 AM GMT #

Thanks Mark, the picture isn't mine. But it is nice.

Can't use -D__FUNCTION__=__func__ since __func__ and
__FUNCTION__ aren't treated like #define's I think. I need to go ask some of the compiler folks.

Posted by Sean on March 27, 2008 at 07:00 AM GMT #

Please check your URL's. They've got the HTML BR tag in them.

Posted by SwitchBL8 on March 27, 2008 at 03:12 PM GMT #

Correction: your feed (he must be braindead) is adding the BR html tag, browsing to this weblog entry shows correct URLs.

Posted by SwitchBL8 on March 27, 2008 at 03:14 PM GMT #

Post a Comment:
Comments are closed for this entry.
About

smg

Search

Archives
« April 2014
MonTueWedThuFriSatSun
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
    
       
Today