1

I am trying to build myself a new version of rsync 3.1.1 under Mac OS 10.10.3, as the mac comes with an older version, and the project does not distribute binaries.

I followed this simple script but it hiccups on gcc. (I am not sure why — though I removed XCode to save disk space, I have the command line tools, incl. gcc in /usr/bin etc.) I would try to build it with clang instead, but how exactly shall I do that?

Here is the error from the script:

configure.sh: Configuring rsync 3.1.1
checking build system type... x86_64-apple-darwin14.3.0
checking host system type... x86_64-apple-darwin14.3.0
checking whether to include debugging
symbols... yes
checking for gcc... gcc
checking whether the C compiler works... no
configure.sh: error: in `/Users/laszlosandor/Downloads/rsync-3.1.1':
configure.sh: error: C
compiler cannot create executable
See `config.log' for more details
make: *** No targets specified and no makefile found.  Stop.

Or even more from the relevant sections of config.log:

gcc: warning: couldn't understand kern.osversion '14.3.0
configure.sh:2893: $? = 0
configure.sh:2882: gcc -v >&5
gcc: warning: couldn't understand kern.osversion '14.3.0
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-apple-darwin12.2.0/4.8.0/lto-wrapper
Target: x86_64-apple-darwin12.2.0
Configured with: ../gcc-4.8-20120930/configure --enable-languages=c++,fortran
Thread model: posix
gcc version 4.8.0 20120930 (experimental) (GCC) 
configure.sh:2893: $? = 0
configure.sh:2882: gcc -V >&5
gcc: warning: couldn't understand kern.osversion '14.3.0
gcc: error: unrecognized command line option '-V'
gcc: fatal error: no input files
compilation terminated.
configure.sh:2893: $? = 1
configure.sh:2882: gcc -qversion >&5
gcc: warning: couldn't understand kern.osversion '14.3.0
gcc: error: unrecognized command line option '-qversion'
gcc: fatal error: no input files
compilation terminated.
configure.sh:2893: $? = 1
configure.sh:2913: checking whether the C compiler works
configure.sh:2935: gcc    conftest.c  >&5
gcc: warning: couldn't understand kern.osversion '14.3.0
ld: library not found for -lgcc_ext.10.4
collect2: error: ld returned 1 exit status
configure.sh:2939: $? = 1
configure.sh:2977: result: no
configure.sh: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define RSYNC_VERSION "3.1.1"
| /* end confdefs.h.  */
| 
| int
| main ()
| {
| 
|   ;
|   return 0;
| }
configure.sh:2982: error: in `/Users/laszlosandor/Downloads/rsync-3.1.1':
configure.sh:2984: error: C compiler cannot create executables
See `config.log' for more details

By the way, I know I could have just stuck with Homebrew, but now I want to learn.

7
  • @bmike Also, I like that you're interested in the specifics of the problem, but I was interested in a specific solution. Why can't ask for that too? I don't see why clang would be irrelevant here.
    – László
    Apr 13, 2015 at 16:34
  • Feel free to revery my title change if it's not a help or what you look for. The detail in config.log is awesome. Last question - does gcc --version show Apple LLVM version 6.1.0 (clang-602.0.49) (based on LLVM 3.6.0svn)
    – bmike
    Apr 13, 2015 at 17:52
  • If you want more information on the problem please tell us what you've tried so far. Particularly how you removed Xcode but kept the command-line tools. It appears from the errors that you have GCC installed through brew perhaps? Apr 13, 2015 at 18:31
  • I simply deleted Xcode, I think. Yes, maybe gcc came with homebrew. So that's a problem? And it makes no sense to try clang instead?
    – László
    Apr 13, 2015 at 18:33
  • The gcc that comes with Xcode is actually clang. :) I'd try brew uninstall gcc, then xcode-select --install, then try ./configure again. Your system just appears to be a bit confused right now. Apr 13, 2015 at 18:55

1 Answer 1

1

The problem is with the install of the command-line developer tools on your Mac.

Try installing again with the following command. This should install the command-line tools alone.

 xcode-select --install

The script is testing the command-line tools to see whether a compatible version is installed but is getting back confusing responses. This is why it fails.

9
  • I get xcode-select: error: command line tools are already installed, use "Software Update" to install updates
    – László
    Apr 13, 2015 at 19:37
  • Type /usr/bin/gcc -v into a Terminal window and let us know what it says. Apr 13, 2015 at 19:38
  • Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 Apple LLVM version 6.1.0 (clang-602.0.49) (based on LLVM 3.6.0svn) Target: x86_64-apple-darwin14.3.0 Thread model: posix
    – László
    Apr 13, 2015 at 19:39
  • Cool. Now try just gcc -v. Apr 13, 2015 at 19:40
  • Weird. gcc: warning: couldn’t understand kern.osversion ‘14.3.0 Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-apple-darwin12.2.0/4.8.0/lto-wrapper Target: x86_64-apple-darwin12.2.0 Configured with: ../gcc-4.8-20120930/configure --enable-languages=c++,fortran Thread model: posix gcc version 4.8.0 20120930 (experimental) (GCC)
    – László
    Apr 13, 2015 at 19:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .