@/tmp/gcc-arguments0.txt: No such file or directory
Hi,
I have been able to use successfully the previous build for cross compiling embedded C. After upgrading to the current one, I am getting the following CMake: Problems Tab
Error:Configuration dialer [Debug]
Compiler exited with error code 1 (/home/fe1/fe1/cws/uc_nios2/nios2/bin/nios2-linux-uclibc-gcc "-DEMBED" "-D__adjtimex=adjtimex" "-D__linux__" "-D__uClinux__" "-Dlinux" "-Dunix" "-I/home/fe1/fe1/cws/uc_nios2/nios2/include" "-I/home/fe1/fe1/cws/uc_nios2/uClinux-dist" "-I/home/fe1/fe1/cws/uc_nios2/uClinux-dist/linux-2.6.x/include" "-I/home/fe1/fe1/cws/uc_nios2/uClinux-dist/staging/usr/include" "-Wall" "-O2" "-g" "-fno-builtin" "-D___CIDR_IGNORE_DEFINITIONS_START" "-xc" "-v" "-dD" "-E" "-")
nios2-linux-uclibc-gcc: @/tmp/gcc-arguments0.txt: No such file or directory
nios2-linux-uclibc-gcc: no input files
This is part of my CMakeLists which was working fine until this clion build
set(CMAKE_SYSTEM_NAME Generic)
set(NIOS2_GCC /home/fe1/fe1/cws/uc_nios2/nios2)
set(GCC_BIN ${NIOS2_GCC}/bin)
set(SUPPORT_FILE_DIRECTORY ${NIOS2_GCC}/include)
set(CMAKE_C_COMPILER ${GCC_BIN}/nios2-linux-uclibc-gcc)
set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
add_definitions(-Wall -O2 -g -fno-builtin -Dlinux -D__linux__ -Dunix -D__uClinux__ -DEMBED -D__adjtimex=adjtimex)
set(CMAKE_EXE_LINKER_FLAGS "-Wl,-d -Wl,-elf2flt")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/bin)
Please sign in to leave a comment.
The problem is that you are working with the nios2-linux-uclibc-gcc compiler.
nios2-linux-uclibc-gcc does not support the option "read switches from the file" that needs for correct cross-platform gcc compilation.
To restore the CLion functioning you need to write understudy script for nios2-linux-uclibc-gcc that reads the options file @/tmp/gcc-argumentsXXXX.txt and runs original compiler with huge decoded command line.
Options in file are separated by whitespace. A whitespace character may be included in an option by surrounding the entire option in either single or double quotes. Any character (including a backslash) may be included by prefixing the character to be included with a backslash. The file may itself contain additional @file options; any such options will be processed recursively.
Thank you very much for the reply,
I followed your lead and wrote a python script that would catch the call to gcc. Although I wouldn't get an error on the "Problems" tab, the autocomplete wouldn't properly find the .h files. After some more debuging I found CLION reads the stdout from that initial call, so I just mimic it as a quick fix. If you have a better idea, let me know. Again, thanks for the feedback.
Maybe you are interested in FAQ
Q: CLion fails to find some of my headers. Where does it search for them?
http://blog.jetbrains.com/clion/2014/09/clion-answers-frequently-asked-questions/