3

I'm getting recurring errors when using make on Mac OS Mountain Lion v10.8.4.

I tried to install libev, and, after running ./configure, I ran make and got:

libtool: link: gcc -dynamiclib -Wl,-undefined -Wl,dynamic_lookup -o .libs/libev.4.dylib  .libs/ev.o .libs/event.o    -O3   -install_name  /usr/local/lib/libev.4.dylib -compatibility_version 5 -current_version 5.0 -Wl,-single_module
libtool: link: dsymutil .libs/libev.4.dylib || :
libtool: link: (cd ".libs" && rm -f "libev.dylib" && ln -s "libev.4.dylib" "libev.dylib")
libtool: link: ar cru .libs/libev.a  ev.o event.o
ranlib: unrecognized option `-q'
ranlib: Try `ranlib --help' for more information.
ar: internal ranlib command failed
make[1]: *** [libev.la] Error 1
make: *** [all] Error 2

I see a pattern because when I run make when trying to install httpd I get this error:

libtool: link: rm -fr  .libs/libev.4.dylib .libs/libev.4.dylib.dSYM .libs/libev.a .libs/libev.dylib
libtool: link: gcc -dynamiclib -Wl,-undefined -Wl,dynamic_lookup -o .libs/libev.4.dylib  .libs/ev.o .libs/event.o    -O3   -install_name  /usr/local/lib/libev.4.dylib -compatibility_version 5 -current_version 5.0 -Wl,-single_module
libtool: link: dsymutil .libs/libev.4.dylib || :
libtool: link: (cd ".libs" && rm -f "libev.dylib" && ln -s "libev.4.dylib" "libev.dylib")
libtool: link: ar cru .libs/libev.a  ev.o event.o
ranlib: unrecognized option `-q'
ranlib: Try `ranlib --help' for more information.
ar: internal ranlib command failed
make[1]: *** [libev.la] Error 1
make: *** [all] Error 2

It looks like I have an issue with ranlib but I'm not sure how to fix it. I saw somewhere that I should reinstall my developer tools, so I did but it hasn't helped.

the Tin Man
  • 158,662
  • 42
  • 215
  • 303
guytamir1
  • 73
  • 2
  • 12

1 Answers1

0

First the obvious actions: make sure you have the latest libev release, and Xcode is up to date. The configure system seems outdated, as it detects the (my) host system as i386-apple-darwin12.4.0 rather than x86_64-apple-darwin12.4.0. Though it still seemed to build.

If you have the autotools installed, e.g., autoconf-2.69, automake-1.13.3, and libtool-2.4.2 (which is typically installed as glibtool on OS X), you can run the included autoreconf command with: sh autogen.sh to refresh the configure system. It will issue a few warnings that can be ignored.

./configure CC="clang" CFLAGS="-pipe -W -Wall -O2 [-march=core2]"

Xcode -> Preferences -> Downloads -> Components :

check and install "Command Line Tools if you haven't already, which might be enough. If you still have a terminal open through the process, type the rehash command. Possibly you've done all this, but some Mac developers never leave the IDE.

the Tin Man
  • 158,662
  • 42
  • 215
  • 303
Brett Hale
  • 21,653
  • 2
  • 61
  • 90
  • i'm not sure libev is even installed on my system, but when i try to install it i get the same error as i posted on the first message (make[1]: *** [libev.la] Error 1) etc. My Xcode is up to date and i've installed Command Line Tools. regarding the autotools, i have the libtool but don't have the other ones.. – guytamir1 Jun 23 '13 at 20:25
  • @ Brett Hale first of all thanks! but unfortunately when i run sudo make command i still get the same errors as in last messages. I've installed the glibtools and tried to run the sh authogen.sh and then the ./configure CC="clang" .... but i get this error that the Compiler does not work... if i run the the ./configure without any flags then its ok but when i run the make command again same error (make[1]: *** [libev.la] Error 1) – guytamir1 Jun 24 '13 at 08:16