libtirpc: fix compilation error
PATCH 1/1 libtirpc: fix compilation error
when compiling libtirpc, rpcgen will fail with file not found on netconfig.h and rpc/types.h
adding the proper include path to the makefile fixes it.
--- package/libtirpc/0003-Add-rpcgen-program-from-nfs-utils-sources.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
package/libtirpc/0003-Add-rpcgen-program-from-nfs-utils-sources.patch +1 -1
@@ -83,7 +83,7 @@ index 0000000..2277b6f --- /dev/null +++ b/rpcgen/Makefile.am @@ -0,0 +1,22 @@ -+COMPILE = $(CC_FOR_BUILD) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ ++COMPILE = $(CC_FOR_BUILD) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) -I../tirpc $(AM_CPPFLAGS) \ + $(CPPFLAGS_FOR_BUILD) $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) +LINK = $(CC_FOR_BUILD) $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(AM_LDFLAGS) $(LDFLAGS_FOR_BUILD) -o $@ +
Signature · 1 line
2.15.1
PATCH 1/1 libtirpc: fix compilation error
Hello,
Quoted 5 lines · Dagg Stompler
when compiling libtirpc, rpcgen will fail with file not found on
netconfig.handrpc/types.h
adding the proper include path to the makefile fixes it.Signed-off-by Dagg Stompler <[email protected]>
Could you give more details about the failures? Is this fixing an autobuilder issue? Under what conditions does this happens? Why aren't the autobuilders seeing this problem?
Thanks,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
PATCH 1/1 libtirpc: fix compilation error
Greetings Thomas
Quoted 13 lines
Sent: Friday, December 29, 2017 at 3:38 PM
From: "Thomas Petazzoni" <[email protected]>
To: "Dagg Stompler" <[email protected]>
Cc: buildroot at buildroot.org
Subject: Re: [Buildroot] [PATCH] libtirpc: fix compilation errorHello,
Quoted 4 lines · Dagg Stompler
when compiling libtirpc, rpcgen will fail with file not found on
netconfig.handrpc/types.h
adding the proper include path to the makefile fixes it.
Quoted 5 lines
Quoted 1 line
Signed-off-by Dagg Stompler <[email protected]>Could you give more details about the failures? Is this fixing an autobuilder issue? Under what conditions does this happens? Why aren't the autobuilders seeing this problem?
here is an example error:
Quoted 1 line
Quoted 1 line
Quoted 1 line
libtirpc 1.0.2 Building
PATH="/home/dagg/workspace/buildroots/buildroot-master4/output/host/bin:/home/dagg/workspace/buildroots/buildroot-master4/output/host/sbin:/usr/x86_64-pc-linux-gnu/gcc-bin/7.2.0:/usr/x86_64-pc-linux-gnu/aarch64-unknown-linux-gnu/gcc-bin/5.4.0:/usr/x86_64-pc-linux-gnu/aarch64-unknown-linux-musl/gcc-bin/6.4.0:/usr/lib/llvm/5/bin:/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/games/bin:/usr/sbin:/usr/local/bin" /usr/bin/make -j9 -C /home/dagg/workspace/buildroots/buildroot-master4/output/build/libtirpc-1.0.2/ make[1]: Entering directory '/home/dagg/workspace/buildroots/buildroot-master4/output/build/libtirpc-1.0.2'
cd rpcgen && /usr/bin/make
make[2]: Entering directory '/home/dagg/workspace/buildroots/buildroot-master4/output/build/libtirpc-1.0.2/rpcgen'
CC rpc_clntout.o
CC rpc_cout.o
CC rpc_hout.o
CC rpc_main.o
CC rpc_parse.o
CC rpc_sample.o
CC rpc_scan.o
CC rpc_svcout.o
CC rpc_tblout.o
rpc_parse.c:39:10: fatal error: rpc/types.h: No such file or directory
#include "rpc/types.h"
^~~~~~~~~~~~~compilation terminated.
make[2]: *** [Makefile:412: rpc_parse.o] Error 1
make[2]: *** Waiting for unfinished jobs....rpc_tblout.c: In function ?write_table?:
rpc_tblout.c:97:18: warning: format not a string literal and no format arguments [-Wformat-security]
f_print(fout, null_entry);
^~~~~~~~~~rpc_hout.c: In function ?pdeclaration?:
rpc_hout.c:470:2: warning: format not a string literal and no format arguments [-Wformat-security]
f_print(fout, separator );
^~~~~~~
rpc_tblout.c:137:17: warning: format not a string literal and no format arguments [-Wformat-security]
f_print(fout, tbl_end);
^~~~~~~
rpc_svcout.c: In function ?write_real_program?:
rpc_svcout.c:296:8: warning: format not a string literal and no format arguments [-Wformat-security]
f_print(fout, proc->args.argname);
^~~~~~~
rpc_clntout.c:39:10: fatal error: rpc/types.h: No such file or directory
#include <rpc/types.h>
^~~~~~~~~~~~~compilation terminated.
make[2]: *** [Makefile:412: rpc_clntout.o] Error 1rpc_main.c: In function ?h_output?:
rpc_main.c:504:17: warning: format not a string literal and no format arguments [-Wformat-security]
f_print(fout, rpcgen_table_dcl);
^~~~~~~~~~~~~~~~make[2]: Leaving directory '/home/dagg/workspace/buildroots/buildroot-master4/output/build/libtirpc-1.0.2/rpcgen' make[1]: *** [Makefile:985: rpcgen/rpcgen] Error 2
make[1]: Leaving directory '/home/dagg/workspace/buildroots/buildroot-master4/output/build/libtirpc-1.0.2'
make: *** [package/pkg-generic.mk:250: /home/dagg/workspace/buildroots/buildroot-master4/output/build/libtirpc-1.0.2/.stamp_built] Error 2
config to reproduce:
BR2_x86_i686=y
BR2_PACKAGE_LIBTIRPC=y
no idea why the autobuilds didn't caught it.
Dagg.
PATCH 1/1 libtirpc: fix compilation error
Hello,
Quoted 5 lines · daggs
config to reproduce:
BR2_x86_i686=y
BR2_PACKAGE_LIBTIRPC=yno idea why the autobuilds didn't caught it.
I initially couldn't reproduce it, but after thinking more about the problem, I understood what happened: you don't have RPC support installed in your host system. The build of the rpcgen host program fails to build because it can't find those headers, which on my system (or the autobuilder instances) are provided system-wide.
So indeed, your patch is correct. Just the explanation was not sufficient, so I've reworded the commit log accordingly.
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
PATCH 1/1 libtirpc: fix compilation error
Greetings Thomas,
Quoted 5 lines
Quoted 5 lines
config to reproduce:
BR2_x86_i686=y
BR2_PACKAGE_LIBTIRPC=y
Quoted 7 lines
Quoted 1 line
no idea why the autobuilds didn't caught it.
I initially couldn't reproduce it, but after thinking more about the problem, I understood what happened: you don't have RPC support installed in your host system. The build of the rpcgen host program fails to build because it can't find those headers, which on my system (or the autobuilder instances) are provided system-wide.
weird, I have it too on my system:
dagg at NCC-5001-D ~ $ ll /usr/include/tirpc/rpc/types.h -rw-r--r-- 1 root root 3270 Dec 1 15:44 /usr/include/tirpc/rpc/types.h dagg at NCC-5001-D ~ $ eix net-libs/libtirpc
[I] net-libs/libtirpc
Available versions: 1.0.1-r1(0/3) 1.0.2-r1(0/3) [m]1.0.2-r1(0/3)[1] {ipv6 kerberos static-libs ABI_MIPS="n32 n64 o32" ABI_PPC="32 64" ABI_S390="32 64" ABI_X86="32 64 x32"}
Installed versions: 1.0.2-r1(0/3)(15:44:39 01/12/17)(-ipv6 -kerberos -static-libs ABI_MIPS="-n32 -n64 -o32" ABI_PPC="-32 -64" ABI_S390="-32 -64" ABI_X86="64 -32 -x32")
Homepage: http://libtirpc.sourceforge.net/
Description: Transport Independent RPC library (SunRPC replacement)[1] "musl" /var/lib/layman/musl
dagg at NCC-5001-D ~ $ qfile /usr/include/tirpc/rpc/types.h net-libs/libtirpc (/usr/include/tirpc/rpc/types.h)
I wonder why it didn't reproduced when you tried it.
maybe it is a global include config or something, does buildroot appends to existing includes or uses a blanked one?
Quoted 3 lines
So indeed, your patch is correct. Just the explanation was not sufficient, so I've reworded the commit log accordingly.
I was never good with words, thanks!
Dagg.
PATCH 1/1 libtirpc: fix compilation error
Hello,
Quoted 8 lines · daggs
Quoted 5 lines
I initially couldn't reproduce it, but after thinking more about the problem, I understood what happened: you don't have RPC support installed in your host system. The build of the rpcgen host program fails to build because it can't find those headers, which on my system (or the autobuilder instances) are provided system-wide.
weird, I have it too on my system:
dagg at NCC-5001-D ~ $ ll/usr/include/tirpc/rpc/types.h-rw-r--r-- 1 root root 3270 Dec 1 15:44/usr/include/tirpc/rpc/types.h
Notice how it is in /usr/include/tirpc, while on my system it is in:
$ ls -l /usr/include/rpc/types.h -rw-r--r-- 1 root root 3233 Dec 6 18:20 /usr/include/rpc/types.h
So, in your system, a #include <rpc/types.h> doesn't find it, while it does on my system. I believe it's because on your system, the RPC implementation comes from libtirpc, while on my system, it comes from glibc.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com