DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] usertools: fix build with gcc
@ 2018-06-21  9:35 Choonho Son
  2018-06-21  9:35 ` Choonho Son
  0 siblings, 1 reply; 4+ messages in thread
From: Choonho Son @ 2018-06-21  9:35 UTC (permalink / raw)
  To: dev; +Cc: Choonho Son

If developer does not define DESTDIR variable,
dpdk-setup.sh fails to build with lack of environment variable

Build complete [x86_64-native-linuxapp-gcc]
Installation cannot run with T defined and DESTDIR undefined


Choonho Son (1):
  usertools: fix build with gcc

 usertools/dpdk-setup.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [dpdk-dev] [PATCH] usertools: fix build with gcc
  2018-06-21  9:35 [dpdk-dev] [PATCH] usertools: fix build with gcc Choonho Son
@ 2018-06-21  9:35 ` Choonho Son
  2018-06-21  9:55   ` Bruce Richardson
  0 siblings, 1 reply; 4+ messages in thread
From: Choonho Son @ 2018-06-21  9:35 UTC (permalink / raw)
  To: dev; +Cc: Choonho Son

dpdk-setup.sh fails to build with lack of environment variable

Build complete [x86_64-native-linuxapp-gcc]
Installation cannot run with T defined and DESTDIR undefined

Signed-off-by: Choonho Son <choonho.son@gmail.com>
---
 usertools/dpdk-setup.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/usertools/dpdk-setup.sh b/usertools/dpdk-setup.sh
index 5eebbce..5248e7a 100755
--- a/usertools/dpdk-setup.sh
+++ b/usertools/dpdk-setup.sh
@@ -65,6 +65,7 @@ setup_target()
 {
 	option=$1
 	export RTE_TARGET=${TARGETS[option]}
+	export DESTDIR=${DESTDIR:-install}
 
 	compiler=${RTE_TARGET##*-}
 	if [ "$compiler" == "icc" ] ; then
@@ -76,7 +77,7 @@ setup_target()
 		fi
 	fi
 	if [ "$QUIT" == "0" ] ; then
-		make install T=${RTE_TARGET}
+		make install T=${RTE_TARGET} DESTDIR=${DESTDIR}
 	fi
 	echo "------------------------------------------------------------------------------"
 	echo " RTE_TARGET exported as $RTE_TARGET"
-- 
2.7.4

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH] usertools: fix build with gcc
  2018-06-21  9:35 ` Choonho Son
@ 2018-06-21  9:55   ` Bruce Richardson
  2018-06-27 13:31     ` Thomas Monjalon
  0 siblings, 1 reply; 4+ messages in thread
From: Bruce Richardson @ 2018-06-21  9:55 UTC (permalink / raw)
  To: Choonho Son; +Cc: dev

On Thu, Jun 21, 2018 at 09:35:41AM +0000, Choonho Son wrote:
> dpdk-setup.sh fails to build with lack of environment variable
> 
> Build complete [x86_64-native-linuxapp-gcc]
> Installation cannot run with T defined and DESTDIR undefined
> 
> Signed-off-by: Choonho Son <choonho.son@gmail.com>
> ---
>  usertools/dpdk-setup.sh | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/usertools/dpdk-setup.sh b/usertools/dpdk-setup.sh
> index 5eebbce..5248e7a 100755
> --- a/usertools/dpdk-setup.sh
> +++ b/usertools/dpdk-setup.sh
> @@ -65,6 +65,7 @@ setup_target()
>  {
>  	option=$1
>  	export RTE_TARGET=${TARGETS[option]}
> +	export DESTDIR=${DESTDIR:-install}
>  
>  	compiler=${RTE_TARGET##*-}
>  	if [ "$compiler" == "icc" ] ; then
> @@ -76,7 +77,7 @@ setup_target()
>  		fi
>  	fi
>  	if [ "$QUIT" == "0" ] ; then
> -		make install T=${RTE_TARGET}
> +		make install T=${RTE_TARGET} DESTDIR=${DESTDIR}
>  	fi
>  	echo "------------------------------------------------------------------------------"
>  	echo " RTE_TARGET exported as $RTE_TARGET"

The message about no DESTDIR is not really an error, the build has
completed successfully. I don't think copying the build over to a new
directory is something we should always do as part of this script.

/Bruce

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH] usertools: fix build with gcc
  2018-06-21  9:55   ` Bruce Richardson
@ 2018-06-27 13:31     ` Thomas Monjalon
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Monjalon @ 2018-06-27 13:31 UTC (permalink / raw)
  To: Choonho Son; +Cc: dev, Bruce Richardson

21/06/2018 11:55, Bruce Richardson:
> On Thu, Jun 21, 2018 at 09:35:41AM +0000, Choonho Son wrote:
> > dpdk-setup.sh fails to build with lack of environment variable
> > 
> > Build complete [x86_64-native-linuxapp-gcc]
> > Installation cannot run with T defined and DESTDIR undefined
> > 
> > Signed-off-by: Choonho Son <choonho.son@gmail.com>
> > ---
[...]
> > -		make install T=${RTE_TARGET}
> > +		make install T=${RTE_TARGET} DESTDIR=${DESTDIR}
> 
> The message about no DESTDIR is not really an error, the build has
> completed successfully. I don't think copying the build over to a new
> directory is something we should always do as part of this script.

Absolutely!

The syntax "make install T=" is old.
It should be replaced by "make config T=" + "make".
You can look at devtools/test-build.sh to see how compilation can be done.
It is also documented in various places like:
	doc/guides/linux_gsg/build_dpdk.rst
	doc/guides/prog_guide/dev_kit_root_make_help.rst

More options:
	- use meson build system in dpdk-setup.sh - maybe too early
	- remove dpdk-setup.sh - maybe used by real users

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-06-27 13:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-21  9:35 [dpdk-dev] [PATCH] usertools: fix build with gcc Choonho Son
2018-06-21  9:35 ` Choonho Son
2018-06-21  9:55   ` Bruce Richardson
2018-06-27 13:31     ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).