Bug 3782 - clang does not work
: clang does not work
Status: CONFIRMED
Product: Desktop Bugs
Classification: ROSA Desktop
Component: Main Packages
: Fresh
: All Linux
: Normal normal
: ---
Assigned To: ROSA Linux Bugs
: ROSA Linux Bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-02-18 10:23 MSK by FirstLevel
Modified: 2014-10-08 21:38 MSD (History)
2 users (show)

See Also:
RPM Package: clang-3.3-4-rosa2012.1.i586
ISO-related:
Bad POT generating:
Upstream:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description FirstLevel 2014-02-18 10:23:50 MSK
Description of problem:
I have installed ROSA 2012.1 Fresh and tried to use clang but occured problem.
$ cat ./test1.cpp 
int main(){return 0;}

$ clang++  ./test1.cpp 
/usr/bin/ld: cannot find crtbegin.o: Нет такого файла или каталога
/usr/bin/ld: cannot find -lgcc
clang: error: linker command failed with exit code 1 (use -v to see invocation)


$ clang++ -v ./test1.cpp 
clang version 3.3 (tags/RELEASE_33/final)
Target: i386-unknown-linux-gnu
Thread model: posix
 "/usr/bin/clang" -cc1 -triple i386-unknown-linux-gnu -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -main-file-name test1.cpp -mrelocation-model static -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -target-cpu pentium4 -target-linker-version 2.22.52.0.4.20120604 -v -resource-dir /usr/bin/../lib/clang/3.3 -internal-isystem /usr/local/include -internal-isystem /usr/bin/../lib/clang/3.3/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -fdeprecated-macro -fdebug-compilation-dir /home/sasha/test/test_clang -ferror-limit 19 -fmessage-length 105 -mstackrealign -fobjc-runtime=gcc -fobjc-default-synthesize-properties -fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -backend-option -vectorize-loops -o /tmp/test1-l21kU4.o -x c++ ./test1.cpp
clang -cc1 version 3.3 based upon LLVM 3.3 default target i386-unknown-linux-gnu
ignoring nonexistent directory "/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /usr/bin/../lib/clang/3.3/include
 /usr/include
End of search list.
 "/usr/bin/ld" --eh-frame-hdr -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 -o a.out /usr/lib/crt1.o /usr/lib/crti.o crtbegin.o -L/lib -L/usr/lib /tmp/test1-l21kU4.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc crtend.o /usr/lib/crtn.o
/usr/bin/ld: cannot find crtbegin.o: Нет такого файла или каталога
/usr/bin/ld: cannot find -lgcc
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I see it maybe error with built of llvm package (/usr/lib/gcc/i586-unknown-linux-gnu/4.7.3/include/ and its lib are not included in search path).


# cat /etc/release 
ROSA Desktop Fresh R2 release 2012.1 for i586

# rpm -qa|egrep "llvm|clang"
libllvm3.3-3.3-4-rosa2012.1.i586
llvm-3.3-4-rosa2012.1.i586
libllvm-devel-3.3-4-rosa2012.1.i586
libclang3.3-3.3-4-rosa2012.1.i586
clang-3.3-4-rosa2012.1.i586

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
Comment 1 FirstLevel 2014-02-18 10:24:39 MSK
I (FirstLevel) try kubuntu and a.out file is made successfully.
Comment 2 Denis Silakov 2014-02-18 11:29:00 MSK
Do you have libstdc++-devel installed?
Comment 3 FirstLevel 2014-02-18 17:45:37 MSK
(In reply to comment #2)
> Do you have libstdc++-devel installed?

# rpm -qa | grep libstdc++
libstdc++6-4.7.4_2014.01-1-rosa2012.1.i586
libstdc++-devel-4.7.4_2014.01-1-rosa2012.1.i586
Comment 4 Denis Silakov 2014-02-18 18:10:17 MSK
Indeed, I can reproduce the issue in 32bit system. In my 64bit system everything works fine...
Comment 5 FirstLevel 2014-02-18 19:36:15 MSK
(In reply to comment #4)
> Indeed, I can reproduce the issue in 32bit system. In my 64bit system
> everything works fine...

I (FirstLevel) have reproduced this bug on ROSA 2012.1 x32 in VirtualBox.
Comment 6 FirstLevel 2014-06-03 14:37:43 MSD
checking the relevance
Comment 7 FirstLevel 2014-06-03 15:27:56 MSD
Case is actual
Comment 8 FirstLevel 2014-10-08 21:38:55 MSD
Case is actual for 2014.1