DPDK usage discussions
 help / color / mirror / Atom feed
* [dpdk-users] Build KNI module failed
@ 2021-04-27  9:42 Joakim Zhang
  2021-04-30 12:17 ` Juraj Linkeš
  2021-04-30 13:54 ` Juraj Linkeš
  0 siblings, 2 replies; 4+ messages in thread
From: Joakim Zhang @ 2021-04-27  9:42 UTC (permalink / raw)
  To: users, dev


Hi guys,

Is there anyone met gcc build error when build KNI module on Ubuntu to cross build ARM64?
I tried both gcc-linaro-6.5.0-2018.12-x86_64_aarch64-linux-gnu and gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu.

The error log as below, any comments would be appreciated! Thanks a lot! 
== Build kernel/linux/kni
  CC [M]  /home/zqq/dpdk/arm64-dpaa-linuxapp-gcc/build/kernel/linux/kni/kni_misc.o
aarch64-linux-gnu-gcc: error: unrecognized command line option '-mstack-protector-guard=sysreg'; did you mean '-fstack-protector-strong'?
aarch64-linux-gnu-gcc: error: unrecognized command line option '-mstack-protector-guard-reg=sp_el0'; did you mean '-fstack-protector-all'?
aarch64-linux-gnu-gcc: error: unrecognized command line option '-mstack-protector-guard-offset=1096'; did you mean '-fstack-protector-strong'?
scripts/Makefile.build:279: recipe for target '/home/zqq/dpdk/arm64-dpaa-linuxapp-gcc/build/kernel/linux/kni/kni_misc.o' failed

I search the source code, have not found these gcc command line options.

Best Regards,
Joakim Zhang


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

* Re: [dpdk-users] Build KNI module failed
  2021-04-27  9:42 [dpdk-users] Build KNI module failed Joakim Zhang
@ 2021-04-30 12:17 ` Juraj Linkeš
  2021-04-30 13:54 ` Juraj Linkeš
  1 sibling, 0 replies; 4+ messages in thread
From: Juraj Linkeš @ 2021-04-30 12:17 UTC (permalink / raw)
  To: Joakim Zhang, users, dev

Hi Joakim,

When I cross-compiled KNI I only used gcc that comes with Ubuntu, e.g.:
sudo apt install gcc-aarch64-linux-gnu libc6-dev-arm64-cross pkg-config-aarch64-linux-gnu

Which Ubuntu version are you using? The Ubuntu18.04 gcc works fine:
aarch64-linux-gnu-gcc -v
gcc version 7.5.0 (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04)

This is a bit strange, since the versions are the same/similar.

I am using this meson invocation:
meson kni-cross-gcc -Denable_kmods=true -Dkernel_dir=/home/jlinkes/linux --cross-file config/arm/arm64_armv8_linux_gcc

/home/jlinkes/linux is where I have my Linux git repo.

Juraj

> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Joakim Zhang
> Sent: Tuesday, April 27, 2021 11:43 AM
> To: users@dpdk.org; dev@dpdk.org
> Subject: [dpdk-dev] Build KNI module failed
> 
> 
> Hi guys,
> 
> Is there anyone met gcc build error when build KNI module on Ubuntu to cross
> build ARM64?
> I tried both gcc-linaro-6.5.0-2018.12-x86_64_aarch64-linux-gnu and gcc-linaro-
> 7.5.0-2019.12-x86_64_aarch64-linux-gnu.
> 
> The error log as below, any comments would be appreciated! Thanks a lot!
> == Build kernel/linux/kni
>   CC [M]  /home/zqq/dpdk/arm64-dpaa-linuxapp-
> gcc/build/kernel/linux/kni/kni_misc.o
> aarch64-linux-gnu-gcc: error: unrecognized command line option '-mstack-
> protector-guard=sysreg'; did you mean '-fstack-protector-strong'?
> aarch64-linux-gnu-gcc: error: unrecognized command line option '-mstack-
> protector-guard-reg=sp_el0'; did you mean '-fstack-protector-all'?
> aarch64-linux-gnu-gcc: error: unrecognized command line option '-mstack-
> protector-guard-offset=1096'; did you mean '-fstack-protector-strong'?
> scripts/Makefile.build:279: recipe for target '/home/zqq/dpdk/arm64-dpaa-
> linuxapp-gcc/build/kernel/linux/kni/kni_misc.o' failed
> 
> I search the source code, have not found these gcc command line options.
> 
> Best Regards,
> Joakim Zhang
> 



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

