Description of problem: If you try to compile a c++ program with clang it fails because clang doesn't find any c++ include files. Version-Release number of selected component (if applicable): clang-2.7-1 Steps to Reproduce: 1.try to compile a c++ program with clang 2. 3. Actual results: clang doesn't find the c++ Includes Expected results: clang should find the c++ Includes
llvm-2.7-4.fc12 has been submitted as an update for Fedora 12. http://admin.fedoraproject.org/updates/llvm-2.7-4.fc12
llvm-2.7-4.fc13 has been submitted as an update for Fedora 13. http://admin.fedoraproject.org/updates/llvm-2.7-4.fc13
I took a look, and it turns out that Clang is right now hard-coded with include paths for various Linux distributions, and each compiler version/arch has to be added by hand. I've added F-12/{x86_64,ppc} and F-13 (i686,x86_64,ppc) to the clang-2.7-4 update that will be out soon; the patch has been sent upstream too.
llvm-2.7-5.fc13 has been submitted as an update for Fedora 13. http://admin.fedoraproject.org/updates/llvm-2.7-5.fc13
llvm-2.7-5.fc12 has been submitted as an update for Fedora 12. http://admin.fedoraproject.org/updates/llvm-2.7-5.fc12
llvm-2.7-5.fc13 has been pushed to the Fedora 13 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update llvm'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/llvm-2.7-5.fc13
llvm-2.7-5.fc12 has been pushed to the Fedora 12 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update llvm'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/llvm-2.7-5.fc12
Just tested the version from the updates-testing repository. It gives me the following output if I try to compile a Hello World program: clang helloWorld.cpp -o helloWorld /tmp/cc-APeGw4.o: In function `__cxx_global_var_init': helloWorld.cpp:(.text+0x18): undefined reference to `std::ios_base::Init::Init()' helloWorld.cpp:(.text+0x20): undefined reference to `std::ios_base::Init::~Init()' /tmp/cc-APeGw4.o: In function `main': helloWorld.cpp:(.text+0x63): undefined reference to `std::cout' helloWorld.cpp:(.text+0x76): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)' /tmp/cc-APeGw4.o:(.gnu.linkonce.r._ZTISt9basic_iosIcSt11char_traitsIcEE+0x0): undefined reference to `vtable for __cxxabiv1::__si_class_type_info' /tmp/cc-APeGw4.o:(.gnu.linkonce.r._ZTISt9basic_iosIcSt11char_traitsIcEE+0x10): undefined reference to `typeinfo for std::ios_base' /tmp/cc-APeGw4.o:(.gnu.linkonce.r._ZTVSt9basic_iosIcSt11char_traitsIcEE+0x10): undefined reference to `std::basic_ios<char, std::char_traits<char> >::~basic_ios()' /tmp/cc-APeGw4.o:(.gnu.linkonce.r._ZTVSt9basic_iosIcSt11char_traitsIcEE+0x18): undefined reference to `std::basic_ios<char, std::char_traits<char> >::~basic_ios()' collect2: ld returned 1 exit status clang: error: linker command failed with exit code 1 (use -v to see invocation)
(In reply to comment #8) > Just tested the version from the updates-testing repository. > It gives me the following output if I try to compile a Hello World program: > > clang helloWorld.cpp -o helloWorld You want to use clang++, not clang. HTH, -- Michel
Oh, my mistake. Everything works fine when I use clang++ instead clang.
llvm-2.7-5.fc13 has been pushed to the Fedora 13 stable repository. If problems still persist, please make note of it in this bug report.
llvm-2.7-5.fc12 has been pushed to the Fedora 12 stable repository. If problems still persist, please make note of it in this bug report.