pipelka / vdr-plugin-xvdr

DISCONTINUED - XVDR Plugin for VDR
GNU General Public License v2.0
43 stars 22 forks source link

Compilation on debian wheezy (64bit) fails #89

Closed eleon216 closed 11 years ago

eleon216 commented 11 years ago

I use xvdr for over a year now on debian wheezy, and got recently issues with compiling.

the first thing (which I could fix very easily) the vdr-dev package in debian puts the libsi-headerfiles in /usr/include/vdr/libsi not /usr/include/libsi which is very easy to fix, I just changed it in src/live/livepatfilter.h

but then I get this error:

g++ -c -DPLUGIN_NAME_I18N='"xvdr"' -DXVDR_VERSION='"0.9.7"' -I./src -o src/config/config.o src/config/config.c g++ -c -DPLUGIN_NAME_I18N='"xvdr"' -DXVDR_VERSION='"0.9.7"' -I./src -o src/demuxer/bitstream.o src/demuxer/bitstream.c g++ -c -DPLUGIN_NAME_I18N='"xvdr"' -DXVDR_VERSION='"0.9.7"' -I./src -o src/demuxer/demuxer.o src/demuxer/demuxer.c g++ -c -DPLUGIN_NAME_I18N='"xvdr"' -DXVDR_VERSION='"0.9.7"' -I./src -o src/demuxer/demuxer_ADTS.o src/demuxer/demuxer_ADTS.c g++ -c -DPLUGIN_NAME_I18N='"xvdr"' -DXVDR_VERSION='"0.9.7"' -I./src -o src/demuxer/demuxer_LATM.o src/demuxer/demuxer_LATM.c g++ -c -DPLUGIN_NAME_I18N='"xvdr"' -DXVDR_VERSION='"0.9.7"' -I./src -o src/demuxer/demuxer_AC3.o src/demuxer/demuxer_AC3.c g++ -c -DPLUGIN_NAME_I18N='"xvdr"' -DXVDR_VERSION='"0.9.7"' -I./src -o src/demuxer/demuxer_EAC3.o src/demuxer/demuxer_EAC3.c g++ -c -DPLUGIN_NAME_I18N='"xvdr"' -DXVDR_VERSION='"0.9.7"' -I./src -o src/demuxer/demuxer_H264.o src/demuxer/demuxer_H264.c g++ -c -DPLUGIN_NAME_I18N='"xvdr"' -DXVDR_VERSION='"0.9.7"' -I./src -o src/demuxer/demuxer_MPEGAudio.o src/demuxer/demuxer_MPEGAudio.c g++ -c -DPLUGIN_NAME_I18N='"xvdr"' -DXVDR_VERSION='"0.9.7"' -I./src -o src/demuxer/demuxer_MPEGVideo.o src/demuxer/demuxer_MPEGVideo.c g++ -c -DPLUGIN_NAME_I18N='"xvdr"' -DXVDR_VERSION='"0.9.7"' -I./src -o src/demuxer/demuxer_PES.o src/demuxer/demuxer_PES.c g++ -c -DPLUGIN_NAME_I18N='"xvdr"' -DXVDR_VERSION='"0.9.7"' -I./src -o src/demuxer/demuxer_Subtitle.o src/demuxer/demuxer_Subtitle.c g++ -c -DPLUGIN_NAME_I18N='"xvdr"' -DXVDR_VERSION='"0.9.7"' -I./src -o src/demuxer/parser.o src/demuxer/parser.c g++ -c -DPLUGIN_NAME_I18N='"xvdr"' -DXVDR_VERSION='"0.9.7"' -I./src -o src/demuxer/streaminfo.o src/demuxer/streaminfo.c g++ -c -DPLUGIN_NAME_I18N='"xvdr"' -DXVDR_VERSION='"0.9.7"' -I./src -o src/live/channelcache.o src/live/channelcache.c g++ -c -DPLUGIN_NAME_I18N='"xvdr"' -DXVDR_VERSION='"0.9.7"' -I./src -o src/live/livepatfilter.o src/live/livepatfilter.c g++ -c -DPLUGIN_NAME_I18N='"xvdr"' -DXVDR_VERSION='"0.9.7"' -I./src -o src/live/livequeue.o src/live/livequeue.c g++ -c -DPLUGIN_NAME_I18N='"xvdr"' -DXVDR_VERSION='"0.9.7"' -I./src -o src/live/livestreamer.o src/live/livestreamer.c g++ -c -DPLUGIN_NAME_I18N='"xvdr"' -DXVDR_VERSION='"0.9.7"' -I./src -o src/net/msgpacket.o src/net/msgpacket.c g++ -c -DPLUGIN_NAME_I18N='"xvdr"' -DXVDR_VERSION='"0.9.7"' -I./src -o src/net/os-config.o src/net/os-config.c g++ -c -DPLUGIN_NAME_I18N='"xvdr"' -DXVDR_VERSION='"0.9.7"' -I./src -o src/net/socketlock.o src/net/socketlock.c g++ -c -DPLUGIN_NAME_I18N='"xvdr"' -DXVDR_VERSION='"0.9.7"' -I./src -o src/recordings/recordingscache.o src/recordings/recordingscache.c g++ -c -DPLUGIN_NAME_I18N='"xvdr"' -DXVDR_VERSION='"0.9.7"' -I./src -o src/recordings/recplayer.o src/recordings/recplayer.c g++ -c -DPLUGIN_NAME_I18N='"xvdr"' -DXVDR_VERSION='"0.9.7"' -I./src -o src/tools/hash.o src/tools/hash.c g++ -c -DPLUGIN_NAME_I18N='"xvdr"' -DXVDR_VERSION='"0.9.7"' -I./src -o src/xvdr/xvdr.o src/xvdr/xvdr.c g++ -c -DPLUGIN_NAME_I18N='"xvdr"' -DXVDR_VERSION='"0.9.7"' -I./src -o src/xvdr/xvdrclient.o src/xvdr/xvdrclient.c g++ -c -DPLUGIN_NAME_I18N='"xvdr"' -DXVDR_VERSION='"0.9.7"' -I./src -o src/xvdr/xvdrserver.o src/xvdr/xvdrserver.c g++ -c -DPLUGIN_NAME_I18N='"xvdr"' -DXVDR_VERSION='"0.9.7"' -I./src -o src/xvdr/xvdrchannels.o src/xvdr/xvdrchannels.c g++ -shared src/config/config.o src/demuxer/bitstream.o src/demuxer/demuxer.o src/demuxer/demuxer_ADTS.o src/demuxer/demuxer_LATM.o src/demuxer/demuxer_AC3.o src/demuxer/demuxer_EAC3.o src/demuxer/demuxer_H264.o src/demuxer/demuxer_MPEGAudio.o src/demuxer/demuxer_MPEGVideo.o src/demuxer/demuxer_PES.o src/demuxer/demuxer_Subtitle.o src/demuxer/parser.o src/demuxer/streaminfo.o src/live/channelcache.o src/live/livepatfilter.o src/live/livequeue.o src/live/livestreamer.o src/net/msgpacket.o src/net/os-config.o src/net/socketlock.o src/recordings/recordingscache.o src/recordings/recplayer.o src/tools/hash.o src/xvdr/xvdr.o src/xvdr/xvdrclient.o src/xvdr/xvdrserver.o src/xvdr/xvdrchannels.o -o libvdr-xvdr.so /usr/bin/ld: src/config/config.o: relocation R_X86_64_32S against `_ZTV17cXVDRServerConfig' can not be used when making a shared object; recompile with -fPIC src/config/config.o: could not read symbols: Bad value collect2: error: ld returned 1 exit status make: *\ [libvdr-xvdr.so] Error 1

I'm not a programmer.

it's debian whezzy with vdr-1.7.28

carsten12 commented 11 years ago

I can confirm this build problem on Ubuntu Precise.

The include problem is well known, it's because Debian derivatives have lbsi includes in /usr/include/vdr and not in /usr/include. The other problem can be fixed by adding -fPIC during compile time, but will not succeed because the libvdr-xvdr.so is build in a place where the Debian tools don't expect it.

The libvdr-xvdr.so itself is - by the way - functional when renamed and moved into the plugin lib dir.

BR, Carsten.

eleon216 commented 11 years ago

Thanks carsten. Adding -fPIC in the Makefile worked. I'm not sure if this issues should stay open or not? I can live with this fix, but it would be nice if it would compile out of the box.

carsten12 commented 11 years ago

Definitely not. And now I have to say that I have stuttering output on my OpenELEC XBMC with latest addon. I get one picture every second, audio is ok. So it isn't functional. I use vdr 1.7.27.

tkurbad commented 11 years ago

The issue with the include path exists on Gentoo, too.

Andi-bz commented 11 years ago

can someone explain how to add the -fPIC? Thanks

hoedlmoser commented 11 years ago

carsten12, if you are using VDR 1.7.27, why don't you use branch master-pre-vdr-1.7.34. 1st I also thougt there is something wrong, but then I've seen major changes in the Makefile in commit https://github.com/pipelka/vdr-plugin-xvdr/commit/0ed81b855ad8c021306b575bb32032917806088a and the comment "for backward-compatibility please use the "master-pre-vdr-1.7.34" branch" and that branch is really working.

so, compilation in Debian is like following git clone https://github.com/pipelka/vdr-plugin-xvdr.git cd vdr-plugin-xvdr/ git checkout master-pre-vdr-1.7.34 dpkg-buildpackage -us -tc

carsten12 commented 11 years ago

I'll try out tomorrow and give feedback, but I see why you are right...

eleon216 commented 11 years ago

@hoedlmoser: I just tried the master-pre-vdr-1.7.34 branch, and it's working like a charm. Thanks!

Benvandamme commented 11 years ago

Where do i have to add the -fpic Parameter ? i tried to add it in the makefile itself, in the .global and .config, but the plugin won't build on archlinux.

seahawk1986 commented 11 years ago

Using a recent vdr version >= 1.7.36 there is nothing to it (the vdr package has to be installed first): https://github.com/seahawk1986/vdr4arch/blob/yaarch/plugins/vdr-xvdr-git/PKGBUILD

Otherwise you can add -fpic to the CXXFLAGS variable

hoedlmoser commented 11 years ago

@Benvandamme which version of VDR are you using?

Benvandamme commented 11 years ago

Now Im running 1.7.38 with the packages from seahawks link and everything works fine. Thank you for your help.

KnisterPeter commented 10 years ago

Hello, I'm on Ubuntu 13.10 with vdr version 2.0.3-1. I cannot compile either 0.9.8 oder 0.9.9. I'll get this error output:

g++  -c -DPLUGIN_NAME_I18N='"xvdr"' -DXVDR_VERSION='"0.9.8"' -I./src -o src/live/livequeue.o src/live/livequeue.c
g++  -c -DPLUGIN_NAME_I18N='"xvdr"' -DXVDR_VERSION='"0.9.8"' -I./src -o src/live/livestreamer.o src/live/livestreamer.c
g++  -c -DPLUGIN_NAME_I18N='"xvdr"' -DXVDR_VERSION='"0.9.8"' -I./src -o src/net/msgpacket.o src/net/msgpacket.c
g++  -c -DPLUGIN_NAME_I18N='"xvdr"' -DXVDR_VERSION='"0.9.8"' -I./src -o src/net/os-config.o src/net/os-config.c
g++  -c -DPLUGIN_NAME_I18N='"xvdr"' -DXVDR_VERSION='"0.9.8"' -I./src -o src/net/socketlock.o src/net/socketlock.c
g++  -c -DPLUGIN_NAME_I18N='"xvdr"' -DXVDR_VERSION='"0.9.8"' -I./src -o src/recordings/recordingscache.o src/recordings/recordingscache.c
src/recordings/recordingscache.c: In member function ‘void cRecordingsCache::LoadResumeData()’:
src/recordings/recordingscache.c:143:56: warning: format ‘%llu’ expects argument of type ‘long long unsigned int*’, but argument 4 has type ‘uint64_t* {aka long unsigned int*}’ [-Wformat=]
   while(fscanf(f, "%08x = %llu, %i", &uid, &pos, &count) != EOF)
                                                        ^
src/recordings/recordingscache.c: In member function ‘void cRecordingsCache::SaveResumeData()’:
src/recordings/recordingscache.c:178:98: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘uint64_t {aka long unsigned int}’ [-Wformat=]
   fprintf(f, "%08x = %llu, %i\n", i->first, i->second.lastplayedposition, i->second.playcount);
                                                                                                  ^
g++  -c -DPLUGIN_NAME_I18N='"xvdr"' -DXVDR_VERSION='"0.9.8"' -I./src -o src/recordings/recplayer.o src/recordings/recplayer.c
g++  -c -DPLUGIN_NAME_I18N='"xvdr"' -DXVDR_VERSION='"0.9.8"' -I./src -o src/tools/hash.o src/tools/hash.c
g++  -c -DPLUGIN_NAME_I18N='"xvdr"' -DXVDR_VERSION='"0.9.8"' -I./src -o src/xvdr/xvdr.o src/xvdr/xvdr.c
g++  -c -DPLUGIN_NAME_I18N='"xvdr"' -DXVDR_VERSION='"0.9.8"' -I./src -o src/xvdr/xvdrclient.o src/xvdr/xvdrclient.c
g++  -c -DPLUGIN_NAME_I18N='"xvdr"' -DXVDR_VERSION='"0.9.8"' -I./src -o src/xvdr/xvdrserver.o src/xvdr/xvdrserver.c
g++  -c -DPLUGIN_NAME_I18N='"xvdr"' -DXVDR_VERSION='"0.9.8"' -I./src -o src/xvdr/xvdrchannels.o src/xvdr/xvdrchannels.c
g++   -shared src/config/config.o src/demuxer/bitstream.o src/demuxer/demuxer.o src/demuxer/demuxer_ADTS.o src/demuxer/demuxer_LATM.o src/demuxer/demuxer_AC3.o src/demuxer/demuxer_EAC3.o src/demuxer/demuxer_H264.o src/demuxer/demuxer_MPEGAudio.o src/demuxer/demuxer_MPEGVideo.o src/demuxer/demuxer_PES.o src/demuxer/demuxer_Subtitle.o src/demuxer/parser.o src/demuxer/streaminfo.o src/live/channelcache.o src/live/livepatfilter.o src/live/livequeue.o src/live/livestreamer.o src/net/msgpacket.o src/net/os-config.o src/net/socketlock.o src/recordings/recordingscache.o src/recordings/recplayer.o src/tools/hash.o src/xvdr/xvdr.o src/xvdr/xvdrclient.o src/xvdr/xvdrserver.o src/xvdr/xvdrchannels.o -o libvdr-xvdr.so
/usr/bin/ld: src/config/config.o: relocation R_X86_64_32S against `_ZTV17cXVDRServerConfig' can not be used when making a shared object; recompile with -fPIC
src/config/config.o: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
make[2]: *** [libvdr-xvdr.so] Error 1
make[2]: Leaving directory `/home/markusw/xvdr/temp/vdr-plugin-xvdr'
dh_auto_build: make -j1 all VDRDIR=/usr/include/vdr LIBDIR=. LOCALEDIR=locale returned exit code 2
make[1]: *** [override_dh_auto_build] Error 2
make[1]: Leaving directory `/home/markusw/xvdr/temp/vdr-plugin-xvdr'
make: *** [build] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2

