Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSX Segmentation fault: 11 #3029

Closed
Vikisix opened this issue Mar 2, 2016 · 18 comments
Closed

OSX Segmentation fault: 11 #3029

Vikisix opened this issue Mar 2, 2016 · 18 comments

Comments

@Vikisix
Copy link

Vikisix commented Mar 2, 2016

Hi all!

I have just lost one day trying to solve this problem but I really do not know how to solve it. I want to run shogun on my laptop (OSX 10.11.3). I have installed shogun with macports and I have updated all the libraries with brew (as example I hade libcurl 7.0 so I have updated to 9.0 as requested with brew).

After this odissea , I try to run "import modshogun" in my python console, but I got:

Segmentation fault: 11

Any idea on how to solve this problem?

Any help is really appreciated!

Thank you for your time :)

@vigsterkr
Copy link
Member

macports based shogun is pretty outdated :(
try to use either brew or from src

@Vikisix
Copy link
Author

Vikisix commented Mar 2, 2016

I have cleaned the previous installation of macports and I tried to install shogun with brew.
The installation went all (apparently), however when I tried to import modshogun in python console It said:
_modshogun.so requires version 12.0.0 or later, but libxml2.2.dylib provides version 10.0.0
So I have updated it using the suggestions in the following thread:
https://github.com/Homebrew/homebrew-php/issues/2446
Then I tried it again and I have received Segmentation fault: 11
Do you suggest to try to install from src? Or do you think the problem is something else?

@amoudgl
Copy link
Contributor

amoudgl commented Mar 3, 2016

Any updates on this? I am also facing the same issue. Following are my environment variables:

Abhinavs-MBP:shogun abhinavmoudgil95$ echo $PYTHONPATH
/usr/local/lib/python2.7/site-packages/
Abhinavs-MBP:shogun abhinavmoudgil95$ echo $DYLD_LIBRARY_PATH

Abhinavs-MBP:shogun abhinavmoudgil95$ 

If I change my DYLD_LIBRARY_PATH to /usr/local/lib as suggested on INSTALL wiki page, I get the following error:

Abhinavs-MBP:shogun abhinavmoudgil95$ export DYLD_LIBRARY_PATH=/usr/local/lib
Abhinavs-MBP:shogun abhinavmoudgil95$ python
Python 2.7.10 |Anaconda 2.3.0 (x86_64)| (default, May 28 2015, 17:04:42) 
[GCC 4.2.1 (Apple Inc. build 5577)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://binstar.org
>>> import modshogun
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/site-packages/modshogun.py", line 30, in <module>
    _modshogun = swig_import_helper()
  File "/usr/local/lib/python2.7/site-packages/modshogun.py", line 26, in swig_import_helper
    _mod = imp.load_module('_modshogun', fp, pathname, description)
ImportError: dlopen(/usr/local/lib/python2.7/site-packages/_modshogun.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.dylib
 in /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
>>> 

@karlnapf
Copy link
Member

karlnapf commented Mar 3, 2016

This is why we need this GSoC project!
Sorry I am of no help here, but maybe @lisitsyn has an idea?

@amoudgl
Copy link
Contributor

amoudgl commented Mar 3, 2016

Yes! This is the major issue I face in Open Source orgs. Most of them are updated for Linux but not for OS X. I'd be happy to contribute my part.

@vigsterkr
Copy link
Member

@abhinavmoudgil95 i'm not so sure how you've managed to get this error, as i really dont get how you've managed to get modshogun depend on libJPEG. could you share your cmake command?

FYI i'm using shogun on OSX without any problems.

@amoudgl
Copy link
Contributor

amoudgl commented Mar 4, 2016

Oh! Thanks for informing. I wasn't aware that modshogun doesn't depend on libJPEG. I guess there is some wrong symlink created between libraries. I'll see and get back.

Following is the cmake command I used:
cmake -DPythonModular=ON ..

@vigsterkr
Copy link
Member

symlink between libraries? what exactly do you mean by that?

@amoudgl
Copy link
Contributor

amoudgl commented Mar 4, 2016

Symbolic links between files. See here for more details.

@vigsterkr
Copy link
Member

symbolic links between files? a symbolic link to a file, maybe... btw thanks for the link about symbolic link.
but i have a hard time to understand how that would that be the root cause of getting linking errors for your library

@amoudgl
Copy link
Contributor

amoudgl commented Mar 4, 2016

Symlinks may not be created while building modshogun.

In my case, there may be symbolic links to files present in /usr/local/lib from linkpath path/to/anaconda/pkgs/jpeg-8d-1/lib/ (where libJPEG is present). Can this be a cause to above mentioned error?

@vigsterkr
Copy link
Member

still dont understand how did modshogun got the linking dependency for libJPEG.

@amoudgl
Copy link
Contributor

amoudgl commented Mar 4, 2016

shogun libraries are present in /usr/local/lib/as libshogun.17.2.dylib etc. and all files present in /usr/local/lib/ may be linking from linkpath path/to/anaconda/pkgs/jpeg-8d-1/lib/

@vigsterkr
Copy link
Member

but man do you understand what does it mean to have a linking dependency to libJPEG? and how did you manage to do that?

@amoudgl
Copy link
Contributor

amoudgl commented Mar 4, 2016

Doing something like this ln -s /usr/local/lib/* path/to/anaconda/pkgs/jpeg-8d-1/lib/somelink/ can cause such error? Yes, agreed that it makes no sense for modshogun to link to libJPEG. It may be created by mistake while building some other tool. Sorry I don't remember exactly.

@vigsterkr
Copy link
Member

no it has nothing do with that. i suggest you to read more about shared libraries and linking libraries because the things you've mentioned here makes no sense at all.

@amoudgl
Copy link
Contributor

amoudgl commented Mar 4, 2016

I'll take your word.

@Vikisix
Copy link
Author

Vikisix commented Mar 6, 2016

After some other working.. I remove all the previous installation and I followed the following instructions https://github.com/shogun-toolbox/shogun/wiki/QUICKSTART.

However when I run the examples... I still get Segmentation fault: 11... do you have any idea of what is the problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants