vdr-1.7.32 plugin dvbhddevice fails

Message ID 50A9E93F.8060207@tvdr.de
State New
Headers

Commit Message

Klaus Schmidinger Nov. 19, 2012, 8:09 a.m. UTC
  On 19.11.2012 05:27, Richard Scobie wrote:
> I have just upgraded from vdr-1.7.31 to vdr-1.7.32 with S2-6400 and on making plugins, I receive the following error:
>
> make[2]: Entering directory `/home/rs/vdr-1.7.32/PLUGINS/src/dvbhddevice/libhdffcmd'
> gcc -O3 -Wall  -fPIC -shared -o libhdffcmd-0.1.0.so bitbuffer.o hdffcmd_av.o hdffcmd_base.o hdffcmd_generic.o hdffcmd_hdmi.o hdffcmd_mux.o hdffcmd_osd.o hdffcmd_remote.o
> /usr/bin/ld: bitbuffer.o: relocation R_X86_64_PC32 against undefined symbol `memset@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
> /usr/bin/ld: final link failed: Bad value
> collect2: ld returned 1 exit status
> make[2]: *** [libhdffcmd-0.1.0.so] Error 1
>
> As "-fPIC" is being used, I am not sure how to handle the comment, "recompile with -fPIC"

Maybe this was caused by the change I introduced in order to be able to
easily build a 32-bit version of VDR (and all its plugins) on a 64-bit
machine:

--------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------

However, I got no such error message here, and I do use a TT S2-6400.
Maybe check your Make.global and/or Make.config files.

Klaus
  

Comments

Richard Scobie Nov. 20, 2012, 3:38 a.m. UTC | #1
Hi Klaus,

Klaus Schmidinger wrote:

> Maybe this was caused by the change I introduced in order to be able to
> easily build a 32-bit version of VDR (and all its plugins) on a 64-bit
> machine:
> 
> -------------------------------------------------------------------------------------------- 
> 
> --- PLUGINS/src/dvbhddevice/libhdffcmd/Makefile 2012/01/18 12:25:20     1.2
> +++ PLUGINS/src/dvbhddevice/libhdffcmd/Makefile 2012/10/09 09:54:26     1.3
> @@ -24,6 +24,18 @@
>  AR      ?= ar
>  ARFLAGS ?= r
> 
> +### The directory environment:
> +
> +VDRDIR ?= ../../../..
> +
> +### Make sure that necessary options are included:
> +
> +include $(VDRDIR)/Make.global
> +
> +### Allow user defined options to overwrite defaults:
> +
> +-include $(VDRDIR)/Make.config
> +
>  ### Implicit rules:
> 
>  %.o: %.c
> -------------------------------------------------------------------------------------------- 
> 
> 
> However, I got no such error message here, and I do use a TT S2-6400.
> Maybe check your Make.global and/or Make.config files.
> 

I checked both and they seem OK. My previous post just showed the 
linking stage. Here is the full output from compiling the dvbhddevice 
plugin and "-fPIC" is present during compilation of all object files.


Plugin dvbhddevice:
make[1]: Entering directory `/home/rs/vdr-1.7.32/PLUGINS/src/dvbhddevice'
make[1]: Leaving directory `/home/rs/vdr-1.7.32/PLUGINS/src/dvbhddevice'
make[1]: Entering directory `/home/rs/vdr-1.7.32/PLUGINS/src/dvbhddevice'
g++ -O3 -Wall -Werror=overloaded-virtual -Wno-parentheses -fPIC -c 
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE 
-D_GNU_SOURCE -DPLUGIN_NAME_I18N='"dvbhddevice"' 
-I/mnt/storage/media_build_experimental/linux/include -I../../../include 
dvbhddevice.c
g++ -O3 -Wall -Werror=overloaded-virtual -Wno-parentheses -fPIC -c 
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE 
-D_GNU_SOURCE -DPLUGIN_NAME_I18N='"dvbhddevice"' 
-I/mnt/storage/media_build_experimental/linux/include -I../../../include 
dvbhdffdevice.c
g++ -O3 -Wall -Werror=overloaded-virtual -Wno-parentheses -fPIC -c 
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE 
-D_GNU_SOURCE -DPLUGIN_NAME_I18N='"dvbhddevice"' 
-I/mnt/storage/media_build_experimental/linux/include -I../../../include 
hdffcmd.c
g++ -O3 -Wall -Werror=overloaded-virtual -Wno-parentheses -fPIC -c 
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE 
-D_GNU_SOURCE -DPLUGIN_NAME_I18N='"dvbhddevice"' 
-I/mnt/storage/media_build_experimental/linux/include -I../../../include 
hdffosd.c
hdffosd.c: In member function â??virtual void cHdffOsd::DrawText(int, 
int, const char*, tColor, tColor, const cFont*, int, int, int)â??:
hdffosd.c:258:9: warning: variable â??limitâ?? set but not used 
[-Wunused-but-set-variable]
g++ -O3 -Wall -Werror=overloaded-virtual -Wno-parentheses -fPIC -c 
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE 
-D_GNU_SOURCE -DPLUGIN_NAME_I18N='"dvbhddevice"' 
-I/mnt/storage/media_build_experimental/linux/include -I../../../include 
menu.c
g++ -O3 -Wall -Werror=overloaded-virtual -Wno-parentheses -fPIC -c 
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE 
-D_GNU_SOURCE -DPLUGIN_NAME_I18N='"dvbhddevice"' 
-I/mnt/storage/media_build_experimental/linux/include -I../../../include 
setup.c
make -C libhdffcmd all
make[2]: Entering directory 
`/home/rs/vdr-1.7.32/PLUGINS/src/dvbhddevice/libhdffcmd'
gcc -O3 -Wall  -fPIC -shared -o libhdffcmd-0.1.0.so bitbuffer.o 
hdffcmd_av.o hdffcmd_base.o hdffcmd_generic.o hdffcmd_hdmi.o 
hdffcmd_mux.o hdffcmd_osd.o hdffcmd_remote.o
/usr/bin/ld: bitbuffer.o: relocation R_X86_64_PC32 against undefined 
symbol `memset@@GLIBC_2.2.5' can not be used when making a shared 
object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: ld returned 1 exit status
make[2]: *** [libhdffcmd-0.1.0.so] Error 1
make[2]: Leaving directory 
`/home/rs/vdr-1.7.32/PLUGINS/src/dvbhddevice/libhdffcmd'
make[1]: *** [libvdr-dvbhddevice.so] Error 2
make[1]: Leaving directory `/home/rs/vdr-1.7.32/PLUGINS/src/dvbhddevice'

The machine is running Fedora 16 64bit and gcc version 4.6.2 20111027 
(Red Hat 4.6.2-1) and I have no problem building vdr-1.7.31.

Regards,

Richard
  
Gerald Dachs Nov. 20, 2012, 6:15 a.m. UTC | #2
Am 2012-11-20 04:38, schrieb Richard Scobie:
> Hi Klaus,
>
> Klaus Schmidinger wrote:
>
>> Maybe this was caused by the change I introduced in order to be able 
>> to
>> easily build a 32-bit version of VDR (and all its plugins) on a 
>> 64-bit
>> machine:
>> 
>> --------------------------------------------------------------------------------------------
>> --- PLUGINS/src/dvbhddevice/libhdffcmd/Makefile 2012/01/18 12:25:20  
>>   1.2
>> +++ PLUGINS/src/dvbhddevice/libhdffcmd/Makefile 2012/10/09 09:54:26  
>>   1.3
>> @@ -24,6 +24,18 @@
>>  AR      ?= ar
>>  ARFLAGS ?= r
>> +### The directory environment:
>> +
>> +VDRDIR ?= ../../../..
>> +
>> +### Make sure that necessary options are included:
>> +
>> +include $(VDRDIR)/Make.global
>> +
>> +### Allow user defined options to overwrite defaults:
>> +
>> +-include $(VDRDIR)/Make.config
>> +
>>  ### Implicit rules:
>> %.o: %.c
>> 
>> --------------------------------------------------------------------------------------------
>>
>> However, I got no such error message here, and I do use a TT 
>> S2-6400.
>> Maybe check your Make.global and/or Make.config files.
>>
>
> I checked both and they seem OK. My previous post just showed the
> linking stage. Here is the full output from compiling the dvbhddevice
> plugin and "-fPIC" is present during compilation of all object files.
>
>
> Plugin dvbhddevice:
> make[1]: Entering directory 
> `/home/rs/vdr-1.7.32/PLUGINS/src/dvbhddevice'
> make[1]: Leaving directory 
> `/home/rs/vdr-1.7.32/PLUGINS/src/dvbhddevice'
> make[1]: Entering directory 
> `/home/rs/vdr-1.7.32/PLUGINS/src/dvbhddevice'
> g++ -O3 -Wall -Werror=overloaded-virtual -Wno-parentheses -fPIC -c
> -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
> -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"dvbhddevice"'
> -I/mnt/storage/media_build_experimental/linux/include
> -I../../../include dvbhddevice.c
> g++ -O3 -Wall -Werror=overloaded-virtual -Wno-parentheses -fPIC -c
> -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
> -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"dvbhddevice"'
> -I/mnt/storage/media_build_experimental/linux/include
> -I../../../include dvbhdffdevice.c
> g++ -O3 -Wall -Werror=overloaded-virtual -Wno-parentheses -fPIC -c
> -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
> -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"dvbhddevice"'
> -I/mnt/storage/media_build_experimental/linux/include
> -I../../../include hdffcmd.c
> g++ -O3 -Wall -Werror=overloaded-virtual -Wno-parentheses -fPIC -c
> -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
> -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"dvbhddevice"'
> -I/mnt/storage/media_build_experimental/linux/include
> -I../../../include hdffosd.c
> hdffosd.c: In member function â??virtual void cHdffOsd::DrawText(int,
> int, const char*, tColor, tColor, const cFont*, int, int, int)â??:
> hdffosd.c:258:9: warning: variable â??limitâ?? set but not used
> [-Wunused-but-set-variable]
> g++ -O3 -Wall -Werror=overloaded-virtual -Wno-parentheses -fPIC -c
> -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
> -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"dvbhddevice"'
> -I/mnt/storage/media_build_experimental/linux/include
> -I../../../include menu.c
> g++ -O3 -Wall -Werror=overloaded-virtual -Wno-parentheses -fPIC -c
> -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
> -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"dvbhddevice"'
> -I/mnt/storage/media_build_experimental/linux/include
> -I../../../include setup.c
> make -C libhdffcmd all
> make[2]: Entering directory
> `/home/rs/vdr-1.7.32/PLUGINS/src/dvbhddevice/libhdffcmd'
> gcc -O3 -Wall  -fPIC -shared -o libhdffcmd-0.1.0.so bitbuffer.o
> hdffcmd_av.o hdffcmd_base.o hdffcmd_generic.o hdffcmd_hdmi.o
> hdffcmd_mux.o hdffcmd_osd.o hdffcmd_remote.o
> /usr/bin/ld: bitbuffer.o: relocation R_X86_64_PC32 against undefined
> symbol `memset@@GLIBC_2.2.5' can not be used when making a shared
> object; recompile with -fPIC
> /usr/bin/ld: final link failed: Bad value
> collect2: ld returned 1 exit status
> make[2]: *** [libhdffcmd-0.1.0.so] Error 1
> make[2]: Leaving directory
> `/home/rs/vdr-1.7.32/PLUGINS/src/dvbhddevice/libhdffcmd'
> make[1]: *** [libvdr-dvbhddevice.so] Error 2
> make[1]: Leaving directory 
> `/home/rs/vdr-1.7.32/PLUGINS/src/dvbhddevice'
>
> The machine is running Fedora 16 64bit and gcc version 4.6.2 20111027
> (Red Hat 4.6.2-1) and I have no problem building vdr-1.7.31.

