[ANNOUNCE] VDR developer version 1.7.36

Message ID 1358709866.18838.12.camel@pluto.deltab.lan
State New
Headers

Commit Message

Andreas Brachold Jan. 20, 2013, 7:24 p.m. UTC
  Hi,

I think into vdr.pc is parameter includedir= missed, if $(INCDIR) not a
standard directory.

After a recreating of a new PLUGIN Makefile, building from vdr root
directory work, but i can't build plugin from own directory.

#> cd PLUGINS/src/dvdswitch/
#> make all

g++ -g -O0 -Wall -Werror=overloaded-virtual -Wno-parentheses -fPIC
-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-D_LARGEFILE64_SOURCE -c -DPLUGIN_NAME_I18N='"dvdswitch"'  -o
dvdswitch.o dvdswitch.c
dvdswitch.c:10:24: fatal error: vdr/plugin.h: No such file or directory
compilation terminated.
make: *** [dvdswitch.o] Error 1


Andreas
  

Comments

Klaus Schmidinger Jan. 22, 2013, 10:59 a.m. UTC | #1
On 20.01.2013 20:24, Andreas Brachold wrote:
> Hi,
>
> I think into vdr.pc is parameter includedir= missed, if $(INCDIR) not a
> standard directory.
>
> After a recreating of a new PLUGIN Makefile, building from vdr root
> directory work, but i can't build plugin from own directory.
>
> #> cd PLUGINS/src/dvdswitch/
> #> make all
>
> g++ -g -O0 -Wall -Werror=overloaded-virtual -Wno-parentheses -fPIC
> -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
> -D_LARGEFILE64_SOURCE -c -DPLUGIN_NAME_I18N='"dvdswitch"'  -o
> dvdswitch.o dvdswitch.c
> dvdswitch.c:10:24: fatal error: vdr/plugin.h: No such file or directory
> compilation terminated.
> make: *** [dvdswitch.o] Error 1

If you have an installed version of VDR on your system (i.e. there is
a vdr.pc file in /usr/share/pkgconfig) and you 'make' a plugin from
within the plugin's source directory, the information stored in that
vdr.pc file will be used.
If, in such a scenario, you want to build the plugin using VDR header
files from the VDR source directory, you need to do

   make VDRDIR=/path/to/your/vdr/source

If you want to be able to build a plugin from within its source directory,
and use the VDR source from ../../.. without setting the VDRDIR macro, you
need to make sure that there is no vdr.pc in /usr/share/pkgconfig.

Klaus
  
Joachim Wilke Jan. 23, 2013, 10:02 a.m. UTC | #2
2013/1/22 Klaus Schmidinger <Klaus.Schmidinger@tvdr.de>

> On 20.01.2013 20:24, Andreas Brachold wrote:
>
>> I think into vdr.pc is parameter includedir= missed, if $(INCDIR) not a
>> standard directory.
>>
>>
> If you have an installed version of VDR on your system (i.e. there is
> a vdr.pc file in /usr/share/pkgconfig) and you 'make' a plugin from
> within the plugin's source directory, the information stored in that
> vdr.pc file will be used.
>
>
I think what Andreas means ist, that the INCDIR of the *installed* VDR
headers is currently not included in the CXXFLAGS in vdr.pc. This causes
plugins to not compile for themselves even if VDR has installed (using make
install) before.
  
Christopher Reimer Jan. 25, 2013, 2:31 p.m. UTC | #3
2013/1/23 Joachim Wilke <joachim.wilke@gmail.com>:
> 2013/1/22 Klaus Schmidinger <Klaus.Schmidinger@tvdr.de>
>>
>> On 20.01.2013 20:24, Andreas Brachold wrote:
>>>
>>> I think into vdr.pc is parameter includedir= missed, if $(INCDIR) not a
>>> standard directory.
>>>
>>
>> If you have an installed version of VDR on your system (i.e. there is
>> a vdr.pc file in /usr/share/pkgconfig) and you 'make' a plugin from
>> within the plugin's source directory, the information stored in that
>> vdr.pc file will be used.
>>
>
> I think what Andreas means ist, that the INCDIR of the *installed* VDR
> headers is currently not included in the CXXFLAGS in vdr.pc. This causes
> plugins to not compile for themselves even if VDR has installed (using make
> install) before.
>

