DennisOSRM/Project-OSRM — Issue #151: compilation fails on ubuntu 11.10/gcc4.6.1: omp.h not found
Author: emiltin
Created: 2012-02-26 09:02:40+00:00
State: open

on a fresh ubuntu 11.10 instance, scons fails to find omp.h, even though it exists in /usr/lib/gcc/x86_64-linux-gnu/4.6/include/omp.h:

root@localhost:~# apt-get update
[...]

root@localhost:~# sudo apt-get install build-essential git scons libprotoc-dev libprotobuf7 protobuf-compiler libprotobuf-dev libpng-dev libbz2-dev libstxxl-dev libstxxl-doc libstxxl1 libxml2-dev libzip-dev
[...]

root@localhost:~# git clone git://github.com/DennisOSRM/Project-OSRM.git
Cloning into Project-OSRM...
remote: Counting objects: 3392, done.
remote: Compressing objects: 100% (968/968), done.
remote: Total 3392 (delta 2437), reused 3353 (delta 2409)
Receiving objects: 100% (3392/3392), 1.03 MiB | 660 KiB/s, done.
Resolving deltas: 100% (2437/2437), done.

root@localhost:~# cd Project-OSRM/

root@localhost:~/Project-OSRM# scons
scons: Reading SConscript files ...
Using default C++ Compiler: g++
Checking for C header file omp.h... no
Compiler does not support OpenMP. Exiting

root@localhost:~/Project-OSRM# g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6.1/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.1-9ubuntu3' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++,go --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3)

root@localhost:~/Project-OSRM# find / -name omp.h
/usr/lib/gcc/x86_64-linux-gnu/4.6/include/omp.h

i'm sure there's a simple explanation, which can be added to the wiki :-)