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

crfsuite dyld problem #312

Open
bethard opened this issue Apr 14, 2015 · 13 comments
Open

crfsuite dyld problem #312

bethard opened this issue Apr 14, 2015 · 13 comments

Comments

@bethard
Copy link
Contributor

bethard commented Apr 14, 2015

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
Copy link
Contributor Author

bethard commented Apr 14, 2015

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

That binary should be rebuilt statically.

@bethard
Copy link
Contributor Author

bethard commented Apr 14, 2015

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
Copy link
Contributor Author

bethard commented Apr 14, 2015

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
Copy link
Contributor Author

bethard commented Apr 14, 2015

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
Copy link
Contributor Author

bethard commented Apr 14, 2015

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

<empty>

@bethard
Copy link
Contributor Author

bethard commented Apr 14, 2015

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
Copy link
Contributor Author

bethard commented Apr 14, 2015

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

For the record:

  • download liblbfgs and configure with --prefix=~/crf, make and install it
  • download crfsuite and configure with --prefix=/crf --with-liblbfgs=/crf/, make and install it
  • go to crfsuite-0.12/frontend
  • gcc -o crfsuite-static *.o ~/crf/lib/libcqdb.a ~/crf/lib/libcrfsuite.a ~/crf/lib/liblbfgs.a

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

@bethard
Copy link
Contributor Author

bethard commented Apr 14, 2015

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
Copy link
Contributor Author

bethard commented Apr 14, 2015

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
Copy link
Contributor Author

bethard commented Apr 14, 2015

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
Copy link
Contributor Author

bethard commented Apr 14, 2015

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

<empty>

@bethard
Copy link
Contributor Author

bethard commented Apr 14, 2015

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

<empty>

@bethard
Copy link
Contributor Author

bethard commented Apr 14, 2015

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

<empty>

@bethard bethard modified the milestone: 2.2 Apr 16, 2015
@reckart reckart modified the milestones: 3.0.0, ⭐️ Feature backlog Nov 4, 2022
@reckart reckart added 🐛 Bug Something isn't working and removed Type-Defect labels Nov 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants