pyexiv2-developers team mailing list archive
-
pyexiv2-developers team
-
Mailing list archive
-
Message #00125
Trouble building under macos/fink
I'm trying to get pyexiv2-0.3.2 to build on MacOS-10.6 under fink.
Boost is 1.46. gcc is 4.4.
The attached file shows the changes that I made:
Put /sw/include in the include path (to find boost)
Link against boost_python-mt
I then build like this:
CXX=g++-4 LDFLAGS="-L/sw/lib" python2.7 /sw/bin/scons -k
Use the fink compiler (which is 32bit mode, same as the boost libraries)
Put /sw/lib in the link path (to link against boost)
Use the fink python
Here are the key bits of output:
scons: Building targets ...
g++-4 -o build/exiv2wrapper.o -c -I/sw/include -I/sw/include/python2.7
src/exiv2wrapper.cpp
g++-4 -o build/exiv2wrapper -L/sw/lib build/exiv2wrapper.o
-lboost_python-mt -lexiv2
Undefined symbols:
"_PyExc_RuntimeError", referenced from:
_PyExc_RuntimeError$non_lazy_ptr in exiv2wrapper.o
(maybe you meant: _PyExc_RuntimeError$non_lazy_ptr)
Many more symbols like that...
"_PyEval_SaveThread", referenced from:
exiv2wrapper::Image::_instantiate_image() in exiv2wrapper.o
exiv2wrapper::Image::readMetadata() in exiv2wrapper.o
exiv2wrapper::Image::writeMetadata() in exiv2wrapper.o
exiv2wrapper::Image::getDataBuffer() const in exiv2wrapper.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
scons: *** [build/exiv2wrapper] Error 1
g++-4 -o build/exiv2wrapper.os -c -fPIC -I/sw/include
-I/sw/include/python2.7 src/exiv2wrapper.cpp
g++-4 -o build/exiv2wrapper_python.os -c -fPIC -I/sw/include
-I/sw/include/python2.7 src/exiv2wrapper_python.cpp
g++-4 -o build/libexiv2python.dylib -L/sw/lib -dynamiclib
build/exiv2wrapper.os build/exiv2wrapper_python.os -lboost_python-mt
-lexiv2
Undefined symbols:
"_PyList_Type", referenced from:
_PyList_Type$non_lazy_ptr in exiv2wrapper_python.os
(maybe you meant: _PyList_Type$non_lazy_ptr)
Many more symbols like that...
"_PyObject_Size", referenced from:
boost::python::len(boost::python::api::object const&) in exiv2wrapper.os
ld: symbol(s) not found
collect2: ld returned 1 exit status
scons: *** [build/libexiv2python.dylib] Error 1
I new to building on Mac, so I don't know what to expect (especially
with loadable modules and C++).
A couple things are different than the Linux build example on the web site:
It's trying to build build/exiv2wrapper as an application (really?),
but it isn't linking against python.
The dynamic library isn't built with -shared (or is -dynamiclib the
same thing?).
Any advice?
Anybody have this working?
-Dan
Attachment:
pyexiv2.diff
Description: Binary data
Follow ups