-
Notifications
You must be signed in to change notification settings - Fork 8
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
Multiple paths required #4
Comments
Does this still hold for Java 16? |
Perhaps it was not a good idea for me to have mentioned two issues in this "issue". Both are related to include paths, but the fluidsynth-header issue is technically unrelated to the java-native include issue, so perhaps I should have kept them separate. Treating them separately below: ===========================================
|
Hmm. This is interesting: jni.h is included in a few places:
BUT I only had to add a workaround the inclusion in jorgan-fluidsynth. That presumably means that the other cases already have good (non-hack) workarounds that can be moved over to fluidsynth?? I will investigate. |
Hmm:
So all of the above didn't really include jni.h in the same way that fluidsynth does. HOWEVER I note that whoever wrote the following lines of jorgan-creative/build.xml
felt entirely happy having the lines:
inside a win-dependent target. Later on in a windows dependent target the same file is happy to have a pair of lines:
I am therefore beginning to infer that my originally reported workaround is (adding the darwin director) is actually "in keeping" with the expected practice. I will therefore make a pull-request for the adding of the darwin line. It still remains to figure out what to do with the fluidsynth include issue. |
OK - I made a pull-request for the addition of the darwin line. Find it here: However this still leaves open the question of the most appropriate way of making sure that the build can find "fluidsynth/ladspa.h" |
When building from source on my mac, I found I needed to modify more build.xml files than I anticipated. I've listed some of them below. With enough such changes I can indeed build Jorgan and it makes noises and I can load some dispositions from elsewhere. So in that sense there is no "issue" at all.
However it also feels to me like there should be a few more options in build.properties which can feed down in a more natural way to the sub-packages so that other people in future building on mac don't have to solve the same problems I had to investigate.
I am hoping that perhaps by posing an issue here it might be possible to work toward such a resolution.
E.g. having set
mac.include = /Library/Java/JavaVirtualMachines/jdk-11.0.12.jdk/Contents/Home/include
in build.properties (which I did expect to change) I still had to add extra lines to jorgan-fluidsynth/build.xml as shown in the diff below.
As you can see there are two extra lines above.
The FIRST additional line was because the header files installed in $JAVA_HOME/include by the https://download.oracle.com/otn-pub/java/jdk/11.0.12+8/f411702ca7704a54a79ead0c2e0942a3/jdk-11.0.12_osx-x64_bin.dmg installer oracle had me use contain files which are used by organ with names like:
${mac.include}/jni.h
which themselves contain lines like
#include "jni_md.h"
despite "jni_md.h" actually being one directory deeper in the darwin sub-folder. Presumably this is because jni_md.h contains system dependent code.
THIS FIRST ISSUE would be solved if build.properties contained some facility for me to include multiple include paths, not just a single one, for mac.include. Then I could include both my $JAVA_HOME/include and $JAVA_HOME/include/darwin. I did initially hope I might be able to do so by using some magic separator (like colons), e,g. setting:
mac.include=$JAVA_HOME/include:$JAVA_HOME/include/darwin
however the above (even if it were compatible with the java compile line, which I am not 100% sure it is) would still trigger a file-not-found failure in places in jorgan-fluidsynth/build.xml where tests like this are done:
I am neither a java nor an ant expert, so rather than attempt to fix the test above I just hard-coded extra include paths into the build line as shown in the original diff. However, it feels to me that someone who is a java/ant expert would be able to propose a better fix than the one I did from the get-go.
The second line you can see I added to jorgan-fluidsynth/build.xml was so that the jOrgan build could find my system's fluidsynth headers. Again, I just added the line so that the thing would compile, but I presume that someone more au-fait with ant would propose a more sensible high-level place to put such paths in a way that would be more maintainable for others in future?
In case anyone wants to see the sum total of all the changes I made, they can be seen in the "LESTER_M1_CONFIG" branch of my Jorgan fork here:
https://github.com/kesterlester/jorgan/tree/LESTER_M1_CONFIG
The text was updated successfully, but these errors were encountered: