I actually have two issues here. The first is that I cannot figure out why clang is being pulled in as a dependency. The second is that I cannot figure out how to break the circular dependency if I want to install clang. For the first issue: Running emerge -auDNv @world results in the following output: $ emerge -auDNv @world These are the packages that would be merged, in order: Calculating dependencies... done! [nomerge ] sys-devel/clang-3.5.2-r100:0/3.5::gentoo_prefix USE="static-analyzer -debug -multitarget -python" [ebuild N ] sys-devel/llvm-3.5.2:0/3.5::gentoo_prefix USE="(clang) libffi ncurses static-analyzer -debug -doc -gold -libedit -multitarget -ocaml -python {-test} -xml" PYTHON_TARGETS="python2_7 (-pypy)" VIDEO_CARDS="-radeon" 20985 KiB [ebuild N ] sys-libs/libcxx-3.5.1::gentoo_prefix USE="libcxxrt -static-libs {-test}" 0 KiB [ebuild N ] sys-libs/libcxxabi-3.5.1::gentoo_prefix 0 KiB [ebuild N ] sys-devel/clang-3.5.2-r100:0/3.5::gentoo_prefix USE="static-analyzer -debug -multitarget -python" 0 KiB Total: 4 packages (4 new), Size of downloads: 20985 KiB * Error: circular dependencies: (sys-devel/llvm-3.5.2:0/3.5::gentoo_prefix, ebuild scheduled for merge) depends on (sys-devel/llvm-3.5.2:0/3.5::gentoo_prefix, ebuild scheduled for merge) (buildtime) * Note that circular dependencies can often be avoided by temporarily * disabling USE flags that trigger optional dependencies. If I put clang in package.mask everything proceeds just fine, except I get the following warning: !!! Ebuilds for the following packages are either all !!! masked or don't exist: sys-devel/clang The only thing installed on the system that depends on llvm is sys-devel/binutils-apple-6.1 However, the only dependency on llvm that applies is the following: || ( >=sys-devel/gcc-apple-4.2.1 sys-devel/llvm ) However, gcc-apple is installed and should satisfy that dependency. $ emerge -pv --nodeps '>=sys-devel/gcc-apple-4.2.1' These are the packages that would be merged, in order: [ebuild R ] sys-devel/gcc-apple-4.2.1_p5666-r2:42::gentoo_prefix USE="cxx nls nptl objc objc++ openmp -fortran -multislot -regression-test -vanilla" 0 KiB Total: 1 package (1 reinstall), Size of downloads: 0 KiB So the question is why is portage trying to pull in llvm and thus clang to be built? For the second issue, I just for the life of me cannot figure out how to break the circular dependency to install clang. I have tried using package.provided for clang so that the clang provided by Apple would be used to build libcxx and llvm, but the sys-devel/libcxxabi-3.5.1 ebuild errors out with: * libcxxabi-3.5.1.src.tar.xz SHA256 SHA512 WHIRLPOOL size ;-) ... [ ok ] * libcxxabi needs to be built with clang++. Please do not override * CC (x86_64-apple-darwin14-gcc) and CXX (x86_64-apple-darwin14-g++) * or point them at clang and eerror clang++ respectively. * ERROR: sys-libs/libcxxabi-3.5.1::gentoo_prefix failed (setup phase): * (no error message) * * Call stack: * ebuild.sh, line 93: Called __call-ebuildshell 'pkg_setup' * ebuild.sh, line 502: Called pkg_setup * libcxxabi-3.5.1.ebuild, line 35: Called die * The specific snippet of code: * die I have tried turning off the forced clang use flag on llvm, but that results in the following portage error: $ emerge -pv llvm These are the packages that would be merged, in order: Calculating dependencies... done! emerge: there are no ebuilds built with USE flags to satisfy "~sys-devel/llvm-3.5.2[clang(-),debug=,multitarget?,python?,static-analyzer,abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?]". !!! One of the following packages is required to complete your request: - sys-devel/llvm-3.5.2::gentoo_prefix (Change USE: +clang) (dependency required by "sys-devel/clang-3.5.2-r100::gentoo_prefix" [ebuild]) (dependency required by "sys-libs/libcxxabi-3.5.1::gentoo_prefix" [ebuild]) (dependency required by "sys-libs/libcxx-3.5.1::gentoo_prefix" [ebuild]) (dependency required by "sys-devel/llvm-3.5.2::gentoo_prefix" [ebuild]) (dependency required by "llvm" [argument]) The bottom line is that I am completely lost on how to build and install clang $ emerge --info Portage 2.2.20-prefix (python 3.3.3-final-0, prefix/darwin/macos/10.10/x64, gcc-4.2.1, unavailable, 14.4.0 x86_64) ================================================================= System uname: Darwin-14.4.0-x86_64-i386-64bit Timestamp of repository gentoo_prefix: Tue, 04 Aug 2015 14:59:16 +0000 sh bash 4.3_p39 app-shells/bash: 4.3_p39::gentoo_prefix dev-lang/perl: 5.22.0::gentoo_prefix dev-lang/python: 2.7.8::gentoo_prefix, 3.3.3::gentoo_prefix dev-util/pkgconfig: 0.28-r3::gentoo_prefix sys-devel/autoconf: 2.69::gentoo_prefix sys-devel/automake: 1.14.1::gentoo_prefix sys-devel/gcc-config: 1.8-r1::gentoo_prefix sys-devel/libtool: 2.4.2-r1::gentoo_prefix sys-devel/make: 4.1-r1::gentoo_prefix Repositories: gentoo_prefix location: /Users/pvarner/Library/Gentoo/usr/portage sync-type: rsync sync-uri: rsync://rsync.prefix.bitzolder.nl/gentoo-portage-prefix priority: -1000 aliases: gentoo local location: /Users/pvarner/Library/Gentoo/usr/local/portage/local masters: gentoo_prefix ACCEPT_KEYWORDS="~x64-macos" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-apple-darwin14" CFLAGS="-march=nocona -O2 -pipe" CHOST="x86_64-apple-darwin14" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/terminfo" CXXFLAGS="-march=nocona -O2 -pipe" DISTDIR="/Users/pvarner/Library/Gentoo/usr/portage/distfiles" EMERGE_DEFAULT_OPTS="--with-bdeps=y --autounmask=n" FCFLAGS="" FEATURES="assume-digests binpkg-logs case-insensitive-fs config-protect-if-modified distlocks ebuild-locks fixlafiles force-prefix merge-sync news nostrip preserve-libs protect-owned sfperms strict unknown-features-warn unmerge-logs unmerge-orphans unprivileged userfetch userpriv usersandbox usersync" FFLAGS="" GENTOO_MIRRORS="http://distfiles.gentoo.org" LDFLAGS="-Wl,-dead_strip_dylibs" MAKEOPTS="-j1" PKGDIR="/Users/pvarner/Library/Gentoo/usr/portage/packages" PORTAGE_CONFIGROOT="/Users/pvarner/Library/Gentoo/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/Users/pvarner/Library/Gentoo/var/tmp" USE="coreaudio cracklib cxx ipv6 mmx mmxext modules ncurses nls objc objc++ prefix prefix-guest readline sse sse2 ssl svg unicode x64-macos zlib" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd 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" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" ELIBC="Darwin" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse" KERNEL="Darwin" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" 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, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
I figured out how to break the dependency by reading through the most up to date bootstrap-prefix.sh script. The steps to fix were: 1. Add the CC/CXX variables to make.conf 2. Add clang to package.provided 3. emerge --oneshot sys-libs/libcxx 4. emerge --oneshot --nodeps sys-devel/llvm 5. Remove clang from package.provided 6. emerge sys-devel/clang 7. Since I updated the toolchain for the system, emerge -e world
Glad you figured it out. It's a mess, sorry! There was no easy way out really.
Why was this bug closed? This bug is definitely not FIXED. Just because someone jumped through hoops to fix it and the bootstrap script also jumps through hoops doesn't mean it's fixed. It means that anyone upgrading is going to run into a major problem. [ebuild U ] sys-devel/binutils-apple-6.3:6 [6.1:6] USE="-libcxx -lto {-test}" 2,290 KiB [ebuild N ] sys-devel/llvm-3.5.2:0/3.5 USE="(clang) libffi ncurses static-analyzer -debug -doc -gold -libedit -multitarget -ocaml -python {-test} -xml" PYTHON_TARGETS="python2_7 (-pypy)" VIDEO_CARDS="-radeon" 20,985 KiB [ebuild N ] sys-libs/libcxx-3.6.2 USE="libcxxrt -static-libs {-test}" 922 KiB [ebuild N ] sys-libs/libcxxabi-3.6.2 544 KiB [ebuild N ] sys-devel/clang-3.5.2-r100:0/3.5 USE="static-analyzer -debug -multitarget -python" 0 KiB
(In reply to Timothy Miller from comment #3) > Why was this bug closed? This bug is definitely not FIXED. Just because > someone jumped through hoops to fix it and the bootstrap script also jumps > through hoops doesn't mean it's fixed. It means that anyone upgrading is > going to run into a major problem. Because honestly, it is a can't fix automatically. You really only have two choices, jump through the hoops that I listed or do a new prefix install using the bootstrap process. If you want to go through the hoops, email me directly and I will give you the commands that correspond to the steps that I listed.