[MacPorts] #33896: gnucash python bindings import error

MacPorts noreply at macports.org
Wed Apr 4 12:48:27 PDT 2012


#33896: gnucash python bindings import error
--------------------------------------------+-------------------------------
 Reporter:  reubano@…                       |       Owner:  macports-tickets@…                   
     Type:  defect                          |      Status:  new                                  
 Priority:  Normal                          |   Milestone:                                       
Component:  ports                           |     Version:  2.0.4                                
 Keywords:  gnucash, python, libJPEG.dylib  |        Port:  gnucash                              
--------------------------------------------+-------------------------------
 gnucash-2.4.10 built from source with MacPorts 2.0.4 on MacOSX 10.7.2

 I get the following error when trying to use gnucash python bindings


 {{{
 gnucash-env ipython
 }}}

 {{{
 Python 2.7.1 (r271:86832, Jul 31 2011, 19:30:53)
 Type "copyright", "credits" or "license" for more information.

 IPython 0.12 -- An enhanced Interactive Python.
 ?         -> Introduction and overview of IPython's features.
 %quickref -> Quick reference.
 help      -> Python's own help system.
 object?   -> Details about 'object', use 'object??' for extra details.

 In [1]: import gnucash.gnucash_core
 ---------------------------------------------------------------------------
 ImportError                               Traceback (most recent call
 last)
 /Users/reubano/<ipython-input-1-d3675276f3f3> in <module>()
 ----> 1 import gnucash.gnucash_core

 /opt/x11/lib/python2.7/site-packages/gnucash/__init__.py in <module>()
       4 # instead of

       5 # >>> from gnucash.gnucash_core import thingy

 ----> 6 from gnucash_core import *
       7 ##  @file

       8 #   @brief helper file for the importing of gnucash


 /opt/x11/lib/python2.7/site-packages/gnucash/gnucash_core.py in <module>()
      29 #  @ingroup python_bindings

      30
 ---> 31 import gnucash_core_c
      32
      33 from function_class import \

 /opt/x11/lib/python2.7/site-packages/gnucash/gnucash_core_c.py in
 <module>()
      23                 fp.close()
      24             return _mod
 ---> 25     _gnucash_core_c = swig_import_helper()
      26     del swig_import_helper
      27 else:

 /opt/x11/lib/python2.7/site-packages/gnucash/gnucash_core_c.py in
 swig_import_helper()
      19         if fp is not None:
      20             try:
 ---> 21                 _mod = imp.load_module('_gnucash_core_c', fp,
 pathname, description)
      22             finally:
      23                 fp.close()

 ImportError: dlopen(/opt/x11/lib/python2.7/site-
 packages/gnucash/_gnucash_core_c.so, 2): Symbol not found:
 __cg_jpeg_resync_to_restart
   Referenced from:
 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO
   Expected in: /opt/x11/lib/libJPEG.dylib
  in
 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO
 }}}

 I received similar errors when building gnucash but those went away once I
 ran

 {{{
 export DYLD_FALLBACK_LIBRARY_PATH=/opt/x11/lib:
 }}}

 The current error appears whether I have DYLD_FALLBACK_LIBRARY_PATH set or
 not.

 Additionally, I was able to work around this (and a similar error in
 libTIFF.dylib) by symlinking to the corresponding dylib in
 /System/Library/Frameworks.... However, I then reached the following

 {{{
 In [1]: import gnucash.gnucash_core
 ---------------------------------------------------------------------------
 ImportError                               Traceback (most recent call
 last)
 /Users/reubano/<ipython-input-1-d3675276f3f3> in <module>()
 ----> 1 import gnucash.gnucash_core

 /opt/x11/lib/python2.7/site-packages/gnucash/__init__.py in <module>()
       4 # instead of

       5 # >>> from gnucash.gnucash_core import thingy

 ----> 6 from gnucash_core import *
       7 ##  @file

       8 #   @brief helper file for the importing of gnucash


 /opt/x11/lib/python2.7/site-packages/gnucash/gnucash_core.py in <module>()
      29 #  @ingroup python_bindings

      30
 ---> 31 import gnucash_core_c
      32
      33 from function_class import \

 /opt/x11/lib/python2.7/site-packages/gnucash/gnucash_core_c.py in
 <module>()
      23                 fp.close()
      24             return _mod
 ---> 25     _gnucash_core_c = swig_import_helper()
      26     del swig_import_helper
      27 else:

 /opt/x11/lib/python2.7/site-packages/gnucash/gnucash_core_c.py in
 swig_import_helper()
      19         if fp is not None:
      20             try:
 ---> 21                 _mod = imp.load_module('_gnucash_core_c', fp,
 pathname, description)
      22             finally:
      23                 fp.close()

 ImportError: dlopen(/opt/x11/lib/python2.7/site-
 packages/gnucash/_gnucash_core_c.so, 2): Symbol not found:
 __cg_png_create_info_struct
   Referenced from:
 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO
   Expected in: /opt/x11/lib/libpng14.14.dylib
  in
 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO
 }}}

 and there is no libpng14.14.dylib in /System/Library/Frameworks. I also
 rebuilt the libs using the +universal variants as well.

-- 
Ticket URL: <https://trac.macports.org/ticket/33896>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list