But it works without any problems here. You don't need to add
/usr/include or /usr/local/include to the CXXFLAGS because they are
always included.
I can't imagine a reason why the includedir should not be a "standard
directory".
  
Andreas Brachold Jan. 25, 2013, 4:23 p.m. UTC | #4
Hi,
        
Am Freitag, den 25.01.2013, 15:31 +0100 schrieb Christopher Reimer:
> I can't imagine a reason why the includedir should not be a "standard
> directory".
        
I use this, to install multiple versions side by side.
Please remember you, the program vdr-1.7.x is a developer version ...
        
Andreas
  
Christopher Reimer Jan. 25, 2013, 5 p.m. UTC | #5
Ever tried LCLBLD=1 or ONEDIR=1 ?

Christopher

2013/1/25 Andreas Brachold <ml08@deltab.de>:
> Hi,
>
> Am Freitag, den 25.01.2013, 15:31 +0100 schrieb Christopher Reimer:
>> I can't imagine a reason why the includedir should not be a "standard
>> directory".
>
> I use this, to install multiple versions side by side.
> Please remember you, the program vdr-1.7.x is a developer version ...
>
> Andreas
>
>
>
>
>
> _______________________________________________
> vdr mailing list
> vdr@linuxtv.org
> http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
  
Joachim Wilke Jan. 25, 2013, 5:45 p.m. UTC | #6
2013/1/25 Christopher Reimer <c.reimer1993@gmail.com>

> > I think what Andreas means ist, that the INCDIR of the *installed* VDR
> > headers is currently not included in the CXXFLAGS in vdr.pc. This causes
> > plugins to not compile for themselves even if VDR has installed (using
> make
> > install) before.
> >
>
> But it works without any problems here. You don't need to add
> /usr/include or /usr/local/include to the CXXFLAGS because they are
> always included.
> I can't imagine a reason why the includedir should not be a "standard
> directory".
>

So your imagination is limited. Nvertheless, it is no good practise to
expect something to be included by default.
As long as INCDIR or PREFIX can be changed in Make.config, this *has* to be
considered when creating vdr.pc. I'm not requesting a feature, I'm just
providing a bugfix.
  
Christopher Reimer Jan. 25, 2013, 6:31 p.m. UTC | #7
OK, OK, OK...

If it fixes your problem I don't see any problem with adding INCDIR to
CINCLUDES. I was a bit worried about the DESTDIR stuff, but this
change doesn't affect anything there.

Christopher

2013/1/25 Joachim Wilke <joachim.wilke@gmail.com>:
>
>
> 2013/1/25 Christopher Reimer <c.reimer1993@gmail.com>
>>
>> > I think what Andreas means ist, that the INCDIR of the *installed* VDR
>> > headers is currently not included in the CXXFLAGS in vdr.pc. This causes
>> > plugins to not compile for themselves even if VDR has installed (using
>> > make
>> > install) before.
>> >
>>
>> But it works without any problems here. You don't need to add
>> /usr/include or /usr/local/include to the CXXFLAGS because they are
>> always included.
>> I can't imagine a reason why the includedir should not be a "standard
>> directory".
>
>
> So your imagination is limited. Nvertheless, it is no good practise to
> expect something to be included by default.
> As long as INCDIR or PREFIX can be changed in Make.config, this *has* to be
> considered when creating vdr.pc. I'm not requesting a feature, I'm just
> providing a bugfix.
>
> _______________________________________________
> vdr mailing list
> vdr@linuxtv.org
> http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
>
  
Christopher Reimer Jan. 25, 2013, 7:57 p.m. UTC | #8
Hmm, it is problematic.

We can't make sure that "make plugins" uses the header files of the
current source tree.

plugins of 1.7.36 should be compiled against the 1.7.36 headers, even
if there are older header files in /usr/include/vdr.