* Re: [dpdk-users] Build KNI module failed
  2021-04-27  9:42 [dpdk-users] Build KNI module failed Joakim Zhang
  2021-04-30 12:17 ` Juraj Linkeš
@ 2021-04-30 13:54 ` Juraj Linkeš
  2021-05-06  5:17   ` Joakim Zhang
  1 sibling, 1 reply; 4+ messages in thread
From: Juraj Linkeš @ 2021-04-30 13:54 UTC (permalink / raw)
  To: Joakim Zhang, users, dev

Maybe we actually need to step back a bit and talk about versions.

Which DPDK version are you using?
Why are you using the old make build system instead of Meson?

Support for KNI cross-compilation was only added recently to Meson and I don't know enough about the old Make system to comment on that.

Juraj

> -----Original Message-----
> From: Juraj Linkeš
> Sent: Friday, April 30, 2021 2:18 PM
> To: 'Joakim Zhang' <qiangqing.zhang@nxp.com>; users@dpdk.org;
> dev@dpdk.org
> Subject: RE: Build KNI module failed
> 
> Hi Joakim,
> 
> When I cross-compiled KNI I only used gcc that comes with Ubuntu, e.g.:
> sudo apt install gcc-aarch64-linux-gnu libc6-dev-arm64-cross pkg-config-
> aarch64-linux-gnu
> 
> Which Ubuntu version are you using? The Ubuntu18.04 gcc works fine:
> aarch64-linux-gnu-gcc -v
> gcc version 7.5.0 (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04)
> 
> This is a bit strange, since the versions are the same/similar.
> 
> I am using this meson invocation:
> meson kni-cross-gcc -Denable_kmods=true -Dkernel_dir=/home/jlinkes/linux --
> cross-file config/arm/arm64_armv8_linux_gcc
> 
> /home/jlinkes/linux is where I have my Linux git repo.
> 
> Juraj
> 
> > -----Original Message-----
> > From: dev <dev-bounces@dpdk.org> On Behalf Of Joakim Zhang
> > Sent: Tuesday, April 27, 2021 11:43 AM
> > To: users@dpdk.org; dev@dpdk.org
> > Subject: [dpdk-dev] Build KNI module failed
> >
> >
> > Hi guys,
> >
> > Is there anyone met gcc build error when build KNI module on Ubuntu to
> > cross build ARM64?
> > I tried both gcc-linaro-6.5.0-2018.12-x86_64_aarch64-linux-gnu and
> > gcc-linaro- 7.5.0-2019.12-x86_64_aarch64-linux-gnu.
> >
> > The error log as below, any comments would be appreciated! Thanks a lot!
> > == Build kernel/linux/kni
> >   CC [M]  /home/zqq/dpdk/arm64-dpaa-linuxapp-
> > gcc/build/kernel/linux/kni/kni_misc.o
> > aarch64-linux-gnu-gcc: error: unrecognized command line option
> > '-mstack- protector-guard=sysreg'; did you mean '-fstack-protector-strong'?
> > aarch64-linux-gnu-gcc: error: unrecognized command line option
> > '-mstack- protector-guard-reg=sp_el0'; did you mean '-fstack-protector-all'?
> > aarch64-linux-gnu-gcc: error: unrecognized command line option
> > '-mstack- protector-guard-offset=1096'; did you mean '-fstack-protector-
> strong'?
> > scripts/Makefile.build:279: recipe for target
> > '/home/zqq/dpdk/arm64-dpaa-
> > linuxapp-gcc/build/kernel/linux/kni/kni_misc.o' failed
> >
> > I search the source code, have not found these gcc command line options.
> >
> > Best Regards,
> > Joakim Zhang
> >



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

* Re: [dpdk-users] Build KNI module failed
  2021-04-30 13:54 ` Juraj Linkeš