If you would take a deeper look into your post you would have noticed 
that the mentioned file bitbuffer.o is not
build to this time. It must have been build in a former stage. So there 
is still no proof that it
has been build with -fPIC.

Gerald
  
Richard Scobie Nov. 20, 2012, 7:08 p.m. UTC | #3
Hi Gerald,

Gerald Dachs wrote:

> If you would take a deeper look into your post you would have noticed 
> that the mentioned file bitbuffer.o is not
> build to this time. It must have been build in a former stage. So there 
> is still no proof that it
> has been build with -fPIC.
> 

You are correct. It appears none of the object files in 
dvbhddevice/libhdffcmd are being built without -fPIC, whereas all other 
object files in all the other plugins are, so I will investigate further.

Regards,

Richard
  

Patch

--- PLUGINS/src/dvbhddevice/libhdffcmd/Makefile 2012/01/18 12:25:20     1.2
+++ PLUGINS/src/dvbhddevice/libhdffcmd/Makefile 2012/10/09 09:54:26     1.3
@@ -24,6 +24,18 @@ 
  AR      ?= ar
  ARFLAGS ?= r

+### The directory environment:
+
+VDRDIR ?= ../../../..
+
+### Make sure that necessary options are included:
+
+include $(VDRDIR)/Make.global
+
+### Allow user defined options to overwrite defaults:
+
+-include $(VDRDIR)/Make.config
+
  ### Implicit rules:

  %.o: %.c