Or for 0.9.9

g++  -c -DPLUGIN_NAME_I18N='"xvdr"' -DXVDR_VERSION='"0.9.9"' -I./src -o src/live/livepatfilter.o src/live/livepatfilter.c
g++  -c -DPLUGIN_NAME_I18N='"xvdr"' -DXVDR_VERSION='"0.9.9"' -I./src -o src/live/livequeue.o src/live/livequeue.c
g++  -c -DPLUGIN_NAME_I18N='"xvdr"' -DXVDR_VERSION='"0.9.9"' -I./src -o src/live/livestreamer.o src/live/livestreamer.c
g++  -c -DPLUGIN_NAME_I18N='"xvdr"' -DXVDR_VERSION='"0.9.9"' -I./src -o src/net/msgpacket.o src/net/msgpacket.c
g++  -c -DPLUGIN_NAME_I18N='"xvdr"' -DXVDR_VERSION='"0.9.9"' -I./src -o src/net/os-config.o src/net/os-config.c
g++  -c -DPLUGIN_NAME_I18N='"xvdr"' -DXVDR_VERSION='"0.9.9"' -I./src -o src/net/socketlock.o src/net/socketlock.c
g++  -c -DPLUGIN_NAME_I18N='"xvdr"' -DXVDR_VERSION='"0.9.9"' -I./src -o src/recordings/recordingscache.o src/recordings/recordingscache.c
src/recordings/recordingscache.c: In member function ‘void cRecordingsCache::LoadResumeData()’:
src/recordings/recordingscache.c:142:56: warning: format ‘%llu’ expects argument of type ‘long long unsigned int*’, but argument 4 has type ‘uint64_t* {aka long unsigned int*}’ [-Wformat=]
   while(fscanf(f, "%08x = %llu, %i", &uid, &pos, &count) != EOF)
                                                        ^     
