fix a really subtle linux/boost-python crash related to exception handling -> link to libstdc++ before any other libraries
parent
9071a911f0
commit
cedab7e413
|
@ -6,7 +6,7 @@ CXX = 'g++'
|
|||
CC = 'gcc'
|
||||
CXXFLAGS = ['-O0', '-Wall', '-g', '-pipe', '-march=nocona', '-msse2', '-ftree-vectorize', '-mfpmath=sse', '-funsafe-math-optimizations', '-fno-rounding-math', '-fno-signaling-nans', '-fomit-frame-pointer', '-DMTS_DEBUG', '-DSINGLE_PRECISION', '-DSPECTRUM_SAMPLES=3', '-DMTS_SSE', '-DMTS_HAS_COHERENT_RT', '-fopenmp']
|
||||
LINKFLAGS = []
|
||||
SHLINKFLAGS = ['-rdynamic', '-shared', '-fPIC']
|
||||
SHLINKFLAGS = ['-rdynamic', '-shared', '-fPIC', '-lstdc++']
|
||||
BASEINCLUDE = ['#include']
|
||||
BASELIB = ['dl', 'm', 'pthread', 'gomp']
|
||||
OEXRINCLUDE = ['/usr/include/OpenEXR']
|
||||
|
|
|
@ -6,7 +6,7 @@ CXX = 'g++'
|
|||
CC = 'gcc'
|
||||
CXXFLAGS = ['-O3', '-Wall', '-g', '-pipe', '-march=nocona', '-msse2', '-ftree-vectorize', '-mfpmath=sse', '-funsafe-math-optimizations', '-fno-rounding-math', '-fno-signaling-nans', '-fomit-frame-pointer', '-DMTS_DEBUG', '-DSINGLE_PRECISION', '-DSPECTRUM_SAMPLES=3', '-DMTS_SSE', '-DMTS_HAS_COHERENT_RT', '-fopenmp']
|
||||
LINKFLAGS = []
|
||||
SHLINKFLAGS = ['-rdynamic', '-shared', '-fPIC']
|
||||
SHLINKFLAGS = ['-rdynamic', '-shared', '-fPIC', '-lstdc++']
|
||||
BASEINCLUDE = ['#include']
|
||||
BASELIB = ['dl', 'm', 'pthread', 'gomp']
|
||||
OEXRINCLUDE = ['/usr/include/OpenEXR']
|
||||
|
|
|
@ -125,6 +125,8 @@
|
|||
{}
|
||||
\lstnewenvironment{cpp}[1][]{\lstset{language=c++, #1}}
|
||||
{}
|
||||
\lstnewenvironment{python}[1][]{\lstset{language=python, #1}}
|
||||
{}
|
||||
\lstnewenvironment{xml}[1][]{\lstset{language=xml, #1}}
|
||||
{}
|
||||
\lstnewenvironment{console}[1][]{\lstset{basicstyle=\footnotesize\ttfamily, float, #1}}
|
||||
|
@ -155,6 +157,7 @@
|
|||
%\include{development}
|
||||
%\include{integrator}
|
||||
%\include{parallelization}
|
||||
\include{python}
|
||||
\include{acknowledgements}
|
||||
|
||||
\bibliographystyle{acm}
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
\section{Python integration}
|
||||
\label{sec:python}
|
||||
A recent feature of Mitsuba is a simple Python interface to the renderer API.
|
||||
While the interface is still limited at this point, it can already be
|
||||
used for simple automation tasks. To access the API, start your Python
|
||||
interpreter and run
|
||||
\begin{python}
|
||||
import mitsuba
|
||||
\end{python}
|
||||
For this to work on MacOS X, you will first have to run the ``\emph{Apple
|
||||
Menu}$\to$\emph{Command-line Access}'' menu item from within Mitsuba.
|
||||
On Windows and non-packaged Linux builds, you must update the extension
|
||||
search path before the \code{import} command is issued:
|
||||
\begin{python}
|
||||
import sys
|
||||
|
||||
# Update the extension search path
|
||||
# (may vary depending on your setup)
|
||||
sys.path.append('dist/python')
|
||||
|
||||
import mitsuba
|
||||
\end{python}
|
||||
|
|
@ -530,6 +530,7 @@ void export_core() {
|
|||
.def("trace", &Matrix4x4::trace)
|
||||
.def("det", &Matrix4x4::det)
|
||||
.def("serialize", &Matrix4x4::serialize)
|
||||
.def("transpose", &Matrix4x4::transpose)
|
||||
.def(bp::self != bp::self)
|
||||
.def(bp::self == bp::self)
|
||||
.def(-bp::self)
|
||||
|
@ -554,8 +555,10 @@ BOOST_PYTHON_MODULE(mitsuba) {
|
|||
bp::object package = bp::scope();
|
||||
package.attr("__path__") = "mitsuba";
|
||||
|
||||
bp::def("initializeFramework", initializeFramework);
|
||||
bp::def("shutdownFramework", shutdownFramework);
|
||||
/* Automatically take care of the framework
|
||||
initialization / shutdown */
|
||||
initializeFramework();
|
||||
atexit(shutdownFramework);
|
||||
|
||||
export_core();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue