Using the S32K toolchain with cmake - Fatal error: lib_c99.prefix : No such file or directory

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Using the S32K toolchain with cmake - Fatal error: lib_c99.prefix : No such file or directory

Jump to solution
1,982 Views
gberthiaume
Contributor III

Hi,

I'm looking for guidance about how to use the S32K toolchain.

Context

I'm trying to use the S32K Linux (Ubuntu 16) arm-none-eabi build tools to compile my project.
I'm using CMake and Make to do so.

Currently, the build system fails at the "check for working C compiler" step. The exact error message is:

cc1: fatal error: lib_c99.prefix: No such file or directory

Of course, this file exists in my build_tools directory:

 

$  find /usr/local/build_tools/arm32_ewl2 | grep lib_c99
/usr/local/build_tools/arm32_ewl2/EWL_C/include/lib_c99.prefix

 

While the CMake toolchain file could be the cause of this problem, my compiler flags seem identical to the one used when compiling the project with the S32 DS IDE:

usr/local/build_tools/gcc-6.3-arm32-eabi/bin/arm-none-eabi-gcc -c -fmessage-length=0 -ffunction-sections -fdata-sections -mcpu=cortex-m4 -mthumb -specs=ewl_c9x_noio.specs --sysroot="/usr/local/build_tools/arm32_ewl2" -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fdata-sections -ffunction-sections -o CMakeFiles/cmTC_ee422.dir/testCCompiler.c.obj -c /root/nBMSMv2_Tools/myproject/build/CMakeFiles/CMakeTmp/testCCompiler.c

I think the problem might reside in my environment setup.
Here's my build_tools tree:

 

/usr/local/build_tools/
|-- arm32_ewl2  # <-------- SYSROOT
|   |-- Build_Tag.txt
|   |-- Doxyfile
|   |-- EWL_C
|   |-- EWL_C++
|   |-- EWL_ReleaseNotes
|   |-- EWL_Runtime
|   |-- lib
|   `-- makefile
`-- gcc-6.3-arm32-eabi
    |-- arm-none-eabi
    |-- bin
    |-- include
    |-- lib
    |-- libexec
    |-- linux_support
    |-- patches_applied
    `-- share

 


Question

Why can't arm-none-eabi-gcc find the lib_c99.prefix file? 
If all the compilation flags are identical to the one used by the IDE, what did I miss? Is this a question of environment variables?

Thanks.

ATCH. The full CMake log

Labels (1)
0 Kudos
1 Solution
1 Reply