# How to compile DNSMASQ from source?



## MrT69 (Oct 3, 2020)

Hi
I have the problem that I want dnsmasq compiled from source on freebsd. To compile I'll run it with this command:


```
make all-i18n COPTS="-DHAVE_IDN -DHAVE_DNSSEC -DHAVE_LUA -DHAVE_DBUS -DHAVE_libidn2 -DHAVE_CONNTRACK"
```

When I run this then it break with the command nettle.h and idn2.h is missing. On LINUX system it's not a problem to add additional headers with e.g. "apt install nettle-dev" and that's it.
How can I do this on FreeBSD?

Get the source code here: http://www.thekelleys.org.uk/dnsmasq/dnsmasq-2.82.tar.gz

Thanks a lot in advance!


----------



## SirDice (Oct 3, 2020)

MrT69 said:


> I have the problem that I want dnsmasq compiled from source on freebsd


Build it from ports, dns/dnsmasq.


----------



## dd_ff_bb (Oct 3, 2020)

> When I run this then it break with the command nettle.h and idn2.h is missing. On LINUX system it's not a problem to add additional headers with e.g. "apt install nettle-dev" and that's it.
> How can I do this on FreeBSD?




Relative to your question:

root@bsd12:~ # pkg provides nettle.h
Name    : nettle-3.6
Desc    : Low-level cryptographic library
Repo    : FreeBSD
Filename: usr/local/share/doc/nettle/nettle.html
          usr/local/bin/nettle-hash

Name    : linux-c7-nettle-2.7.1
Desc    : Low-level cryptographic library (Linux CentOS 7.8.2003)
Repo    : FreeBSD
Filename: compat/linux/usr/bin/nettle-hash


root@bsd12:~ # pkg provides idn2.h
Name    : libidn2-2.3.0_1
Desc    : Implementation of IDNA2008 internationalized domain names
Repo    : FreeBSD
Filename: usr/local/share/gtk-doc/html/libidn2/libidn2.html
          usr/local/share/gtk-doc/html/libidn2/libidn2-idn2.html
          usr/local/include/idn2.h



** if you dont have provides plugin you can install it with:

root@bsd12:~ # pkg install pkg-provides

setup and usage here:



			https://papers.freebsd.org/2018/FOSDEM/rodrigo-pkg_provides.files/freebsd_provides.pdf


----------

