public inbox for gentoo-alt@lists.gentoo.org
 help / color / mirror / Atom feed
From: Michael Weiser <michael@weiser.dinsnail.net>
To: "Han H." <twn@outlook.com>
Cc: "gentoo-alt@lists.gentoo.org" <gentoo-alt@lists.gentoo.org>
Subject: Re: [gentoo-alt] Update clang failed (El Captain)
Date: Fri, 2 Sep 2016 17:44:48 +0200	[thread overview]
Message-ID: <20160902154448.mgcjj7clteuse7eo@weiser.dinsnail.net> (raw)
In-Reply-To: <BAY180-W81C428D07DAC013D67B402B1E50@phx.gbl>

Hello Han,

On Fri, Sep 02, 2016 at 02:49:22PM +0000, Han H. wrote:

> This might be the relevant error message:

> 'stdio.h' file not found

The more interesting message is this one:

> x86_64-apple-darwin15-clang-3.7: warning: no such sysroot directory: '-mmacosx-version-min=10.5'

It basically says thath '-mmacosx-version-min=10.5' is passed as
parameter to -isysroot which is bogus. Looking at the compiler call for
eprintf.c above it:

> /Users/abc/gentoo/usr/bin/x86_64-apple-darwin15-clang  -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Iprojects/compiler-rt/lib/builtins -I/Users/abc/gentoo/var/tmp/portage/sys-devel/llvm-3.8.1/work/llvm-3.8.1.src/projects/compiler-rt/lib/builtins -Iinclude -I/Users/abc/gentoo/var/tmp/portage/sys-devel/llvm-3.8.1/work/llvm-3.8.1.src/include  -DNDEBUG -arch i386    -isysroot -mmacosx-version-min=10.5 -arch i386 -fPIC -O3 -fvisibility=hidden -DVISIBILITY_HIDDEN -Wall -fomit-frame-pointer -MD -MT projects/compiler-rt/lib/builtins/CMakeFiles/clang_rt.eprintf.dir/eprintf.c.o -MF projects/compiler-rt/lib/builtins/CMakeFiles/clang_rt.eprintf.dir/eprintf.c.o.d -o projects/compiler-rt/lib/builtins/CMakeFiles/clang_rt.eprintf.dir/eprintf.c.o -c /Users/abc/gentoo/var/tmp/portage/sys-devel/llvm-3.8.1/work/llvm-3.8.1.src/projects/compiler-rt/lib/builtins/eprintf.c

... you can see that this is actually the case:

-isysroot -mmacosx-version-min=10.5

So you'd need to find out why that is the case.

Grepping for sysroot in llvm-3.8.1.src/projects/compiler-rt and knowing
that llvm is nowadays built using cmake on Gentoo I find
cmake/config-ix.cmake which has the following interesting code block
that might lead to an -isysroot parameter without path:

  # On Darwin if /usr/include doesn't exist, the user probably has Xcode but not
  # the command line tools. If this is the case, we need to find the OS X
  # sysroot to pass to clang.
  if(NOT EXISTS /usr/include)
    execute_process(COMMAND xcodebuild -version -sdk macosx Path
       OUTPUT_VARIABLE OSX_SYSROOT
       ERROR_QUIET
       OUTPUT_STRIP_TRAILING_WHITESPACE)
    set(OSX_SYSROOT_FLAG "-isysroot${OSX_SYSROOT}")
  endif()

So to get the obvious out of the way:

1. Do you have /usr/include
2. Do you have the XCode command line tools installed?
3. Have you recently upgraded Xcode and possibly forgotten the command
   line tools so they don't match in version?
3. What does xcodebuild -version -sdk macosx Path output?

Another possiblity is this bit of CMake code in the same file:

  find_darwin_sdk_dir(DARWIN_osx_SYSROOT macosx)

  if(DARWIN_osx_SYSROOT)
    list(APPEND DARWIN_osx_CFLAGS -isysroot ${DARWIN_osx_SYSROOT})
    list(APPEND DARWIN_osx_LINKFLAGS -isysroot ${DARWIN_osx_SYSROOT})
  endif()

find_darwin_sdk_dir is defined in ./cmake/Modules/CompilerRTDarwinUtils.cmake
and contains a basically identical call to xcodebuild.

Also, I just noticed that I have llvm-3.8.1-r1 on my box and emerge -atuND
@world is offering me a *downgrade* to 3.8.1 which you are trying to install.
I've just kicked this off and will let you know if it ran through on my system.

Yet also, there is an ebuild llvm-3.8.1-r2 and llvm-3.9.0_rc3. Have you tried
any of those (-r1, -r2, _rc3)?
-- 
tschoe, Michael
I like Kaba!


  reply	other threads:[~2016-09-02 16:00 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-02 14:49 [gentoo-alt] Update clang failed (El Captain) Han H.
2016-09-02 15:44 ` Michael Weiser [this message]
2016-09-02 19:31   ` Han H.
2016-09-02 20:25     ` Michael Weiser
2016-09-04 15:06     ` Fabian Groffen
2016-09-06  7:55       ` Fabian Groffen
2016-09-06  7:56         ` Matt Michalowski
2016-09-11  0:05       ` Michael Weiser
2016-09-11  8:09         ` Fabian Groffen
2016-09-22 13:05           ` Michael Weiser
2016-12-23 10:57             ` Fabian Groffen
  -- strict thread matches above, loose matches on Subject: below --
2016-09-06 21:37 Han H.
2016-09-06 21:37 ` Han H.
2016-09-07  7:36   ` Fabian Groffen
2016-09-08 19:36     ` Han H.
2016-09-03 23:36 Han H.
2016-08-24 16:40 Han H.
2016-08-29 12:35 ` Michael Weiser

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160902154448.mgcjj7clteuse7eo@weiser.dinsnail.net \
    --to=michael@weiser.dinsnail.net \
    --cc=gentoo-alt@lists.gentoo.org \
    --cc=twn@outlook.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox