ClearTK / cleartk

Machine learning components for Apache UIMA
http://cleartk.github.io/cleartk/
Other
130 stars 58 forks source link

crfsuite dyld problem #312

Open bethard opened 9 years ago

bethard commented 9 years ago

Original issue 314 created by ClearTK on 2012-07-19T00:02:36.000Z:

What steps will reproduce the problem?

  1. Run "mvn test"

What is the expected output?

Tests run: 2, Failures: 0, Errors: 0, Skipped: 0

What do you see instead?

WARNING: CRFSuite could not be executed! Jul 18, 2012 5:57:16 PM org.cleartk.classifier.crfsuite.CRFSuiteWrapper <init>(86) WARNING: The CRFSuite binary is not available for the current operation system, please install it! Jul 18, 2012 5:57:16 PM org.cleartk.classifier.crfsuite.CRFSuiteWrapper trainClassifier(215) WARNING: dyld: Library not loaded: /Users/dbaer/make_crfsuite/binaries/lib/libcrfsuite-0.12.dylibReferenced from: /Users/bethard/Code/cleartk/cleartk-ml-crfsuite/target/classes/crfsuite/osx_x86_64/bin/crfsuiteReason: image not found Jul 18, 2012 5:57:16 PM org.cleartk.classifier.crfsuite.CRFSuiteWrapper trainClassifier(216) INFO:

Jul 18, 2012 5:57:16 PM org.cleartk.classifier.crfsuite.CRFSuiteWrapper classifyFeatures(296) WARNING: dyld: Library not loaded: /Users/dbaer/make_crfsuite/binaries/lib/libcrfsuite-0.12.dylibReferenced from: /Users/bethard/Code/cleartk/cleartk-ml-crfsuite/target/classes/crfsuite/osx_x86_64/bin/crfsuiteReason: image not found

Please use labels and text to provide additional information.

So look in particular at that last line with the "dyld". It's referring to a hard-coded path on some system that I'm not on. Seems like the library path should be relative to the crfsuite binary. Or maybe the whole thing should be statically linked rather than dynamically linked?

bethard commented 9 years ago

Comment #1 originally posted by ClearTK on 2012-07-19T06:55:42.000Z:

That binary should be rebuilt statically.

bethard commented 9 years ago

Comment #2 originally posted by ClearTK on 2012-07-19T09:10:30.000Z:

The binaries for the other platforms should also be linked statically, which should remove the need to include the "lib" and "include" folders in SVN.

bethard commented 9 years ago

Comment #3 originally posted by ClearTK on 2012-07-20T08:26:01.000Z:

For OS X, there is another alternative, since static builds are a bit problematic on OS X:

builder.environment().put("DYLD_LIBRARY_PATH", ...path...to...lib...folder...);

I didn't look at the CRFSuiteWrapper in detail yet.

bethard commented 9 years ago

Comment #4 originally posted by ClearTK on 2012-07-20T10:08:39.000Z:

Relevant link for OS X: http://developer.apple.com/library/mac/#qa/qa1393/_index.html

bethard commented 9 years ago

Comment #5 originally posted by ClearTK on 2012-07-24T17:27:17.000Z:

<empty>

bethard commented 9 years ago

Comment #6 originally posted by ClearTK on 2012-07-24T17:35:18.000Z:

I built a statically linked version of crfsuite 0.12 with liblbfgs 1.10. It's attached to this issue. It should work if you replace the current OS X binary with this one. Please test.

bethard commented 9 years ago

Comment #7 originally posted by ClearTK on 2012-07-24T17:38:40.000Z:

For the record:

The result should be a statically linked binary called "crfsuite-static".

bethard commented 9 years ago

Comment #8 originally posted by ClearTK on 2012-07-24T17:41:53.000Z:

@Steven: I think Martin is a bit busy at the moment and he doesn't have a Mac anyway. Please check if this static binary works for you.

bethard commented 9 years ago

Comment #9 originally posted by ClearTK on 2012-07-25T16:06:22.000Z:

Works like a charm, thanks! I committed it in r3925.

I'm leaving this issue open until we have the linux binaries linked statically as well.

bethard commented 9 years ago

Comment #10 originally posted by ClearTK on 2012-07-26T17:52:42.000Z:

So I just tried this out on a Linux box where I don't have crfsuite installed, and the cleartk-ml-crfsuite tests all pass, meaning the dynamically linked crfsuite seems to work fine on Linux.

So, while we should probably still rebuild the crfsuite binaries statically for Linux, this issue won't block the 1.2 release.

bethard commented 9 years ago

Comment #11 originally posted by ClearTK on 2013-02-17T18:00:54.000Z:

<empty>

bethard commented 9 years ago

Comment #12 originally posted by ClearTK on 2013-05-03T08:44:33.000Z:

<empty>

bethard commented 9 years ago

Comment #13 originally posted by ClearTK on 2014-03-15T17:41:52.000Z:

<empty>