sermanet / OverFeat

Other
597 stars 203 forks source link

Issue with path to libgomp.1.dylib #5

Open mickaellegal opened 10 years ago

mickaellegal commented 10 years ago

Hi Guys,

I've just installed OverFeat on my computer and whenever I run the simple test of the precompiled binaries >> ./bin/macos/overfeat -n 3 samples/bee.jpg

I keep having the following error message:

sh: convert: command not found dyld: Library not loaded: /opt/local/lib/libgcc/libgomp.1.dylib Referenced from: [mypath]/overfeat/bin/macos/overfeatcmd Reason: image not found

sh: line 1: 47466 Done(127) convert samples/bee.jpg ppm:- 47467 Trace/BPT trap: 5 | /[mypath]/overfeat/bin/macos/overfeatcmd /[mypath]/overfeat/data/default/net_weight_0 -1 0 19

Here are the steps I followed:

  1. Downloaded OverFeat-v04.tgz from the website
  2. Ran the download_weights.py script
  3. Installed imagemagick
  4. Ran brew install gcc48.

libgomp.1.dylib is on my computer but in the following folder: /usr/local/Cellar/gcc48/4.8.2/lib/gcc/x86_64-apple-darwin13.1.0

I'm running on a MacBook Pro with OS X Mavericks and Xcode 5.02 installed.

Any idea how I could solve this issue? Please let me know if you need additional information.

Thank you very much in advance.

Mickael

MichaelMathieu commented 10 years ago

Hi,

In the future, please ask question on the google group ( https://groups.google.com/forum/#!forum/overfeat ) since it might interest other people.

Concerning your question, convert is an imagemagick tool. Are you sure it is in your path, after you installed it ? I installed it with MacPorts and didn't have any issue. You definitely need to have the convert command to run the overfeat script. If it's just a path problem, you can type

export $PATH=$PATH:

before, running overfeat. In order to avoid typing it each time you open a terminal, you can add it to your .bashrc .

I don't fully understand what happens with libgomp (should be openmp, and you should have it with gcc48), but the line "Reason: image not found" at the end makes me think it's linked. Solving the convert problem comes first. If it still doesn't work, you can always symlink the library :

cd /opt/local/lib/libgcc ln -sf /usr/local/Cellar/gcc48/4.8.2/lib/gcc/x86_64-apple-darwin13.1.0/libgomp1.dylib

If you don't want to symlink, the only way is probably to recompile it with the correct paths to the libraries.

Tell me how it works.

On 03/07/2014 08:29 AM, Mickael Le Gal wrote:

Hi Guys,

I've just installed OverFeat on my computer and whenever I run the simple test of the precompiled binaries >> ./bin/macos/overfeat -n 3 samples/bee.jpg

I keep having the following error message:

sh: convert: command not found dyld: Library not loaded: /opt/local/lib/libgcc/libgomp.1.dylib Referenced from: [mypath]/overfeat/bin/macos/overfeatcmd Reason: image not found

sh: line 1: 47466 Done(127) convert samples/bee.jpg ppm:- 47467 Trace/BPT trap: 5 | /[mypath]/overfeat/bin/macos/overfeatcmd /[mypath]/overfeat/data/default/net_weight_0 -1 0 19

Here are the steps I followed:

  1. Downloaded OverFeat-v04.tgz from the website
  2. Ran the download_weights.py script
  3. Installed imagemagick
  4. Ran brew install gcc48.

libgomp.1.dylib is on my computer but in the following folder: /usr/local/Cellar/gcc48/4.8.2/lib/gcc/x86_64-apple-darwin13.1.0

I'm running on a MacBook Pro with OS X Mavericks and Xcode 5.02 installed.

Any idea how I could solve this issue? Please let me know if you need additional information.

Thank you very much in advance.

Mickael

— Reply to this email directly or view it on GitHub https://github.com/sermanet/OverFeat/issues/5.

mickaellegal commented 10 years ago

Hi Michael,

Many thanks for the reply and well noted next time, I will post directly on the forum.

  1. I added the path to convert in the .profile. By the way I installed imageMagick using the package installer found here.
  2. Then ran the script again and got the following error.

########################### overfeat mickaellegal$ ./bin/macos/overfeat -n 3 samples/bee.jpg

dyld: Library not loaded: /opt/local/lib/libgcc/libgomp.1.dylib Referenced from: //overfeat/bin/macos/overfeatcmd Reason: image not found sh: line 1: 52159 Done convert samples/bee.jpg -resize 231x231^ ppm:- 52160 Trace/BPT trap: 5 |

//overfeat/bin/macos/overfeatcmd //overfeat/data/default/net_weight_0 3 0 19 ###########################

Convert was found but the libgomp can’t still be loaded.

  1. I symlinked has you suggested and ran the script again and still have the following error:

########################### ./bin/macos/overfeat -n 3 samples/bee.jpg dyld: Library not loaded: /opt/local/lib/libgcc/libgomp.1.dylib Referenced from: //overfeat/bin/macos/overfeatcmd Reason: image not found sh: line 1: 52199 Done convert samples/bee.jpg -resize 231x231^ ppm:- 52200 Trace/BPT trap: 5 | //bin/macos/overfeatcmd //overfeat/data/default/net_weight_0 3 0 19 ###########################

I’m not sure to understand what is going on here. Is there a way to easily recompile with the correct paths to the libraries?

Thanks a lot in advance.

Mickael

On 7 Mar, 2014, at 9:49 pm, Michael MATHIEU notifications@github.com wrote:

libgomp1.dylib

mickaellegal commented 10 years ago

Hi Michael,

I found the solution to this problem. I've reinstalled everything with Macport instead of Homebrew and it works now.

  1. Install macport if you don't already have it.
  2. sudo port -v selfupdate
  3. sudo port install libgcc +universal
  4. sudo port install ImageMagick

And there you go, it works great now.

Thanks for your help.

Mickael

nzer0 commented 10 years ago

This solved for me http://stackoverflow.com/questions/17703510/dyld-library-not-loaded-reason-image-not-loaded

kylemcdonald commented 9 years ago

i'm running osx 10.10.2 and have gcc 4.9.1 installed via homebrew. this fixed it for me:

cd /opt
sudo mkdir -p local/lib/libgcc
cd local/lib/libgcc
sudo ln -sf /usr/local/Cellar/gcc/4.9.1/lib/gcc/x86_64-apple-darwin13.3.0/4.9.1/libgomp.1.dylib
DanlanChen commented 8 years ago

install gcc helps all