Friday, April 27, 2007

ALBERTA on Mac

System: MacBook Intel-Mac OS X 10.4


1. Make sure development libraries are installed.

They are available from OS X installation DVD. Or you can go to HPC for Mac. They have everything.

2. If you want to use gltools, see the following instruction by Omar Lakkis.

Before installing gltools, one must make sure GL are present. A quick check can be performed by doing

$ locate libGL.a
[which in my case gave me]
/usr/X11R6/lib/libGL.a
[this information is important for later.]

and
locate include/GL

/usr/X11R6/include/GL
/usr/X11R6/include/GL/gl.h
/usr/X11R6/include/GL/glext.h
/usr/X11R6/include/GL/glu.h
/usr/X11R6/include/GL/GLwDrawA.h
/usr/X11R6/include/GL/GLwDrawAP.h
/usr/X11R6/include/GL/GLwMDrawA.h
/usr/X11R6/include/GL/GLwMDrawAP.h
/usr/X11R6/include/GL/glx.h
/usr/X11R6/include/GL/glxext.h
/usr/X11R6/include/GL/glxint.h
/usr/X11R6/include/GL/glxmd.h
/usr/X11R6/include/GL/glxproto.h
/usr/X11R6/include/GL/glxtokens.h
/usr/X11R6/include/GL/osmesa.h

INFOS TO RETAIN FROM HERE ARE:
the lib directory /usr/X11R6/lib and the include directory /usr/X11R6/include

Now we must edit the Makefile, namely
[here we use the information retained above from checking the presence of GL]
-----------------------------------------------------------

######
#uncomment or correct these
LIBRARY_PATH=-L/usr/X11R6/lib #this is changed from original
INCLUDE_PATH=-I/usr/X11R6/include #this is changed from original
#GL_LIB=MesaGL

CC=gcc #this is changed from original
CCOPT=-O2

------------------------------------------------------------

Then

# make lib

# make bin


3. Then just config and make install; see my old post.

Before "config", do the following

ln -s /usr/include/malloc/malloc.h /usr/include/malloc.h

otherwise it cannot find the head file "malloc.h".


It seems dynamic library does not work for Alberta on Mac. But if you add an argument "-static" to "EXTRA_LIBS" in "include/Makefile.alberta". I would like to know if there is any other way out.


Acknowledgment:

I would like to thank Dr. Omar Lakkis and Dr. Andera Bonito for sharing their invaluable experience.