twonkymedia server on fresh installed debian lenny failure

Other OS or NAS discussions
Post Reply
trashpunk
Posts:1
Joined:Mon Jan 26, 2009 1:40 pm
AV Hardware:debian lenny @ qnap ts-209
ps3
twonkymedia server on fresh installed debian lenny failure

Post by trashpunk » Mon Jan 26, 2009 1:59 pm

hi all,

i installed Linux ARM little endian glibc 2.2.5 on my qnap ts-209 running debian (lenny).

Code: Select all

chmod 700 twonkym* cgi-bin/* plugins/*
./twonkymedia.sh start
Starting /usr/local/TwonkyVision/twonkymedia ... ./twonkymedia.sh: line 97: /usr/local/TwonkyVision/twonkymedia: No such file or directory

Code: Select all

file TwonkyVision/twonkymedia
TwonkyVision/twonkymedia: ELF 32-bit LSB executable, ARM, version 1, dynamically linked (uses shared libs), for GNU/Linux 2.4.3, stripped
i found out that there is a missing glibc version

installed is

Code: Select all

strings /lib/libc.so.6 | grep GLIBC
GLIBC_2.4
GLIBC_2.5
GLIBC_2.6
GLIBC_2.7
GLIBC_PRIVATE
quick an dirty i did a

Code: Select all

cd /lib
ln -s ld-2.7.so ld-linux.so.2
try starting

Code: Select all

/usr/local/TwonkyVision/twonkymedia     
/usr/local/TwonkyVision: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /usr/local/TwonkyVision/twonkymedia)
/usr/local/TwonkyVision/twonkymedia: /lib/libc.so.6: version `GLIBC_2.1' not found (required by /usr/local/TwonkyVision/twonkymedia)
/usr/local/TwonkyVision/twonkymedia: /lib/libc.so.6: version `GLIBC_2.1.3' not found (required by /usr/local/TwonkyVision/twonkymedia)
/usr/local/TwonkyVision/twonkymedia: /lib/libc.so.6: version `GLIBC_2.0' not found (required by /usr/local/TwonkyVision/twonkymedia)
any ideas, how i get the missing (old) glibc libraries installed?

greetings

harrysun
Posts:6
Joined:Sun Feb 01, 2009 7:35 pm
AV Hardware:QNAP TS-109 II Pro with Debian 5.0 "lenny" (Linux qnap 2.6.26-1-orion5x #1 Sun Jan 11 17:19:11 UTC 2009 armv5tel GNU/Linux)

Re: twonkymedia server on fresh installed debian lenny failure

Post by harrysun » Sun Feb 01, 2009 9:16 pm

Here some detailed information about the incompatibility of twonkymedia-armel-glibc-2.2.5-4.4.11-20090108.zip and Debian GNU/Linux 5.0 "lenny".

TwonkyMedia server is compiled against a old LIBC version which is not supported by LENNY anymore. Which interface version are supported by LIBC can be checked with the following command.

# apt-get install binutils
# objdump -p /lib/libc.so.6
...
Version definitions:
1 0x01 0x0865f4e6 libc.so.6
2 0x00 0x0d696914 GLIBC_2.4
3 0x00 0x0d696915 GLIBC_2.5
GLIBC_2.4
4 0x00 0x0d696916 GLIBC_2.6
GLIBC_2.5
5 0x00 0x0d696917 GLIBC_2.7
GLIBC_2.6
6 0x00 0x0963cf85 GLIBC_PRIVATE
GLIBC_2.7

Version References:
required from ld-linux.so.3:
0x0d696914 0x00 08 GLIBC_2.4
0x0963cf85 0x00 07 GLIBC_PRIVATE
private flags = 4000002: [Version4 EABI] [has entry point]
Now check the LIBC versions TwonkyMedia server requests.

# objdump -p /usr/local/twonkymedia/twonkymediaserver
...
Version References:
required from libc.so.6:
0x0d696911 0x00 08 GLIBC_2.1
0x09691f73 0x00 07 GLIBC_2.1.3
0x0d696912 0x00 05 GLIBC_2.2
0x0d696910 0x00 04 GLIBC_2.0
required from libpthread.so.0:
0x0d696912 0x00 06 GLIBC_2.2
0x0d696911 0x00 03 GLIBC_2.1
0x0d696910 0x00 02 GLIBC_2.0
private flags = 2: [APCS-32] [FPA float format] [has entry point]
Until TwonkyMedia is build agains these new LIBC version we have to install a LIBC environment which satisfy this API version. With Debian GNU/Linux 4.0 "etch" this requirements are solved. To install a ETCH on LENNY do the follwoing steps.

# apt-get install debootstrap
# debootstrap --arch=arm etch /etch-root http://ftp.de.debian.org/debian/

Now we have a chroot environment installed in /etch-root including an older LIBC.

# objdump -p /etch-root/lib/libc.so.6
Version definitions:
1 0x01 0x0865f4e6 libc.so.6
2 0x00 0x0d696910 GLIBC_2.0
3 0x00 0x0d696911 GLIBC_2.1
GLIBC_2.0
4 0x00 0x09691f71 GLIBC_2.1.1
GLIBC_2.1
5 0x00 0x09691f72 GLIBC_2.1.2
GLIBC_2.1.1
6 0x00 0x09691f73 GLIBC_2.1.3
GLIBC_2.1.2
7 0x00 0x0d696912 GLIBC_2.2
GLIBC_2.1.3
8 0x00 0x09691a71 GLIBC_2.2.1
GLIBC_2.2
9 0x00 0x09691a72 GLIBC_2.2.2
GLIBC_2.2.1
10 0x00 0x09691a73 GLIBC_2.2.3
GLIBC_2.2.2
11 0x00 0x09691a74 GLIBC_2.2.4
GLIBC_2.2.3
12 0x00 0x09691a76 GLIBC_2.2.6
GLIBC_2.2.4
13 0x00 0x0d696913 GLIBC_2.3
GLIBC_2.2.6
14 0x00 0x09691972 GLIBC_2.3.2
GLIBC_2.3
15 0x00 0x09691973 GLIBC_2.3.3
GLIBC_2.3.2
16 0x00 0x09691974 GLIBC_2.3.4
GLIBC_2.3.3
17 0x00 0x0963cf85 GLIBC_PRIVATE
GLIBC_2.3.4
18 0x00 0x0b792650 GCC_3.0

Version References:
required from ld-linux.so.2:
0x0d696911 0x00 21 GLIBC_2.1
0x0963cf85 0x00 20 GLIBC_PRIVATE
0x0d696910 0x00 19 GLIBC_2.0
private flags = 2: [APCS-32] [FPA float format] [has entry point]
This version of LIBC support the required API version by TwonkyServer. Extract now the TwonkyServer ZIP archive within the new chroot environment.

# mkdir /etch-root/usr/local/twonkymedia
# cd /etch-root/usr/local/twonkymedia
# unzip /root/twonkymedia-armel-glibc-2.2.5-4.4.11-20090108.zip
# chmod 700 twonky* cgi-bin/* plugins/*
# cd /root

We are now ready to start the TwonkyMedia server within the chroot environment. But there are two other things we have to prepare. First, the /proc directory have to be seen within the chroot envirionement. This can be done by the following command.

# mount --bind /proc /etch-root/proc

Second. Our media libarary is outside the chroot directory. We have to mount the media library into the chroot directory with the same mount --bind command.

# mount --bind /home /etch-root/home

We are now ready to start the TwonkyMedia server within the chroot environment.

# chroot /etch-root /usr/local/twonkymedia/twonkymedia.sh start

Setup the TwonkyMedia server to search within the /home directory and you are ready.

A script make it easier to handle.

Code: Select all

#!/bin/sh

set -e

action="$1"

case "$action" in
  *start)
    mount | grep -q " on /etch-root/proc " || mount --bind /proc /etch-root/proc
    mount | grep -q " on /etch-root/home " || mount --bind /home /etch-root/home
   ;;
esac

chroot /etch-root /usr/local/twonkymedia/twonkymedia.sh $action || true

case "$action" in
  stop)
    mount | grep -q " on /etch-root/proc " && umount /etch-root/proc
    mount | grep -q " on /etch-root/home " && umount /etch-root/home
  ;;
esac
I hope this help :D

jcsf
Posts:1
Joined:Mon Feb 02, 2009 5:09 pm
AV Hardware:--

Re: twonkymedia server on fresh installed debian lenny failure

Post by jcsf » Mon Feb 02, 2009 5:17 pm

Great write-up, harrysun.

An alternative solution is to use the uClibc version.

0) Download the ARM little-endian uclibc twonky from the unsupported twonky distributions page

1) Download uClibc 0.9.28-3 from http://free-electrons.com/pub/toolchain ... -3.tar.bz2 (direct link: http://free-electrons.com/pub/toolchain ... -3.tar.bz2) and extract into /usr/local/uclibc-0.9.28-3 per the instructions on the page. Do this as root:

Code: Select all

mkdir -p /usr/local/uclibc-0.9.28-3
cd /usr/local/uclibc-0.9.28-3
wget http://free-electrons.com/pub/toolchains/uclibc/0.9.28-3/arm-linux-uclibc-0.9.28-3.tar.bz2
bunzip2 -c arm-linux-uclibc-0.9.28-3.tar.bz2 | tar xvf -
2) Modify the twonkymedia.sh script to include the line LD_LIBRARY_PATH=/usr/local/uclibc-0.9.28-3/arm/lib. Do this using an editor, or:

Code: Select all

cd /to/wherever/you/installed/twonkymedia/
printf '1i\nLD_LIBRARY_PATH=/usr/local/uclibc-0.9.28-3/arm/lib\n.\nwq!\n' | ex twonkymedia.sh
This is the solution I've gone with. I'm not sure how Twonky internally launches new processes; if it comes to the point where Twonky supports transcoding and my transcoding tool is compiled against glibc, I don't know if I'll be able to tell twonky to not inherit parent process environment (and therefore unset LD_LIBRARY_PATH or have it set to /lib etc)


JC

User avatar
mgillespie
Posts:1222
Joined:Fri Jul 08, 2005 1:19 pm
AV Hardware:TwonkyMedia AV UPnP Mediaserver (Marvell Kirkwood ARM Sheevaplug with Debian Squeeze).
2x Noxon V2 audio client
1x PS3 Slim 500GB Audio/Video UPnP client.
1x Sony VGF-CP1 Wireless Photoframe.
Location:UK

Re: twonkymedia server on fresh installed debian lenny failure

Post by mgillespie » Tue Aug 04, 2009 1:57 am

Just got a SheevaPlug today and came across this same problem. However I can't get the uclibc trick to work. Has anything changed to stop it working?

EDIT: Found out the build for Linkstation Pro works without any problems....

if I do file on it:

Code: Select all

twonkymedia: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.4.17, stripped
Please note: Moderators here are voluntary and do not work for PacketVideo or Twonky, please do not attack us. Any posts are personal opinion, and may not be those of PV/Twonky.

User avatar
mgillespie
Posts:1222
Joined:Fri Jul 08, 2005 1:19 pm
AV Hardware:TwonkyMedia AV UPnP Mediaserver (Marvell Kirkwood ARM Sheevaplug with Debian Squeeze).
2x Noxon V2 audio client
1x PS3 Slim 500GB Audio/Video UPnP client.
1x Sony VGF-CP1 Wireless Photoframe.
Location:UK

Re: twonkymedia server on fresh installed debian lenny failure

Post by mgillespie » Mon Aug 24, 2009 8:04 pm

Now running a dedicated build from the Twonky guys specifically for the Marvell's Feroceon (Sheevaplug) and it's working very well indeed.

Code: Select all

file twonkymedia
twonkymedia: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux  2.6.14, stripped

Code: Select all

root@ubuntu:/usr/local/TwonkyVision# objdump -p /usr/local/TwonkyVision/twonkymediaserver

/usr/local/TwonkyVision/twonkymediaserver:     file format elf32-littlearm

Program Header:
0x70000001 off    0x000ad8d4 vaddr 0x000b58d4 paddr 0x000b58d4 align 2**2
         filesz 0x00000018 memsz 0x00000018 flags r--
    PHDR off    0x00000034 vaddr 0x00008034 paddr 0x00008034 align 2**2
         filesz 0x00000100 memsz 0x00000100 flags r-x
  INTERP off    0x00000134 vaddr 0x00008134 paddr 0x00008134 align 2**0
         filesz 0x00000013 memsz 0x00000013 flags r--
    LOAD off    0x00000000 vaddr 0x00008000 paddr 0x00008000 align 2**15
         filesz 0x000ad8f0 memsz 0x000ad8f0 flags r-x
    LOAD off    0x000ad8f0 vaddr 0x000bd8f0 paddr 0x000bd8f0 align 2**15
         filesz 0x0000a65c memsz 0x000201bc flags rw-
 DYNAMIC off    0x000ad8fc vaddr 0x000bd8fc paddr 0x000bd8fc align 2**2
         filesz 0x000000f8 memsz 0x000000f8 flags rw-
    NOTE off    0x00000148 vaddr 0x00008148 paddr 0x00008148 align 2**2
         filesz 0x00000020 memsz 0x00000020 flags r--
   STACK off    0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**2
         filesz 0x00000000 memsz 0x00000000 flags rw-

Dynamic Section:
  NEEDED               libpthread.so.0
  NEEDED               libgcc_s.so.1
  NEEDED               libc.so.6
  INIT                 0x00009770
  FINI                 0x0009c420
  INIT_ARRAY           0x000bd8f0
  INIT_ARRAYSZ         0x00000004
  FINI_ARRAY           0x000bd8f4
  FINI_ARRAYSZ         0x00000004
  HASH                 0x00008168
  STRTAB               0x00008d30
  SYMTAB               0x00008500
  STRSZ                0x000004ef
  SYMENT               0x00000010
  DEBUG                0x00000000
  PLTGOT               0x000bd9f4
  PLTRELSZ             0x000003d0
  PLTREL               0x00000011
  JMPREL               0x000093a0
  REL                  0x00009388
  RELSZ                0x00000018
  RELENT               0x00000008
  VERNEED              0x00009328
  VERNEEDNUM           0x00000003
  VERSYM               0x00009220

Version References:
  required from libgcc_s.so.1:
    0x0b792655 0x00 04 GCC_3.5
  required from libpthread.so.0:
    0x0d696914 0x00 03 GLIBC_2.4
  required from libc.so.6:
    0x0d696914 0x00 02 GLIBC_2.4
private flags = 5000002: [Version5 EABI] [has entry point]

Please note: Moderators here are voluntary and do not work for PacketVideo or Twonky, please do not attack us. Any posts are personal opinion, and may not be those of PV/Twonky.

Keith
Posts:3
Joined:Fri Jun 19, 2009 3:30 pm
AV Hardware:Server: Western Digital My Book World Edition II (Twonky 4.4.9w)
Client: Samsung LE37B650 (DLNA 1.5)

Re: twonkymedia server on fresh installed debian lenny failure

Post by Keith » Sun Aug 30, 2009 12:49 pm

Hi, I have a ARM processor running inside my Wester Digital My Book World Edition.
I want to install Twonky glibc little endian.

# strings /lib/libc.so.6 | grep GLIBC

Code: Select all

BFD: /lib/libc.so.6: warning: sh_link not set for section `.ARM.exidx'
GLIBC_2.4
GLIBC_PRIVATE
I am not shure if this warning is somehow important... but anyway.

# objdump -p twonkymedia

Code: Select all

twonkymedia:     file format elf32-littlearm

Program Header:
    PHDR off    0x00000034 vaddr 0x00008034 paddr 0x00008034 align 2**2
         filesz 0x000000c0 memsz 0x000000c0 flags r-x
  INTERP off    0x000000f4 vaddr 0x000080f4 paddr 0x000080f4 align 2**0
         filesz 0x00000013 memsz 0x00000013 flags r--
    LOAD off    0x00000000 vaddr 0x00008000 paddr 0x00008000 align 2**15
         filesz 0x00000c7b memsz 0x00000c7b flags r-x
    LOAD off    0x00000c7c vaddr 0x00010c7c paddr 0x00010c7c align 2**15
         filesz 0x00000164 memsz 0x0000016c flags rw-
 DYNAMIC off    0x00000c8c vaddr 0x00010c8c paddr 0x00010c8c align 2**2
         filesz 0x000000d0 memsz 0x000000d0 flags rw-
    NOTE off    0x00000110 vaddr 0x00008110 paddr 0x00008110 align 2**4
         filesz 0x00000020 memsz 0x00000020 flags r--

Dynamic Section:
  NEEDED      libpthread.so.0
  NEEDED      libc.so.6
  INIT        0x85e0
  FINI        0x8bf0
  HASH        0x8130
  STRTAB      0x8384
  SYMTAB      0x81e4
  STRSZ       0x105
  SYMENT      0x10
  DEBUG       0x0
  PLTGOT      0x10d70
  PLTRELSZ    0xb8
  PLTREL      0x11
  JMPREL      0x8528
  REL         0x8520
  RELSZ       0x8
  RELENT      0x8
  VERNEED     0x84c0
  VERNEEDNUM  0x2
  VERSYM      0x848a

Version References:
  required from libpthread.so.0:
    0x0d696910 0x00 03 GLIBC_2.0
  required from libc.so.6:
    0x0d696911 0x00 05 GLIBC_2.1
    0x09691f73 0x00 04 GLIBC_2.1.3
    0x0d696910 0x00 02 GLIBC_2.0
private flags = 2: [APCS-32] [FPA float format] [has entry point]
As you can see, I also need some missing glibc libraries.
I have no clue where I can get the. I have no debian based linux distro. There is no debootstrap available on this linux...

Any ideas, how i get the missing (old) glibc libraries installed?

Post Reply