Skip to content
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

Compilation issue for LEDE openwrt FRR 5.0. #2674

Closed
lion24 opened this issue Jul 17, 2018 · 2 comments
Closed

Compilation issue for LEDE openwrt FRR 5.0. #2674

lion24 opened this issue Jul 17, 2018 · 2 comments
Labels
build Issues with the build question Not a bug

Comments

@lion24
Copy link

lion24 commented Jul 17, 2018

Hi everyone !

I'm trying to compile FRR for my Linksys WRT1200AC at home. And autoconf is not able to set correct build parameter for cross-compilation.. It fails will the following error:


make[2]: Entering directory '/home/lionel/workspace/openwrt/feeds/routing/frr'
bash: /home/lionel/workspace/openwrt/staging_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/host/bin/gettext: No such file or directory
. /home/lionel/workspace/openwrt/include/shell.sh; xzcat /home/lionel/workspace/openwrt/dl/frr-5.0.tar.xz | tar -C /home/lionel/workspace/openwrt/build_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/frr-5.0/.. -xf - 
[ ! -d ./src/ ] || cp -fpR ./src/. /home/lionel/workspace/openwrt/build_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/frr-5.0

Applying ./patches/101-u_short_fix.patch using plaintext: 
patching file lib/log.h
Hunk #1 succeeded at 26 with fuzz 2 (offset 1 line).

Applying ./patches/102-include_ethernet.patch using plaintext: 
patching file zebra/if_netlink.c
Hunk #1 succeeded at 34 with fuzz 2 (offset 12 lines).

