Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 338231 - sys-devel/clang-2.7-r3 fails at runtime.
Summary: sys-devel/clang-2.7-r3 fails at runtime.
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Bernard Cafarelli
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-20 20:58 UTC by Nick Bowler
Modified: 2010-09-21 16:18 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Bowler 2010-09-20 20:58:02 UTC
Updating clang to the latest version has caused dynamic linking problems
preventing it from running.  Firstly, attempting to run clang produces the
following error:

  % clang
  clang: error while loading shared libraries: libLLVM-2.7.so: cannot open shared object file: No such file or directory

Further inspection reveals that this library is installed in /usr/lib/llvm,
but this path is neither in /etc/ld.so.conf nor in the runpath of clang.

So I set LD_LIBRARY_PATH=/usr/lib/llvm and run clang:

  % clang
  clang: error: no input files

So far so good.  But now when we attempt to compile any C program:

  % clang -v test.c
  clang version 1.1 (branches/release_27)
  Target: x86_64-pc-linux-gnu
  Thread model: posix
   "/usr/bin/clang" -cc1 -triple x86_64-pc-linux-gnu -S -disable-free -disable-llvm-verifier -main-file-name test.c -mrelocation-model static -mdisable-fp-elim -mconstructor-aliases -munwind-tables -target-cpu x86-64 -v -resource-dir /usr/lib/clang/1.1 -fmessage-length 80 -fgnu-runtime -fdiagnostics-show-option -fcolor-diagnostics -o /tmp/cc-hjolYR.s -x c test.c
  /usr/bin/clang: symbol lookup error: /usr/bin/clang: undefined symbol: LLVMInitializeMBlazeTargetInfo
  clang: error: compiler command failed with exit code 127 (use -v to see invocation)

Downgrading to clang-2.7-r2 corrects the issue.

Portage 2.1.8.3 (default/linux/amd64/10.0, gcc-4.4.3, glibc-2.11.2-r0, 2.6.36-rc4-00076-g9c03f16 x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-2.6.36-rc4-00076-g9c03f16-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q8300_@_2.50GHz-with-gentoo-2.0.1
Timestamp of tree: Mon, 20 Sep 2010 17:30:22 +0000
distcc 3.1 x86_64-pc-linux-gnu [disabled]
ccache version 2.4 [enabled]
app-shells/bash:     4.0_p37
dev-java/java-config: 2.1.11
dev-lang/python:     2.6.5-r3, 3.1.2-r4
dev-util/ccache:     2.4-r7
dev-util/cmake:      2.8.1-r2
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.6.3
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.65-r1
sys-devel/automake:  1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.4.3-r2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
sys-devel/make:      3.81-r2
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=core2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/bin/startx /usr/share/X11/xkb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -march=core2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--keep-going --with-bdeps=y"
FEATURES="assume-digests ccache distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://mirror.datapipe.net/gentoo"
LANG="en_CA.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en_CA en ja"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acl alsa amd64 berkdb bzip2 cairo cjk cli cracklib crypt cups curl cvs cxx doc dri exif fbcon ffmpeg flac fontforge fortran gdbm gpm graphviz gtk iconv icu idn imagemagick ipv6 jadetex jpeg kpathsea latex lcms mmx modules mp3 mudflap multilib ncurses nis nls nptl nptlonly ogg opengl openmp pam pcre perl png postgres pppd python qt3support readline reflection sdl session smp sse sse2 sse3 ssl ssse3 svg sysfs tcpd tex4ht theora tiff truetype unicode vim-syntax vorbis xcb xinerama xorg xulrunner xv zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CAMERAS="ptp2" ELIBC="glibc" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_CA en ja" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="intel fbdev" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 
Unset:  CPPFLAGS, CTARGET, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

sys-devel/clang-2.7-r3 was built with the following:
USE="(multilib) static-analyzer -debug -system-cxx-headers -test"
Comment 1 Ross Smith 2010-09-21 05:19:28 UTC
Thank you for taking the time to report this bug.  Just to rule out any other linking issues, have you run revdep-rebuild since seeing this error?   If not, please do so.
Comment 2 Nick Bowler 2010-09-21 13:51:29 UTC
(In reply to comment #1)
> Thank you for taking the time to report this bug.  Just to rule out any other
> linking issues, have you run revdep-rebuild since seeing this error?   If not,
> please do so.

There is no change after running revdep-rebuild.
Comment 3 Bernard Cafarelli gentoo-dev 2010-09-21 16:18:41 UTC
Thanks for the report! I removed the buggy ebuild and added -r4

The rpath sed was indeed broken, and I missed the unresolved symbol part... For 2.7 clang won't use llvm shared library, I'll fix that for 2.8.