Hi, I wanted to install bird on my Netgear R7000 router running Shibby Tomato firmware. As there were no optware packages available, I decided to compile one myself. I have followed instructions for compiling bird from http://www.nslu2-linux.org/wiki/Optware/AddAPackageToOptware. I was compiling both 1.4.0 and 1.4.5. Compilation required the following patch:
--- sysdep/unix/io.c.orig 2014-11-02 02:47:28.000000000 -0800 +++ sysdep/unix/io.c 2014-11-02 02:49:11.000000000 -0800 @@ -11,6 +11,10 @@ if _GNU_SOURCE is not defined. */ #define _GNU_SOURCE 1 +#ifndef IPV6_V6ONLY +#define IPV6_V6ONLY 27 +#endif + #include <stdio.h> #include <stdlib.h> #include <time.h> as for some reason IPV6_V6ONLY was not defined in my cross-compiling platform (Ubuntu 7.10 64-bit). Here is the configure I used: AR=/home/rejsmont/src/optware/mbwe-bluering/toolchain/mbwe-bluering-buildroot/build_arm_nofpu/staging_dir/bin/arm-linux-uclibc-ar AS=/home/rejsmont/src/optware/mbwe-bluering/toolchain/mbwe-bluering-buildroot/build_arm_nofpu/staging_dir/bin/arm-linux-uclibc-as LD=/home/rejsmont/src/optware/mbwe-bluering/toolchain/mbwe-bluering-buildroot/build_arm_nofpu/staging_dir/bin/arm-linux-uclibc-ld NM=/home/rejsmont/src/optware/mbwe-bluering/toolchain/mbwe-bluering-buildroot/build_arm_nofpu/staging_dir/bin/arm-linux-uclibc-nm CC=/home/rejsmont/src/optware/mbwe-bluering/toolchain/mbwe-bluering-buildroot/build_arm_nofpu/staging_dir/bin/arm-linux-uclibc-gcc CPP="/home/rejsmont/src/optware/mbwe-bluering/toolchain/mbwe-bluering-buildroot/build_arm_nofpu/staging_dir/bin/arm-linux-uclibc-gcc -E" GCC=/home/rejsmont/src/optware/mbwe-bluering/toolchain/mbwe-bluering-buildroot/build_arm_nofpu/staging_dir/bin/arm-linux-uclibc-gcc CXX=/home/rejsmont/src/optware/mbwe-bluering/toolchain/mbwe-bluering-! buildroot/build_arm_nofpu/staging_dir/bin/arm-linux-uclibc-g++ RANLIB=/home/rejsmont/src/optware/mbwe-bluering/toolchain/mbwe-bluering-buildroot/build_arm_nofpu/staging_dir/bin/arm-linux-uclibc-ranlib STRIP=/home/rejsmont/src/optware/mbwe-bluering/toolchain/mbwe-bluering-buildroot/build_arm_nofpu/staging_dir/bin/arm-linux-uclibc-strip \ CPPFLAGS="-O2 -pipe -I/home/rejsmont/src/optware/mbwe-bluering/staging/opt/include " \ LDFLAGS=" -L/home/rejsmont/src/optware/mbwe-bluering/staging/opt/lib -Wl,-rpath,/opt/lib -Wl,-rpath-link,/home/rejsmont/src/optware/mbwe-bluering/staging/opt/lib " \ ./configure \ --build=x86_64-pc-linux-gnu \ --host=arm-linux \ --target=arm-linux \ --prefix=/opt \ --sysconfdir=/opt/etc/bird \ --enable-ipv6 checking for arm-linux-gcc... /home/rejsmont/src/optware/mbwe-bluering/toolchain/mbwe-bluering-buildroot/build_arm_nofpu/staging_dir/bin/arm-linux-uclibc-gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... yes checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether /home/rejsmont/src/optware/mbwe-bluering/toolchain/mbwe-bluering-buildroot/build_arm_nofpu/staging_dir/bin/arm-linux-uclibc-gcc accepts -g... yes checking for /home/rejsmont/src/optware/mbwe-bluering/toolchain/mbwe-bluering-buildroot/build_arm_nofpu/staging_dir/bin/arm-linux-uclibc-gcc option to accept ISO C89... none needed checking for library containing clock_gettime... none required checking build system type... x86_64-pc-linux-gnu checking host system type... arm-unknown-linux-gnu checking for arm-linux-gcc... (cached) /home/rejsmont/src/optware/mbwe-bluering/toolchain/mbwe-bluering-buildroot/build_arm_nofpu/staging_dir/bin/arm-linux-uclibc-gcc checking whether we are using the GNU C compiler... (cached) yes checking whether /home/rejsmont/src/optware/mbwe-bluering/toolchain/mbwe-bluering-buildroot/build_arm_nofpu/staging_dir/bin/arm-linux-uclibc-gcc accepts -g... (cached) yes checking for /home/rejsmont/src/optware/mbwe-bluering/toolchain/mbwe-bluering-buildroot/build_arm_nofpu/staging_dir/bin/arm-linux-uclibc-gcc option to accept ISO C89... (cached) none needed checking whether POSIX threads are available... no checking whether CC supports -Wno-pointer-sign... no checking whether CC supports -fno-strict-aliasing... yes checking whether CC supports -fno-strict-overflow... no checking CFLAGS... -g -O2 -Wall -Wstrict-prototypes -Wno-parentheses -fno-strict-aliasing checking how to run the C preprocessor... /home/rejsmont/src/optware/mbwe-bluering/toolchain/mbwe-bluering-buildroot/build_arm_nofpu/staging_dir/bin/arm-linux-uclibc-gcc -E checking for a BSD-compatible install... /usr/bin/install -c checking for arm-linux-ranlib... /home/rejsmont/src/optware/mbwe-bluering/toolchain/mbwe-bluering-buildroot/build_arm_nofpu/staging_dir/bin/arm-linux-uclibc-ranlib checking for flex... flex checking for bison... bison checking for gm4... no checking for m4... m4 checking which OS configuration should we use... ./sysdep/cf/linux-v6.h checking system-dependent directories... sysdep/linux sysdep/unix lib checking protocols... ok checking for linux/rtnetlink.h... yes checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking syslog.h usability... yes checking syslog.h presence... yes checking for syslog.h... yes checking alloca.h usability... yes checking alloca.h presence... yes checking for alloca.h... yes checking whether 'struct sockaddr' has sa_len... no checking whether byte ordering is bigendian... no checking size of char... 1 checking size of short int... 2 checking size of int... 4 checking size of long int... 4 checking size of long long int... 8 checking for 8-bit type... char checking for 16-bit type... short int checking for 32-bit type... int checking for 64-bit type... long long int checking usual alignment of structures... 16 checking characteristics of time_t... 32-bit signed checking for struct ip_mreqn... yes checking for add_history in -lhistory... yes checking for tgetent in -lncurses... yes checking for rl_callback_read_char in -lreadline... yes checking for rl_crlf in -lreadline... yes checking for rl_ding in -lreadline... yes configure: creating ./config.status config.status: creating Makefile config.status: creating obj/Makefile config.status: creating obj/Rules config.status: creating obj/sysdep/autoconf.h config.status: executing merge commands Merging system-dependent modules (sysdep/linux sysdep/unix lib) BIRD was configured with the following options: Source directory: . Object directory: obj Iproute2 directory: /etc/iproute2 System configuration: ./sysdep/cf/linux-v6.h Debugging: no POSIX threads: no Routing protocols: bgp ospf pipe radv rip static Client: yes Bird has compiled fine, but when I established connections with my two other routers (running ubuntu precise 64-bit) I got the following in my router’s syslog: Nov 2 19:27:16 router-2 daemon.err bird6: Bad OSPF DBDES packet from fe80::xxxx:xxxx:xxxx:f300 - too short (28 B) Nov 2 19:27:16 router-2 daemon.err bird6: Bad OSPF DBDES packet from fe80::yyyy:yyyy:yyyy:f300 - too short (28 B) I guess there is something wrong with type detection during config but have no idea what exactly is wrong and how to resolve… Best, Radek -- Radoslaw Kamil Ejsmont, Ph.D. http://radoslaw.ejsmont.net