2013/1/25 Christopher Reimer <c.reimer1993@gmail.com>:
> OK, OK, OK...
>
> If it fixes your problem I don't see any problem with adding INCDIR to
> CINCLUDES. I was a bit worried about the DESTDIR stuff, but this
> change doesn't affect anything there.
>
> Christopher
>
> 2013/1/25 Joachim Wilke <joachim.wilke@gmail.com>:
>>
>>
>> 2013/1/25 Christopher Reimer <c.reimer1993@gmail.com>
>>>
>>> > I think what Andreas means ist, that the INCDIR of the *installed* VDR
>>> > headers is currently not included in the CXXFLAGS in vdr.pc. This causes
>>> > plugins to not compile for themselves even if VDR has installed (using
>>> > make
>>> > install) before.
>>> >
>>>
>>> But it works without any problems here. You don't need to add
>>> /usr/include or /usr/local/include to the CXXFLAGS because they are
>>> always included.
>>> I can't imagine a reason why the includedir should not be a "standard
>>> directory".
>>
>>
>> So your imagination is limited. Nvertheless, it is no good practise to
>> expect something to be included by default.
>> As long as INCDIR or PREFIX can be changed in Make.config, this *has* to be
>> considered when creating vdr.pc. I'm not requesting a feature, I'm just
>> providing a bugfix.
>>
>> _______________________________________________
>> vdr mailing list
>> vdr@linuxtv.org
>> http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
>>
  
Marek Hajduk Jan. 25, 2013, 9:51 p.m. UTC | #9
s pozdravom

Marek Hajduk
France-tech s.r.o.
konatel spolocnosti

-----Original Message-----
From: Christopher Reimer <c.reimer1993@gmail.com>
Sender: vdr-bounces@linuxtv.org
Date: Fri, 25 Jan 2013 18:00:09 
To: VDR Mailing List<vdr@linuxtv.org>
Reply-To: VDR Mailing List <vdr@linuxtv.org>
Subject: Re: [vdr] [ANNOUNCE] VDR developer version 1.7.36

Ever tried LCLBLD=1 or ONEDIR=1 ?

Christopher

2013/1/25 Andreas Brachold <ml08@deltab.de>:
> Hi,
>
> Am Freitag, den 25.01.2013, 15:31 +0100 schrieb Christopher Reimer:
>> I can't imagine a reason why the includedir should not be a "standard
>> directory".
>
> I use this, to install multiple versions side by side.
> Please remember you, the program vdr-1.7.x is a developer version ...
>
> Andreas
>
>
>
>
>
> _______________________________________________
> vdr mailing list
> vdr@linuxtv.org
> http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
  
Joachim Wilke Jan. 26, 2013, 1:17 p.m. UTC | #10
2013/1/25 Christopher Reimer <c.reimer1993@gmail.com>:
> Hmm, it is problematic.
>
> We can't make sure that "make plugins" uses the header files of the
> current source tree.
>
> plugins of 1.7.36 should be compiled against the 1.7.36 headers, even
> if there are older header files in /usr/include/vdr.

This is an issue even without my suggested patch, right?
  
Christopher Reimer Jan. 26, 2013, 3:35 p.m. UTC | #11
No, I tried it and it works with and without your patch.

CINCLUDES has a lower priority, the order of the parameters matters.
And the default INCLUDE stuff comes after CXXFLAGS (CINCLUDES is a
part of CXXFLAGS in plugin makefiles)



2013/1/26 Joachim Wilke <joachim.wilke@gmail.com>:
> 2013/1/25 Christopher Reimer <c.reimer1993@gmail.com>:
>> Hmm, it is problematic.
>>
>> We can't make sure that "make plugins" uses the header files of the
>> current source tree.
>>
>> plugins of 1.7.36 should be compiled against the 1.7.36 headers, even
>> if there are older header files in /usr/include/vdr.
>
> This is an issue even without my suggested patch, right?
>
> --
> Best Regards,
> Joachim.
>
> _______________________________________________
> vdr mailing list
> vdr@linuxtv.org
> http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
  
