Installing PMS on NAS (Synology DS-211+)

For help and support with issues specific to Linux/Unix
Forum rules
Please make sure you follow the Problem Reporting Guidelines before posting if you want a reply.

Installing PMS on NAS (Synology DS-211+)

Postby synops » Sat Oct 22, 2011 1:39 pm

Hi,

I am trying to get the ps3mediaserver into my Synology DS211+ (Marvell Kirkwood mv6282 ARM cpu, 1.6Ghz, 512MB RAM).

Here is what I did so far, (following the steps discussed in this post http://www.ps3mediaserver.org/forum/viewtopic.php?f=3&t=486).

    > ipkg install jamvm
    > ipkg install ffmpeg
    > ipkg install classpath
    downloaded "pms-generic-linux-unix-1.40.0.tgz" to /opt
    > cd /opt
    > tar -xvzf pms-generic-linux-unix-1.40.0.tgz
    > cd ./pms-linux-1.40.0
    > chmod ug+x PMS.sh
    edited PMS.sh as follows:
    Code: Select all
    # Setup the JVM
    if [ "x$JAVA" = "x" ]; then
       if [ "x$JAVA_HOME" != "x" ]; then
          JAVA="$JAVA_HOME/bin/java"
       else
          JAVA="jamvm"
       fi
    fi

    > ./PMS.sh

Now when PMS starts, I get the following error:
Code: Select all
GUI environment not available
Switching to console mode
[main] WARN  14:24:35.788 Error loading libzen: jnidispatch (/com/sun/jna/linux-arm/libjnidispatch.so) not found in resource path


Attached is my PMS.conf and the complete PMS log.
Can anyone help?

Thanks,
synops
Attachments
PMS.sh.log.zip
(1.1 KiB) Downloaded 163 times
PMS.conf.zip
(1.05 KiB) Downloaded 236 times
synops
 
Posts: 10
Joined: Sat Oct 22, 2011 10:55 am

Re: Installing PMS on NAS (Synology DS-211+)

Postby markdark » Wed Nov 16, 2011 5:10 pm

Hello,

I got the same error and can't find out what the problem is. The installation I did so far:

1. Install Java 1.6 or greater
- Download Java SE Embedded Runtime from Oracle site, select the ARM v5 Linux version (http://www.oracle.com/technetwork/java/ ... 35769.html)
- Save the file 'ejre-1_6_0_27-fcs-b07-linux-arm-sflt-eabi-headless-18_jul_2011.tar.tar' to /volume1/@tmp/
- mkdir /opt/java
- cd /volume1/@tmp/
- tar zvxf ejre-1_6_0_27-fcs-b07-linux-arm-sflt-eabi-headless-18_jul_2011.tar.tar
- mv ejre1.6.0_27 /opt/java/
- Test java: /opt/java/ejre1.6.0_27/bin/java -version
2. Install classpath on NAS through ipkg
- ipkg install classpath
3. Download PMS (http://ps3mediaserver.blogspot.com/) to /volume1/@tmp/
4. Unpack file 'pms-generic-linux-unix-1.50.0-b2.tgz'
- tar zvxf pms-generic-linux-unix-1.50.0-b2.tgz
5. Edit the profile for all bash users to look like this (file '/opt/etc/profile'):

#
# Bash initialization script
#

PS1="[\u@\h \W]$ "
PATH=/opt/sbin:/opt/bin:/sbin:/bin:/usr/sbin:/usr/bin
LD_LIBRARY_PATH=/opt/lib:${LD_LIBRARY_PATH}
JAVA_HOME=/opt/java/ejre1.6.0_27

export PS1 PATH LD_LIBRARY_PATH JAVA_HOME

6. Edit the profile for all root users (file '/etc/profile') to look like this:

PATH=/opt/java/ejre1.6.0_27/bin:/opt/bin:/opt/sbin:$PATH
JAVA_HOME=/opt/java/ejre1.6.0_27/
export JAVA_HOME

7. Install SVN
- ipkg install svn

8. Install MPlayer
- mkdir /opt/local/mplayer
- cd /opt/local/mplayer
- svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer

9. Start PMS
markdark
 
Posts: 13
Joined: Wed Nov 16, 2011 5:07 pm

Re: Installing PMS on NAS (Synology DS-211+)

Postby synops » Wed Nov 16, 2011 7:47 pm

Hello markdark,

What I have also did is installing mediainfo, libmediainfo and libzen, but I am still getting the same error.

Looks like "libjnidispatch.so" is missing.
synops
 
Posts: 10
Joined: Sat Oct 22, 2011 10:55 am

Re: Installing PMS on NAS (Synology DS-211+)

Postby synops » Wed Nov 16, 2011 10:34 pm

Hello,

I think - I got one step further, here is what I did:

NOTE: I did the following on my desktop machine.

1. Get libjnidispatch.so for arm
- download libjna-java_3.2.7-4_armel.deb from http://packages.debian.org/sid/armel/libjna-java/download to /tmp and cd to this folder
- extract the deb file
> ar vx libjna-java_3.2.7-4_armel.deb
> tar -xzf data.tar.gz

2. download, unpack and cd to ps3mediaserver
> cd pms-linux-1.40.0

3. create directory "com/sun/jna/linux-arm"
> mkdir com
> mkdir com/sun
> mkdir com/sun/jna
> mkdir com/sun/jna/linux-arm

4. copy libjnidispatch.so to this folder
> cp /tmp/usr/lib/jni/libjnidispatch.so com/sun/jna/linux-arm/

5. add ibjnidispatch.so to pms.jar
> jar uf pms.jar com/sun/jna/linux-arm/libjnidispatch.so

6. Test
> jar tvf pms.jar | grep libjnidispatch
make sure the output contains the following line
“com/sun/jna/linux-arm/libjnidispatch.so”

7. Thats it, copy pms.jar to to the ps3mediaserver folder on the ds211+
start PMS.sh

Now I get an different error:

Code: Select all
[main] WARN  20:46:38.896 Error loading libzen: Could not load library /tmp/jna133adeab06d.tmp


I have noticed that a ps3mediaserver directory has been created in /tmp
I have changed the permissions of this directory to 777 ...
> chmod 777 /tmp/ps3mediaserver/
However, this has not solved the problem.

Can anybody give a hint to fix the problem?
synops
 
Posts: 10
Joined: Sat Oct 22, 2011 10:55 am

Re: Installing PMS on NAS (Synology DS-211+)

Postby markdark » Thu Nov 17, 2011 1:38 pm

[quote="synops"
What I have also did is installing mediainfo, libmediainfo and libzen, but I am still getting the same error.
[/quote]

How did you install mediainfo, libmediainfo and libzen? I was trying to install these followin this guide:
Code: Select all
mkdir /opt/src
 cd /opt/src
 //Get zipped file
 wget http://downloads.sourceforge.net/med...Source.tar.bz2
 //Extract zipped file
 tar xvjf MediaInfo_CLI_0.7.44_GNU_FromSource.tar.bz2
 //Delete zipped file to save space
 rm MediaInfo_CLI_0.7.44_GNU_FromSource.tar.bz2
 //Compile!! This next process could take up to 2 hours so take a break and come back later
 cd MediaInfo_CLI_GNU_FromSource
 ./CLI_Compile.sh
 //When it finishes copy mediainfo file to bin dir
 cp /opt/src/MediaInfo_CLI_GNU_FromSource/MediaInfo/Project/GNU/CLI/mediainfo /bin/
 //Now install ZenLib, make install should work, but in my case it didn't so i manually installed it
 cd /opt/src/MediaInfo_CLI_GNU_FromSource/ZenLib/Project/GNU/Library
 /bin/sh ./libtool --mode=install /usr/bin/install -c 'libzen.la' '/usr/local/lib/libzen.la'
 //Now install MediaInfoLib, make install should work, but in my case it didn't so i manually installed it
 cd /opt/src/MediaInfo_CLI_GNU_FromSource/MediaInfoLib/Project/GNU/Library
 /bin/sh ./libtool --mode=install /usr/bin/install -c 'libmediainfo.la' '/usr/local/lib/libmediainfo.la'
 //Copy libraries files to lib folder
 cp -Rrp /usr/local/lib/lib* /lib/
 //Delete source files
 cd /opt
 rm -rf /opt/src
 //Test
 mediainfo --version


Only when I execute './CLI_Compile.sh' everything goes fine untill compiling mediainfo. I get the error 'Problem while compiling MediaInfo'.

[quote="synops"
[main] WARN 20:46:38.896 Error loading libzen: Could not load library /tmp/jna133adeab06d.tmp
[/quote]

If you installed libzen. I don't understand this error!
markdark
 
Posts: 13
Joined: Wed Nov 16, 2011 5:07 pm

Re: Installing PMS on NAS (Synology DS-211+)

Postby synops » Fri Nov 18, 2011 9:28 pm

I had the following errors when compiling mediainfo:

1.
Error: g++: /opt/lib/libstdc++.so: No such file or directory
solved by: ln -s /lib/libstdc++.so.6 /opt/lib/libstdc++.so

2.
Error:
/opt/lib/gcc/arm-none-linux-gnueabi/4.2.3/../../../../arm-none-linux-gnueabi/lib/libpthread.so: undefined reference to `__default_sa_restorer_v2@GLIBC_PRIVATE'
/opt/lib/gcc/arm-none-linux-gnueabi/4.2.3/../../../../arm-none-linux-gnueabi/lib/libpthread.so: undefined reference to `__default_rt_sa_restorer_v2@GLIBC_PRIVATE'
/opt/lib/gcc/arm-none-linux-gnueabi/4.2.3/../../../../arm-none-linux-gnueabi/lib/libpthread.so: undefined reference to `__default_rt_sa_restorer_v1@GLIBC_PRIVATE'
/opt/lib/gcc/arm-none-linux-gnueabi/4.2.3/../../../../arm-none-linux-gnueabi/lib/libpthread.so: undefined reference to `__default_sa_restorer_v1@GLIBC_PRIVATE'

Workaround:
found here: http://forum.synology.com/enu/viewtopic.php?f=90&t=30132
1) backup the pthread libraries found in /opt/arm-none-linux-gnueabi/lib/ :
mkdir /opt/arm-none-linux-gnueabi/lib_disabled
mv /opt/arm-none-linux-gnueabi/lib/libpthread* /opt/arm-none-linux-gnueabi/lib_disabled
2) Copy the pthread libraries found in /opt/lib
cp /lib/libpthread.so.0 /opt/arm-none-linux-gnueabi/lib/
cd /opt/arm-none-linux-gnueabi/lib/
ln -s libpthread.so.0 libpthread.so
ln -s libpthread.so.0 libpthread-2.5.so

MediaInfo compiled - install MediaInfo
>cd MediaInfo_CLI_GNU_FromSource/MediaInfo/Project/GNU/CLI
> make install
Test
> mediainfo --Version

install libzen
>cd MediaInfo_CLI_GNU_FromSource/ZenLib/Project/GNU/Library
>./configure –enable-shared=yes
>make
>make install

install libmediainfo
> cd MediaInfo_CLI_GNU_FromSource/MediaInfoLib/Project/GNU/Library
>./configure –enable-shared=yes
>make
>make install
synops
 
Posts: 10
Joined: Sat Oct 22, 2011 10:55 am

Re: Installing PMS on NAS (Synology DS-211+)

Postby markdark » Sat Nov 19, 2011 10:31 am

Hi,

I have compiled and configured libmediainfo, mediainfo and libzen as you did. Now when I start PMS I get:
Code: Select all
[main] WARN  10:28:59.542 Error loading libzen: Unable to load library 'zen': libzen.so: cannot open shared object file: No such file or directory


Mark

*** EDIT ***
When you do the following:
ln -s /usr/local/lib/libzen.la /usr/lib/libzen.so
And then you start PMS, you get the error:
Code: Select all
[main] WARN  10:43:38.696 Error loading libzen: Unable to load library 'zen': /usr/lib/libzen.so: ELF file version does not match current one

So that means that PMS really needs libzen.so to be in the path /usr/lib/. We now both have compiled libzen etc. But we don't have a *.so file but a *.a and *.la file.
I have been searching the internet and it looks like we have compiled the files as a static library, but it should be a shared library (I think). I am not familar with all of this, but see:
http://kemovitra.blogspot.com/2009/06/c ... ry-to.html

So what I did is next:
mkdir /volume1/@tmp/libzen
cd /volume1/@tmp/libzen
ar x /usr/local/lib/libzen.a
gcc -shared *.o -o libzen.so
cp /volume1/@tmp/libzen/libzen.so /usr/lib/

Now when I start PMS, I get the following error:
Code: Select all
[main] WARN  11:09:48.146 Error loading libzen: Unable to load library 'zen': /usr/lib/libzen.so: undefined symbol: _ZTVN10__cxxabiv117__class_type_infoE
markdark
 
Posts: 13
Joined: Wed Nov 16, 2011 5:07 pm

Re: Installing PMS on NAS (Synology DS-211+)

Postby synops » Sun Nov 20, 2011 3:40 pm

Hello,

pms is running now and appears on my ps3 :D

1. I have followed your instruction and installed "Java SE Embedded 7 for ARMv5".
The archive name is: "ejre-7-fcs-b147-linux-arm-sflt-headless-27_jun_2011.tar.gz"

2. Then I have Installed libffi
Dowload libffi from http://sourceware.org/libffi/ to /volume1/@tmp/
> cd /volume1/@tmp/
> tar zxvf libffi-3.0.9.tar.gz
> cd libffi-3.0.9/
> ./configure
> make
> make install # did not work for me, so I just copied the created libs to /usr/libs
> cp .libs libffi.s* /usr/lib

So that means that PMS really needs libzen.so ...
But we don't have a *.so file

I do have a *.so file. If you run ./configure with –enable-shared=yes, then libzen.so should be created.

Regards
synops
 
Posts: 10
Joined: Sat Oct 22, 2011 10:55 am

Re: Installing PMS on NAS (Synology DS-211+)

Postby markdark » Mon Nov 21, 2011 9:45 am

synops,

Looks like 'make' is not working correctly on my NAS. I have problems compiling libffi and also the libzen, mediainfo etc. For example libffi:
Code: Select all
....
....
configure: creating ./config.status
config.status: creating include/Makefile
config.status: creating include/ffi.h
config.status: creating Makefile
config.status: creating testsuite/Makefile
config.status: creating man/Makefile
config.status: creating libffi.pc
config.status: creating fficonfig.h
config.status: linking ../src/arm/ffitarget.h to include/ffitarget.h
config.status: executing buildir commands
config.status: create top_srcdir/Makefile guessed from local Makefile
config.status: build in armv5tel-unknown-linux-gnueabi (HOST=)
config.status: executing depfiles commands
config.status: executing libtool commands
config.status: executing include commands
config.status: executing src commands
markdark-nas> make
MAKE armv5tel-unknown-linux-gnueabi :       0 * all-all
make: *** [all-all] Error 1
markdark-nas> make install
MAKE armv5tel-unknown-linux-gnueabi :       0 * install
tail: `-1' option is obsolete; use `-n 1'
Try `tail --help' for more information.

I am not that familar with compiling. But should I need to configure make or something? Can you please help me to get PMS running also?

Mark
markdark
 
Posts: 13
Joined: Wed Nov 16, 2011 5:07 pm

Re: Installing PMS on NAS (Synology DS-211+)

Postby synops » Mon Nov 21, 2011 10:13 am

Hi Mark,

install coreutils
> ipkg install coreutils

Then try to compile libffi 3.0.9, I had the same error as you when I was trying to compile libffi 3.0.10,
synops
 
Posts: 10
Joined: Sat Oct 22, 2011 10:55 am

Next

Return to Linux/Unix Support

Who is online

Users browsing this forum: No registered users and 8 guests