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

Error while running example #2

Open
Spiroz opened this issue Oct 11, 2012 · 9 comments
Open

Error while running example #2

Spiroz opened this issue Oct 11, 2012 · 9 comments

Comments

@Spiroz
Copy link

Spiroz commented Oct 11, 2012

I have been trying to install puredatap5 to my mac book os x 10.6.8 both to processing 2 & 1.5
Every time i run the example i get this:

NativeLoader$NativeLibraryLoadError: Couldn't find libpdnative.jnilib for this platform mac/x86

Exception in thread "Animation Thread" org.puredata.core.NativeLoader$NativeLibraryLoadError: Couldn't find libpdnative.jnilib for this platform mac/x86
at org.puredata.core.NativeLoader.loadLibraryFromJar(NativeLoader.java:111)
at org.puredata.core.NativeLoader.loadLibrary(NativeLoader.java:99)
at org.puredata.core.PdBase.(PdBase.java:74)
at org.puredata.processing.PureData.(Unknown Source)
at HelloPd.setup(HelloPd.java:35)
at processing.core.PApplet.handleDraw(PApplet.java:1608)
at processing.core.PApplet.run(PApplet.java:1530)
at java.lang.Thread.run(Thread.java:680)

and line writing this:
pd = new PureData(this, 44100, 0, 2);
is highlighted.

How can i fix this bug?

@heuermh
Copy link

heuermh commented Jan 4, 2013

I see the same with OSX 10.7 and 10.8 with 64bit Oracle JDKs 1.7 and 1.8.

Exception in thread "Animation Thread" org.puredata.core.NativeLoader$NativeLibraryLoadError: Couldn't find libpdnative.jnilib for this platform mac/x86_64
    at org.puredata.core.NativeLoader.loadLibraryFromJar(NativeLoader.java:111)
    at org.puredata.core.NativeLoader.loadLibrary(NativeLoader.java:99)
    at org.puredata.core.PdBase.(PdBase.java:74)
    at org.puredata.processing.PureData.(Unknown Source)
    at HelloPd.setup(HelloPd.java:36)
    at processing.core.PApplet.handleDraw(PApplet.java:2103)
    at processing.core.PGraphicsJava2D.requestDraw(PGraphicsJava2D.java:190)
    at processing.core.PApplet.run(PApplet.java:2006)
    at java.lang.Thread.run(Thread.java:680)

@heuermh
Copy link

heuermh commented Jan 4, 2013

There is a commit here

libpd/libpd@6f0a89d

that shows separate 32 and 64 bit native libraries for OSX, but when I clone and build from libpd/libpd master, I see only a single mac native library:

$ make javalib
...
javac -d java-build java/org/puredata/core/PdBase.java java/org/puredata/core/NativeLoader.java java/org/puredata/core/PdListener.java java/org/puredata/core/PdMidiReceiver.java java/org/puredata/core/PdReceiver.java java/org/puredata/core/utils/IoUtils.java java/org/puredata/core/utils/PdDispatcher.java
jar -cvf libs/libpd.jar -C java-build org/puredata/
added manifest
adding: org/puredata/(in = 0) (out= 0)(stored 0%)
adding: org/puredata/core/(in = 0) (out= 0)(stored 0%)
adding: org/puredata/core/NativeLoader$NativeLibraryLoadError.class(in = 604) (out= 355)(deflated 41%)
adding: org/puredata/core/NativeLoader.class(in = 2945) (out= 1609)(deflated 45%)
adding: org/puredata/core/natives/(in = 0) (out= 0)(stored 0%)
adding: org/puredata/core/natives/mac/(in = 0) (out= 0)(stored 0%)
adding: org/puredata/core/natives/mac/libpdnative.jnilib(in = 1814240) (out= 672577)(deflated 62%)
adding: org/puredata/core/PdBase.class(in = 6447) (out= 3380)(deflated 47%)
adding: org/puredata/core/PdListener$Adapter.class(in = 763) (out= 352)(deflated 53%)
adding: org/puredata/core/PdListener.class(in = 513) (out= 264)(deflated 48%)
adding: org/puredata/core/PdMidiReceiver.class(in = 343) (out= 224)(deflated 34%)
adding: org/puredata/core/PdReceiver$Adapter.class(in = 430) (out= 262)(deflated 39%)
adding: org/puredata/core/PdReceiver.class(in = 278) (out= 188)(deflated 32%)
adding: org/puredata/core/utils/(in = 0) (out= 0)(stored 0%)
adding: org/puredata/core/utils/IoUtils$1.class(in = 1027) (out= 572)(deflated 44%)
adding: org/puredata/core/utils/IoUtils$FileProcessor.class(in = 259) (out= 179)(deflated 30%)
adding: org/puredata/core/utils/IoUtils.class(in = 2967) (out= 1491)(deflated 49%)
adding: org/puredata/core/utils/PdDispatcher.class(in = 2984) (out= 1411)(deflated 52%)
$ cd libs
$ ls
asm-3.3.jar        cglib-2.2.jar      easymock-3.0.jar   libpd.jar          libpdnative.jnilib objenesis-1.2.jar  pthreadGC2.dll
$ jar tvf libpd.jar 
     0 Thu Jan 03 22:01:50 CST 2013 META-INF/
    60 Thu Jan 03 22:01:50 CST 2013 META-INF/MANIFEST.MF
     0 Thu Jan 03 22:01:50 CST 2013 org/puredata/
     0 Thu Jan 03 22:01:50 CST 2013 org/puredata/core/
   604 Thu Jan 03 22:01:50 CST 2013 org/puredata/core/NativeLoader$NativeLibraryLoadError.class
  2945 Thu Jan 03 22:01:50 CST 2013 org/puredata/core/NativeLoader.class
     0 Thu Jan 03 22:01:50 CST 2013 org/puredata/core/natives/
     0 Thu Jan 03 22:01:50 CST 2013 org/puredata/core/natives/mac/
