When installing sys-libs/libcxx for the first time, it fails to build. >>> Emerging (1 of 1) sys-libs/libcxx-0.0_p20130531-r1 * libcxx-0.0_p20130531.tar.xz SHA256 SHA512 WHIRLPOOL size ;-) ... [ ok ] >>> Unpacking source... >>> Unpacking libcxx-0.0_p20130531.tar.xz to /var/tmp/portage/sys-libs/libcxx-0.0_p20130531-r1/work >>> Source unpacked in /var/tmp/portage/sys-libs/libcxx-0.0_p20130531-r1/work >>> Preparing source in /var/tmp/portage/sys-libs/libcxx-0.0_p20130531-r1/work/libcxx-0.0_p20130531 ... * Applying multilib.patch ... [ ok ] * Applying cxxrt.patch ... [ ok ] >>> Source prepared. >>> Configuring source in /var/tmp/portage/sys-libs/libcxx-0.0_p20130531-r1/work/libcxx-0.0_p20130531 ... >>> Working in BUILD_DIR: "/var/tmp/portage/sys-libs/libcxx-0.0_p20130531-r1/work/libcxx-0.0_p20130531_shared" cmake --no-warn-unused-cli -C /var/tmp/portage/sys-libs/libcxx-0.0_p20130531-r1/work/libcxx-0.0_p20130531_shared/gentoo_common_config.cmake -G Unix Makefiles -DCMAKE_INSTALL_PREFIX=/usr -DLIBCXX_CXX_ABI=libcxxrt -DLIBCXX_LIBCXXRT_INCLUDE_PATHS=/usr/include/libcxxrt/ -DCMAKE_BUILD_TYPE=Gentoo -DCMAKE_INSTALL_DO_STRIP=OFF -DCMAKE_USER_MAKE_RULES_OVERRIDE=/var/tmp/portage/sys-libs/libcxx-0.0_p20130531-r1/work/libcxx-0.0_p20130531_shared/gentoo_rules.cmake /var/tmp/portage/sys-libs/libcxx-0.0_p20130531-r1/work/libcxx-0.0_p20130531 Not searching for unused variables given on the command line. loading initial cache file /var/tmp/portage/sys-libs/libcxx-0.0_p20130531-r1/work/libcxx-0.0_p20130531_shared/gentoo_common_config.cmake -- The CXX compiler identification is Clang 3.3.0 -- The C compiler identification is Clang 3.3.0 -- Check for working CXX compiler: /usr/bin/clang++ -- Check for working CXX compiler: /usr/bin/clang++ -- broken CMake Error at /usr/share/cmake/Modules/CMakeTestCXXCompiler.cmake:54 (message): The C++ compiler "/usr/bin/clang++" is not able to compile a simple test program. It fails with the following output: Change Dir: /var/tmp/portage/sys-libs/libcxx-0.0_p20130531-r1/work/libcxx-0.0_p20130531_shared/CMakeFiles/CMakeTmp Run Build Command:/usr/bin/gmake "cmTryCompileExec3134877955/fast" gmake -f CMakeFiles/cmTryCompileExec3134877955.dir/build.make CMakeFiles/cmTryCompileExec3134877955.dir/build gmake[1]: Entering directory `/var/tmp/portage/sys-libs/libcxx-0.0_p20130531-r1/work/libcxx-0.0_p20130531_shared/CMakeFiles/CMakeTmp' /usr/bin/cmake -E cmake_progress_report /var/tmp/portage/sys-libs/libcxx-0.0_p20130531-r1/work/libcxx-0.0_p20130531_shared/CMakeFiles/CMakeTmp/CMakeFiles 1 Building CXX object CMakeFiles/cmTryCompileExec3134877955.dir/testCXXCompiler.cxx.o /usr/bin/clang++ -DNDEBUG -O2 -pipe -o CMakeFiles/cmTryCompileExec3134877955.dir/testCXXCompiler.cxx.o -c /var/tmp/portage/sys-libs/libcxx-0.0_p20130531-r1/work/libcxx-0.0_p20130531_shared/CMakeFiles/CMakeTmp/testCXXCompiler.cxx Linking CXX executable cmTryCompileExec3134877955 /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec3134877955.dir/link.txt --verbose=1 /usr/bin/clang++ -O2 -pipe CMakeFiles/cmTryCompileExec3134877955.dir/testCXXCompiler.cxx.o -o cmTryCompileExec3134877955 /usr/bin/x86_64-gentoo-freebsd9.0-ld: cannot find -lstdc++ clang: error: linker command failed with exit code 1 (use -v to see invocation) gmake[1]: *** [cmTryCompileExec3134877955] Error 1 gmake[1]: Leaving directory `/var/tmp/portage/sys-libs/libcxx-0.0_p20130531-r1/work/libcxx-0.0_p20130531_shared/CMakeFiles/CMakeTmp' gmake: *** [cmTryCompileExec3134877955/fast] Error 2 CMake will not be able to correctly generate this project. Call Stack (most recent call first): CMakeLists.txt:7 (project) -- Configuring incomplete, errors occurred! * ERROR: sys-libs/libcxx-0.0_p20130531-r1 failed (configure phase): * cmake failed Reproducible: Always Steps to Reproduce: 1. emerge -C libcxx (if it is installed already) 2. emerge libcxx 3.
Created attachment 351554 [details, diff] sample patch for libcxx-0.0_p20130531-r1.ebuild
(In reply to Yuta SATOH from comment #1) > Created attachment 351554 [details, diff] [details, diff] > sample patch for libcxx-0.0_p20130531-r1.ebuild Note) This patch is not required if you've fixes Bug 474042.
better fix clang since you provided the patches note: _gcc-install-dir is supposed to be an internal function.
should be fixed in recent libcxx versions