Pybombs install hackrf causes CMake to fail with no suitable type found on CentOS 6.5

Hi folks,

I am trying to build on CentOS 6.5.

I cloned the repos, and then issued cd pybombs; ./pybombs install
hackrf and it eventually failed with:


Current step: (hackrf :: configure)
configure
(’ \n CC=gcc CXX=g++ cmake … -DCMAKE_BUILD_TYPE=Debug
-DCMAKE_INSTALL_PREFIX=/home/rsharpe/dev/target \n’, ’ \n CC=$cc
CXX=$cxx cmake … -DCMAKE_BUILD_TYPE=$cmakebuildtype
-DCMAKE_INSTALL_PREFIX=$prefix $config_opt\n’)
(’ \n CC=gcc CXX=g++ cmake … -DCMAKE_BUILD_TYPE=Debug
-DCMAKE_INSTALL_PREFIX=/home/rsharpe/dev/target \n’, ’ \n CC=gcc
CXX=g++ cmake … -DCMAKE_BUILD_TYPE=Debug
-DCMAKE_INSTALL_PREFIX=/home/rsharpe/dev/target \n’)
bash exec (/home/rsharpe/dev/pybombs/src/hackrf/host/build)::
CC=gcc CXX=g++ cmake … -DCMAKE_BUILD_TYPE=Debug
-DCMAKE_INSTALL_PREFIX=/home/rsharpe/dev/target

– The C compiler identification is GNU
– The CXX compiler identification is GNU

– Check if the system is big endian
– Searching 16 bit integer
– Looking for sys/types.h
– Looking for sys/types.h - not found
– Looking for stdint.h
– Looking for stdint.h - not found
– Looking for stddef.h
– Looking for stddef.h - not found
– Check size of unsigned short
– Check size of unsigned short - failed
– Check size of unsigned int
– Check size of unsigned int - failed
– Check size of unsigned long
– Check size of unsigned long - failed
CMake Error at
/home/rsharpe/dev/target/share/cmake-2.8/Modules/TestBigEndian.cmake:44
(MESSAGE):
no suitable type found
Call Stack (most recent call first):
libhackrf/CMakeLists.txt:40 (TEST_BIG_ENDIAN)

The problem was obvious once I checked in
src/hackrf/host/build/CMakeFiles/CMakeError.log:

cc1: error: unrecognized command line option “-std=gnu90”

gcc version is 4.4-.7-4.el6 which does not support that command-line
option.

Is there any way to switch it off?


Regards,
Richard Sharpe
(何以解憂?唯有杜康。–曹操)

On Fri, Sep 5, 2014 at 1:39 PM, Richard Sharpe
[email protected] wrote:

(’ \n CC=gcc CXX=g++ cmake … -DCMAKE_BUILD_TYPE=Debug

– Looking for stdint.h - not found
no suitable type found

Is there any way to switch it off?

Found a way to fix the problem. I changed “-std=c90” to “-std=c99” in
two CMakeList.txt files and reran ./pybombs install hackrf and all
worked. However, I am not sure if there is any difference between
-std=c90 vs -std=c99 that will affect the generated code. Indeed, it
is even possible that -std=c89 would work, but I did not try that.

That suggests that for greater portability the hackrf CMakeList.txt
files should change that.


Regards,
Richard Sharpe
(何以解憂?唯有杜康。–曹操)