Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8025275

JDK 8 build fails in configure phase on Mac (says not the required gcc)

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Not an Issue
    • Affects Version/s: 8, 9
    • Fix Version/s: None
    • Component/s: infrastructure
    • Labels:
    • Environment:

      Mountain lion

    • Subcomponent:
    • OS:
      os_x

      Description

      When building JDK on Mac , we are getting ,
      "The C compiler (located as /usr/bin/gcc) does not seem to be the required GCC compiler".

      The above message is apparently because of parsing of the command "gcc --version" which is failing as the Apple's gcc --version command output is different from the JDK configure script's expected result. So though we have gcc etc configure doesn't want to move further. We have installed XCode 5.0 and the required XCode as per JDK 8 build README is 4.5.X.

      Bottom line : Parsing the gcc --version must be improved to consider all versions of GCC (or) get a workaround to find the GCC version(not sure how though).

        Activity

        Hide
        skonchad Sandeep Konchady added a comment - - edited
        Steps to reproduce:

        1. Take a clean Mac 10.8.5 system and install JDK 7u40, Mercurial, Xcode 4.5, xquartz and ccache
        2. Open Xcode and install command line tools from Preference --> Downloads
        3. Check out OpenJDK 8 as documented in (http://hg.openjdk.java.net/jdk8/jdk8/raw-file/tip/README-builds.html)
        4. Follow the steps listed in the above Wiki. At the point of running ./configure, autoconf checks for gcc and fails

        ps: After installing Xcode 4.5 (default from Apple app store) and it's command line tools, "/usr/llvm-gcc-4.2" is missing from the system.
        Show
        skonchad Sandeep Konchady added a comment - - edited Steps to reproduce: 1. Take a clean Mac 10.8.5 system and install JDK 7u40, Mercurial, Xcode 4.5, xquartz and ccache 2. Open Xcode and install command line tools from Preference --> Downloads 3. Check out OpenJDK 8 as documented in ( http://hg.openjdk.java.net/jdk8/jdk8/raw-file/tip/README-builds.html ) 4. Follow the steps listed in the above Wiki. At the point of running ./configure, autoconf checks for gcc and fails ps: After installing Xcode 4.5 (default from Apple app store) and it's command line tools, "/usr/llvm-gcc-4.2" is missing from the system.
        Hide
        ihse Magnus Ihse Bursie added a comment -
        According to your description, you have installed XCode 5.0.

        This will replace the XCode 4.5 command line tools, and reportedly xcode-select will not function on command line tools.

        XCode 5.0 is currently not supported, so the configure test is actually correct.

        See http://mail.openjdk.java.net/pipermail/build-dev/2013-September/010257.html for details on how to recover.
        Show
        ihse Magnus Ihse Bursie added a comment - According to your description, you have installed XCode 5.0. This will replace the XCode 4.5 command line tools, and reportedly xcode-select will not function on command line tools. XCode 5.0 is currently not supported, so the configure test is actually correct. See http://mail.openjdk.java.net/pipermail/build-dev/2013-September/010257.html for details on how to recover.
        Hide
        srikchan Srikalyan Chandrashekar (Inactive) added a comment - - edited
        [~ihse] BTW i had a clean machine(i.e i never had 4.5 tools installed so there is no issue of replacing the earlier tools. Now after scraping through the apple insider pages i found that LLVM is the default backend for the clang and gcc compiler front ends. Henceforth there is no pure GCC in OSX , it would be nice to account this into the build system so that it will automatically be valid for future tools versions.
        Show
        srikchan Srikalyan Chandrashekar (Inactive) added a comment - - edited [~ihse] BTW i had a clean machine(i.e i never had 4.5 tools installed so there is no issue of replacing the earlier tools. Now after scraping through the apple insider pages i found that LLVM is the default backend for the clang and gcc compiler front ends. Henceforth there is no pure GCC in OSX , it would be nice to account this into the build system so that it will automatically be valid for future tools versions.
        Hide
        srikchan Srikalyan Chandrashekar (Inactive) added a comment -
        If anybody installed command line tools through XCode 5 here is the easy way to uninstall it

        lsbom -fls /var/db/receipts/com.apple.pkg.DeveloperToolsCLI.bom | sudo xargs -I{} rm -r "{}"
        sudo rm /var/db/receipts/com.apple.pkg.DeveloperToolsCLI.bom
        sudo rm /var/db/receipts/com.apple.pkg.DeveloperToolsCLI.plist

        Without uninstallation , even if you got 4.6.X XCode ,it will still see the LLVM as the default compiler.
        Show
        srikchan Srikalyan Chandrashekar (Inactive) added a comment - If anybody installed command line tools through XCode 5 here is the easy way to uninstall it lsbom -fls /var/db/receipts/com.apple.pkg.DeveloperToolsCLI.bom | sudo xargs -I{} rm -r "{}" sudo rm /var/db/receipts/com.apple.pkg.DeveloperToolsCLI.bom sudo rm /var/db/receipts/com.apple.pkg.DeveloperToolsCLI.plist Without uninstallation , even if you got 4.6.X XCode ,it will still see the LLVM as the default compiler.

          People

          • Assignee:
            Unassigned
            Reporter:
            srikchan Srikalyan Chandrashekar (Inactive)
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: