linphone-sdk icon indicating copy to clipboard operation
linphone-sdk copied to clipboard

Building linphone-sdk on Raspberry Pi zero 2 results in "-- Check for working C compiler: /usr/bin/cc - broken"

Open meowmachine opened this issue 2 years ago • 3 comments

I have a Raspberry Pi Zero 2 with a fresh install of Raspian. I'm following the directions here to compile linphone: https://wiki.linphone.org/xwiki/wiki/public/view/Linphone/Linphone%20and%20Raspberry%20Pi/

I've installed the build dependencies: sudo apt install cmake automake autoconf libtool intltool yasm libasound2-dev libpulse-dev libv4l-dev nasm git libglew-dev

But when I try to make -j2, here is the output:

pi@raspberrypi:~/linphone-sdk/build-raspberry $ make -j2
[ 11%] Performing configure step for 'sdk'
loading initial cache file /home/pi/linphone-sdk/build-raspberry/sdk-prefix/tmp/sdk-cache-RelWithDebInfo.cmake
CMake Warning (dev) in CMakeLists.txt:
  No project() command is present.  The top-level CMakeLists.txt file must
  contain a literal, direct call to the project() command.  Add a line of
  code such as

    project(ProjectName)

  near the top of the file, but after cmake_minimum_required().

  CMake is pretending there is a "project(Project)" command on the first
  line.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- The C compiler identification is GNU 10.2.1
-- The CXX compiler identification is GNU 10.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc - broken
CMake Error at /usr/share/cmake-3.18/Modules/CMakeTestCCompiler.cmake:66 (message):
  The C compiler

    "/usr/bin/cc"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /home/pi/linphone-sdk/build-raspberry/desktop/CMakeFiles/CMakeTmp
    
    Run Build Command(s):/usr/bin/gmake cmTC_f260b/fast && gmake[3]: Entering directory '/home/pi/linphone-sdk/build-raspberry/desktop/CMakeFiles/CMakeTmp'
    /usr/bin/gmake  -f CMakeFiles/cmTC_f260b.dir/build.make CMakeFiles/cmTC_f260b.dir/build
    gmake[4]: Entering directory '/home/pi/linphone-sdk/build-raspberry/desktop/CMakeFiles/CMakeTmp'
    Building C object CMakeFiles/cmTC_f260b.dir/testCCompiler.c.o
    /usr/bin/cc   -mfpu=neon  -o CMakeFiles/cmTC_f260b.dir/testCCompiler.c.o -c /home/pi/linphone-sdk/build-raspberry/desktop/CMakeFiles/CMakeTmp/testCCompiler.c
    cc: error: unrecognized command-line option ‘-mfpu=neon’
    gmake[4]: *** [CMakeFiles/cmTC_f260b.dir/build.make:85: CMakeFiles/cmTC_f260b.dir/testCCompiler.c.o] Error 1
    gmake[4]: Leaving directory '/home/pi/linphone-sdk/build-raspberry/desktop/CMakeFiles/CMakeTmp'
    gmake[3]: *** [Makefile:140: cmTC_f260b/fast] Error 2
    gmake[3]: Leaving directory '/home/pi/linphone-sdk/build-raspberry/desktop/CMakeFiles/CMakeTmp'
    
    

  

  CMake will not be able to correctly generate this project.


-- Configuring incomplete, errors occurred!
See also "/home/pi/linphone-sdk/build-raspberry/desktop/CMakeFiles/CMakeOutput.log".
See also "/home/pi/linphone-sdk/build-raspberry/desktop/CMakeFiles/CMakeError.log".
make[2]: *** [CMakeFiles/sdk.dir/build.make:127: sdk-prefix/src/sdk-stamp/sdk-configure] Error 1
make[1]: *** [CMakeFiles/Makefile2:95: CMakeFiles/sdk.dir/all] Error 2
make: *** [Makefile:103: all] Error 2

meowmachine avatar May 25 '22 23:05 meowmachine

Hello. Did you try removing the "-mfpu=neon" from -DCMAKE_C_FLAGS ?

Regards

KyronNextLevel avatar Aug 01 '22 08:08 KyronNextLevel

@KyronNextLevel, it still fails with the same error.

@meowmachine, any resolutions?

haricane8133 avatar Jun 03 '23 05:06 haricane8133

  1. Do we have any pre-built binaries that we can just install in the Raspberry Pi Zero 2W?

haricane8133 avatar Jun 03 '23 05:06 haricane8133