Joachim Wilke Feb. 15, 2013, 10:14 a.m. UTC | #12
2013/1/26 Christopher Reimer <c.reimer1993@gmail.com>:
> No, I tried it and it works with and without your patch.
>
> CINCLUDES has a lower priority, the order of the parameters matters.
> And the default INCLUDE stuff comes after CXXFLAGS (CINCLUDES is a
> part of CXXFLAGS in plugin makefiles)

As the fix is not yet included in 1.7.37, is it scheduled for the next release?
  
Klaus Schmidinger Feb. 15, 2013, 10:28 a.m. UTC | #13
On 15.02.2013 11:14, Joachim Wilke wrote:
> 2013/1/26 Christopher Reimer <c.reimer1993@gmail.com>:
>> No, I tried it and it works with and without your patch.
>>
>> CINCLUDES has a lower priority, the order of the parameters matters.
>> And the default INCLUDE stuff comes after CXXFLAGS (CINCLUDES is a
>> part of CXXFLAGS in plugin makefiles)
>
> As the fix is not yet included in 1.7.37, is it scheduled for the next release?

I'm not planning to make any more changes to the Makefiles for version 2.0.0.

Klaus
  
Joachim Wilke Feb. 16, 2013, 10:43 a.m. UTC | #14
2013/2/15 Klaus Schmidinger <Klaus.Schmidinger@tvdr.de>:
> I'm not planning to make any more changes to the Makefiles for version
> 2.0.0.

So it will remain broken. Thats sad, I provided the patch already
before release of 1.7.37.
  
Klaus Schmidinger Feb. 16, 2013, 10:48 a.m. UTC | #15
On 16.02.2013 11:43, Joachim Wilke wrote:
> 2013/2/15 Klaus Schmidinger <Klaus.Schmidinger@tvdr.de>:
>> I'm not planning to make any more changes to the Makefiles for version
>> 2.0.0.
>
> So it will remain broken. Thats sad, I provided the patch already
> before release of 1.7.37.

Well, according to Christopher Reimer it isn't broken:

http://www.linuxtv.org/pipermail/vdr/2013-January/027173.html

Klaus
  
Dominic Evans Feb. 18, 2013, 8:51 p.m. UTC | #16
On 16 February 2013 10:48, Klaus Schmidinger <Klaus.Schmidinger@tvdr.de> wrote:
> On 16.02.2013 11:43, Joachim Wilke wrote:
>> 2013/2/15 Klaus Schmidinger <Klaus.Schmidinger@tvdr.de>:
>>> I'm not planning to make any more changes to the Makefiles for version
>>> 2.0.0.
>>
>> So it will remain broken. Thats sad, I provided the patch already
>> before release of 1.7.37.
>
> Well, according to Christopher Reimer it isn't broken:
> http://www.linuxtv.org/pipermail/vdr/2013-January/027173.html

Well. If you wanted to install different VDR versions to
/opt/vdr-$APIVERSION, you might have compiled with
PREFIX=/opt/vdr-$APIVERSION, and the header files would end up at
/opt/vdr-$APIVERSION/include which obviously isn't on the default
search path. Unless I'm misreading Christopher's e-mail just seemed to
say that this patch didn't make a difference to the problem he
described - that doesn't mean its not potentially useful.

Even if you don't add INCDIR directly to the CFLAGS/CXXFLAGS you could
add it to the pkg-config variables dumped into vdr.pc so that plugin
authors can use it if they need it. Currently its not available in
either place.
  
Klaus Schmidinger Feb. 19, 2013, 8:07 a.m. UTC | #17
On 18.02.2013 21:51, Dominic Evans wrote:
> On 16 February 2013 10:48, Klaus Schmidinger <Klaus.Schmidinger@tvdr.de> wrote:
>> On 16.02.2013 11:43, Joachim Wilke wrote:
>>> 2013/2/15 Klaus Schmidinger <Klaus.Schmidinger@tvdr.de>:
>>>> I'm not planning to make any more changes to the Makefiles for version
>>>> 2.0.0.
>>>
>>> So it will remain broken. Thats sad, I provided the patch already
>>> before release of 1.7.37.
>>
>> Well, according to Christopher Reimer it isn't broken:
>> http://www.linuxtv.org/pipermail/vdr/2013-January/027173.html
>
> Well. If you wanted to install different VDR versions to
> /opt/vdr-$APIVERSION, you might have compiled with
> PREFIX=/opt/vdr-$APIVERSION, and the header files would end up at
> /opt/vdr-$APIVERSION/include which obviously isn't on the default
> search path. Unless I'm misreading Christopher's e-mail just seemed to
> say that this patch didn't make a difference to the problem he
> described - that doesn't mean its not potentially useful.

