milgner / k290-fnkeyctl

Configures the behaviour of the F-keys on the Logitech K290
MIT License
222 stars 29 forks source link

fatal error: 'iostream' file not found on Fedora 20 #5

Closed mariuszs closed 10 years ago

mariuszs commented 10 years ago
~/k290-fnkeyctl$ ./build.sh                                                                                                                                                                     
k290_fnkeyctl.cpp:1:10: fatal error: 'iostream' file not found
#include <iostream>
            ^
1 error generated.

My packages llvm-3.4-6.fc20.x86_64 clang-3.4-6.fc20.x86_64.rpm libstdc++-devel.x86_64 0:4.8.2-7.fc20

I found also http://llvm.org/docs/CodingStandards.html#include-iostream-is-forbidden

mariuszs commented 10 years ago
clang version 3.4 (tags/RELEASE_34/final)
Target: x86_64-redhat-linux-gnu
Thread model: posix
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-redhat-linux/4.8.2
Found candidate GCC installation: /usr/lib/gcc/x86_64-redhat-linux/4.8.2
Selected GCC installation:
"/usr/bin/clang" -cc1 -triple x86_64-redhat-linux-gnu -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -main-file-name k290_fnkeyctl.cpp -mrelocation-model static -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -target-cpu x86-64 -target-linker-version 2.23.2 -v -resource-dir /usr/bin/../lib/clang/3.4 -I /usr/include -internal-isystem /usr/local/include -internal-isystem /usr/bin/../lib/clang/3.4/include -internal-externc-isystem /usr/include -internal-externc-isystem /usr/lib/gcc/x86_64-redhat-linux/4.8.2/include -std=c++11 -fdeprecated-macro -fdebug-compilation-dir /home/mariuszs/git/k290-fnkeyctl -ferror-limit 19 -fmessage-length 211 -mstackrealign -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -vectorize-slp -o /tmp/k290_fnkeyctl-2a3320.o -x c++ k290_fnkeyctl.cpp
clang -cc1 version 3.4 based upon LLVM 3.4 default target x86_64-redhat-linux-gnu
ignoring nonexistent directory "/usr/lib/gcc/x86_64-redhat-linux/4.8.2/include"
ignoring duplicate directory "/usr/include"
as it is a non-system directory that duplicates a system directory
#include "..." search starts here:
#include <...> search starts here:
/usr/local/include
/usr/bin/../lib/clang/3.4/include
/usr/include
End of search list.
k290_fnkeyctl.cpp:1:10: fatal error: 'iostream' file not found
#include <iostream>
^
1 error generated.
milgner commented 10 years ago

Hi, thanks for the report. Unfortunately I currently have no idea what may be causing it. You say libstdc++-devel is installed, and it provides the file in question. Your linked-to entry in the LLVM FAQ does not apply here as it mentions libraries, not applications. Looks like the file should be at /usr/include/c++/4.8.2/iostream - could you check whether that's the case? Because that directory is not listed in your output, so there may be something wrong with your compiler.

mariuszs commented 10 years ago

Thanks for your help, I have resolved this with some additional packages

sudo yum groupinstall "Development Tools"
sudo yum install libstdc++-static.x86_64 compat-libstdc++-33.x86_64