|
|
Povray-3.7.0.RC6 successfully compiled on MacBook Pro MAC OS X 10.7.5
In the following document, I give all the modification I've done to make POVRAY
to compile.
The modifications should be included in the configuration process. But I don't
First, let give all the important technical data about my system.
Then I explain the changes I've made to the code.
You **will** be able to download the modified code on:
http://beurive.com/data/povray.zip
Please: the upload of the file is **slow**. It's not finished yet...
-------------------------------------
I compile using the GNU environment, installed via MacPorts.
POVRAY version: povray-3.7.0.RC6
$ machine
i486
$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.7.5
BuildVersion: 11G63
$ gcc -v
...
Target: i686-apple-darwin11
....
Thread model: posix
gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)
$ port list boost pth jpeg libpng tiff zlib
boost @1.52.0 devel/boost
pth @2.0.7 devel/pth
jpeg @8d graphics/jpeg
libpng @1.5.13 graphics/libpng
tiff @3.9.7 graphics/tiff
zlib @1.2.7 archivers/zlib
-------------------------------------
Configure
../configure COMPILED_BY="tes### [at] testcom" \
CXX=g++ \
CXXCPP="g++ -E" \
LDFLAGS='-L/opt/local/lib -lboost_system-mt' \
CXXFLAGS="-DMACOS10_7_5"
Note: see "Problem 2" for "CXXFLAGS".
-------------------------------------
Problem 1:
"uint" is not defined.
You need to include <sys/types.h>.
I added it in the file "./vfe/unix/syspovconfig.h".
-------------------------------------
Problem 2:
"lseek64" is not defined in file "./source/base/image/image.cpp".
I added a dirty macro in "./vfe/unix/syspovconfig.h".
#ifdef MACOS10_7_5
#define POV_LSEEK(a,b,c) lseek(a,b,c)
#else
#define POV_LSEEK(a,b,c) lseek64(a,b,c)
#endif
Then I replaced "lseek64" by "POV_LSEEK" in file
"./source/base/image/image.cpp".
Note : You need to add a CXXFLAGS to the command "configure".
-------------------------------------
Problem 3:
Thread-local storage not supported for this target.
You need to comment 4 macros in the file ./vfe/unix/syspovconfig.h.
// #define DECLARE_THREAD_LOCAL_PTR(ptrType, ptrName) __thread
ptrType *ptrName
// #define IMPLEMENT_THREAD_LOCAL_PTR(ptrType, ptrName, ignore) __thread
ptrType *ptrName
// #define GET_THREAD_LOCAL_PTR(ptrName) (ptrName)
// #define SET_THREAD_LOCAL_PTR(ptrName, ptrValue) (ptrName =
ptrValue)
-------------------------------------
Problem 4:
"boost::TIME_UTC" is not defined.
You need to replace it by "boost::TIME_UTC_" in :
o ./source/backend/scene/view.cpp.
o ./vfe/vfesession.cpp
o ./vfe/vfepovms.cpp
I have added the following code into "./vfe/unix/syspovconfig.h":
#include "boost/version.hpp"
#if BOOST_VERSION >= 105000
#define POV_BOOST_UTIME boost::TIME_UTC_
#else
#define POV_BOOST_UTIME boost::TIME_UTC
#endif
Then replace "boost::TIME_UTC" by "POV_BOOST_UTIME" everyhere.
Best regards,
Denis
Post a reply to this message
|
|
|
|
Hello,
While compiling Povray-3.7.0.RC6 on MacBook Pro MAC OS X 10.7.5, I have problem
with "uint". I add to include <sys/types.h>.
In order to increase the portability, I suggest to replace every occurrence of
"uint" by "unsigned int".
Unlike "uint", "unsigned int" is always defined. Therefore, I suggest to replace
every occurrence of "uint" by "unsigned int".
There are only 3 lines to modify, distributed in 2 files.
- ./vfe/unix/vfeplatform.h (2 lines).
- ./vfe/vfesession.h (1 line).
It is a small modification, bu I think it worth it.
Note: find . -type f -name "*.h" -exec grep -H 'uint' {} \;
Best regards,
Denis
Post a reply to this message
|
|