csound OS X installer [was BUG(?) running csound api with 64bit java]
Date | 2015-06-28 16:33 |
From | peiman khosravi |
Subject | csound OS X installer [was BUG(?) running csound api with 64bit java] |
Attachments | None None |
I deleted csound framework
s and the java extension. Reinstalled the latest version of csound and csound api isn't working at all in java: /Extensions/lib_jcsound6.jnilib: dlopen(/Library/Java/Extensions/lib_jcsound6.jnilib, 1): no suitable image found. Did find: /Library/Java/Extensions/lib_jcsound6.jnilib: unknown file type, first eight bytes: 0x62 0x6F 0x6F 0x6B 0x00 0x00 0x00 0x00 So the copy I had must have been from an older version of csound. It looks like there is something wrong with the csound installer. Thanks Peiman |
Date | 2015-06-28 16:41 |
From | Jacques Leplat |
Subject | Re: csound OS X installer [was BUG(?) running csound api with 64bit java] |
Attachments | None None |
The CSound Jar I use is installed in /Library/Frameworks/CsoundLib64.framework/Versions/6.0/Resources.That folder has a jar and jnilib file. Not sure what to do with the jnilib, but I always keep the jar and jnilib copies in the same folder.
|
Date | 2015-06-28 17:39 |
From | Steven Yi |
Subject | Re: csound OS X installer [was BUG(?) running csound api with 64bit java] |
That should be the correct location for system Java extensions. Try running this: otool -L /Library/Java/Extensions/lib_jcsound6.jnilib in a terminal and see what it reports. For my local-built version of Csound, I have things installed in ~/Library instead, so I have this: Steven-Yis-MacBook-Pro:dissertation stevenyi$ otool -L ~/Library/Java/Extensions/lib_jcsound6.jnilib /Users/stevenyi/Library/Java/Extensions/lib_jcsound6.jnilib: @rpath/libjawt.dylib (compatibility version 1.0.0, current version 1.0.0) @rpath/libjvm.dylib (compatibility version 1.0.0, current version 1.0.0) /usr/local/lib/libsndfile.1.dylib (compatibility version 2.0.0, current version 2.25.0) libcsnd6.6.0.dylib (compatibility version 6.0.0, current version 0.0.0) CsoundLib64.framework/Versions/6.0/CsoundLib64 (compatibility version 6.0.0, current version 0.0.0) /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 104.1.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0) You may also want to check if you have ~/Library/Frameworks/CsoundLib64.framework and if so, delete it, as you're trying to use the installer version of Csound. (The on in the home directory would be installed if you used Homebrew or built Csound yourself locally) On Sun, Jun 28, 2015 at 11:33 AM, peiman khosravi |
Date | 2015-06-28 18:28 |
From | peiman khosravi |
Subject | Re: csound OS X installer [was BUG(?) running csound api with 64bit java] |
Attachments | None None |
Thanks Steven, Please see my comments inline. That should be the correct location for system Java extensions. Try I just ran the command after a fresh reinstall, and this is what I get: peimans-air:~ peimankhosravi$ otool -L /Library/Java/Extensions/lib_jcsound6.jnilib /Library/Java/Extensions/lib_jcsound6.jnilib: @rpath/libjawt.dylib (compatibility version 1.0.0, current version 1.0.0) @rpath/libjvm.dylib (compatibility version 1.0.0, current version 1.0.0) CsoundLib64.framework/Versions/6.0/CsoundLib64 (compatibility version 6.0.0, current version 0.0.0) @loader_path/../../../../libs/libsndfile.1.dylib (compatibility version 2.0.0, current version 2.25.0) libcsnd6.6.0.dylib (compatibility version 6.0.0, current version 0.0.0) /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 60.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1) Then I tried running your first csound api iava example and this is what I get: Example1.java:2: error: package csnd6 does not exist import csnd6.csnd6;
I definitly don't have the folder installed. |
Date | 2015-06-28 18:43 |
From | Steven Yi |
Subject | Re: csound OS X installer [was BUG(?) running csound api with 64bit java] |
That's odd about the message: Example1.java:2: error: package csnd6 does not exist import csnd6.csnd6; as that sounds like a compilation issue. The csnd6.jar should be picked up from t/Library/Java/Extensions though (is it there?). Try running this next: file /Library/Java/Extensions/lib_jcsound6.jnilib That should tell if it's been compiled for both i386 and x86_64. On Sun, Jun 28, 2015 at 1:28 PM, peiman khosravi |
Date | 2015-06-28 21:03 |
From | peiman khosravi |
Subject | Re: csound OS X installer [was BUG(?) running csound api with 64bit java] |
Attachments | None None |
This is what I get: peimans-air:~ peimankhosravi$ file /Library/Java/Extensions/lib_jcsound6.jnilib /Library/Java/Extensions/lib_jcsound6.jnilib: Mach-O universal binary with 2 architectures /Library/Java/Extensions/lib_jcsound6.jnilib (for architecture i386): Mach-O bundle i386 /Library/Java/Extensions/lib_jcsound6.jnilib (for architecture x86_64): Mach-O 64-bit bundle x86_64 peimans-air:~ peimankhosravi$ On 28 June 2015 at 18:43, Steven Yi <stevenyi@gmail.com> wrote: That's odd about the message: |
Date | 2015-06-28 21:08 |
From | Jacques Leplat |
Subject | Re: csound OS X installer [was BUG(?) running csound api with 64bit java] |
Attachments | None None |
Is csnd6.jar on your classpath? I’d expect the error you get if it is not:
|
Date | 2015-06-28 21:14 |
From | peiman khosravi |
Subject | Re: csound OS X installer [was BUG(?) running csound api with 64bit java] |
Attachments | None None |
Shouldn't the csound installer take care of that? Otherwise, do you know where to put it? On 28 June 2015 at 21:08, Jacques Leplat <jleplat@j3ltd.com> wrote:
|
Date | 2015-06-28 21:23 |
From | Jacques Leplat |
Subject | Re: csound OS X installer [was BUG(?) running csound api with 64bit java] |
Attachments | None None |
I don’t think so. Java looks for an environment variable called CLASSPATH, but the usual way of adding your jars is as a java command line option. macz:~ jacquesleplat$ java Usage: java [-options] class [args...] (to execute a class) or java [-options] -jar jarfile [args...] (to execute a jar file) where options include: -d32 use a 32-bit data model if available -d64 use a 64-bit data model if available -server to select the "server" VM The default VM is server, because you are running on a server-class machine. -cp <class search path of directories and zip/jar files> If you’re running from netbeans or some other ide, you’ll need to specify csnd6.jar as a library, and tell it where it is. |
Date | 2015-06-28 21:23 |
From | peiman khosravi |
Subject | Re: csound OS X installer [was BUG(?) running csound api with 64bit java] |
Attachments | None None |
OK, here it is. I copied csnd6.jar file from the csound frameworks folder into /Library/Java/Extensions/. Now the package is recognised but I'm back to square one: # A fatal error has been detected by the Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x0000000125224875, pid=1726, tid=3335 # # JRE version: Java(TM) SE Runtime Environment (8.0_45-b14) (build 1.8.0_45-b14) # Java VM: Java HotSpot(TM) 64-Bit Server VM (25.45-b02 mixed mode bsd-amd64 compressed oops) # Problematic frame: # C [libawt_lwawt.dylib+0x44875] JNI_OnLoad+0x91 . . . But now the only place I can make it work is inside 32-bit Max (but not 64-bit Max). P On 28 June 2015 at 21:14, peiman khosravi <peimankhosravi@gmail.com> wrote:
|
Date | 2015-06-28 21:30 |
From | Jacques Leplat |
Subject | Re: csound OS X installer [was BUG(?) running csound api with 64bit java] |
Attachments | None None |
Well, to me it looks like you now have something right: it works in 32 bit but not 64 bit. Has anyone else used max and java csound? If so in 64 bit? It might be down to how max is linking to csound via java in your setup.
|
Date | 2015-06-28 21:31 |
From | Jacques Leplat |
Subject | Re: csound OS X installer [was BUG(?) running csound api with 64bit java] |
Attachments | None None |
I do wonder which JDK max is using. Is it Apple’s or your JDK 1.8? Just a thought
|
Date | 2015-06-28 21:48 |
From | Jacques Leplat |
Subject | Re: csound OS X installer [was BUG(?) running csound api with 64bit java] |
Attachments | None None |
It’s possible that CSound was built for the Java 7 or 8 (1.7 or 1.8). I’m not sure without delving into CSound’s plethora of make files. Maybe someone more knowledgeable about building csound can help here. Apple’s OS X version is 1.6. 1.7 compiled jars may cause problems, unless a compilation flag is specified to make the classes backwards compatible. See http://www.oracle.com/technetwork/java/javase/compatibility-417013.html#jdk7 for details.
|
Date | 2015-06-28 22:09 |
From | peiman khosravi |
Subject | Re: csound OS X installer [was BUG(?) running csound api with 64bit java] |
Attachments | None None |
To be clear, max is the only environment that lets me run Csound. I'm guessing if I fire up java in 32-bit mode it will work too. But at the moment, it's not working when I run java via the terminal. On 28 June 2015 at 21:30, Jacques Leplat <jleplat@j3ltd.com> wrote:
|
Date | 2015-06-28 22:19 |
From | Steven Yi |
Subject | Re: csound OS X installer [was BUG(?) running csound api with 64bit java] |
/Library/Java/Extensions/ is where the installer should be placing links or copies of the csnd6.jar and lib_csnd6.jnilib. It's very odd that 32-bit would work. I would suspect that there is some other library that is in the way that was compiled for 32-bit. Try looking for copies of libcsnd6.6.0.dylib (there may be one in /usr/local/lib, which may be leftover from an older build) and run "file /path/to/libcsnd6.6.0.dylib" to see if it's i386 only. On Sun, Jun 28, 2015 at 5:09 PM, peiman khosravi |
Date | 2015-06-29 07:20 |
From | peiman khosravi |
Subject | Re: csound OS X installer [was BUG(?) running csound api with 64bit java] |
Attachments | None None |
Hi Steven, That looks fine: peimans-air:Desktop peimankhosravi$ file /usr/local/lib/libcsnd6.6.0.dylib /usr/local/lib/libcsnd6.6.0.dylib: Mach-O universal binary with 2 architectures /usr/local/lib/libcsnd6.6.0.dylib (for architecture i386): Mach-O dynamically linked shared library i386 /usr/local/lib/libcsnd6.6.0.dylib (for architecture x86_64): Mach-O 64-bit dynamically linked shared library x86_64 peimans-air:Desktop peimankhosravi$ On 28 June 2015 at 22:19, Steven Yi <stevenyi@gmail.com> wrote: /Library/Java/Extensions/ is where the installer should be placing |
Date | 2015-06-29 07:28 |
From | peiman khosravi |
Subject | Re: csound OS X installer [was BUG(?) running csound api with 64bit java] |
Attachments | None None |
And I just checked and Blue is still working in api mode. On 29 June 2015 at 07:20, peiman khosravi <peimankhosravi@gmail.com> wrote:
|
Date | 2015-06-29 07:37 |
From | peiman khosravi |
Subject | Re: csound OS X installer [was BUG(?) running csound api with 64bit java] |
Attachments | None None |
I tried copying the csnd6.jar from the blue application package into /Library/Java/Extensions/. Same error... On 29 June 2015 at 07:28, peiman khosravi <peimankhosravi@gmail.com> wrote:
|
Date | 2015-06-29 07:42 |
From | peiman khosravi |
Subject | Re: csound OS X installer [was BUG(?) running csound api with 64bit java] |
Attachments | None None |
I don't understand what's going on: I just deleted the files in /Library/Java/Extensions/ and placed fresh copies of lib_jcsound6.jnilib and csnd6.jar in there. And now I'm getting this error: _jcsound6 native code library failed to load. java.lang.UnsatisfiedLinkError: /Library/Java/Extensions/lib_jcsound6.jnilib: dlopen(/Library/Java/Extensions/lib_jcsound6.jnilib, 1): no suitable image found. Did find: /Library/Java/Extensions/lib_jcsound6.jnilib: unknown file type, first eight bytes: 0x62 0x6F 0x6F 0x6B 0x00 0x00 0x00 0x00 [Finished in 1.2s with exit code 1] On 29 June 2015 at 07:37, peiman khosravi <peimankhosravi@gmail.com> wrote:
|
Date | 2015-06-29 08:02 |
From | peiman khosravi |
Subject | Re: csound OS X installer [was BUG(?) running csound api with 64bit java] |
Attachments | None None |
Steven, Could we try something? Can you please send me a copy of your csnd6.jar and lib_jcsound6.jnilib? If I put them in my /Library/Extensions folder then it should all work right? Otherwise the problem is elsewhere. Thank, P On 29 June 2015 at 07:42, peiman khosravi <peimankhosravi@gmail.com> wrote:
|
Date | 2015-06-29 09:12 |
From | peiman khosravi |
Subject | Re: csound OS X installer [was BUG(?) running csound api with 64bit java] |
Attachments | None None |
ok the previus error was because libsndfile.1.dylib was missing from my /usr/local/lib folder. I copied it there and now back to the initial error: A fatal error has been detected... [libawt_lwawt.dylib+0x44875] JNI_OnLoad+0x91. On 29 June 2015 at 08:02, peiman khosravi <peimankhosravi@gmail.com> wrote:
|
Date | 2015-06-29 16:00 |
From | Steven Yi |
Subject | Re: csound OS X installer [was BUG(?) running csound api with 64bit java] |
I'm not sure sending my java-related files will work as they're linking to different library locations. Maybe we can try this: uninstall 6.05, and install 6.03.2: https://sourceforge.net/projects/csound/files/csound6/Csound6.03/ That one was built for OSX 10.9. If that works, that might give us some more information. On Mon, Jun 29, 2015 at 4:12 AM, peiman khosravi |
Date | 2015-06-29 21:30 |
From | peiman khosravi |
Subject | Re: csound OS X installer [was BUG(?) running csound api with 64bit java] |
Attachments | None None |
Hi Steven, It took me ages to download the installer (very slow Internet here). So the good news is that it works with 6.03.2. (I still had to install the .jar file manually.) Many Thanks for your help. Best, Peiman On 29 June 2015 at 16:00, Steven Yi <stevenyi@gmail.com> wrote: I'm not sure sending my java-related files will work as they're |
Date | 2015-06-30 19:15 |
From | Steven Yi |
Subject | Re: csound OS X installer [was BUG(?) running csound api with 64bit java] |
Could you file an issue in the csound issue tracker for this? I'm going to suspect that the work that was done to embed the support libraries into the framework are causing an issue here (maybe something was missed with the interface libraries). We can also investigate what is going on with the csnd6.jar. On Mon, Jun 29, 2015 at 4:30 PM, peiman khosravi |