diff mbox

rtptools: disable for MIPS Codescape toolchains

Message ID 1457446983-17165-1-git-send-email-Vincent.Riera@imgtec.com
State Changes Requested
Headers show

Commit Message

Vicente Olivert Riera March 8, 2016, 2:23 p.m. UTC
Codescape toolchains don't provide rpcsvc/ypclnt.h, therefore rtptools
fails to build showing an error like this one:

host2ip.c:13:38: fatal error: rpcsvc/ypclnt.h: No such file or directory
 #include <rpcsvc/ypclnt.h>   /* YP */

Fixes:

  http://autobuild.buildroot.net/results/5a8abdd4918a721c1bddbf68a16d99bea90a59a9/

Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
---
 package/rtptools/Config.in | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Thomas Petazzoni March 8, 2016, 3:32 p.m. UTC | #1
Vicente,

On Tue, 8 Mar 2016 14:23:03 +0000, Vicente Olivert Riera wrote:
> Codescape toolchains don't provide rpcsvc/ypclnt.h, therefore rtptools
> fails to build showing an error like this one:
> 
> host2ip.c:13:38: fatal error: rpcsvc/ypclnt.h: No such file or directory
>  #include <rpcsvc/ypclnt.h>   /* YP */
> 
> Fixes:
> 
>   http://autobuild.buildroot.net/results/5a8abdd4918a721c1bddbf68a16d99bea90a59a9/
> 
> Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>

Isn't the problem that the Codescape toolchain don't provide RPC
support at all ? Or is it really a bug limited to <rpcsvc/ypclnt.h>.

I don't really like to add random toolchain exclusions without a more
serious explanation than "header file is not in toolchain".

Thomas
Vicente Olivert Riera March 8, 2016, 4:03 p.m. UTC | #2
Hello Thomas,

On 08/03/16 15:32, Thomas Petazzoni wrote:
> Vicente,
> 
> On Tue, 8 Mar 2016 14:23:03 +0000, Vicente Olivert Riera wrote:
>> Codescape toolchains don't provide rpcsvc/ypclnt.h, therefore rtptools
>> fails to build showing an error like this one:
>>
>> host2ip.c:13:38: fatal error: rpcsvc/ypclnt.h: No such file or directory
>>  #include <rpcsvc/ypclnt.h>   /* YP */
>>
>> Fixes:
>>
>>   http://autobuild.buildroot.net/results/5a8abdd4918a721c1bddbf68a16d99bea90a59a9/
>>
>> Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
> 
> Isn't the problem that the Codescape toolchain don't provide RPC
> support at all ? 

Yes, that's the problem.

> Or is it really a bug limited to <rpcsvc/ypclnt.h>.
> 
> I don't really like to add random toolchain exclusions without a more
> serious explanation than "header file is not in toolchain".

Ok. Perhaps we should make rtptools package depeding on
BR2_TOOLCHAIN_HAS_NATIVE_RPC?


Regards,

Vincent.

> 
> Thomas
>
Thomas Petazzoni March 8, 2016, 4:11 p.m. UTC | #3
Hello,

On Tue, 8 Mar 2016 16:03:56 +0000, Vicente Olivert Riera wrote:

> > Isn't the problem that the Codescape toolchain don't provide RPC
> > support at all ? 
> 
> Yes, that's the problem.

Ah, OK. That's a different problem indeed.

> > I don't really like to add random toolchain exclusions without a more
> > serious explanation than "header file is not in toolchain".
> 
> Ok. Perhaps we should make rtptools package depeding on
> BR2_TOOLCHAIN_HAS_NATIVE_RPC?

Well, I just built rtptools with
http://autobuild.buildroot.org/toolchains/configs/br-arm-basic.config,
which does *not* have RPC support, and it builds fine. So it is not
simply that rtptools unconditionally needs RPC support. Looking at the
code, it does:

#ifndef __UCLIBC__
#define HAVE_YP
#endif

#ifdef HAVE_YP
#include <rpcsvc/ypclnt.h>   /* YP */
#endif


So it seems like it has special handling for uClibc. I think you should
replace this with an AC_CHECK_HEADERS test for rpcsvc/ypclnt.h, and use
the HAVE_<foo> variable that will be defined by this test.

Best regards,

Thomas
Vicente Olivert Riera March 9, 2016, 2 p.m. UTC | #4
Hello Thomas,

On 08/03/16 16:11, Thomas Petazzoni wrote:
> Hello,
> 
> On Tue, 8 Mar 2016 16:03:56 +0000, Vicente Olivert Riera wrote:
> 
>>> Isn't the problem that the Codescape toolchain don't provide RPC
>>> support at all ? 
>>
>> Yes, that's the problem.
> 
> Ah, OK. That's a different problem indeed.
> 
>>> I don't really like to add random toolchain exclusions without a more
>>> serious explanation than "header file is not in toolchain".
>>
>> Ok. Perhaps we should make rtptools package depeding on
>> BR2_TOOLCHAIN_HAS_NATIVE_RPC?
> 
> Well, I just built rtptools with
> http://autobuild.buildroot.org/toolchains/configs/br-arm-basic.config,
> which does *not* have RPC support, and it builds fine. So it is not
> simply that rtptools unconditionally needs RPC support. Looking at the
> code, it does:
> 
> #ifndef __UCLIBC__
> #define HAVE_YP
> #endif
> 
> #ifdef HAVE_YP
> #include <rpcsvc/ypclnt.h>   /* YP */
> #endif
> 
> 
> So it seems like it has special handling for uClibc. I think you should
> replace this with an AC_CHECK_HEADERS test for rpcsvc/ypclnt.h, and use
> the HAVE_<foo> variable that will be defined by this test.

the thing is that rtptools already includes its own ypclnt.h under the
"nt/include/rpcsvc" directory, so we could replace the code you wrote
above with something like this:

#ifndef __UCLIBC__
#include "nt/include/rpcsvc/ypclnt.h"
#endif

CC'ing Peter as he wrote the patch which adds that uClibc stuff to
host2ip.c.

Regards,

Vincent.

> Best regards,
> 
> Thomas
>
Thomas Petazzoni March 9, 2016, 2:05 p.m. UTC | #5
Hello,

On Wed, 9 Mar 2016 14:00:19 +0000, Vicente Olivert Riera wrote:

> the thing is that rtptools already includes its own ypclnt.h under the
> "nt/include/rpcsvc" directory, so we could replace the code you wrote
> above with something like this:
> 
> #ifndef __UCLIBC__
> #include "nt/include/rpcsvc/ypclnt.h"
> #endif
> 
> CC'ing Peter as he wrote the patch which adds that uClibc stuff to
> host2ip.c.

I haven't looked at the code, but it's not only about including a
header, Peter's patch also puts some code between HAVE_YP.

Thomas
diff mbox

Patch

diff --git a/package/rtptools/Config.in b/package/rtptools/Config.in
index 80bbb7a..257be7f 100644
--- a/package/rtptools/Config.in
+++ b/package/rtptools/Config.in
@@ -1,7 +1,14 @@ 
 config BR2_PACKAGE_RTPTOOLS
 	bool "rtptools"
+	# Codescape toolchains don't have rpcsvc/ypclnt.h
+	depends on !BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS && \
+		!BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS
 	help
 	  The rtptools distribution consists of a number of small
 	  applications that can be used for processing RTP data.
 
 	  http://www.cs.columbia.edu/irt/software/rtptools/
+
+comment "rtptools cannot be built with a MIPS Codescape toolchain"
+	depends on BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS || \
+		BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS