python - Compilation error ld: library not found for -lgcc_ext in MacOSX -


  1. i'm trying replicate tutorial example in pylearn2 documentation. when run python make_dataset.py, in example, got error:

    11:17 $ python make_dataset.py  /users/user/pylearn2/pylearn2/utils/image.py:16: userwarning: unable import matplotlib. features unavailable. original exception: dlopen(/library/python/2.7/site-packages/matplotlib-1.4.x-py2.7-macosx-10.9-intel.egg/matplotlib/backends/_macosx.so, 2): symbol not found: __cg_jpeg_resync_to_restart 

    referenced from: /system/library/frameworks/imageio.framework/versions/a/imageio

    expected in: /usr/local/lib/libjpeg.8.dylib

    i can import matplotlib , image in python in command line. me understand complaining , how fix error?

  2. another problem (which may or may not related problem above) linking error

    problem occurred during compilation command line below:

    g++ -dynamiclib -g -o3 -fno-math-errno -wno-unused-label -wno-unused-variable -wno-write-strings -march=core-avx-i -mmmx -mno-3dnow -msse -msse2 -msse3 -mssse3 -mno-sse4a -mcx16 -msahf -mno-movbe -maes -mpclmul -mpopcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-bmi2 -mno-tbm -mavx -mno-avx2 -msse4.2 -msse4.1 -mno-lzcnt -mno-rtm -mno-hle -mrdrnd -mf16c -mfsgsbase -mno-rdseed -mno-prfchw -mno-adx -mfxsr -mxsave -mxsaveopt -mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=6144 -mtune=core-avx-i -d npy_no_deprecated_api=npy_1_7_api_version -m64 -fpic -undefined dynamic_lookup -i/library/python/2.7/site-packages/numpy-1.9.0.dev_297f54b-py2.7-macosx-10.9-intel.egg/numpy/core/include -i/system/library/frameworks/python.framework/versions/2.7/include/python2.7 -o /users/user/.theano/compiledir_darwin-13.2.0-x86_64-i386-64bit-i386-2.7.5-64/tmpbdy9w9/49d70155ef39a124cbfa83c600416644.so /users/user/.theano/compiledir_darwin-13.2.0-x86_64-i386-64bit-i386-2.7.5-64/tmpbdy9w9/mod.cpp -l/system/library/frameworks/python.framework/versions/2.7/lib  ld: library not found -lgcc_ext.10.5  collect2: error: ld returned 1 exit status  exception: ('the following error happened while compiling node', inplacedimshuffle{x,0}(mean), '\n', 'compilation failed (return status=1): ld: library not found -lgcc_ext.10.5. collect2: error: ld returned 1 exit status. ', '[inplacedimshuffle{x,0}(mean)]') 

    i running pylearn2 on mac osx mavericks. not sure how fix error: library seems in system in several places:

    /usr/local/cellar/gcc47/4.7.3/lib/gcc/x86_64-apple-darwin13.0.0/4.7.3/libgcc_ext.10.5.dylib /usr/local/cellar/gfortran/4.8.2/gfortran/lib/libgcc_ext.10.5.dylib /usr/local/lib/gcc/x86_64-apple-darwin13.0.0/4.7.3/libgcc_ext.10.5.dylib 

    i not sure 1 link , how should link.

    i have changed (added) paths dyld_library_path didn't fix problem.

    any appreciated.

it looks one possible solution manually create link .dylib file:

sudo ln -sf /system/library/frameworks/opengl.framework/versions/a/libraries/libgl.dylib /opt/local/lib/libgl.dylib

sudo ln -sf /system/library/frameworks/applicationservices.framework/versions/a/frameworks/imageio.framework/versions/a/resources/libpng.dylib /opt/local/lib/libpng.dylib

sudo ln -sf /system/library/frameworks/applicationservices.framework/versions/a/frameworks/imageio.framework/versions/a/resources/libtiff.dylib /opt/local/lib/libtiff.dylib

sudo ln -sf /system/library/frameworks/applicationservices.framework/versions/a/frameworks/imageio.framework/versions/a/resources/libjpeg.dylib /opt/local/lib/libjpeg.dylib

why work? because whatever reason, when apple requests libjpeg.dyld, whatever system searches finds /opt/local/lib/libjpeg.dyld because search case insensitive. unix operating system. go figure. lines above force program looking libjpeg.dyld redirected apple's libjpeg.dyld.

another user suggested setting dyld_fallback_library_path:

you use dyld_fallback_library_path. had use avoid apple's libjpeg getting in way of apps expected libjpeg port. see man page dlopen() details.


Comments

Popular posts from this blog

Unable to open serial port using Putty to bluetooth device on windows 7 64 bit -

bash - How do you programmatically add a bats test? -

java - Getting exception in JDBC thin driver -