Scribbler 2
MyroC Installation and Comments for Mac OS X

Materials to Support a C-based Course with Scribbler 2 Robots
Scribbler 2

Installing MyroC.3.1b

This page organizes instructions and notes for the installation of version the MyroC package on Mac OS X.

eSpeak (external package) libjpeg (external package) openGL (part of Mac OS X) eSpeakPackage.2.0
(within MyroC.3.1b)

General Comments

eSpeak [Jonathan Duddington (admin)]

To install eSpeak

  1. Download eSpeak OSX zip file from eSpeak

  2. If the Downloads package appears with a .zip extension (e.g.,, unzip the OSX zip file:

  3. Move to the unzipped espeak directory, and review the available files, including the license and ReadMe files.

  4. Within the espeak directory in a terminal window, copy the speak program to /usr/local/bin.

    sudo cp speak /usr/local/bin
  5. Copy the speak-data directory (and its contents) to a known/required location.

    The espeak package requires the speak-data directory to be located in either /usr/share or in the user's home directory. However, although Mac OS X Yosemite release (Mac OS X 10.10) and prior releases allow installation of user files in /usr/share, this is not allowed in the Mac OS X El Capitan (Mac OS X 10.11) for security reasons.

  6. Check that espeak is properly installed by typing the following lines into a terminal window:

    speak << !
    this is a test



  1. Download the jpeg source from to /usr/local/src:

    1. Use cd /usr/local/src to move to this source directory
      • If this command yields "No such file or directory", the create the subdirectory:
        cd /usr/local
        sudo mkdir src
        cd src
    2. In a browser, go to, home for the Independent JPEG Group, to verify the current stable version of the jpeg library. At this writing, the current version is release 9a, and that version is used in the following instructions. (When later releases become available, you will need to make the corresponding adjustments in what follows.)

    3. Download compressed jpeg source code:

      sudo curl --remote-name
  2. Extract and decompress the downloaded file, creating a new subdirectory jpeg-9a
    Still working within directory /usr/local/src:

    sudo tar -xzvf jpegsrc.v9a.tar.gz
  3. Compile and install libjpeg from new jpeg-9a subdirectory

    cd jpeg-9a
    sudo ./configure
    sudo make
    sudo make install



Since OpenGL is used widely as the underlying environment for Mac OS X, this package already should be available within the Macintosh environment.

Since it is already installed as part of Mac OS X, a user need do nothing to complete this step.


As noted in the General Comments near the top of this page, the following procedures assume the user has established a base directory for the downloading and installation of the eSpeak and MyroC packages. For example, the user might create a base directory, perhaps called "MyroC".

  1. In a terminal window, move to the created base directory, with a command such as:

    cd        # since earlier commands reference various directories, go home first
    cd MyroC  # base directory for MyroC installation
  2. Download the compressed archive file, MyroC.3.1b.tgz to your created base directory

  3. Although the original file, MyroC.3.1b.tgz, is a compressed archive file, the Mac environment may or may not decompress the file automatically during download.

Following this extraction, the following files and directories should be found in a new MyroC.3.1b subdirectory.

The use of eSpeak is quite different on Linux and Mac platforms. Thus, as noted above, the decompression and extraction process creates two subdirectories for the eSpeakPackage:

  1. Assuming a Mac environment, move from the main base directory to the new MyroC.3.1 subdirectory, and the mac-based eSpeak directory. Then list the contents of the eSpeak subdirectory:

    cd MyroC.3.1 
    cd eSpeakPackage-mac.2.0 

    The listing includes the following files:

  2. Designate Makefile-mac as the relevant framework for compiling and running eSpeak on a Macintosh computer. This is accomplished by creating a symbolic link within the eSpeak directory:

    ln -s Makefile-mac Makefile

    After this command has been issued, use the ls -l command to check that a new Makefile entry appears in the subdirectory, and that it points to makefile-mac:

    ls -l
  3. Compile the eSpeakPackage

    make eSpeakPackage.o
  4. Install the eSpeakPackage with the command
    sudo make install/eSpeak


Testing the eSpeak and eSpeakPackage download and installation


Installation of the eSpeakPackage required downloading and decompressing the archive file MyroC.3.1b.tgz. From the created base directory (e.g., "MyroC"), move to the MyroC.3.1 release subdirectory, and then its subrelease MyroC.3.1b subdirectory:

  1. Move to the MyroC.3.1b subdirectory:

    cd            # since earlier commands reference various directories, go home first
    cd MyroC      # base directory for MyroC installation
    cd MyroC.3.1  # the release subdirectory
    cd MyroC.3.1b # the subrelease subdirectory
  2. As with the eSpeak installation, designate Makefile-mac as the relevant framework for compiling and installing the MyroC package:

    ln -s Makefile-mac Makefile
  3. Compile and install the MyroC package in system directories:

    sudo make install/MyroC

Testing and Running MyroC Programs

Several test programs are available in the test-programs subdirectory of the base directory.

Preliminary Step: Using MyroC with Scribbler 2 robots requires setting up Bluetooth so the workstation/laptop and robot(s) are properly paired. See Bluetooth Setup for Macintosh Workstations/Laptops for details — before trying to run test programs.

Compiling MyroC programs requires use of numerous compilation flags, compiling normally uses a Makefile. As with installation, compilation flags must be tailored to the Macintosh environment.

  1. Move to the MyroC.3.1 directory that you created earlier (not MyroC.3.1b), and then move to its test-programs subdirectory.

  2. From the MyroC.3.1 directory, move to the test-programs subdirectory.

    cd test-programs

    In the test-programs subdirectory, designate Makefile-mac as the relevant framework for compiling MyroC programs:

    ln -s Makefile-mac Makefile
  3. Test programs can be compiled with a simple make command. For example, running the spirit-song.c program utilizes these steps:

    make spirit-song

    Note: If this step generates errors that rBeep and other MyroC functions are "Undefined symbols" or that there is a "clang: error", double check that the "ln -s" command above has been issued, and a new file (called Makefile) is present in the same directory as your program. See also the notes after Step 4 below.

  4. To compile programs in any other user directory (except eSpeak and MyroC.3.1b), copy the Makefile-mac file to the user directory — using the name Makefile.

    Notes: Compiling and installing both the eSpeakPackage and MyroC require different commands from compiling and running user programs (once these packages have been installed). Thus, the Makefile-mac files in the eSpeak and MyroC subdirectories are different from the Makefile-mac file in the test-programs subdirectory. Be sure to utilize the Makefile-mac in the test-programs subdirectory as the appropriate Makefile for user programs utilizing either the eSpeakPackage or MyroC.

created 17 October 2015
revised 19 October 2015
revised 23 February 2016
Valid HTML 4.01! Valid CSS!
For more information, please contact Henry M. Walker at