mac osx 10.6 build problem
we are trying to build pyexiv2 for mac osx 10.6.4
installed packages via mac ports
scons @2.0.1_0
python26 @2.6.6_0+no_tkinter
exiv2 @0.19_0
boost @1.44.0_0+python26
pyexiv2 form source pyexiv2 0.2.2
following robin mills tips @ http://
@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
+import sys
import os
import site
from distutils.sysconfig import get_python_inc, get_python_lib
@@ -7,6 +8,9 @@ import SCons.Util
env = Environment()
+env['LIBPATH'] = ['/opt/local/lib']
+env['CPPPATH'] = ['/opt/
+
# Take environment variables into account
# (see https:/
if os.environ.
@@ -16,6 +20,11 @@ if os.environ.
if os.environ.
env[
+# if os.environ.
+'] += '-I' + SCons.Util.
+
# Include directories to look for 'Python.h' in
env.Append(
@@ -26,6 +35,12 @@ env.Append(
libs = [ARGUMENTS.
env.Append(
+if sys.platform[:6] == 'darwin':
+ print 'sys.platform' + sys.platform[:6]
+ # MacOS X
+ # link the Python framework
+ env['FRAMEWORKS'] += ['Python']
+
# Build shared library libpyexiv2
cpp_sources = ['exiv2wrapper.
libpyexiv2 = env.SharedLibra
@@ -53,6 +68,15 @@ else:
else:
+# if sys.platform[:6] == 'darwin':
+ install_dir = '/opt/local/
+
+print "doing an install into ", install_dir
+
env.Install(
modules = ['__init__', 'metadata', 'exif', 'iptc', 'xmp', 'preview', 'utils']
env.Install(
scons does successfully build.
sudo scons install copies the files into the install_dir above:
./libexiv2pytho
./pyexiv2/
./pyexiv2/exif.py
./pyexiv2/iptc.py
./pyexiv2/
./pyexiv2/
./pyexiv2/utils.py
./pyexiv2/xmp.py
we symlink the lib so python finds it.
ls -s ./libexiv2pytho
$ python2.6
>>> import pyexiv2
Segmentation fault
mac os x crash report:
Process: Python [80534]
Path: /opt/local/
Identifier: Python
Version: ??? (???)
Code Type: X86-64 (Native)
Parent Process: bash [80449]
Date/Time: 2010-11-05 00:58:12.823 -0400
OS Version: Mac OS X 10.6.4 (10F569)
Report Version: 6
Interval Since Last Report: 223175 sec
Crashes Since Last Report: 9
Per-App Crashes Since Last Report: 9
Anonymous UUID: 937A886A-
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_
Crashed Thread: 0 Dispatch queue: com.apple.
Thread 0 Crashed: Dispatch queue: com.apple.
0 org.python.python 0x000000010134f776 PyInt_FromLong + 36
1 libexiv2python.
2 libexiv2python.
3 libexiv2python.
4 libexiv2python.
5 libexiv2python.
6 libexiv2python.
7 libexiv2python.
8 dyld 0x00007fff5fc0d500 ImageLoaderMach
9 dyld 0x00007fff5fc0bcec ImageLoader:
10 dyld 0x00007fff5fc0bda6 ImageLoader:
11 dyld 0x00007fff5fc08fbb dlopen + 573
12 libSystem.B.dylib 0x00007fff8786d2c0 dlopen + 61
13 org.python.python 0x00000001000e959f _PyImport_
14 org.python.python 0x00000001000d38e4 _PyImport_
15 org.python.python 0x00000001000d1bcf import_submodule + 383
16 org.python.python 0x00000001000d2171 load_next + 369
17 org.python.python 0x00000001000d23fb PyImport_
18 org.python.python 0x00000001000af973 builtin___import__ + 131
19 org.python.python 0x000000010000b902 PyObject_Call + 98
20 org.python.python 0x00000001000b0bb7 PyEval_
21 org.python.python 0x00000001000b4e7e PyEval_EvalFrameEx + 12622
22 org.python.python 0x00000001000b9af5 PyEval_EvalCodeEx + 2197
23 org.python.python 0x00000001000b9c16 PyEval_EvalCode + 54
24 org.python.python 0x00000001000ceac0 PyImport_
25 org.python.python 0x00000001000cfd22 load_source_module + 722
26 org.python.python 0x00000001000d12df load_package + 463
27 org.python.python 0x00000001000d1bcf import_submodule + 383
28 org.python.python 0x00000001000d20ea load_next + 234
29 org.python.python 0x00000001000d23fb PyImport_
30 org.python.python 0x00000001000af973 builtin___import__ + 131
31 org.python.python 0x000000010000b902 PyObject_Call + 98
32 org.python.python 0x00000001000b0bb7 PyEval_
33 org.python.python 0x00000001000b4e7e PyEval_EvalFrameEx + 12622
34 org.python.python 0x00000001000b9af5 PyEval_EvalCodeEx + 2197
35 org.python.python 0x00000001000b9c16 PyEval_EvalCode + 54
36 org.python.python 0x00000001000de50c PyRun_Interacti
37 org.python.python 0x00000001000de76e PyRun_Interacti
38 org.python.python 0x00000001000defe1 PyRun_AnyFileEx
39 org.python.python 0x00000001000ee40c Py_Main + 2764
40 org.python.python 0x0000000100000f14 0x100000000 + 3860
Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x000000010146e740 rbx: 0x0000000000000000 rcx: 0x0000000100700030 rdx: 0x0000000000000000
rdi: 0x0000000000000000 rsi: 0x00007fff5fbfcafc rbp: 0x00007fff5fbfc960 rsp: 0x00007fff5fbfc950
r8: 0x0000000000000000 r9: 0x0000000000000000 r10: 0x0000000000001002 r11: 0x0000000000000206
r12: 0x0000000000000001 r13: 0x0000000101001894 r14: 0x0000000101000330 r15: 0x000000010105a000
rip: 0x000000010134f776 rfl: 0x0000000000010287 cr2: 0x0000000000000000
Binary Images:
0x100000000 - 0x100000fff +org.python.python 2.6.6 (2.6.6) <07609241-
0x100003000 - 0x10014fff7 +org.python.python 2.6.6, (c) 2004-2008 Python Software Foundation. (2.6.6) <3519EF3C-
0x1002e3000 - 0x1002e5ff7 +readline.so ??? (???) <CBCFF103-
0x100440000 - 0x100468ff7 +libreadline.
0x10047e000 - 0x1004c3fef +libncursesw.
0x1004d2000 - 0x1004fcff7 +libncurses.5.dylib 5.0.0 (compatibility 5.0.0) <B5CBC236-
0x100515000 - 0x100554ff7 +libboost_
0x1005a2000 - 0x1005abff7 +libintl.8.dylib 10.1.0 (compatibility 10.0.0) <D1004391-
0x1005b1000 - 0x1005c5ff7 +libz.1.dylib 1.2.5 (compatibility 1.0.0) <6D767FC2-
0x1005c9000 - 0x1005e8fef +libexpat.1.dylib 7.2.0 (compatibility 7.0.0) <4F23C4ED-
0x101000000 - 0x101059fff +libexiv2python
0x10113f000 - 0x1012a3fff +libexiv2.6.dylib 7.0.0 (compatibility 7.0.0) <25F6719D-
0x101326000 - 0x101436ff7 org.python.python 2.6.1 (2.6.1) <A07FF07F-
0x101496000 - 0x101592fe7 +libiconv.2.dylib 8.0.0 (compatibility 8.0.0) <6907D6DB-
0x7fff5fc00000 - 0x7fff5fc3bdef dyld 132.1 (???) <B536F2F1-
0x7fff803d7000 - 0x7fff80423fff libauto.dylib ??? (???) <072804DF-
0x7fff80f47000 - 0x7fff80f58ff7 libz.1.dylib 1.2.3 (compatibility 1.0.0) <FB5EE53A-
0x7fff81501000 - 0x7fff81505ff7 libmathCommon.
0x7fff862dd000 - 0x7fff86452ff7 com.apple.
0x7fff87866000 - 0x7fff87a26fef libSystem.B.dylib 125.2.0 (compatibility 1.0.0) <95E02DD0-
0x7fff87b1d000 - 0x7fff87bd3fff libobjc.A.dylib 227.0.0 (compatibility 1.0.0) <F206BE6D-
0x7fff888bb000 - 0x7fff88938fef libstdc++.6.dylib 7.9.0 (compatibility 7.0.0) <35ECA411-
0x7fff88939000 - 0x7fff88af7fff libicucore.A.dylib 40.0.0 (compatibility 1.0.0) <0E53A4A6-
0x7fffffe00000 - 0x7fffffe01fff libSystem.B.dylib ??? (???) <95E02DD0-
------ Added by <email address hidden> -- 2010-11-05 08:24:53PDT ------
I'll build the combo:
scons @2.0.1_0
python26 @2.6.6_0+no_tkinter
exiv2 @0.19_0
boost @1.44.0_0+python26
pyexiv2 form source pyexiv2 0.2.2
I do have a suggestion. On each library you have built and installed run (libpyexiv2, libexiv2.dylib, libboost-python and python himself)
"otool -L"
"lipo -info"
"install_name_tool"
Another thought is to set the environment variable DYLD_PRINT_
I don't think this is going to reveal anything extraordinary. I think this is about the same as the doctor using his stethoscope - it keeps you busy while he's thinking!
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- pyexiv2 Edit question
- Assignee:
- robinmills Edit question
- Solved by:
- reco
- Solved:
- Last query:
- Last reply: