Linux version of PMS with statically linked ffmpeg/mencoder

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.

Re: Linux version of PMS with statically linked ffmpeg/menco

Postby chocolateboy » Thu Sep 29, 2011 1:43 pm

Fix for 0.9.6: Fontconfig depends on FreeType:

Code: Select all
build_freetype
build_fontconfig
chocolateboy
Project Member
 
Posts: 2580
Joined: Wed Sep 16, 2009 10:05 am

Re: Linux version of PMS with statically linked ffmpeg/menco

Postby langerak » Thu Sep 29, 2011 2:36 pm

On the builds by PMS itself as we are testing now, what is the procedure for building?

I run a 64-bit OS with 8 Gb RAM, when using 32-bit tools, I am not able to use this to the fullest. Would it be wise to build 2 generic versions, for 32- and 64-bit on the X86(_64) platform?
langerak
 
Posts: 14
Joined: Sat Sep 24, 2011 10:54 am

Re: Linux version of PMS with statically linked ffmpeg/menco

Postby happy.neko » Thu Sep 29, 2011 3:10 pm

langerak wrote:The build process is good enough for the maintainers, but for me as a poweruser, I would like to build this stuff myself, maybe you want to create a userscript with the generic and native options applied to them :). I never tend to download prebuild versions if I can build it myself and setting it up for my usage :).

I think "march" can be set as user-defined variable like "mtune". That way it will be possible to easy tune optimization options without script modification if needed.

langerak wrote:Have you looked into this as well:
I've also received an error about autoconf, the script does not check if this is installed, fixed by issuing:
Code: Select all
apt-get install autoconf automake

On line 1262 there is:
Code: Select all
$GPP -shared -static-libstdc++ -static-libgcc -o ./../libmediainfo.so ./*.o  -Wl,--whole-archive -L./ -lzen -Wl,--no-whole-archive

That results in an error stating that you want to create a shared library with static options, I managed to get the compile further by changing it into:
Code: Select all
$GPP -static-libstdc++ -static-libgcc -o ./../libmediainfo.so ./*.o  -Wl,--whole-archive -L./ -lzen -Wl,--no-whole-archive

Checks for autoconf/automake are now in place. As for libmediainfo problem you can compile shared library like this. Change in build_libmediainfo()
Code: Select all
./configure --enable-static --disable-shared --disable-dependency-tracking --enable-staticlibs --prefix=$TARGET
to
Code: Select all
./configure --enable-shared --disable-dependency-tracking --prefix=$TARGET


and in build_ps3mediaserver() change
Code: Select all
    set_flags
    mkdir tmp-libmediainfo
    cd tmp-libmediainfo
    cp $TARGET/lib/libmediainfo.a .
    ar x libmediainfo.a
    rm libmediainfo.a
    $GPP -shared -static-libstdc++ -static-libgcc -o ./../libmediainfo.so ./*.o  -Wl,--whole-archive -L./ -lzen -Wl,--no-whole-archive
    exit_on_error
    cd ..
    rm -rf ./tmp-libmediainfo

to
Code: Select all
cp $TARGET/lib/libmediainfo.so .
happy.neko
Project Member
 
Posts: 478
Joined: Fri Sep 23, 2011 5:38 pm

Re: Linux version of PMS with statically linked ffmpeg/menco

Postby happy.neko » Thu Sep 29, 2011 3:12 pm

chocolateboy wrote:Fix for 0.9.6: Fontconfig depends on FreeType:

Code: Select all
build_freetype
build_fontconfig

thanks
happy.neko
Project Member
 
Posts: 478
Joined: Fri Sep 23, 2011 5:38 pm

Re: Linux version of PMS with statically linked ffmpeg/menco

Postby langerak » Thu Sep 29, 2011 3:14 pm

Sorry to be picky, but can you update this in your script? Then I'll give it another run for you :).
langerak
 
Posts: 14
Joined: Sat Sep 24, 2011 10:54 am

Re: Linux version of PMS with statically linked ffmpeg/menco

Postby happy.neko » Thu Sep 29, 2011 3:41 pm

Actually this is how it was in the beginning. The problem is that resulting libmediainfo.so links to a shared version of libstdc++ and libgcc. I need to find better solution.
happy.neko
Project Member
 
Posts: 478
Joined: Fri Sep 23, 2011 5:38 pm

Re: Linux version of PMS with statically linked ffmpeg/menco

Postby langerak » Thu Sep 29, 2011 4:00 pm

If that file always has the same name, should that really be a problem? If you make dependencies for software on this particular piece, that shouldn't be a problem I guess? Or am I misreading it?
langerak
 
Posts: 14
Joined: Sat Sep 24, 2011 10:54 am

Re: Linux version of PMS with statically linked ffmpeg/menco

Postby happy.neko » Thu Sep 29, 2011 4:24 pm

It may be a problem if you copy resulting library to system with other version of libstdc++.
happy.neko
Project Member
 
Posts: 478
Joined: Fri Sep 23, 2011 5:38 pm

Re: Linux version of PMS with statically linked ffmpeg/menco

Postby langerak » Thu Sep 29, 2011 4:55 pm

Would it be possible to build that library static as well or is that a no-go? I assume not as this is part of gcc and would require a custom build of gcc.

EDIT:
Found this (rather old) article:
http://www.trilithium.com/johan/2005/06/static-libstdc/
langerak
 
Posts: 14
Joined: Sat Sep 24, 2011 10:54 am

Re: Linux version of PMS with statically linked ffmpeg/menco

Postby chocolateboy » Fri Sep 30, 2011 12:25 am

happy.neko wrote:The problem is that resulting libmediainfo.so links to a shared version of libstdc++ and libgcc. I need to find better solution.


Please don't waste any time/effort on this. It's not possible to make portable shared libraries on Linux. I left it out of the ticket for a reason. :-)
chocolateboy
Project Member
 
Posts: 2580
Joined: Wed Sep 16, 2009 10:05 am

PreviousNext

Return to Linux/Unix Support

Who is online

Users browsing this forum: No registered users and 6 guests