From 219663a42dfa4a38fd2eb6e3421c82d1473bd174 Mon Sep 17 00:00:00 2001
From: Rohit Gupta <rohit.gupta@eurecom.fr>
Date: Tue, 23 Aug 2016 17:40:02 +0200
Subject: [PATCH] fix for downloading linux headers when kernel is installed
 from sources

---
 cmake_targets/tools/build_helper | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/cmake_targets/tools/build_helper b/cmake_targets/tools/build_helper
index 56da5cdf82c..0f87ce1ad37 100755
--- a/cmake_targets/tools/build_helper
+++ b/cmake_targets/tools/build_helper
@@ -369,7 +369,6 @@ check_install_oai_software() {
 	libxml2 \
 	libxml2-dev  \
 	libxslt1-dev \
-	linux-headers-`uname -r` \
 	mscgen  \
 	octave \
 	octave-signal \
@@ -385,6 +384,8 @@ check_install_oai_software() {
 
     $SUDO update-alternatives --set liblapack.so /usr/lib/atlas-base/atlas/liblapack.so
     
+    #Sometimes linux headers are not available in apt-get if kernel is custom or new
+    $SUDO apt-get install linux-headers-`uname -r` || true
     # First we remove gnutls/nettle installation and then install from sources
     $SUDO apt-get remove -y libgnutls-dev nettle-dev nettle-bin
     install_nettle_from_source
-- 
GitLab