Applying ./patches/103-fix-configureac-openwrt.patch using plaintext: 
patching file configure.ac
Hunk #2 succeeded at 322 (offset -16 lines).
Hunk #3 succeeded at 514 (offset -18 lines).
touch /home/lionel/workspace/openwrt/build_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/frr-5.0/.prepared_4a096654f78a0608b0928d87377af3e468b329da9893e34099c7d8ad5cb9c940
rm -f /home/lionel/workspace/openwrt/staging_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/stamp/.frr_installed
(cd /home/lionel/workspace/openwrt/build_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/frr-5.0 && GETTEXT_VERSION= && /home/lionel/workspace/openwrt/staging_dir/host/bin/sed -i /home/lionel/workspace/openwrt/build_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/frr-5.0/configure.ac -e "s/AM_GNU_GETTEXT_VERSION(.*)/AM_GNU_GETTEXT_VERSION(\[$GETTEXT_VERSION\])/g" && /home/lionel/workspace/openwrt/staging_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/host/bin/autopoint --force );   (cd /home/lionel/workspace/openwrt/build_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/frr-5.0; rm -f aclocal.m4; if [ -f ./configure.ac ] || [ -f ./configure.in ]; then [ -d ./autom4te.cache ] && rm -rf autom4te.cache; [ -e ./config.rpath ] || ln -s /home/lionel/workspace/openwrt/scripts/config.rpath ./config.rpath; touch NEWS AUTHORS COPYING ABOUT-NLS ChangeLog; AUTOM4TE=/home/lionel/workspace/openwrt/staging_dir/host/bin/autom4te AUTOCONF=/home/lionel/workspace/openwrt/staging_dir/host/bin/autoconf AUTOMAKE=/home/lionel/workspace/openwrt/staging_dir/host/bin/automake ACLOCAL=/home/lionel/workspace/openwrt/staging_dir/host/bin/aclocal AUTOHEADER=/home/lionel/workspace/openwrt/staging_dir/host/bin/autoheader LIBTOOLIZE=/home/lionel/workspace/openwrt/staging_dir/host/bin/libtoolize LIBTOOL=/home/lionel/workspace/openwrt/staging_dir/host/bin/libtool M4=/home/lionel/workspace/openwrt/staging_dir/host/bin/m4 AUTOPOINT=true /home/lionel/workspace/openwrt/staging_dir/host/bin/autoreconf -v -f -i -s -B /home/lionel/workspace/openwrt/staging_dir/host/share/aclocal -I /home/lionel/workspace/openwrt/staging_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/host/share/aclocal -I /home/lionel/workspace/openwrt/staging_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/usr/share/aclocal -I m4 -I . . || true; fi; );
bash: /home/lionel/workspace/openwrt/staging_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/host/bin/autopoint: No such file or directory
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: /home/lionel/workspace/openwrt/staging_dir/host/bin/aclocal -I /home/lionel/workspace/openwrt/staging_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/host/share/aclocal -I /home/lionel/workspace/openwrt/staging_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/usr/share/aclocal -I m4 -I . --force -I m4
autoreconf: configure.ac: tracing
autoreconf: running: /home/lionel/workspace/openwrt/staging_dir/host/bin/libtoolize --force
OpenWrt-libtoolize: putting auxiliary files in `.'.
OpenWrt-libtoolize: linking file `./ltmain.sh'
OpenWrt-libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
OpenWrt-libtoolize: linking file `m4/libtool.m4'
OpenWrt-libtoolize: linking file `m4/ltoptions.m4'
OpenWrt-libtoolize: linking file `m4/ltsugar.m4'
OpenWrt-libtoolize: linking file `m4/ltversion.m4'
OpenWrt-libtoolize: linking file `m4/lt~obsolete.m4'
autoreconf: running: /home/lionel/workspace/openwrt/staging_dir/host/bin/autoconf --include=/home/lionel/workspace/openwrt/staging_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/host/share/aclocal --include=/home/lionel/workspace/openwrt/staging_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/usr/share/aclocal --include=m4 --include=. --prepend-include=/home/lionel/workspace/openwrt/staging_dir/host/share/aclocal --force
autoreconf: running: /home/lionel/workspace/openwrt/staging_dir/host/bin/autoheader --include=/home/lionel/workspace/openwrt/staging_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/host/share/aclocal --include=/home/lionel/workspace/openwrt/staging_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/usr/share/aclocal --include=m4 --include=. --prepend-include=/home/lionel/workspace/openwrt/staging_dir/host/share/aclocal --force
autoreconf: running: /home/lionel/workspace/openwrt/staging_dir/host/bin/automake --add-missing --force-missing
configure.ac:115: installing './compile'
configure.ac:25: installing './config.guess'
configure.ac:25: installing './config.sub'
configure.ac:60: installing './install-sh'
configure.ac:60: installing './missing'
Makefile.am: installing './INSTALL'
Makefile.am: installing './depcomp'
configure.ac: installing './ylwrap'
autoreconf: Leaving directory `.'
(cd /home/lionel/workspace/openwrt/build_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/frr-5.0/./; if [ -x ./configure ]; then find /home/lionel/workspace/openwrt/build_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/frr-5.0/ -name config.guess | xargs -r chmod u+w; find /home/lionel/workspace/openwrt/build_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/frr-5.0/ -name config.guess | xargs -r -n1 cp --remove-destination /home/lionel/workspace/openwrt/scripts/config.guess; find /home/lionel/workspace/openwrt/build_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/frr-5.0/ -name config.sub | xargs -r chmod u+w; find /home/lionel/workspace/openwrt/build_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/frr-5.0/ -name config.sub | xargs -r -n1 cp --remove-destination /home/lionel/workspace/openwrt/scripts/config.sub; AR="arm-openwrt-linux-muslgnueabi-gcc-ar" AS="arm-openwrt-linux-muslgnueabi-gcc -c -Os -pipe -mcpu=cortex-a9 -mfpu=vfpv3-d16 -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=hard -iremap/home/lionel/workspace/openwrt/build_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/frr-5.0:frr-5.0 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro" LD=arm-openwrt-linux-muslgnueabi-ld NM="arm-openwrt-linux-muslgnueabi-gcc-nm" CC="arm-openwrt-linux-muslgnueabi-gcc" GCC="arm-openwrt-linux-muslgnueabi-gcc" CXX="arm-openwrt-linux-muslgnueabi-g++" RANLIB="arm-openwrt-linux-muslgnueabi-gcc-ranlib" STRIP=arm-openwrt-linux-muslgnueabi-strip OBJCOPY=arm-openwrt-linux-muslgnueabi-objcopy OBJDUMP=arm-openwrt-linux-muslgnueabi-objdump SIZE=arm-openwrt-linux-muslgnueabi-size CFLAGS="-Os -pipe -mcpu=cortex-a9 -mfpu=vfpv3-d16 -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=hard -iremap/home/lionel/workspace/openwrt/build_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/frr-5.0:frr-5.0 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro " CXXFLAGS="-Os -pipe -mcpu=cortex-a9 -mfpu=vfpv3-d16 -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=hard -iremap/home/lionel/workspace/openwrt/build_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/frr-5.0:frr-5.0 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro " CPPFLAGS="-I/home/lionel/workspace/openwrt/staging_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/usr/include -I/home/lionel/workspace/openwrt/staging_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/include -I/home/lionel/workspace/openwrt/staging_dir/toolchain-arm_cortex-a9+vfpv3_gcc-5.4.0_musl-1.1.16_eabi/usr/include -I/home/lionel/workspace/openwrt/staging_dir/toolchain-arm_cortex-a9+vfpv3_gcc-5.4.0_musl-1.1.16_eabi/include/fortify -I/home/lionel/workspace/openwrt/staging_dir/toolchain-arm_cortex-a9+vfpv3_gcc-5.4.0_musl-1.1.16_eabi/include " LDFLAGS="-L/home/lionel/workspace/openwrt/staging_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/usr/lib -L/home/lionel/workspace/openwrt/staging_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/lib -L/home/lionel/workspace/openwrt/staging_dir/toolchain-arm_cortex-a9+vfpv3_gcc-5.4.0_musl-1.1.16_eabi/usr/lib -L/home/lionel/workspace/openwrt/staging_dir/toolchain-arm_cortex-a9+vfpv3_gcc-5.4.0_musl-1.1.16_eabi/lib -znow -zrelro "   ./configure --target=arm-openwrt-linux --host=arm-openwrt-linux --build=x86_64-redhat-linux --program-prefix="" --program-suffix="" --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/lib --sysconfdir=/etc --datadir=/usr/share --localstatedir=/var --mandir=/usr/man --infodir=/usr/info --disable-nls  CFLAGS="-Os -pipe -mcpu=cortex-a9 -mfpu=vfpv3-d16 -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=hard -iremap/home/lionel/workspace/openwrt/build_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/frr-5.0:frr-5.0 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro" BUILD_CFLAGS="-Os -pipe -mcpu=cortex-a9 -mfpu=vfpv3-d16 -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=hard -iremap/home/lionel/workspace/openwrt/build_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/frr-5.0:frr-5.0 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro" HOST_CFLAGS="" BUILD_CPPFLAGS="" BUILD_LDFLAGS="-L/home/lionel/workspace/openwrt/staging_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/usr/lib -L/home/lionel/workspace/openwrt/staging_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/lib -L/home/lionel/workspace/openwrt/staging_dir/toolchain-arm_cortex-a9+vfpv3_gcc-5.4.0_musl-1.1.16_eabi/usr/lib -L/home/lionel/workspace/openwrt/staging_dir/toolchain-arm_cortex-a9+vfpv3_gcc-5.4.0_musl-1.1.16_eabi/lib -znow -zrelro" --localstatedir=/var/run/frr --sysconfdir=/etc/frr/ --enable-shared --disable-static --enable-user=network --enable-group=network --enable-multipath=8 --disable-ospfclient --disable-capabilities --disable-doc --enable-zebra --disable-bgpd --disable-ldpd --disable-isisd --disable-nhrpd --disable-ospfd --disable-ospf6d --disable-pimd --disable-ripd --disable-ripngd --disable-vtysh  ; fi; )
configure: WARNING: unrecognized options: --disable-nls
configure: loading site script /home/lionel/workspace/openwrt/include/site/arm
checking build system type... x86_64-redhat-linux-gnu
checking host system type... arm-openwrt-linux-gnu
configure: error: cross-compilation is only possible with builddir separate from srcdir.  create a separate directory and run as .../path-to-frr/configure.
make[2]: *** [Makefile:337: /home/lionel/workspace/openwrt/build_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/frr-5.0/.configured_2be94bbf6df193ed1a174c46d3695115] Error 1
make[2]: Leaving directory '/home/lionel/workspace/openwrt/feeds/routing/frr'
make[1]: *** [package/Makefile:106: package/feeds/routing/frr/compile] Error 2
make[1]: Leaving directory '/home/lionel/workspace/openwrt'
make: *** [/home/lionel/workspace/openwrt/include/toplevel.mk:207: package/frr/compile] Error 2

