Having problems installing Yet Another Web Server (YAWS) on OS X 10.7 (Lion) or 10.8 (Mountain Lion)? ./configure not working? no acceptable C compiler found in $PATH? You’ve come to the right place.
Assuming you already have Erlang installed, there are two issues that will trip you up when you try to get YAWS up and running as well.
GNU Compiler Collection
In order to install YAWS you will need GCC. GCC isn’t installed by default on a regular OS X nor is it even installed as part of Xcode (as of v4.4).
If you have Xcode installed, you can enable it from within Xcode itself following instructions over on StackOverflow.
If you don’t have Xcode installed, you can download and install the command line tools separately (an absence of a /Developer folder on your drive — and Xcode content within it — verifies that you don’t have Xcode installed).
- Download the latest Command Line Tools (OS X Lion or Mountain Lion) for Xcode from Apple’s Developer site
- You get an image called something like xcode462_cltools_10_86938259a.dmg
- Mount the image
- run the installer (.mpkg) and accept the defaults
Now $ gcc -v in terminal will report something like:
Using built-in specs.
Configured with: /private/var/tmp/llvmgcc42/llvmgcc42-2336.11~182/src/configure –disable-checking –enable-werror –prefix=/Applications/Xcode.app/Contents/Developer/usr/llvm-gcc-4.2 –mandir=/share/man –enable-languages=c,objc,c++,obj-c++ –program-prefix=llvm- –program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ –with-slibdir=/usr/lib –build=i686-apple-darwin11 –enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2336.11~182/dst-llvmCore/Developer/usr/local –program-prefix=i686-apple-darwin11- –host=x86_64-apple-darwin11 –target=i686-apple-darwin11 –with-gxx-include-dir=/usr/include/c++/4.2.1
Thread model: posix
gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)
Where you get the YAWS source from will determine which build approach will work.
Some will suggest that you clone the GitHub repo but that won’t work without additional effort.
Just download the latest YAWS source (e.g. yaws-1.96.tar.gz) from the project’s website and then follow the standard ./configure, make, and sudo make install process to install it. Step-by-step instructions can, once again, be found on StackOverflow.
You should be good to go now. Have fun!