* [Buildroot] [PATCH] libtirpc: fix compilation error
@ 2017-12-29 13:03 Dagg Stompler
2017-12-29 13:38 ` Thomas Petazzoni
0 siblings, 1 reply; 6+ messages in thread
From: Dagg Stompler @ 2017-12-29 13:03 UTC (permalink / raw)
To: buildroot
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.
Signed-off-by: Dagg Stompler <daggs@gmx.com>
---
package/libtirpc/0003-Add-rpcgen-program-from-nfs-utils-sources.patch | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package/libtirpc/0003-Add-rpcgen-program-from-nfs-utils-sources.patch b/package/libtirpc/0003-Add-rpcgen-program-from-nfs-utils-sources.patch
index 1cf861417c..f2b15fe2f1 100644
--- a/package/libtirpc/0003-Add-rpcgen-program-from-nfs-utils-sources.patch
+++ b/package/libtirpc/0003-Add-rpcgen-program-from-nfs-utils-sources.patch
@@ -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 $@
+
--
2.15.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] libtirpc: fix compilation error
2017-12-29 13:03 [Buildroot] [PATCH] libtirpc: fix compilation error Dagg Stompler
@ 2017-12-29 13:38 ` Thomas Petazzoni
2017-12-29 14:24 ` daggs
0 siblings, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2017-12-29 13:38 UTC (permalink / raw)
To: buildroot
Hello,
On Fri, 29 Dec 2017 15:03:33 +0200, Dagg Stompler wrote:
> 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.
>
> Signed-off-by: Dagg Stompler <daggs@gmx.com>
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
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] libtirpc: fix compilation error
2017-12-29 13:38 ` Thomas Petazzoni
@ 2017-12-29 14:24 ` daggs
2017-12-29 21:23 ` Thomas Petazzoni
0 siblings, 1 reply; 6+ messages in thread
From: daggs @ 2017-12-29 14:24 UTC (permalink / raw)
To: buildroot
Greetings Thomas
> Sent: Friday, December 29, 2017 at 3:38 PM
> From: "Thomas Petazzoni" <thomas.petazzoni@free-electrons.com>
> To: "Dagg Stompler" <daggs@gmx.com>
> Cc: buildroot at buildroot.org
> Subject: Re: [Buildroot] [PATCH] libtirpc: fix compilation error
>
> Hello,
>
> On Fri, 29 Dec 2017 15:03:33 +0200, Dagg Stompler wrote:
> > 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.
> >
> > Signed-off-by: Dagg Stompler <daggs@gmx.com>
>
> 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:
>>> 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 1
rpc_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.
^ permalink raw reply [flat|nested] 6+ messages in thread* [Buildroot] [PATCH] libtirpc: fix compilation error
2017-12-29 14:24 ` daggs
@ 2017-12-29 21:23 ` Thomas Petazzoni
2017-12-30 6:44 ` daggs
0 siblings, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2017-12-29 21:23 UTC (permalink / raw)
To: buildroot
Hello,
On Fri, 29 Dec 2017 15:24:11 +0100, daggs wrote:
> config to reproduce:
> BR2_x86_i686=y
> BR2_PACKAGE_LIBTIRPC=y
>
> 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.
So indeed, your patch is correct. Just the explanation was not
sufficient, so I've reworded the commit log accordingly.
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] libtirpc: fix compilation error
2017-12-29 21:23 ` Thomas Petazzoni
@ 2017-12-30 6:44 ` daggs
2017-12-30 10:51 ` Thomas Petazzoni
0 siblings, 1 reply; 6+ messages in thread
From: daggs @ 2017-12-30 6:44 UTC (permalink / raw)
To: buildroot
Greetings Thomas,
>
> > config to reproduce:
> > BR2_x86_i686=y
> > BR2_PACKAGE_LIBTIRPC=y
> >
> > 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?
>
> 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.
^ permalink raw reply [flat|nested] 6+ messages in thread* [Buildroot] [PATCH] libtirpc: fix compilation error
2017-12-30 6:44 ` daggs
@ 2017-12-30 10:51 ` Thomas Petazzoni
0 siblings, 0 replies; 6+ messages in thread
From: Thomas Petazzoni @ 2017-12-30 10:51 UTC (permalink / raw)
To: buildroot
Hello,
On Sat, 30 Dec 2017 07:44:43 +0100, daggs wrote:
> > 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
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-12-30 10:51 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-29 13:03 [Buildroot] [PATCH] libtirpc: fix compilation error Dagg Stompler
2017-12-29 13:38 ` Thomas Petazzoni
2017-12-29 14:24 ` daggs
2017-12-29 21:23 ` Thomas Petazzoni
2017-12-30 6:44 ` daggs
2017-12-30 10:51 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox