libpd / puredatap5

Tentative Processing support for libpd; use at your own risk.
GNU General Public License v2.0
60 stars 11 forks source link

Error while running example #2

Open Spiroz opened 11 years ago

Spiroz commented 11 years ago

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 commented 11 years ago

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 commented 11 years ago

There is a commit here

https://github.com/libpd/libpd/commit/6f0a89d6a26110197c465b3f6c59dfc47586e11c

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 commented 11 years ago

With the following commits I get closer

https://github.com/heuermh/puredatap5/commit/20a20d0b206625758d7e8b31d13e4abaeef96086 https://github.com/heuermh/puredatap5/commit/1cb19c145f39dd9596ab6d5e071cb8bc7fc333c4

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 commented 11 years ago

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 commented 11 years ago

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

MikeSperone commented 11 years ago

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

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] https://github.com/libpd/puredatap5/issues/2#issuecomment-22668870

filipecalegario commented 11 years ago

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 commented 11 years ago

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] https://github.com/libpd/puredatap5/issues/2#issuecomment-22670385

filipecalegario commented 11 years ago

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! =)