pipelka / vdr-plugin-xvdr

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

Failed to compile on ubuntu 13.10 with vdr 2.0.3 #121

Closed KnisterPeter closed 10 years ago

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
pipelka commented 10 years ago

Hi,

Please recheck with the latest "master" branch of the git repository.

Regards, Alex

KnisterPeter commented 10 years ago

Hi,

that fails with

g++  -fPIC -c -DPLUGIN_NAME_I18N='"xvdr"' -DXVDR_VERSION='"0.9.9"' -I./src -I./src/vdr -o src/xvdr/xvdrclient.o src/xvdr/xvdrclient.c
g++  -fPIC -c -DPLUGIN_NAME_I18N='"xvdr"' -DXVDR_VERSION='"0.9.9"' -I./src -I./src/vdr -o src/xvdr/xvdrserver.o src/xvdr/xvdrserver.c
g++  -fPIC -c -DPLUGIN_NAME_I18N='"xvdr"' -DXVDR_VERSION='"0.9.9"' -I./src -I./src/vdr -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/recordings/recordingscache.o src/recordings/recplayer.o src/scanner/wirbelscan.o src/tools/hash.o src/xvdr/timerconflicts.o src/xvdr/xvdr.o src/xvdr/xvdrclient.o src/xvdr/xvdrserver.o src/xvdr/xvdrchannels.o -o libvdr-xvdr.so
xgettext -C -cTRANSLATORS --no-wrap --no-location -k -ktr -ktrNOOP --package-name=vdr-xvdr --package-version=0.9.9 --msgid-bugs-address='<see README>' -o po/xvdr.pot `find ./src -name *.c`
msgmerge -U --no-wrap --no-location --backup=none -q -N po/de_AT.po po/xvdr.pot
msgfmt -c -o po/de_AT.mo po/de_AT.po
msgmerge -U --no-wrap --no-location --backup=none -q -N po/de_DE.po po/xvdr.pot
msgfmt -c -o po/de_DE.mo po/de_DE.po
make[2]: Leaving directory `/home/markusw/xvdr/vdr-plugin-xvdr'
make[1]: Leaving directory `/home/markusw/xvdr/vdr-plugin-xvdr'
   dh_auto_test
 fakeroot debian/rules binary
dh binary
   dh_testroot
   dh_prep
   dh_auto_install
make[1]: Entering directory `/home/markusw/xvdr/vdr-plugin-xvdr'
install -D libvdr-xvdr.so /home/markusw/xvdr/vdr-plugin-xvdr/debian/vdr-plugin-xvdr/usr/lib/vdr/plugins/libvdr-xvdr.so.2.0.0
install -D -m644 po/de_AT.mo /home/markusw/xvdr/vdr-plugin-xvdr/debian/vdr-plugin-xvdr/usr/share/locale/de_AT/LC_MESSAGES/vdr-xvdr.mo
install -D -m644 po/de_DE.mo /home/markusw/xvdr/vdr-plugin-xvdr/debian/vdr-plugin-xvdr/usr/share/locale/de_DE/LC_MESSAGES/vdr-xvdr.mo
make[1]: Leaving directory `/home/markusw/xvdr/vdr-plugin-xvdr'
   dh_install
dh_install: vdr-plugin-xvdr missing files (libvdr-xvdr.so.*), aborting
make: *** [binary] Error 255
dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2

But I discovered that the tagged version xvdr-0.9.8-pre-vdr-1.7.34 does compile and work as expected. That seems to be a bit strange.

seahawk1986 commented 10 years ago

When building a plugin using the new VDR Makefile system there is no need to copy the libvdr-.so. via an entry in debian/install. Just comment out/remove the first line: https://github.com/pipelka/vdr-plugin-xvdr/blob/master/debian/install#L1

pipelka commented 10 years ago

Ok.

So this patch should fix it:

diff --git a/debian/install b/debian/install
index fd616ed..647121d 100644
--- a/debian/install
+++ b/debian/install
@@ -1,3 +1,2 @@
-libvdr-xvdr.so.*         usr/lib/vdr/plugins/
 debian/plugin.xvdr.conf  etc/vdr/plugins/
 xvdr/allowed_hosts.conf  var/lib/vdr/plugins/xvdr/

Please recheck. If it's ok I'll apply it.

KnisterPeter commented 10 years ago

Wonderful, it works like a charm.