bunuelo/funk2 — Issue #1: Build failure on OSX 10.6 x86_64
Author: dasmith
Created: 2012-01-15 21:26:06+00:00
State: open

Build on OSX failed because some of the CPU functions are missing.

1. `librt` is can't be found. (**partial solution**: removed `-ld` from Makefile)
2. `clock_get_time` undefined in `c/configurator.c` (**solution**: [from here](https://gist.github.com/1087739)
3. `CPU_SETSIZE` undefined (**solution**; [here](http://github.com/certik/sysconf/blob/master/ncpus.c)

I'll attach a patch with some of these changes.

That's just part of it... Here's the current result of `Make`:

```
mkdir -p lib/.libs
gcc -Wall -DF2__DLFCN__SUPPORTED -DF2__INSTALL__BOOTSTRAP_IMG__FILENAME=\"/usr/share/funk2/img/bootstrap.img\" -DF2__COMPILE__BOOTSTRAP_REPL_IMG__FILENAME=\"./img/bootstrap-repl.img\" -DF2__COMPILE__BOOTSTRAP_IMG__FILENAME=\"./img/bootstrap.img\" -D_THREAD_SAFE -D_THREAD_SAFE -D_REENTRANT -I/usr/local/Cellar/gtk+/2.24.5/include/gtk-2.0 -I/usr/local/Cellar/gtk+/2.24.5/lib/gtk-2.0/include -I/usr/local/Cellar/atk/2.0.1/include/atk-1.0 -I/usr/local/Cellar/gdk-pixbuf/2.23.5/include/gdk-pixbuf-2.0 -I/usr/local/Cellar/pango/1.28.4/include/pango-1.0 -I/usr/local/Cellar/glib/2.28.7/include/glib-2.0 -I/usr/local/Cellar/glib/2.28.7/lib/glib-2.0/include -I/usr/local/Cellar/gettext/0.18.1.1/include -I/usr/local/Cellar/glib/2.28.7/include -I/usr/X11/include/cairo -I/usr/X11/include/pixman-1 -I/usr/X11/include/freetype2 -I/usr/X11/include -I/usr/X11/include/libpng12 -D_REENTRANT -I/usr/local/Cellar/glib/2.28.7/include/glib-2.0 -I/usr/local/Cellar/glib/2.28.7/lib/glib-2.0/include -I/usr/local/Cellar/gettext/0.18.1.1/include -I/usr/local/Cellar/glib/2.28.7/include -I/usr/X11/include/cairo -I/usr/X11/include/pixman-1 -I/usr/X11/include/freetype2 -I/usr/X11/include -I/usr/X11/include/libpng12 c/configurator.c -o bin/configurator
c/configurator.c: In function ‘raw__processor_thread__execution_nanoseconds’:
c/configurator.c:73: warning: implicit declaration of function ‘clock_gettime’
c/configurator.c: In function ‘main’:
c/configurator.c:104: warning: implicit declaration of function ‘sched_getaffinity’
c/configurator.c:108: warning: implicit declaration of function ‘CPU_ISSET’
Undefined symbols:
"_sched_getaffinity", referenced from:
_main in cctTb8Pz.o
"_clock_gettime", referenced from:
_raw__processor_thread__execution_nanoseconds in cctTb8Pz.o
"_CPU_ISSET", referenced from:
_main in cctTb8Pz.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [bin/configurator] Error 1
```