# BIRD Internet Routing Daemon



## wdcapl (Dec 5, 2010)

Hi all!
I am new to bsd (but not to Linux) and i'm trying to compile BIRD on freebsd but unfortunatelly with no success.
I've installed the linux dependencies (linux_enable=YES)

```
jasper# cd /usr/src/bird-1.2.5
jasper# ./configure
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for library containing clock_gettime... none required
checking build system type... i386-unknown-freebsd8.1
checking host system type... i386-unknown-freebsd8.1
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking what CFLAGS should we use... -g -O2 -Wall -Wstrict-prototypes -Wno-parentheses -Wno-pointer-sign
checking how to run the C preprocessor... gcc -E
checking for a BSD-compatible install... /usr/bin/install -c
checking for ranlib... ranlib
checking for flex... flex
checking for bison... bison
checking for gm4... gm4
checking which OS configuration should we use... ./sysdep/cf/bsd.h
checking system-dependent directories... sysdep/unix sysdep/bsd  lib
checking protocols... ok
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/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... no
checking alloca.h presence... no
checking for alloca.h... no
checking whether 'struct sockaddr' has sa_len... yes
checking whether byte ordering is bigendian... no
checking for char... yes
checking size of char... 1
checking for short int... yes
checking size of short int... 2
checking for int... yes
checking size of int... 4
checking for long int... yes
checking size of long int... 4
checking for 8-bit type... char
checking for 16-bit type... short int
checking for 32-bit type... int
checking usual alignment of structures... 8
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/unix sysdep/bsd lib)

BIRD was configured with the following options:
        Source directory:       .
        Object directory:       obj
        System configuration:   ./sysdep/cf/bsd.h
        Debugging:              no
        Routing protocols:      bgp ospf pipe rip static
        Client:                 yes
jasper# make
make -C obj all
make: chdir obj: No such file or directory
*** Error code 1

Stop in /usr/src/bird-1.2.5.
```

What could cause the error?

After changing objdir:


```
jasper# cat Makefile
# Makefile for in place build of BIRD
# (c) 1999--2000 Martin Mares <mj@ucw.cz>

objdir=/usr/src/bird-1.2.5/obj

all depend tags install install-docs:
        $(MAKE) -C $(objdir) $@

docs userdocs progdocs:
        $(MAKE) -C doc $@

clean:
        $(MAKE) -C $(objdir) clean
        find . -name "*~" -or -name "*.[oa]" -or -name "\#*\#" -or -name TAGS -or -name core -or -name depend -or -name ".#*" | xargs rm -f

distclean: clean
        $(MAKE) -C doc distclean
        rm -rf $(objdir) autom4te.cache
        rm -f config.* configure sysdep/autoconf.h sysdep/paths.h Makefile

jasper# make
make -C /usr/src/bird-1.2.5/obj all
"Rules", line 44: Need an operator
"Rules", line 48: Need an operator
"Rules", line 50: Need an operator
"Rules", line 55: Need an operator
Error expanding embedded variable.
*** Error code 2

Stop in /usr/src/bird-1.2.5.
```

Big thanks for suggestions!


----------



## ondra_knezour (Dec 5, 2010)

First thoughts:

- /usr/src is meant to be place for FreeBSD sources
- GNU make is available under FreeBSD ports as gmake devel/gmake
- BIRD itself is available under FreeBSD ports net/bird and net/bird6

About FreeBSD ports

`# portsnap fetch extract && cd /usr/ports/net/bird && make install` as root should do the business.

Installation and Maintenance of FreeBSD Ports or Packages is probably better place for such type of questions.


----------



## aragon (Dec 5, 2010)

Why not use the port?

net/bird


----------



## wdcapl (Dec 5, 2010)

aragon said:
			
		

> Why not use the port?
> 
> net/bird



Thanks all for reply!
1.net/bird is not up to date 
2.i have made a patch for bgp summary from another patch and i do like to use it  (it is working on linux)

thx ondra, i will try that ortsnap command


----------



## aragon (Dec 5, 2010)

wdcapl said:
			
		

> 1.net/bird is not up to date
> 2.i have made a patch for bgp summary from another patch and i do like to use it  (it is working on linux)


One of the beauties of ports is that you can easily integrate your custom patches without going back to the drawing board of porting the rest of the app.  Updating slightly old ports is often very easy for someone with software building experience too.

Even though you're new, you might like to browse the Porters Handbook.


----------



## wdcapl (Dec 5, 2010)

Big thanks!
The build is working fine

```
bird> show bgp summary
Peer                    AS Last state change   Prefixes rcvd/best   State/Last error
1.1.1.1           49895 00:16               331628/331628        Established
```
Now I must learn to build a pkg.
Thanks to all!


----------



## Duy Nguyen (Dec 1, 2014)

Hi wdcapl, all,

I have the same problem as you, may I know how you solved the problem? I intend to modify some routing decision in BIRD. I am new to FreeBSD.

Thanks a lot.


----------



## pumtsp (Apr 1, 2016)

Hi,
I used gmake instead of make and it worked
pkg install gmake
gmake
gmake install


----------



## SirDice (Apr 1, 2016)

Don't. Use the port. And if it's out of date, provide patches so it can be updated.


----------



## azerty32 (Jan 6, 2018)

Hello,

I have

```
FreeBSD XXX 11.1-RELEASE FreeBSD 11.1-RELEASE #0 r321309: Fri Jul 21 02:08:28 UTC 2017     root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
```

I installed these packages: hs-readline gauche-readline

But I cant compile bird-2.0.0:

```
# ./configure
...
checking for library containing tgetent... -ltinfo
checking for readline/readline.h... no
configure: error: The client requires GNU Readline library. Either install the library or use --disable-client to compile without the client.
```


```
# find / -name "readline.h"
/usr/include/edit/readline/readline.h
/usr/local/include/editline/readline.h
/usr/local/include/readline/readline.h
```

Could you help me please?

Many thanks.


----------



## SirDice (Jan 8, 2018)

Same answer as before, use the port or package.

net/bird
net/bird-devel


----------

