Skip to contentSkip to conversation

rtptools: disable for MIPS Codescape toolchains

PATCH New Vicente Olivert Riera 2 participants 6 messages Mar 8, 2016 – Mar 9, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rtptools: disable for MIPS Codescape toolchains

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/

---
 package/rtptools/Config.in | 7 +++++++
 1 file changed, 7 insertions(+)
package/rtptools/Config.in +7 -0
index 80bbb7a..257be7f 100644
@@ -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
Signature · 1 line
2.4.10
#1 lore raw

PATCH 1/1 rtptools: disable for MIPS Codescape toolchains

Vicente,

Quoted 11 lines · Vicente Olivert Riera

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/

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

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#2 lore raw

PATCH 1/1 rtptools: disable for MIPS Codescape toolchains

Hello Thomas,

Quoted 9 lines · Thomas Petazzoni

Vicente,

Quoted 6 lines · Vicente Olivert Riera

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 */

Quoted 8 lines
Quoted 5 lines

Fixes:

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

Isn't the problem that the Codescape toolchain don't provide RPC support at all ?

Yes, that's the problem.

Quoted 4 lines

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.

Quoted 3 lines

Thomas

#3 lore raw

PATCH 1/1 rtptools: disable for MIPS Codescape toolchains

Hello,

Quoted 4 lines · Vicente Olivert Riera
Quoted 2 lines

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.

Quoted 5 lines
Quoted 2 lines

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

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#4 lore raw

PATCH 1/1 rtptools: disable for MIPS Codescape toolchains

Hello Thomas,

Quoted 27 lines · Thomas Petazzoni

Hello,

Quoted 4 lines · Vicente Olivert Riera
Quoted 2 lines

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.

Quoted 5 lines
Quoted 2 lines

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

Quoted 8 lines

#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.

Quoted 4 lines

Best regards,

Thomas

#5 lore raw

PATCH 1/1 rtptools: disable for MIPS Codescape toolchains

Hello,

Quoted 10 lines · Vicente Olivert Riera

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

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com