Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 445308 - dev-util/cmake-2.8.10.2: Can't find libstdc++ headers with -isysroot
Summary: dev-util/cmake-2.8.10.2: Can't find libstdc++ headers with -isysroot
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All OS X
: Normal normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-30 09:10 UTC by Charles Davis
Modified: 2013-04-23 20:04 UTC (History)
2 users (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 Charles Davis 2012-11-30 09:10:04 UTC
The gcc that comes with Xcode installs its C++ header files to <prefix>/include/c++/<version>/. The gcc that Portage installs, however, installs the C++ header files to <prefix>/lib/gcc/<CTARGET>/<version>/include/g++-v4. (This appears to be intentional, since it is listed in gcc's configure args running `gcc -v`; see below).

Naturally, this creates a problem for cmake when it builds itself. It likes to use the -isysroot parameter to select one of the Xcode SDK bundles. Since the C++ headers are in the "wrong" place, Prefix GCC can't compile C++ code using libstdc++ against the Xcode SDKs, and so cmake fails.

I'm not sure if the bug is in gcc-apple (for putting its headers in the "wrong" place) or cmake (for being totally stupid and using -isysroot with prefix gcc). Since it worked before, I'm leaning toward the latter.

Reproducible: Always

Steps to Reproduce:
1. USE=cxx emerge gcc-apple
2. emerge cmake
Actual Results:  
Cmake falls over on itself like so:

[  3%] Building CXX object Utilities/KWIML/test/CMakeFiles/cmIML_test.dir/test_include_CXX.cxx.o
cd /Users/chip/Gentoo/var/tmp/portage/dev-util/cmake-2.8.10.2/work/cmake-2.8.10.2_build/Utilities/KWIML/test && /Users/chip/Gentoo/usr/bin/i686-apple-darwin10-g++  -DKWIML_LANGUAGE_C -DKWIML_LANGUAGE_CXX -DKWIML_NAMESPACE=cmIML  -DNDEBUG -O2 -pipe -march=core2  -Wno-format -isysroot /Developer/SDKs/MacOSX10.6.sdk -mmacosx-version-min=10.6 -I/Users/chip/Gentoo/var/tmp/portage/dev-util/cmake-2.8.10.2/work/cmake-2.8.10.2_build/Utilities/KWIML/test -I/Users/chip/Gentoo/var/tmp/portage/dev-util/cmake-2.8.10.2/work/cmake-2.8.10.2_build/Utilities    -o CMakeFiles/cmIML_test.dir/test_include_CXX.cxx.o -c /Users/chip/Gentoo/var/tmp/portage/dev-util/cmake-2.8.10.2/work/cmake-2.8.10.2/Utilities/KWIML/test/test_include_CXX.cxx
/Users/chip/Gentoo/var/tmp/portage/dev-util/cmake-2.8.10.2/work/cmake-2.8.10.2/Utilities/KWIML/test/test_include_CXX.cxx:12:18: error: string: No such file or directory


Expected Results:  
Cmake should successfully finish building itself (the second time, after the bootstrap phase).

$ gcc -v
Using built-in specs.
Target: i686-apple-darwin10
Configured with: /Users/chip/Gentoo/var/tmp/portage/sys-devel/gcc-apple-4.2.1_p5666-r1/work/gcc-5666.3/configure --prefix=/Users/chip/Gentoo/usr --bindir=/Users/chip/Gentoo/usr/i686-apple-darwin10/gcc-bin/4.2.1 --includedir=/Users/chip/Gentoo/usr/lib/gcc/i686-apple-darwin10/4.2.1/include --datadir=/Users/chip/Gentoo/usr/share/gcc-data/i686-apple-darwin10/4.2.1 --mandir=/Users/chip/Gentoo/usr/share/gcc-data/i686-apple-darwin10/4.2.1/man --infodir=/Users/chip/Gentoo/usr/share/gcc-data/i686-apple-darwin10/4.2.1/info --with-gxx-include-dir=/Users/chip/Gentoo/usr/lib/gcc/i686-apple-darwin10/4.2.1/include/g++-v4 --host=i686-apple-darwin10 --enable-version-specific-runtime-libs --build=i686-apple-darwin10 --enable-nls --without-included-gettext --with-system-zlib --disable-checking --disable-werror --enable-shared --enable-threads=posix --with-local-prefix=/Users/chip/Gentoo/usr --with-as=/Users/chip/Gentoo/usr/bin/i686-apple-darwin10-as --with-ld=/Users/chip/Gentoo/usr/bin/i686-apple-darwin10-ld --disable-multilib --enable-languages=c,c++,objc,obj-c++ --enable-libgomp
Thread model: posix
gcc version 4.2.1 (Gentoo 4.2.1_p5666-r1, Apple Inc. build 5666) (dot 3)
$ emerge --info

Portage 2.2.01.21313-prefix (prefix/darwin/macos/10.6/x86, gcc-4.2.1, unavailable, 10.8.0 i386)
=================================================================
System uname: Darwin-10.8.0-i386-32bit
Timestamp of tree: Fri, 30 Nov 2012 07:52:17 +0000
distcc 3.1-toolwhip.1 i386-apple-darwin10.0 [disabled]
ccache version 3.1.8 [disabled]
app-shells/bash:      4.2_p37::gentoo_prefix
dev-lang/python:      2.7.3-r2::gentoo_prefix
dev-util/ccache:      3.1.8::gentoo_prefix
dev-util/cmake:       2.8.9-r1::gentoo_prefix
dev-util/pkgconfig:   0.27.1::gentoo_prefix
sys-devel/autoconf:   2.69::gentoo_prefix
sys-devel/automake:   1.12.4::gentoo_prefix
sys-devel/gcc-config: 1.5-r2::gentoo_prefix
sys-devel/libtool:    2.4.2::gentoo_prefix
sys-devel/make:       3.82-r4::gentoo_prefix
Repositories: gentoo_prefix
ACCEPT_KEYWORDS="~x86-macos"
ACCEPT_LICENSE="* -@EULA"
CBUILD="i686-apple-darwin10"
CFLAGS="-O2 -pipe -march=core2"
CHOST="i686-apple-darwin10"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/portage /etc/revdep-rebuild /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe -march=core2"
DISTDIR="/Users/chip/Gentoo/usr/portage/distfiles"
FCFLAGS=""
FEATURES="assume-digests binpkg-logs collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles force-prefix news nostrip parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-dead_strip_dylibs"
PKGDIR="/Users/chip/Gentoo/usr/portage/packages"
PORTAGE_CONFIGROOT="/Users/chip/Gentoo/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/Users/chip/Gentoo/var/tmp"
PORTDIR="/Users/chip/Gentoo/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.prefix.freens.org/gentoo-portage-prefix"
USE="X aqua bash-completion berkdb bzip2 cairo coreaudio cracklib crypt curl cxx dbus doc exceptions expat extensions fontconfig gdbm gmp gnutls gpg gzip iconv icu ipv6 jbig jpeg libssh2 lzma lzo mmx mmxext mng modules mysql ncurses nls objc objc++ pch pcre perl png prefix python qt3support readline ruby sasl sql sqlite sqlite3 sse sse2 ssl subversion threads tiff tk truetype unicode uuid vim vim-syntax x86-macos xinerama xml xpm xv 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" CAMERAS="ptp2" ELIBC="Darwin" GPSD_PROTOCOLS="garmin garmintxt gpsclock" INPUT_DEVICES="keyboard mouse" KERNEL="Darwin" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby18 ruby19" SANE_BACKENDS="apple" USERLAND="GNU"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, MAKEOPTS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
$ emerge -pqv gcc-apple cmake
[ebuild     U ] dev-util/cmake-2.8.10.2 [2.8.9-r1] USE="ncurses vim-syntax -emacs -qt4 {-test}" 
[ebuild   R   ] sys-devel/gcc-apple-4.2.1_p5666-r1 [4.2.1_p5666-r1] USE="cxx nls objc objc++ openmp -build -fortran -multislot -nptl {-test} -vanilla"
Comment 1 Fabian Groffen gentoo-dev 2012-11-30 09:13:14 UTC
The latter one, cmake.  It shouldn't try to be smarter than the toolchain.
Comment 2 Fabian Groffen gentoo-dev 2012-12-05 11:17:34 UTC
I masked this cmake release for this problem on Darwin
Comment 3 Myk Taylor 2013-01-02 08:45:12 UTC
it looks like this package has become unmasked due to a -r1.  could
  =dev-util/cmake-2.8.10.2
be changed to
  ~dev-util/cmake-2.8.10.2
or
  =dev-util/cmake-2.8.10.2-r1

in prefix/darwin/package.mask?
Comment 4 Fabian Groffen gentoo-dev 2013-01-03 17:34:57 UTC
yes indeed, done
Comment 5 Fabian Groffen gentoo-dev 2013-04-23 20:04:33 UTC
I've fixed 2.8.10.2-r2 now