The following FRR package I'm trying to compile is available on my github repository here: https://github.com/lion24/frr-openwrt

I know this is an issue solved in the past in #958 but I'm not able to find my way in. I tried the suggestion but none of them works.. And it still tries to run my own gcc compiler, even if I overwrite --build="$(GNU_HOST_NAME)" in the `CONFIGURE_ARGS´

checking build system type... x86_64-redhat-linux-gnu

Thanks for the support !

@qlyoung
Copy link
Member

qlyoung commented Jul 25, 2018

Hey - just wanted to say I've seen this issue and want to nail down our process for cross compiling (and document it!), I just haven't gotten around to it yet. Did you manage to get it built?

@qlyoung qlyoung added the question Not a bug label Jul 25, 2018
@cfra
Copy link
Member

cfra commented Aug 16, 2018

It is giving an error message detailing what to do:

configure: error: cross-compilation is only possible with builddir separate from srcdir. create a separate directory and run as .../path-to-frr/configure.

So to address this, when you are in the frr dir, run:

mkdir ../frr-build
cd ../frr-build
../frr/configure

You might run into other cross-compile issues, but this should address the error message you are seeing

@qlyoung qlyoung closed this as completed Feb 4, 2019
@qlyoung qlyoung added the build Issues with the build label Feb 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issues with the build question Not a bug
Projects
None yet
Development

No branches or pull requests

3 participants