src/recordings/recordingscache.c: In member function ‘void cRecordingsCache::SaveResumeData()’:
src/recordings/recordingscache.c:177:98: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘uint64_t {aka long unsigned int}’ [-Wformat=]
       fprintf(f, "%08x = %llu, %i\n", i->first, i->second.lastplayedposition, i->second.playcount);
                                                                                                  ^     
g++  -c -DPLUGIN_NAME_I18N='"xvdr"' -DXVDR_VERSION='"0.9.9"' -I./src -o src/recordings/recplayer.o src/recordings/recplayer.c
g++  -c -DPLUGIN_NAME_I18N='"xvdr"' -DXVDR_VERSION='"0.9.9"' -I./src -o src/scanner/wirbelscan.o src/scanner/wirbelscan.c
g++  -c -DPLUGIN_NAME_I18N='"xvdr"' -DXVDR_VERSION='"0.9.9"' -I./src -o src/tools/hash.o src/tools/hash.c
g++  -c -DPLUGIN_NAME_I18N='"xvdr"' -DXVDR_VERSION='"0.9.9"' -I./src -o src/xvdr/xvdr.o src/xvdr/xvdr.c
g++  -c -DPLUGIN_NAME_I18N='"xvdr"' -DXVDR_VERSION='"0.9.9"' -I./src -o src/xvdr/xvdrclient.o src/xvdr/xvdrclient.c
g++  -c -DPLUGIN_NAME_I18N='"xvdr"' -DXVDR_VERSION='"0.9.9"' -I./src -o src/xvdr/xvdrserver.o src/xvdr/xvdrserver.c
g++  -c -DPLUGIN_NAME_I18N='"xvdr"' -DXVDR_VERSION='"0.9.9"' -I./src -o src/xvdr/xvdrchannels.o src/xvdr/xvdrchannels.c
g++   -shared src/config/config.o src/demuxer/demuxer.o src/demuxer/demuxer_ADTS.o src/demuxer/demuxer_LATM.o src/demuxer/demuxer_AC3.o src/demuxer/demuxer_EAC3.o src/demuxer/demuxer_H264.o src/demuxer/demuxer_MPEGAudio.o src/demuxer/demuxer_MPEGVideo.o src/demuxer/demuxer_PES.o src/demuxer/demuxer_Subtitle.o src/demuxer/parser.o src/demuxer/streaminfo.o src/live/channelcache.o src/live/livepatfilter.o src/live/livequeue.o src/live/livestreamer.o src/net/msgpacket.o src/net/os-config.o src/net/socketlock.o src/recordings/recordingscache.o src/recordings/recplayer.o src/scanner/wirbelscan.o src/tools/hash.o src/xvdr/xvdr.o src/xvdr/xvdrclient.o src/xvdr/xvdrserver.o src/xvdr/xvdrchannels.o -o libvdr-xvdr.so
/usr/bin/ld: src/config/config.o: relocation R_X86_64_32S against `_ZTV17cXVDRServerConfig' can not be used when making a shared object; recompile with -fPIC
src/config/config.o: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
make[2]: *** [libvdr-xvdr.so] Error 1
make[2]: Leaving directory `/home/markusw/xvdr/temp/vdr-plugin-xvdr'
dh_auto_build: make -j1 all VDRDIR=/usr/include/vdr LIBDIR=. LOCALEDIR=locale returned exit code 2
make[1]: *** [override_dh_auto_build] Error 2
make[1]: Leaving directory `/home/markusw/xvdr/temp/vdr-plugin-xvdr'
make: *** [build] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2