Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Wow. I'm really impressed! Freenas?
09-02-2015, 23:15
Post: #21
RE: Wow. I'm really impressed! Freenas?
(09-02-2015 23:04)airflow Wrote:  So I have to compile libohNetJni.so too for FreeBSD. Before I tried that, I compiled and installed openjdk8 successfully (because you mentioned that an java-SDK is needed). Unluckily, compilation of libohNetJni.so fails with the following message:

Code:
gcc -o Build/Obj/Posix/Release/JniAction.o -c -fexceptions -Wall   -Werror -pipe -D_GNU_SOURCE -D_REENTRANT -DDEFINE_LITTLE_ENDIAN -DDEFINE_TRACE -g -O2   -fPIC -IBuild/Include/  -I/include -I/include/linux OpenHome/Net/Bindings/Java/Action.c
OpenHome/Net/Bindings/Java/Action.c:1:17: error: jni.h: No such file or directory

Should I ask the other Simon in the OpenHome-forum for support or do you have an idea already? For your information, I chose openjdk8 for the Java-SDK. I would also have linux-sun-jdk17. Should I try that instead?

You are getting these errors because jni.h was not found. You need to set the JAVA_HOME environment variable to the location where your JDK is installed.
Find all posts by this user
Quote this message in a reply
14-02-2015, 01:21
Post: #22
RE: Wow. I'm really impressed! Freenas?
(09-02-2015 23:15)simoncn Wrote:  You are getting these errors because jni.h was not found. You need to set the JAVA_HOME environment variable to the location where your JDK is installed.

After setting JAVA_HOME, the error went away - but other files were missed (for example jni_md.h or libjvm.so). I solved these problems by creating symlinks to the desired places.
After that, compilation failed with the error "<malloc.h> has been replaced by <stdlib.h>". I could resolve this by simply removing the inclusion of malloc.h in each source-file of ohNet where it was used.

Compilation succeeded then, and I could package the zip-file with both needed .so-files of ohNet. MinimServer started successfully without an error, after which it updated itself, after which the same error occured again. I replaced the now renamed zip-file with the external libs again with my self-made version of it, after which MinimServer starts without any problems in version 0.8.3 update 57. Great! Finally! :-)

After initial configuration the server is available for my renderers in my network. I'm actually listening to music with it right now. There are several facts about MinimServer which I really like: It's faster than any other UPnP-server I tested yet. It provides a great, functional and fast search. And it takes tagging seriously. :-)

For the future I guess, updates will result in continual manual work/adaption for me. That's fine with me. But in case you want to provide an official way of providing a FreeBSD-version, I'm happy to help you if I can.
Find all posts by this user
Quote this message in a reply
14-02-2015, 12:25
Post: #23
RE: Wow. I'm really impressed! Freenas?
(14-02-2015 01:21)airflow Wrote:  After setting JAVA_HOME, the error went away - but other files were missed (for example jni_md.h or libjvm.so). I solved these problems by creating symlinks to the desired places.

I believe there are other environment variables that you can set to make the Java build work without adding symlinks.

Quote:After that, compilation failed with the error "<malloc.h> has been replaced by <stdlib.h>". I could resolve this by simply removing the inclusion of malloc.h in each source-file of ohNet where it was used.

See my comment about this on the ohNet forum.

Quote:Compilation succeeded then, and I could package the zip-file with both needed .so-files of ohNet. MinimServer started successfully without an error, after which it updated itself, after which the same error occured again. I replaced the now renamed zip-file with the external libs again with my self-made version of it, after which MinimServer starts without any problems in version 0.8.3 update 57. Great! Finally! :-)

After initial configuration the server is available for my renderers in my network. I'm actually listening to music with it right now. There are several facts about MinimServer which I really like: It's faster than any other UPnP-server I tested yet. It provides a great, functional and fast search. And it takes tagging seriously. :-)

For the future I guess, updates will result in continual manual work/adaption for me. That's fine with me. But in case you want to provide an official way of providing a FreeBSD-version, I'm happy to help you if I can.

Thanks for doing this work. I am very pleased to hear that the result is successful.

Before I could make FreeBSD an officially supported platform for MinimServer, I would need to set up a FreeBSD environment so that I could build and test MinimServer running in this environment. I would also need to consider the implications for MinimServer of the missing functionality that has been discussed on the ohNet forum. I don't think it is likely that I would have the time to do this in the foreseeable future.

You won't need to rebuild the ohNet zip file for every update, only those updates that include a new version of ohNet. This would typically happen about once every couple of months.
Find all posts by this user
Quote this message in a reply
15-02-2015, 02:10
Post: #24
RE: Wow. I'm really impressed! Freenas?
(14-02-2015 12:25)simoncn Wrote:  I believe there are other environment variables that you can set to make the Java build work without adding symlinks.

That's what I was thinking, too - but I couldn't achieve it and chose the dirty hack in the end. Perhaps I'll tackle it again when a new version of ohNet is available and I have to do the procedure again. As far as I understand it, I will notice that automatically when MinimServer suddenly stops working (due to automatical updates, which load FreeBSD-incompatible libs).