@ 2021-05-06  5:17   ` Joakim Zhang
  0 siblings, 0 replies; 4+ messages in thread
From: Joakim Zhang @ 2021-05-06  5:17 UTC (permalink / raw)
  To: Juraj Linkeš, users, dev


Hi Juraj,

Thanks a lot for your kindly help :)

The reason why I failed to build KNI module from DPDK caused by the cross-compiler which Linux kernel used.

After I changed to use generic Linaro cross-compiler, instead of our internal ones, to build Linux kernel, then KNI module can pass build. It seems that our internal cross-compiler adds some compiler options.

Best Regards,
Joakim Zhang

> -----Original Message-----
> From: Juraj Linkeš <juraj.linkes@pantheon.tech>
> Sent: 2021年4月30日 21:54
> To: Joakim Zhang <qiangqing.zhang@nxp.com>; users@dpdk.org;
> dev@dpdk.org
> Subject: RE: Build KNI module failed
> 
> Maybe we actually need to step back a bit and talk about versions.
> 
> Which DPDK version are you using?
> Why are you using the old make build system instead of Meson?
> 
> Support for KNI cross-compilation was only added recently to Meson and I don't
> know enough about the old Make system to comment on that.
> 
> Juraj
> 
> > -----Original Message-----
> > From: Juraj Linkeš
> > Sent: Friday, April 30, 2021 2:18 PM
> > To: 'Joakim Zhang' <qiangqing.zhang@nxp.com>; users@dpdk.org;
> > dev@dpdk.org
> > Subject: RE: Build KNI module failed
> >
> > Hi Joakim,
> >
> > When I cross-compiled KNI I only used gcc that comes with Ubuntu, e.g.:
> > sudo apt install gcc-aarch64-linux-gnu libc6-dev-arm64-cross
> > pkg-config- aarch64-linux-gnu
> >
> > Which Ubuntu version are you using? The Ubuntu18.04 gcc works fine:
> > aarch64-linux-gnu-gcc -v
> > gcc version 7.5.0 (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04)
> >
> > This is a bit strange, since the versions are the same/similar.
> >
> > I am using this meson invocation:
> > meson kni-cross-gcc -Denable_kmods=true
> > -Dkernel_dir=/home/jlinkes/linux -- cross-file
> > config/arm/arm64_armv8_linux_gcc
> >
> > /home/jlinkes/linux is where I have my Linux git repo.
> >
> > Juraj
> >
> > > -----Original Message-----
> > > From: dev <dev-bounces@dpdk.org> On Behalf Of Joakim Zhang
> > > Sent: Tuesday, April 27, 2021 11:43 AM
> > > To: users@dpdk.org; dev@dpdk.org
> > > Subject: [dpdk-dev] Build KNI module failed
> > >
> > >
> > > Hi guys,
> > >
> > > Is there anyone met gcc build error when build KNI module on Ubuntu
> > > to cross build ARM64?
> > > I tried both gcc-linaro-6.5.0-2018.12-x86_64_aarch64-linux-gnu and
> > > gcc-linaro- 7.5.0-2019.12-x86_64_aarch64-linux-gnu.
> > >
> > > The error log as below, any comments would be appreciated! Thanks a lot!
> > > == Build kernel/linux/kni
> > >   CC [M]  /home/zqq/dpdk/arm64-dpaa-linuxapp-
> > > gcc/build/kernel/linux/kni/kni_misc.o
> > > aarch64-linux-gnu-gcc: error: unrecognized command line option
> > > '-mstack- protector-guard=sysreg'; did you mean '-fstack-protector-strong'?
> > > aarch64-linux-gnu-gcc: error: unrecognized command line option
> > > '-mstack- protector-guard-reg=sp_el0'; did you mean '-fstack-protector-all'?
> > > aarch64-linux-gnu-gcc: error: unrecognized command line option
> > > '-mstack- protector-guard-offset=1096'; did you mean
> > > '-fstack-protector-
> > strong'?
> > > scripts/Makefile.build:279: recipe for target
> > > '/home/zqq/dpdk/arm64-dpaa-
> > > linuxapp-gcc/build/kernel/linux/kni/kni_misc.o' failed
> > >
> > > I search the source code, have not found these gcc command line options.
> > >
> > > Best Regards,
> > > Joakim Zhang
> > >
> 


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

end of thread, other threads:[~2021-05-07  6:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-27  9:42 [dpdk-users] Build KNI module failed Joakim Zhang
2021-04-30 12:17 ` Juraj Linkeš
2021-04-30 13:54 ` Juraj Linkeš
2021-05-06  5:17   ` Joakim Zhang

DPDK usage discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/users/0 users/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 users users/ https://inbox.dpdk.org/users \
		users@dpdk.org
	public-inbox-index users

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.users


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git