Scribbler 2
MyroC Installation and Comments for Linux

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

Installing MyroC.3.33.3b

This page organizes instructions and notes for the installation of version 3.33.3b of the MyroC package on Linux.

General Comments Preliminaries External Packages eSpeakPackage.3.0
(within MyroC.3.33.3b)
MyroC.3.33.3b

Notes:

General Comments

This section includes for general background—before one starts the actual installation process. Overall, these notes fall into three categories: needed directories, permissions with the sudo command, and the use of the apt package manager.

Needed Directories

Installation of MyroC and related packages typically involves two directories, and a user has considerable latitude regarding which directories to use in this process.

Conceptually, the reference directory, mentioned above, might reasonably be designated as /usr or /usr/local or /usr/local/share.

Permissions with the sudo command

In what follows, all commands are assumed to be executed in a terminal window.

During installation, several steps utilize the sudo command, run in a terminal window. The sudo command allows a user to run certain, authorized commands (e.g., system commands) without having general administrative privileges.

The apt Package Manager

As noted above, this guide relies on the usage of the apt package manager for the installation of some programs.

Preliminaries

The installation instructions that follow assume that various standard Linux packages have already been installed. The system administrator of one Linux system has remarked that the following packages should be installed before further work proceeds.

External Packages

MyroC depends upon several third-party packages:

Fortunately, each of these packages can be installed easily using the apt package manager.

  1. Type the following line in a terminal window so that the apt package manager has up-to-date information on what is already installed on your machine.

      sudo apt update
        
  2. Install the needed packages by entering the following line in a terminal window.

      sudo apt install libbluetooth3 libbluetooth-dev libxmu-dev libxmu-headers libxi-dev libpulse-dev libespeak-dev libjpeg-dev libopengl-dev
          

    Note: If you enjoy typing long lines, then you are free to type this yourself in a terminal window. For others, a copy-and-paste of this line would work nicely.

eSpeakPackage

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 "MyroCPackage".

  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 MyroCPackage  # base directory for MyroC installation
    
  2. Download the compressed archive file, MyroC.3.33.3b.tgz to your created base directory

  3. Although the original file, MyroC.3.33.3b.tgz, is a compressed archive file, the Linux 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.33.3b subdirectory.

All materials for the eSpeakPackage are (not surprisingly) located in the eSpeak directory.

  1. Move from the general MyroCPackage directory to its eSpeak subdirectory.:

    cd eSpeak
      

The internal algorithms and code for the eSpeakPackage are quite different on Linux, Mac OS X, and Windows 10. Thus, the downloading and decompression process for the MyroCPackage creates four subdirectories for the eSpeakPackage:



On Linux, the natural approach is to use the eSpeak API to utilize various functions directly within a C program. The eSpeakPackage using this API is collected in subdirectory:


  1. To install the eSpeakPackage for Linux, move to the eSpeakPackage-linux.3.0 directory.

          cd
          cd MyroCPackage
          cd eSpeak
          cd eSpeakPackage-linux.3.0    

    The listing includes the following files:


  1. Designate Makefile-linux-implementation as the relevant framework for compiling and running eSpeak on a Linux computer. This is accomplished by creating a symbolic link within the eSpeak directory:

    ln -s Makefile-linux-implementation 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-linux-implemetation:

    ls -l
    

Note: If this link command ln -s generates a "file exists" error, then a current Makefile link exists, but it may be designating a Makefile for Mac OS X or Windows, rather than Linux. In this case, remove the earlier link and create a new link:

    rm Makefile
    ln -s Makefile-mac Makefile
  

Installation Options for the eSpeakPackge on Linux

Installation of the eSpeakPackge requires primary decisions.

Determining Directories

Within Linux, it is common for programs installed by the user to be placed in subdirectories or /usr/local. In particular,

  1. Check the beginning of the file Makefile-linux-implementation, so that the base directory for this installation is correct.

Installation on a Private Computer versus a Computer with Multiple User Accounts

Typically, a personal laptop is owned by one person, and that person is the only one who can log onto the machine. However, for machines in labs or machines on which several people have accounts, one person could be using the machine while another logs in remotely. In this context, an awkward situation could arise if the remote user logged in to the computer and used the eSpeakPackage to "talk" to a logged in user.

  1. Due to these two environments, the eSpeakPackage has two compilation/installation options.

    If the above command produces a permissions error, use sudo with the above command:

          sudo make computer=shared install/espeak
        
    or
          sudo make install/espeak
        
  1. The above instructions likely handle software installation. However, workstations often are set up with their audio muted. If running test programs yields long pauses when printed output appears, but no sound, check the audio settings.

Testing the eSpeak and eSpeakPackage download and installation

As noted above, if the installation in

eSpeakPackage-linux.3.0

does not seem to work, try a similar process with the alternative implementation in

eSpeakPackage-linux.3.0-alt

MyroC.3.33.3b

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

  1. Move to the MyroC.3.33.3b subdirectory:

    cd            # since earlier commands reference various directories, go home first
    cd MyroC      # base directory for MyroC installation
    cd MyroC.3.3  # the release subdirectory
    cd MyroC.3.33.3b # the subrelease subdirectory
    

  1. As with the eSpeak installation, designate Makefile-linux as the relevant framework for compiling and installing the MyroC package:

    ln -s Makefile-linux Makefile
    

Note: As with eSpeak, if If this link command ln -s generates a "file exists" error, then remove the earlier link and create a new link:

    rm Makefile
    ln -s Makefile-linux Makefile
  

  1. The beginning of file Makefile-linux contains an INSTALLPATH variable that designates where the MyroC material should be placed. Pragmatically, this location depends upon the system involved.

    Edit Makefile-linux as needed to designate the desired directory for this installaton.

  2. Compile and install the MyroC package in system directories:

    make install/MyroC
    
  3. As with the eSpeakPackage installation, report the relevant files to the Linux operating system (see Step 9 in the eSpeakPackage installation above).

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 Linux 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 Linux environment.

Unfortunately, the specific libraries required for graphics and infrastructure vary substantially from one Linux environment to another. For this reason, this MyroC.3.3a package contains two distinct Makefiles for compiling application programs.

Whatever flags are needed, compiling is based on files in the test-programs subdirectory of MyroC.3.3.

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

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

    cd test-programs
    
  3. In the test-programs subdirectory, designate the proper Makefile version as the relevant framework for compiling MyroC programs.

    If neither of these Makefile versions work in the following steps, you will need to determine what libraries contain the relevant functions (see the program header files) as well as the locations of the directories that contain those libraries.

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

    make spirit-song
    ./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.

  5. To compile programs in any other user directory (except eSpeak and MyroC.3.33.3b), copy the appropriate Makefile-linux version 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-linux files in the eSpeak and MyroC subdirectories are different from the Makefile-linux file in the test-programs subdirectory. Be sure to utilize the Makefile-linux 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
revised for alternate Linux environments 22 January 2017, 26 February 2021
Valid HTML 4.01! Valid CSS!
For more information, please contact Henry M. Walker at walker@cs.grinnell.edu.

Warning: require_once(copyright-notice.inc): Failed to open stream: No such file or directory in /home/walker/public_html/MyroC/linux/myroc-installation-notes-linux.php on line 1248

Fatal error: Uncaught Error: Failed opening required 'copyright-notice.inc' (include_path='.:/opt/cpanel/ea-php82/root/usr/share/pear') in /home/walker/public_html/MyroC/linux/myroc-installation-notes-linux.php:1248 Stack trace: #0 {main} thrown in /home/walker/public_html/MyroC/linux/myroc-installation-notes-linux.php on line 1248