BTW, there's another problem I'm currently looking into. There's a script provided to start MinimServer as a daemon (./bin/startd). While /bin/startc starts the server correctly and works for me, startd doesn't, because "setsid" is not available on FreeBSD. I guess I will write another script for execution in the background.
Find all posts by this user
Quote this message in a reply
15-02-2015, 08:14
Post: #25
RE: Wow. I'm really impressed! Freenas?
(15-02-2015 02:10)airflow Wrote:  That's what I was thinking, too - but I couldn't achieve it and chose the dirty hack in the end. Perhaps I'll tackle it again when a new version of ohNet is available and I have to do the procedure again. As far as I understand it, I will notice that automatically when MinimServer suddenly stops working (due to automatical updates, which load FreeBSD-incompatible libs).

I will look into this and post some suggestions for what settings are needed. Which version of the JDK did you download and install (e.g., Oracle, OpenJDK)?

Quote:BTW, there's another problem I'm currently looking into. There's a script provided to start MinimServer as a daemon (./bin/startd). While /bin/startc starts the server correctly and works for me, startd doesn't, because "setsid" is not available on FreeBSD. I guess I will write another script for execution in the background.

I will release a new Linux download soon with a fix for this.
Find all posts by this user
Quote this message in a reply
15-02-2015, 08:29
Post: #26
RE: Wow. I'm really impressed! Freenas?
(15-02-2015 08:14)simoncn Wrote:  [quote='airflow' pid='13822' dateline='1423962609']
Quote:BTW, there's another problem I'm currently looking into. There's a script provided to start MinimServer as a daemon (./bin/startd). While /bin/startc starts the server correctly and works for me, startd doesn't, because "setsid" is not available on FreeBSD. I guess I will write another script for execution in the background.

I will release a new Linux download soon with a fix for this.

The 0.8.3c Linux downloads with this fix are now available from the Downloads page.
Find all posts by this user
Quote this message in a reply
17-02-2015, 10:39
Post: #27
RE: Wow. I'm really impressed! Freenas?
(15-02-2015 08:14)simoncn Wrote:  
(15-02-2015 02:10)airflow Wrote:  That's what I was thinking, too - but I couldn't achieve it and chose the dirty hack in the end. Perhaps I'll tackle it again when a new version of ohNet is available and I have to do the procedure again. As far as I understand it, I will notice that automatically when MinimServer suddenly stops working (due to automatical updates, which load FreeBSD-incompatible libs).

I will look into this and post some suggestions for what settings are needed. Which version of the JDK did you download and install (e.g., Oracle, OpenJDK)?

I chose openjdk8 initially, but I can switch to Oracle if it's better/easier. I didn't try that yet, but thought already about it. But please don't invest time if it's not of your personal interest. I can also try to find that out for myself if I have more time, besides a have a functional work-around.

Quote:
Quote:BTW, there's another problem I'm currently looking into. There's a script provided to start MinimServer as a daemon (./bin/startd). While /bin/startc starts the server correctly and works for me, startd doesn't, because "setsid" is not available on FreeBSD. I guess I will write another script for execution in the background.

I will release a new Linux download soon with a fix for this.

Awesome, thank you! I just downloaded, installed and tried that out. After initial configuration, when I try to start the daemon in the background with bin/startd, there comes the error-message "mknod: node must be type 'b' or 'c'".
Find all posts by this user
Quote this message in a reply
17-02-2015, 11:38
Post: #28
RE: Wow. I'm really impressed! Freenas?
(17-02-2015 10:39)airflow Wrote:  Awesome, thank you! I just downloaded, installed and tried that out. After initial configuration, when I try to start the daemon in the background with bin/startd, there comes the error-message "mknod: node must be type 'b' or 'c'".

Please try editing the startd file to change mknod -p to mkfifo. I was originally using mkfifo but changed this because it wasn't working on some versions of Linux.
Find all posts by this user
Quote this message in a reply
17-02-2015, 23:25
Post: #29
RE: Wow. I'm really impressed! Freenas?
(17-02-2015 11:38)simoncn Wrote:  Please try editing the startd file to change mknod -p to mkfifo. I was originally using mkfifo but changed this because it wasn't working on some versions of Linux.

I changed
Code:
mknod -m a=rw "${MINIMPIPE}" p || exit
to
Code:
mkfifo -m a=rw "${MINIMPIPE}" || exit

after which the start of the daemon works fine.

I then read further through the documentation (very carefully done btw) and tried to control the daemon through the pipe. While that seemed to work, i couldn't get the output via pipedemo.sh - i guess some adaption has to be done there too? But I don't mind, there's not so much to do via the console anyway, and consulting the log-file works. Thanks for the continuing help, I'm happy I can use MinimServer now!
Find all posts by this user
Quote this message in a reply
19-02-2015, 10:41
Post: #30
RE: Wow. I'm really impressed! Freenas?
(17-02-2015 10:39)airflow Wrote:  I chose openjdk8 initially, but I can switch to Oracle if it's better/easier. I didn't try that yet, but thought already about it. But please don't invest time if it's not of your personal interest. I can also try to find that out for myself if I have more time, besides a have a functional work-around.

To pull in the libjvm library for linking, you need to set the libjvm_dir environment variable to the directory path where the libjvm library can be found.

THe ohNet Makefile is using this setting for the JDK includes:

includes_jni = -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux

In your version of OpenJDK, is there an include/linux directory, or has "linux" been changed to something else?
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)