Please try this sequence from the top of your workspace: $ make bootstrap $ make PLATFORM=<yours> build
That’s the “supported, plan-A” scheme. If it doesn’t work, please let us know. If you specify PLATFORM when building host tools (i.e. vppapigen), it won’t work. Thanks… Dave From: nikhil ap [mailto:niks3...@gmail.com] Sent: Thursday, December 7, 2017 10:58 PM To: Dave Barach (dbarach) <dbar...@cisco.com> Cc: vpp-dev@lists.fd.io Subject: Re: [vpp-dev] Build error when trying to cross-compile vpp Hi Dave, It works if I run, "make is_build_tool=yes tools-install" in .../build-root but if I specify the platform, I still see the same issue if I try to cross-compile tools with make PLATFORM=x86_64 TAG=x86_64_debug is_build_tool=yes tools-install It is hitting this configuration in ../src/configure.ac<http://configure.ac> AM_COND_IF([CROSSCOMPILE], [ AC_PATH_PROG([VPPAPIGEN], [vppapigen], [no]) if test "$VPPAPIGEN" = "no"; then AC_MSG_ERROR([Externaly built vppapigen is needed when cross-compiling...]) fi ],[ On Tue, Dec 5, 2017 at 8:53 PM, Dave Barach (dbarach) <dbar...@cisco.com<mailto:dbar...@cisco.com>> wrote: See also “bootstrap.sh...” $ make V=0 is_build_tool=yes tools-install Thanks… Dave From: nikhil ap [mailto:niks3...@gmail.com<mailto:niks3...@gmail.com>] Sent: Tuesday, December 5, 2017 9:11 AM To: Dave Barach (dbarach) <dbar...@cisco.com<mailto:dbar...@cisco.com>> Cc: vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io> Subject: Re: [vpp-dev] Build error when trying to cross-compile vpp Hi Dave, I added a file x86_64.mk<http://x86_64.mk> in .../build-data/plaforms/ with the following content: x86_64_arch = x86_64 x86_64_os = rumprun-netbsd x86_64_target = x86_64-rumprun-netbsd x86_64_native_tools = vppapigen x86_64_uses_dpdk = yes and in the TLD I did a "make PLATFORM=x86_64 TAG=x86_64_debug bootstrap" but I am still seeing that vppapigen is not getting built. Any clues? Thanks, Nikhil On Tue, Dec 5, 2017 at 7:05 PM, Dave Barach (dbarach) <dbar...@cisco.com<mailto:dbar...@cisco.com>> wrote: Dear Nikhil, The first step in adding a new platform: construct .../build-data/plaforms/xxx.mk<http://xxx.mk>. There are several examples. Note the rule: xxx_native_tools = vppapigen This rule builds the missing build-host tool. Then: “make PLATFORM=xxx TAG=xxx_debug vpp-install” or similar. Caveat: the main Makefile “.../build-root/Makefile” is non-trivial. In the past, we’ve used it to self-compile full toolchains, and to use the resulting toolchains to cross-compile embedded Linux images with squashfs / unionfs disk images. All of the mechanisms are there to do interesting things, but since we seldom do those things anymore you can expect a certain amount of trouble. Thanks… Dave From: vpp-dev-boun...@lists.fd.io<mailto:vpp-dev-boun...@lists.fd.io> [mailto:vpp-dev-boun...@lists.fd.io<mailto:vpp-dev-boun...@lists.fd.io>] On Behalf Of nikhil ap Sent: Tuesday, December 5, 2017 6:05 AM To: vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io> Subject: Re: [vpp-dev] Build error when trying to cross-compile vpp After a bit more digging around the make file, I did this: make PLATFORM=x86_64 x86_64_os=rumprun-netbsd bootstrap checking build system type... x86_64-pc-linux-gnu checking host system type... x86_64-rumprun-netbsd checking whether we are cross compiling... yes However, I am still seeing this error: checking for vppapigen... no configure: error: Externaly built vppapigen is needed when cross-compiling... Makefile:635: recipe for target 'tools-configure' failed make[1]: *** [tools-configure] Error 1 What is the issue? On Tue, Dec 5, 2017 at 3:55 PM, nikhil ap <niks3...@gmail.com<mailto:niks3...@gmail.com>> wrote: Hi All, I am trying to cross-compile vpp. The make doesn't expose a way to pass the --host parameter required to configure and build using cross compilation. Initially, I did the following: CC=x86_64-rumprun-netbsd-gcc make bootstrap, but I saw the following error If you meant to cross compile, use `--host'. See `config.log' for more details As a work-around based on the config.log, I did this following /src/configure (Stripped other output ) --build=x86_64-linux-gnu --host=x86_64-rumprun-netbsd --target=x86_64-linux-gnu However, I saw the following error: checking for vppapigen... no configure: error: Externaly built vppapigen is needed when cross-compiling... Is there a way to cleanly cross-compile? -- Regards, Nikhil -- Regards, Nikhil -- Regards, Nikhil -- Regards, Nikhil
_______________________________________________ vpp-dev mailing list vpp-dev@lists.fd.io https://lists.fd.io/mailman/listinfo/vpp-dev