(Added link to M4 macro processor and changed prefix to /usr/arm-linux-gnueabi)
(Flex: the fast lexical analyser)
Line 2: Line 2:
 
== Flex: the fast lexical analyser ==
 
== Flex: the fast lexical analyser ==
  
Flex is a dependency for Wide-DHCPv6. It requires the [https://www.gnu.org/software/m4/m4.html GNU M4] macro processor installed on your build system:
+
Flex is a dependency for Wide-DHCPv6. It requires the [https://www.gnu.org/software/m4/m4.html GNU M4] macro processor & texi2dvi installed on your build system:
  
 
<PRE>
 
<PRE>
 
sudo apt-get install m4
 
sudo apt-get install m4
 +
sudo apt-get install texinfo
 +
sudo apt-get install texlive
 
</PRE>
 
</PRE>
  

Revision as of 05:37, 18 May 2014

Flex: the fast lexical analyser

Flex is a dependency for Wide-DHCPv6. It requires the GNU M4 macro processor & texi2dvi installed on your build system:

sudo apt-get install m4
sudo apt-get install texinfo
sudo apt-get install texlive

Download flex and cross compile for ARM assuming your ARM cross compiler is located at /opt/arm-2011.09/

wget http://sourceforge.net/projects/flex/files/flex-2.5.39.tar.bz2
tar -xjf flex-2.5.39.tar.bz2
cd flex-2.5.39/
./configure --host=arm-linux-gnueabi --prefix=/usr/arm-linux-gnueabi ac_cv_func_malloc_0_nonnull=yes ac_cv_func_realloc_0_nonnull=yes
make
make install

Cross Compiling Wide DHCPv6 for ARM

Wide-DHCPv6 has not been updated for some time and uses structures no longer avaliable in glibc without the use of the #define _GNU_SOURCE

Instead, we patch it with a patch developed by Jeremie Corbier

wget http://downloads.sourceforge.net/project/wide-dhcpv6/wide-dhcpv6/wide-dhcpv6-20080615/wide-dhcpv6-20080615.tar.gz
wget http://wiki.beyondlogic.org/patches/wide-dhcpv6/0004-GNU-libc6-fixes.patch
tar -xzf wide-dhcpv6-20080615.tar.gz 
cd wide-dhcpv6-20080615/
patch -p1 < ../0004-GNU-libc6-fixes.patch 
./configure --prefix=/home/temp/wide-dhcp --host=arm-linux-gnueabi --with-localdbdir=/tmp ac_cv_func_setpgrp_void=yes
make