1814240 Thu Jan 03 22:01:50 CST 2013 org/puredata/core/natives/mac/libpdnative.jnilib
  6447 Thu Jan 03 22:01:50 CST 2013 org/puredata/core/PdBase.class
   763 Thu Jan 03 22:01:50 CST 2013 org/puredata/core/PdListener$Adapter.class
   513 Thu Jan 03 22:01:50 CST 2013 org/puredata/core/PdListener.class
   343 Thu Jan 03 22:01:50 CST 2013 org/puredata/core/PdMidiReceiver.class
   430 Thu Jan 03 22:01:50 CST 2013 org/puredata/core/PdReceiver$Adapter.class
   278 Thu Jan 03 22:01:50 CST 2013 org/puredata/core/PdReceiver.class
     0 Thu Jan 03 22:01:50 CST 2013 org/puredata/core/utils/
  1027 Thu Jan 03 22:01:50 CST 2013 org/puredata/core/utils/IoUtils$1.class
   259 Thu Jan 03 22:01:50 CST 2013 org/puredata/core/utils/IoUtils$FileProcessor.class
  2967 Thu Jan 03 22:01:50 CST 2013 org/puredata/core/utils/IoUtils.class
  2984 Thu Jan 03 22:01:50 CST 2013 org/puredata/core/utils/PdDispatcher.class

@heuermh
Copy link

heuermh commented Jan 4, 2013

With the following commits I get closer

heuermh@20a20d0
heuermh@1cb19c1

Exception in thread "Animation Thread" java.lang.RuntimeException: PdBase does not implement audio!
    at org.puredata.processing.PureData.(Unknown Source)
    at HelloPd.setup(HelloPd.java:36)
    at processing.core.PApplet.handleDraw(PApplet.java:2103)
    at processing.core.PGraphicsJava2D.requestDraw(PGraphicsJava2D.java:190)
    at processing.core.PApplet.run(PApplet.java:2006)
    at java.lang.Thread.run(Thread.java:680)

@MikeSperone
Copy link

I wonder if this is possibly related to the error I've been getting?:

Exception in thread "Animation Thread" java.lang.UnsatisfiedLinkError: org.puredata.core.PdBase.implementsAudio()Z
at org.puredata.core.PdBase.implementsAudio(Native Method)
at org.puredata.processing.PureData.(Unknown Source)
at HelloPd.setup(HelloPd.java:31)
at processing.core.PApplet.handleDraw(PApplet.java:2117)
at processing.core.PGraphicsJava2D.requestDraw(PGraphicsJava2D.java:193)
at processing.core.PApplet.run(PApplet.java:2020)
at java.lang.Thread.run(Thread.java:680)

and processing is highlighting the same line for me too:
pd = new PureData(this, 44100, 0, 2);

I'm running Processing 2.0b7 on Mac OSX 10.7.5

@filipecalegario
Copy link

Hey MikeSperone, did you manage to solve the "UnsatisfiedLinkError"?
I'm getting the same error here...

@MikeSperone
Copy link

No I never got that fixed. And no one has been able to explain it to
me either.

I read something buried in a thread on a forum that someone else posted

  • it seemed to imply that this could be related to a 32 bit/64 bit issue
    in a related library used in the processing libpd source. Of course
    that's a little vague - and worse, it may not even be true.

But that's as far as I got. Last I checked, I've got no replies to any
of my questions regarding this and haven't come across anyone else with
the same error I've got (close, but not this particular one).

I haven't checked recently though, nor have I tried with the latest
version of Processing or checked on updates to libpd. If I find
anything though, I'll share it with you. Please let me know if you find
a way to get it working first.

Thanks!
Mike Sperone


composer/percussionist

www.mikesperone.com
862.262.2777

On 2013-08-14 17:31, Filipe Calegario wrote:

Hey MikeSperone, did you manage to solve the "UnsatisfiedLinkError"?
I'm getting the same error here...

Reply to this email directly or view it on GitHub [1].

Links:

[1] #2 (comment)

@filipecalegario
Copy link

Thank you for your quick reply! =)

I know it is another library, but I was able to control libPd with Processing using this one here:

http://robertesler.com/libpd-with-processing/

The bad point is that you have to install and run another software, the Jack for Mac OS, for the Processing app to work...

If you have any other info, please let me know too. =)

Thanks!

@MikeSperone
Copy link

Yes, I did get this to work. But like you, I also would prefer to not
have Jack required.

Thanks for the tip though!

Mike Sperone


composer/percussionist

www.mikesperone.com
862.262.2777

On 2013-08-14 17:56, Filipe Calegario wrote:

Thank you for your quick reply! =)

I know it is another library, but I was able to control libPd with
Processing using this one here:

http://robertesler.com/libpd-with-processing/ [1]

The bad point is that you have to install and run another software,
the Jack for Mac OS, for the Processing app to work...

If you have any other info, please let me know too. =)

Thanks!

Reply to this email directly or view it on GitHub [2].

Links:

[1] http://robertesler.com/libpd-with-processing/
[2] #2 (comment)

@filipecalegario
Copy link

Hey Mike!

I think I found the solution! =)

I've just seen your earlier discussion topic: http://createdigitalnoise.com/discussion/1916/libpd-processing-and-core-audio-no-jack-on-mac/p1

And based on the link I sent, I realized that the old version, with Jack, I had to place some libs in /System/Library/Frameworks/JavaVM.framework/Libraries

Precisely, libjacknative.dylib and libpdnative.dylib.

I've deleted both and my HelloPd.pde of the new puredatap5 did work! =)

Try it there, it may work! =)

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