If you do this, you will obviously have built VDR with LCLBLD=1
(and a copy of Make.config.template), in which case /opt/vdr-$APIVERSION/include
will be in the vdr.pc file as part of the CXXFLAGS.
Since you will need to build your plugins with

make VDRDIR=/opt/vdr-$APIVERSION

this will read /opt/vdr-$APIVERSION/vdr.pc and everything should work just fine.

> Even if you don't add INCDIR directly to the CFLAGS/CXXFLAGS you could
> add it to the pkg-config variables dumped into vdr.pc so that plugin
> authors can use it if they need it. Currently its not available in
> either place.

This has also been suggested here:

http://www.vdr-portal.de/board1-news/board2-vdr-news/p1127697-announce-vdr-developer-version-1-7-38/#post1127697

so if there are two more people who ACK this, I'll add it for the next version.

Klaus
  
Joachim Wilke Feb. 19, 2013, 9:24 a.m. UTC | #18
2013/2/19 Klaus Schmidinger <Klaus.Schmidinger@tvdr.de>:
> This has also been suggested here:
>
> http://www.vdr-portal.de/board1-news/board2-vdr-news/p1127697-announce-vdr-developer-version-1-7-38/#post1127697
>
> so if there are two more people who ACK this, I'll add it for the next
> version.

I think this is a valid option to solve the issue.

Regards,
Joachim.
  
Klaus Schmidinger Feb. 19, 2013, 10:52 a.m. UTC | #19
On 19.02.2013 09:07, Klaus Schmidinger wrote:
> On 18.02.2013 21:51, Dominic Evans wrote:
>> ...
>> Even if you don't add INCDIR directly to the CFLAGS/CXXFLAGS you could
>> add it to the pkg-config variables dumped into vdr.pc so that plugin
>> authors can use it if they need it. Currently its not available in
>> either place.
>
> This has also been suggested here:
>
> http://www.vdr-portal.de/board1-news/board2-vdr-news/p1127697-announce-vdr-developer-version-1-7-38/#post1127697
>
> so if there are two more people who ACK this, I'll add it for the next version.

I'm afraid I have to cancel this.
There was a valid point at

http://www.vdr-portal.de/board1-news/board2-vdr-news/p1127905-announce-vdr-developer-version-1-7-38/#post1127905

which stated that if plugins provide header files for other plugins,
we might end up having to compile/install the plugins in a very
specific order, which is unacceptable.

Klaus
  

Patch

--- Makefile.org	2013-01-12 14:45:01.000000000 +0100
+++ Makefile	2013-01-20 19:51:31.000000000 +0100
@@ -149,8 +149,9 @@ 
 	@echo "locdir=$(LOCDIR)" >> $@
 	@echo "plgcfg=$(PLGCFG)" >> $@
 	@echo "apiversion=$(APIVERSION)" >> $@
-	@echo "cflags=$(CFLAGS) $(CDEFINES) $(CINCLUDES) $(HDRDIR)" >> $@
-	@echo "cxxflags=$(CXXFLAGS) $(CDEFINES) $(CINCLUDES) $(HDRDIR)" >> $@
+	@echo "includedir=$(DESTDIR)$(INCDIR)" >> $@
+	@echo "cflags=$(CFLAGS) $(CDEFINES) $(CINCLUDES) $(HDRDIR) -I\$${includedir}" >> $@
+	@echo "cxxflags=$(CXXFLAGS) $(CDEFINES) $(CINCLUDES) $(HDRDIR) -I\$${includedir}" >> $@
 	@echo "" >> $@
 	@echo "Name: VDR" >> $@
 	@echo "Description: Video Disk Recorder" >> $@