-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FRR 4.0 Cross Compilation Issue #2131
Comments
for #958 I solved every problem, in what environment are you trying to do this ?
you need to pass more flags, look at the configure for openwrt, I'll update the PR in openwrt routing section, but replace the variables with ones that suits you
|
I am using Yocto Cross Compiler Toolchain to build the FRR from command line, is there a Yocto recipe available for FRR? Before running 'configure' the environment variables are set using the following script Do you see any issue in there? The --host=powerpc-fsl-linux is also set while running 'configure' $ /home/rajaram/Downloads/FRRouting/frr-frr-4.0/configure --host=powerpc-fsl-linux --prefix=/home/rajaram/frrouter/frr --sysconfdir=/home/rajaram/frrouter/frr_conf --localstatedir=/var/run --enable-user=root --enable-group=root |
when cross compile, you have to configure from a sub-folder (for clippy) |
these are your BUILD_* flags, you have to adjust them, also you need the HOST_* flags
|
I am not sure if I understood what changes you are asking me to do; What should be the value for HOST_CFLAGS, HOST_LDFLAGS? I have set values for BUILD_CFLAGS and BUILD_LDFLAGS same as CFLAGS and LDFLAGS respectively, BUILD_CPPFLAGS is empty. What other changes I need to make. Here are the steps I followed, and the result are same $ cd /home/rajaram/git $ git clone https://github.com/FRRouting/frr.git $ cd frr/ $ ./bootstrap.sh $ mkdir build $ cd build/ $ . /opt/fsl-networking/QorIQ-SDK-V1.7/environment-setup-ppce5500-fsl-linux $ ../configure |
it can be that SDK is building is own version of host compiler or libs, not only for crosscompile, but for using it on the system, maybe it is not available on the installed machine from your log uname -m = x86_64 so in hosttools you should have x86_64 stuff but you have powerpc
my cat hosttools/config log | grep CPP is
you have powerpc-fsl-linux-gcc ... |
maybe my example for a crosscompile on x86_64 to x86_64 (with other libs) is not so obvious, I can show you later a diff between an x86_64 and arm, but I think you got the idea of the problem |
I get that, the C compiler used is powerpc-fsl-linux-gcc, and so the executable produced cannot be run in the native x86_64 build PC and hence the below error
But why does it selects the cross gcc when it should be selecting the the native gcc? |
don't run
from that file so it suits your needs, maybe you only need to pass the $TARGET flags manually |
If I don't run the environment-setup-ppce5500-fsl-linux script then the cross toolchain path won't get set, and make compiles everything with the native gcc for the i386:x86-64 platform as shown in the objdump output
If I export the toolchain path before running configure, then it ends up in error
|
you're not doing it right, the TARGET_* flags are not just |
From your setup can you give me the value of
|
here is the whole configure line for an arm target built on x86_64 |
I ran in to this exact error as well. The problem turned out to be a missing dependency, If I've understood the cross-compilation process correctly, I think it would be helpful to wrap the sub- |
is this valid with the latest releases? |
@polychaeta autoclose in 1 day. |
hi, @rajaram-ghosh thanks |
I have been trying to cross compile the FRR 4.0 (d90b2b7), and it ends up with the following error; the issue is similar as reported in #1344 and #958
Attached are the config.log files
make[3]: Entering directory
/home/rajaram/frr-frr-4.0-builddir/hosttools' make[3]: *** No rule to make target
lib/route_types.h'. Stop.make[3]: Leaving directory
/home/rajaram/frr-frr-4.0-builddir/hosttools' make[2]: *** [hosttools/lib/clippy] Error 2 make[2]: Leaving directory
/home/rajaram/frr-frr-4.0-builddir'make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/rajaram/frr-frr-4.0-builddir'
make: *** [all] Error 2
frr_config.log.txt
frr_hosttools_config.log.txt
The text was updated successfully, but these errors were encountered: