Llink:sources: Difference between revisions

From Lundman Wiki
No edit summary
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Sources for llink ==
== Compiling Instructions ==


Latest sources are here:
When compiling llink you need to chose if you want to use '''OpenSSL''', '''libdvdread''' and '''libdvdcss'''. Generally we have no reason to use SSL with '''link''' so I will skip this compile time step.


[http://www.lundman.net/ftp/llink/llink-2.3.2.tar.gz llink-2.3.2.tar.gz]


If you want UPNP support, you also need to get clinkc-2.4 and clinkav-2.4. Until these are officially released, you can get them here:
=== Unix, OsX and other native compiles ===


  [http://www.lundman.net/ftp/llink/clinkc-2.4.tar.gz clinkc-2.4.tar.gz]
The default should work.
  [http://www.lundman.net/ftp/llink/clinkcav-2.4.tar.gz clinkcav-2.4.tar.gz]


If you are on a system where you can "make install", that is considerably easier and wont really need any extra ./configure magic. But if you can not install, and want to compile from the directories,
# ./configure --without-openssl
I would do something like:
# make
# file src/llink


cd /your/compile/area/
The '''file''' command is not necessary, but it shows you where we expect the binary to end up.
tar -zxf clinkc-2.4.tar.gz
cd clinkc-2.4
./configure --enable-anyaddr
make
(make install - if you are root, or use the direct path in the following compiles)


  cd /your/compile/area/
  # ./configure --without-openssl
tar -zxf clinkcav-2.4.tar.gz
  # make
cd clinkcav-2.4
./configure CPPFLAGS=-I/your/compile/area/clinkc-2.4/include LDFLAGS=-L/your/compile/area/clinkc-2.4/lib/unix/ LIBS=""
make
  (make install - if you want)
Here the CPPFLAGS and LDFLAGS are needed if you did not "make install". The LIBS="" part in the end will depend on your system. On OSX, I would use LIBS="-lexpat", on Linux LIBS="-lexpat -lpthread -luuid"


cd /your/compile/area/
If you want to build libdvdcss in statically (so there is just one binary, no shared library dependencies)
tar -zxf llink-2.3.0.tar.gz
./configure --enable-clinkc --without-openssl CPPFLAGS="-I/your/compile/area/clinkc-2.4/include  -I/your/compile/area/clinkcav-2.4/include" LDFLAGS="-L/your/compile/area/clinkcav-2.4/lib/unix/.libs LIBS=""
make
Here the CPPFLAGS and LDFLAGS are needed if you did not "make install". The LIBS="" part in the end will depend on your system. On OSX, I would use LIBS="-lexpat", on Linux LIBS="-lexpat -lpthread -luuid"


# cd libdvdcss-1.2.10
# ./configure --enable-static
# make
# cd ../
# cd llink-2.2.0
# ./configure --without-openssl --with-dvdcss-tree=`pwd`/../libdvdcss-1.2.10/
# make


<paypal></paypal>
=== Windows ===


Download Visual Devstudio C++ 2010 from [http://msdn.microsoft.com/en-us/vstudio/dd582936.aspx Microsoft] and install.


Download the OpenSSL for Windows '''dev''' package. [http://www.slproweb.com/products/Win32OpenSSL.html]  Install it, usually at C:/OpenSSL but you can pick any place.


Setup a new Environment Variable, usually done in "My Computer / Properties / Advanced / Environment Variables". Create a new variable called '''SSL''', and set it to the location of your OpenSSL install. Ie, '''C:/OpenSSL/'''.


Older sources:
Download source package, and load the '''llink.vcproj''' inside "win32/" directory. Change the default project from '''libdirlist''' to '''llink''' and hit compile.


[http://www.lundman.net/ftp/llink/llink-2.3.1.tar.gz llink-2.3.1.tar.gz]
All file paths '''should''' be relative, but sometimes they are not :(
[http://www.lundman.net/ftp/llink/llink-2.3.0.tar.gz llink-2.3.0.tar.gz]
[http://www.lundman.net/ftp/llink/llink-2.2.4.tar.gz llink-2.2.4.tar.gz]
[http://www.lundman.net/ftp/llink/llink-2.2.3.tar.gz llink-2.2.3.tar.gz]
[http://www.lundman.net/ftp/llink/llink-2.2.2.tar.gz llink-2.2.2.tar.gz]
[http://www.lundman.net/ftp/llink/llink-2.2.0.tar.gz llink-2.2.0.tar.gz]
[http://www.lundman.net/ftp/llink/llink-2.1.2.tar.gz llink-2.1.2.tar.gz]
[http://www.lundman.net/ftp/llink/llink-2.1.1.tar.gz llink-2.1.1.tar.gz]
[http://www.lundman.net/ftp/llink/llink-2.1.0.tar.gz llink-2.1.0.tar.gz]
[http://www.lundman.net/ftp/llink/llink-2.0.9.tar.gz llink-2.0.9.tar.gz]
[http://www.lundman.net/ftp/llink/llink-2.0.8.tar.gz llink-2.0.8.tar.gz]
[http://www.lundman.net/ftp/llink/llink-2.0.7.tar.gz llink-2.0.7.tar.gz]
[http://www.lundman.net/ftp/llink/llink-2.0.6.tar.gz llink-2.0.6.tar.gz]
[http://www.lundman.net/ftp/llink/llink-2.0.5.tar.gz llink-2.0.5.tar.gz]
[http://www.lundman.net/ftp/llink/llink-2.0.4.tar.gz llink-2.0.4.tar.gz]
[http://www.lundman.net/ftp/llink/llink-2.0.3.tar.gz llink-2.0.3.tar.gz]
[http://www.lundman.net/ftp/llink/llink-2.0.2.tar.gz llink-2.0.2.tar.gz]
[http://www.lundman.net/ftp/llink/llink-2.0.1.tar.gz llink-2.0.1.tar.gz]
[http://www.lundman.net/ftp/llink/llink-2.0.tar.gz llink-2.0.tar.gz]
[http://www.lundman.net/ftp/llink/llink-1.9.9.tar.gz llink-1.9.9.tar.gz]
[http://www.lundman.net/ftp/llink/llink-1.9.6.tar.gz llink-1.9.6.tar.gz]
[http://www.lundman.net/ftp/llink/llink-1.9.5.tar.gz llink-1.9.5.tar.gz]
[http://www.lundman.net/ftp/llink/llink-1.9.4.tar.gz llink-1.9.4.tar.gz]
[http://www.lundman.net/ftp/llink/llink-1.9.2.tar.gz llink-1.9.2.tar.gz]
[http://www.lundman.net/ftp/llink/llink-1.9.1.tar.gz llink-1.9.1.tar.gz]
[http://www.lundman.net/ftp/llink/llink-1.9.tar.gz llink-1.9.tar.gz]
[http://www.lundman.net/ftp/llink/llink-1.8.tar.gz llink-1.8.tar.gz]
[http://www.lundman.net/ftp/llink/llink-1.7.tar.gz llink-1.7.tar.gz]
[http://www.lundman.net/ftp/llink/llink-1.6.tar.gz llink-1.6.tar.gz]
[http://www.lundman.net/ftp/llink/llink-1.5.tar.gz llink-1.5.tar.gz]
[http://www.lundman.net/ftp/llink/llink-1.4.tar.gz llink-1.4.tar.gz]
[http://www.lundman.net/ftp/llink/llink-1.3.tar.gz llink-1.3.tar.gz]


=== Cross Compile ===


Current testing sources:
For example when compiling for the PCH A-100, you download the toolchain that applies to your arch. In this case, it installs into '''/usr/local/mips/''' with a '''gcc''' binary named as '''/usr/local/mips/bin/mipsel-linux-gcc'''.


[http://www.lundman.net/ftp/llink/llink-2.3.2.tar.gz llink-2.3.2.tar.gz]
First make sure your PATH is updated so that it can find the executable.


CVS Version control
# export PATH=$PATH:/usr/local/mips/bin/
# which mipsel-linux-gcc
/usr/local/mips/bin/mipsel-linux-gcc


  [[CVS]].
Great. If you want to have '''libdvdcss''' we need to compile that first. If you do not, you can skip this step.
 
# cd src/libdvdcss-1.2.10/
# ./configure --host=mipsel-linux-uclibc --enable-static
# make
# file src/.libs/libdvdcss.*
src/.libs/libdvdcss.a:        current ar archive
src/.libs/libdvdcss.so.2.0.8: ELF 32-bit LSB shared object, MIPS, version 1 (SYSV), not stripped
(a few other files, but at least one shows its compiled as MIPS)
 
 
Note that we have to use the full path '''/home/lundman/src/''' to get to the '''libdvdcss-1.2.10/src''' includes.
 
'''Compiling llink'''. Now it is time to compile '''llink''' itself. The version number might change of course.
 
# cd src/llink-2.2.0/
# ./configure --host=mipsel-linux --enable-static --without-openssl  --with-dvdcss-tree=/home/lundman/src/libdvdcss-1.2.10/
# make
# file src/llink
src/llink: ELF 32-bit LSB executable, MIPS, version 1 (SYSV), statically linked, not stripped
 
Naturally, if you do not want '''libdvdcss''' go with the shorter line:
 
# ./configure --host=mipsel-linux --enable-static --without-openssl
# make
 
=== Known Compiling Issues ===
 
The main binary is linked against '''libdvdcss''' if requested, even though it need not be. You can omit "-ldvdcss" on the linking line of llink if it affects you.
 
On C200, if you compile -static, it will product the error:
 
../sysdeps/unix/sysv/linux/ia64/getpagesize.c:35: __getpagesize: Assertion `_rtld_global_ro._dl_pagesize != 0' failed.
 
So don't compile statically on C200.
 
Some systems get:
: undefined reference to `pthread_mutex_init'
 
and similar errors, change directory into the '''undvd''' directory, and copy'paste the final linking line and add "-lpthread" to it. This will be fixed in future.
 
On ReadyNAS, it will appear to hang after:
  [root] listing '/c/media/' with flags 11
 
This is actually the 2nd process libdirlist core-dumping, in the call to getpwnam(). If llink is compiled statically. Please drop the -static.

Latest revision as of 06:30, 12 July 2012

Compiling Instructions

When compiling llink you need to chose if you want to use OpenSSL, libdvdread and libdvdcss. Generally we have no reason to use SSL with link so I will skip this compile time step.


Unix, OsX and other native compiles

The default should work.

# ./configure --without-openssl
# make
# file src/llink

The file command is not necessary, but it shows you where we expect the binary to end up.

# ./configure --without-openssl 
# make

If you want to build libdvdcss in statically (so there is just one binary, no shared library dependencies)

# cd libdvdcss-1.2.10
# ./configure --enable-static
# make
# cd ../
# cd llink-2.2.0
# ./configure --without-openssl --with-dvdcss-tree=`pwd`/../libdvdcss-1.2.10/
# make

Windows

Download Visual Devstudio C++ 2010 from Microsoft and install.

Download the OpenSSL for Windows dev package. [1] Install it, usually at C:/OpenSSL but you can pick any place.

Setup a new Environment Variable, usually done in "My Computer / Properties / Advanced / Environment Variables". Create a new variable called SSL, and set it to the location of your OpenSSL install. Ie, C:/OpenSSL/.

Download source package, and load the llink.vcproj inside "win32/" directory. Change the default project from libdirlist to llink and hit compile.

All file paths should be relative, but sometimes they are not :(

Cross Compile

For example when compiling for the PCH A-100, you download the toolchain that applies to your arch. In this case, it installs into /usr/local/mips/ with a gcc binary named as /usr/local/mips/bin/mipsel-linux-gcc.

First make sure your PATH is updated so that it can find the executable.

# export PATH=$PATH:/usr/local/mips/bin/
# which mipsel-linux-gcc
/usr/local/mips/bin/mipsel-linux-gcc

Great. If you want to have libdvdcss we need to compile that first. If you do not, you can skip this step.

# cd src/libdvdcss-1.2.10/
# ./configure --host=mipsel-linux-uclibc --enable-static
# make
# file src/.libs/libdvdcss.*
src/.libs/libdvdcss.a:        current ar archive
src/.libs/libdvdcss.so.2.0.8: ELF 32-bit LSB shared object, MIPS, version 1 (SYSV), not stripped
(a few other files, but at least one shows its compiled as MIPS)


Note that we have to use the full path /home/lundman/src/ to get to the libdvdcss-1.2.10/src includes.

Compiling llink. Now it is time to compile llink itself. The version number might change of course.

# cd src/llink-2.2.0/
# ./configure --host=mipsel-linux --enable-static --without-openssl  --with-dvdcss-tree=/home/lundman/src/libdvdcss-1.2.10/
# make
# file src/llink
src/llink: ELF 32-bit LSB executable, MIPS, version 1 (SYSV), statically linked, not stripped

Naturally, if you do not want libdvdcss go with the shorter line:

# ./configure --host=mipsel-linux --enable-static --without-openssl
# make

Known Compiling Issues

The main binary is linked against libdvdcss if requested, even though it need not be. You can omit "-ldvdcss" on the linking line of llink if it affects you.

On C200, if you compile -static, it will product the error:

../sysdeps/unix/sysv/linux/ia64/getpagesize.c:35: __getpagesize: Assertion `_rtld_global_ro._dl_pagesize != 0' failed.

So don't compile statically on C200.

Some systems get:

: undefined reference to `pthread_mutex_init'

and similar errors, change directory into the undvd directory, and copy'paste the final linking line and add "-lpthread" to it. This will be fixed in future.

On ReadyNAS, it will appear to hang after:

[root] listing '/c/media/' with flags 11

This is actually the 2nd process libdirlist core-dumping, in the call to getpwnam(). If llink is compiled statically. Please drop the -static.