OpenCogBuntu
From OpenCog
Contents |
What is OpenCogBuntu?
OpenCogBuntu or CogBuntu is a custom version of Ubuntu with all libraries and tools pre-installed to work on OpenCog. It is a live DVD and can be installed just as well.
Why OpenCogBuntu?
The first version of CogBuntu was made for the AGI Summer School in Xiamen in 2009, so that we could demonstrate OpenCog on the computers of Xiamen's University without installing OpenCog. It kept being maintained because it is a convenient way to demonstrate OpenCog without installing it or to install rapidly Ubuntu with all necessary tools and libs to work on OpenCog.
How to Get OpenCogBuntu
You can get OpenCogBuntu 9.10 via torrent or web download (~2Gb):
- OpenCogBuntu 9.10 - 32-bit rc3: torrent - web - md5sum.
- OpenCogBuntu 9.10 - 64-bit rc4: torrent - web - md5sum.
Please use the torrents preferentially, and in the case that there are not many seeds, please use the web download and then seed the iso to help others get the Cogbuntu distribution. We also recommend using a download manager that supports resuming, since it's a big file and the connection may be interrupted. Thanks!
As a Live DVD
You can use it as a live DVD. So you can work on OpenCog while visiting your family without messing up their computer.
As an Install DVD
You can install it, and be able to work right away. Note that there are 3 additional directories at the root tree, /OpenCog, /Packages and /Sources. There are used for installation and live DVD but you probability don't need then once installed so feel free to remove then to save a few GBytes.
Running embodiment (controlled agent in a virtual world)
Must do 4 things
1) install mysql-server
2) run the petBrain (CogBuntu),
3) run the multiverse proxy server (CogBuntu),
4) run the multiverse client (Windows)
Install mysql-server
enter the command
sudo apt-get install mysql-server
A password for mysql root user is asked at the end of the installation. Choose a password and enter it (and enter it again when asked again). Let's denote that password MYSQL_ROOT_PASSWORD.
Run the PetBrain
First of all create an folder OpenCog under the ubuntu account of the live session (or any other place, a flash disk for instance).
cd mkdir OpenCog
Copy the petBrain executables under your OpenCog directory (needed to be done only once)
cp -fr /OpenCog/opencog/dist/Embodiment ~/OpenCog
Go under the directory Embodiment
cd OpenCog/Embodiment
Run the petBrain
./pb.csh
Run the Multiverse proxy
Copy the Multiverse proxy under your OpenCog directory (needed to be done only once)
cp -fr /OpenCog/embodiment_MV1.5-Proxy ~/OpenCog
Initialize the data base (need to be done only once)
cd ~/OpenCog/embodiment_MV1.5-Proxy/server/bin mysql --user=root --password=MYSQL_ROOT_PASSWORD < install.sql
Configure multiverse.properties and PetaverseProxy.properties, place the IP of the machine running CogBuntu (you can use the command ifconfig to get it), and enter the mysql password MYSQL_ROOT_PASSWORD:
for multiverse.properties
multiverse.msgsvr_hostname multiverse.proxyserver
multiverse.db_password
for PetaverseProxy.properties
MY_IP ROUTER_IP
Run the proxy
./multiverse.sh -v restart
Run the multiverse client
Under OpenCog/embodiment_MV1.5-Proxy there is a README that explains in detail how to run the Multiverse client.
Creating and Customizing Cogbuntu
CogBuntu creation process is entirely scripted. The main script is create-cogbuntu.sh and relies on 3 scripts, chroot-install.sh, install-packages.sh and install-opencog-proxy.sh, see below for their code.
Please note that it is recommended (but not necessary) to create the custom image using the same version of Ubuntu, so if for instance you want to create a custom version of Ubuntu 9.10 it is better if you work with Ubuntu 9.10 as well.
You want to invoke create-cogbuntu.sh in super user mode (so you don't have to constantly retype your root password during the process), and have an Ubuntu ISO image at reach, then type
./create-cogbuntu.sh UBUNTU_IMAGE_NAME WORKING_DIRECTORY COGBUNTU_IMAGE_NAME
Note that to work properly UBUNTU_IMAGE_NAME must be the relative path of the Ubuntu image, not the absolute path. It will create a working directory and create the CogBuntu iso inside it.
Once the image is created you can generate a torrent of it using for instance http://openbittorrent.com/ as tracker.
The code of create-cogbuntu.sh is given below.
#!/bin/sh # create-cogbuntu.sh # # Script to compile CogBuntu given an Ubuntu image # It takes 3 arguments # (1) Ubuntu image file name (relative not absolute path) # (2) Directory to create to work under # (3) Name of the cogBuntu image to create if [ "$#" -eq 3 ] then UBUNTU_FILE_NAME=$1 WORKING_DIRECTORY=$2 COGBUNTU_FILE_NAME=$3 else echo "Wrong number of arguments" echo "Script to compile CogBuntu given an Ubuntu image" echo "Usage: $0 UBUNTU_FILE_NAME WORKING_DIRECTORY COGBUNTU_FILE_NAME" echo "UBUNTU_FILE_NAME must be the relative path, not the absolute path" exit 1 fi echo "Creating directory ${WORKING_DIRECTORY}..." mkdir "${WORKING_DIRECTORY}" || (echo "error: ${WORKING_DIRECTORY} not created" && exit 1) || exit 1 cd "${WORKING_DIRECTORY}" echo "Mounting $UBUNTU_FILE_NAME under mnt..." mkdir mnt sudo mount -o loop "../${UBUNTU_FILE_NAME}" mnt || (echo "error: ${UBUNTU_FILE_NAME} not mounted" && exit 1) || exit 1 echo "Extracting ${UBUNTU_FILE_NAME} under extract-cd..." mkdir extract-cd rsync --exclude=/casper/filesystem.squashfs -a mnt/ extract-cd || (echo "error: ${UBUNTU_FILE_NAME} not extracted" && exit 1) || exit 1 echo "Extracting the SquashFS filesystem..." sudo unsquashfs mnt/casper/filesystem.squashfs sudo mv squashfs-root edit echo "Copying useful files and scripts under the chroot environment..." # If you need the network connection within chroot sudo cp /etc/resolv.conf edit/etc/ # Depending on your configuration, you may also need to copy the hosts file sudo cp /etc/hosts edit/etc/ # Copying source sudo cp /etc/apt/sources.list edit/etc/apt # copy the scripts to be used under the chroot environment echo "Copying chroot-install.sh, install-packages.sh and install-opencog-proxy.sh under ${WORKING_DIRECTORY}/edit..." sudo cp ../chroot-install.sh edit || (echo "error: chroot-install.sh not copied under ${WORKING_DIRECTORY}/edit" && exit 1) || exit 1 sudo cp ../install-packages.sh edit || (echo "error: install-packages.sh not copied under ${WORKING_DIRECTORY}/edit" && exit 1) || exit 1 sudo cp ../install-opencog-proxy.sh edit || (echo "error: install-opencog-proxy.sh not copied under ${WORKING_DIRECTORY}/edit" && exit 1) || exit 1 # chroot echo "Chroot..." sudo mount --bind /dev/ edit/dev sudo chroot edit ./chroot-install.sh || (echo "error: chroot-install.sh failed" && exit 1) || exit 1 sudo umount edit/dev # # Putting the DVD together # # Upload CogBuntu boot splash echo "Uploading Cogbuntu splash boot screen..." sudo wget http://www.opencog.org/wikihome/images/7/7e/Cogbuntu_usplash.pcx -O extract-cd/isolinux/splash.pcx || (echo "error: Cogbuntu_usplash.pcx not downloaded" && exit 1) || exit 1 # Regenerate manifest chmod +w extract-cd/casper/filesystem.manifest sudo chroot edit dpkg-query -W > extract-cd/casper/filesystem.manifest sudo cp extract-cd/casper/filesystem.manifest extract-cd/casper/filesystem.manifest-desktop sudo sed -i '/ubiquity/d' extract-cd/casper/filesystem.manifest-desktop sudo sed -i '/casper/d' extract-cd/casper/filesystem.manifest-desktop # Compress filesystem # sudo rm extract-cd/casper/filesystem.squashfs sudo mksquashfs edit extract-cd/casper/filesystem.squashfs # place in extract-cd/README.diskdefines the name of the iso to create sudo echo "${COGBUNTU_FILE_NAME}" > extract-cd/README.diskdefines # Remove old md5sum.txt and calculate new md5 sums cd extract-cd sudo rm md5sum.txt find -type f -print0 | xargs -0 md5sum | grep -v isolinux/boot.cat | sudo tee md5sum.txt # Create ISO sudo mkisofs -D -r -V "${COGBUNTU_FILE_NAME}" -cache-inodes -J -l -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o ../"${COGBUNTU_FILE_NAME}" . # umount nmt sudo umount ../mnt
The script run the following, chroot-install.sh, in chroot mode.
#!/bin/sh # chroot-install.sh mount -t proc none /proc mount -t sysfs none /sys mount -t devpts none /dev/pts # To avoid locale issues and in order to import GPG keys export HOME=/root export LC_ALL=C # Update apt-get echo "Update apt-get..." apt-get update && echo "apt-get updated" || (echo "error: apt-get update failed" && exit 1) || exit 1 echo "#################################################" echo "# Installing libraries and tools for OpenCog... #" echo "#################################################" ########################################################################## # Creating the directories to load and install packages and source files # ########################################################################## # Installing libraries and tools for OpenCog ./install-packages.sh || (echo "error: installing packages for OpenCog has failed" && exit 1) || exit 1 # Installing OpenCog and Proxy ./install-opencog-proxy.sh || (echo "error: installing OpenCog and Proxy has failed" && exit 1) || exit 1 # delete temporary files rm -rf /tmp/* ~/.bash_history rm /etc/resolv.conf # umount special filesystems and exit chroot echo "Un-mounting /proc, /sys and /dev/pts..." umount -l /proc || (echo "error: not able to umount /proc" && exit 1) || exit 1 umount /sys || (echo "error: not able to umount /sys" && exit 1) || exit 1 umount /dev/pts || (echo "error: not able to umount /dev/pts" && exit 1) || exit 1 echo "/proc, /sys and /dev/pts un-mounted"
Usplash screen
You can use that image as usplash screen (the first screen that appears when the live DVD is booted). It is in pcx format and Wiki cannot display it... The script provided download it automatically.
Loading screen
TODO
Packages added for OpenCogBuntu 9.10
Here is the list of all packages that are included in OpenCogBuntu 9.10 rc3. When no version number is indicated it corresponds to the default version installed in Ubuntu 9.10. When the package has been obtained by another mean than using the official Ubuntu package repository it is indicated in brackets.
| Package name | Useful for | How to install (default from Ubuntu repository) |
| build-essential | compling | |
| squashfs-tools | CogBuntu creation | |
| libbogl0 | CogBuntu creation | |
| libbogl-dev | CogBuntu creation | |
| libgd2-xpm | CogBuntu creation | |
| libusplash-dev | Cogbuntu creation | |
| fakeroot | CogBuntu creation | |
| xserver-xephyr | CogBuntu creation | |
| genisoimage | CogBuntu creation | |
| xserver-xorg-input-vmmouse | running under VMWare machine | Note: removed because VMWare Player 3 provides it automatically |
| open-vm-tools | running under VMWare machine | Note: removed because VMWare Player 3 provides it automatically |
| alien | rpm to deb | |
| cmake | compiling | |
| emacs | development | |
| emacs-goodies-el | development | |
| vim | development | |
| global | development (code browser) | Note: removed because it creates weird problems... |
| exuberant-ctags | development (code browser) | |
| tofrodos | development (convert between DOS and UNIX format) | |
| bzr | revision control | |
| bzr-rebase | revision control | |
| cvs | revision control | |
| subversion | revision control | |
| gmp-4.3.1 | guile | compiled and installed from http://gmplib.org/. No longer needed because guile is installed for the repo |
| guile-1.8.7 | OpenCog | |
| doxygen | OpenCog | |
| libicu-dev | libboost | |
| libbz2-dev | libboost | |
| python-dev | libboost | |
| gccxml | libboost | |
| libboost-dev | OpenCog | |
| libssl-dev | OpenCog | |
| liblua5.1-0-dev | OpenCog | |
| libgsl0-dev | OpenCog | |
| libexpat1-dev | OpenCog | |
| libxmlrpc-c3-dev | OpenCog | |
| unixodbc-dev | OpenCog | |
| dot2tex | OpenCog | |
| libxerces-c2-dev | OpenCog | |
| libcurl4-gnutls-dev | OpenCog | |
| libsdl-gfx1.2-dev | OpenCog | |
| rlwrap | OpenCog, telnet access | |
| boost-build | libluabind | |
| libluabind-dev | OpenCog | either install from Ubuntu 9.10 repository or compile and install from source http://sourceforge.net/projects/luabind/files/luabind/ |
| cxxtest-3.10.1 | OpenCog (test units) | downloaded rpm package from http://cxxtest.tigris.org/ and convert the package into a debian package using alien |
| tcl-dev | embodiment scripts | |
| tcsh | embodiment scripts | |
| classpath-common | Embodiment Multiverse Proxy | |
| openjdk-6-jdk | Embodiment Multiverse Proxy | |
| ant | Emdodiment Multiverse Proxy | |
| mysql-server | Embodiment Multiverse Proxy | NOTE: now removed |
| wordnet-dev | Embodiment Multiverse Proxy | |
| wordnet-sense-index | Embodiment Multiverse Proxy | |
| libgetopt-java | Relex | |
| link-grammar-4.6.4 | Relex | download compile and install from http://www.abisource.com/projects/link-grammar/ |
The following script, install-packages.sh, installs then all automatically, including downloading and compiling what is necessary.
#!/bin/sh # install-packages.sh echo "#################################################" echo "# Installing libraries and tools for OpenCog... #" echo "#################################################" ########################################################################## # Creating the directories to load and install packages and source files # ########################################################################## PACKAGES_DIRECTORY=/Packages SOURCES_DIRECTORY=/Sources echo "Create the package directory $PACKAGES_DIRECTORY" mkdir $PACKAGES_DIRECTORY || (echo "error: could not create $PACKAGES_DIRECTORY" && exit 1) || exit 1 echo "Create the source file directory $SOURCES_DIRECTORY" mkdir $SOURCES_DIRECTORY || (echo "error: could not create $SOURCES_DIRECTORY" && exit 1) || exit 1 ################################################### # loading all necessary packages and source files # ################################################### echo "Loading all necessary packages under $PACKAGES_DIRECTORY" cd $PACKAGES_DIRECTORY || (echo "error: could not go the directory $PACKAGES_DIRECTORY" && exit 1) || exit 1 # Not relying any more on reconstructor # echo "Loading reconstructor..." # wget http://www.opencog.org/wikihome/images/0/0c/Reconstructor_2.9_all.deb -O reconstructor_2.9_all.deb && echo "reconstructor loaded" || (echo "error: reconstructor not loaded" && exit 1) || exit 1 echo "Loading cxxtest..." wget http://cxxtest.tigris.org/files/documents/6421/43283/cxxtest-3.10.1-1.noarch.rpm && echo "cxxtest loaded" || (echo "error: cxxtest not loaded" && exit 1) || exit 1 echo "Loading all necessary source files under $SOURCES_DIRECTORY" cd $SOURCES_DIRECTORY # Sockect is no longer useful # echo "Loading Sockets-2.3.6..." # wget http://www.alhem.net/Sockets/Sockets-2.3.6.tar.gz && echo "Sockets-2.3.6 loaded" || (echo "error: Sockets-2.3.6 not loaded" && exit 1) || exit 1 # now included in ubuntu 9.10 repo # echo "Loading gmp-4.3.1..." # wget ftp://ftp.gnu.org/gnu/gmp/gmp-4.3.1.tar.bz2 && echo "gmp-4.3.1 loaded" || (echo "error: gmp-4.3.1 not loaded" && exit 1) || exit 1 # now included in ubuntu 9.10 repo # echo "Loading guile-1.8.7..." # wget ftp://ftp.gnu.org/gnu/guile/guile-1.8.7.tar.gz && echo "guile-1.8.7 loaded" || (echo "error: guile-1.8.7 not loaded" && exit 1) || exit 1 echo "Loading link-grammar-4.6.4..." wget http://www.abisource.com/downloads/link-grammar/4.6.4/link-grammar-4.6.4.tar.gz && echo "link-grammar-4.6.4 loaded" || (echo "error: link-grammar-4.6.4 not loaded" && exit 1) || exit 1 # currently installed with apt-get # echo "Loading boost-1.35.0..." # wget http://downloads.sourceforge.net/project/boost/boost/1.35.0/boost_1_35_0.tar.gz && echo "boost-1.35.0 loaded" || (echo "error: boost-1.35.0 not loaded" && exit 1) || exit 1 # part of Ubuntu 9.10, installed with apt-get # echo "Loading luabind-0.8.1..." # wget http://freefr.dl.sourceforge.net/project/luabind/luabind/0.8.1/luabind-0.8.1.tar.gz && echo "luabind-0.8.1 loaded" || (echo "error: luabind-0.8.1 not loaded" && exit 1) || exit 1 ########################### # installing all packages # ########################### cd $PACKAGES_DIRECTORY || (echo "error: could not go the directory $PACKAGES_DIRECTORY" && exit 1) || exit 1 echo "Installing build-essential..." apt-get -y install build-essential && echo "build-essential installed" || (echo "error: build-essential not installed" && exit 1) || exit 1 echo "Installing all packages required for creating CogBuntu..." apt-get -y install squashfs-tools libbogl0 libbogl-dev libgd2-xpm libusplash-dev fakeroot xserver-xephyr && echo "all required packages for creating CogBuntu installed" || (echo "error: all required packages for creating CogBuntu not installed" && exit 1) || exit 1 echo "Installing genisoimage..." apt-get -y install genisoimage && echo "genisoimage installed" || (echo "error: genisoimage not installed" && exit 1) || exit 1 # Not relying anymore on reconstructor # echo "Installing reconstructor-2.9..." # dpkg -i reconstructor_2.9_all.deb && echo "reconstructor-2.9 installed" || (echo "error: reconstructor-2.9 not installed" && exit 1) || exit 1 # removed because VMWare Player 3 provides it automatically # echo "Installing drivers for VMWare..." # apt-get -y install xserver-xorg-input-vmmouse open-vm-tools && echo "drivers for VMWare installed" || (echo "error: drivers for VMWare not installed" && exit 1) || exit 1 echo "Installing alien..." apt-get -y install alien && echo "alien installed" || (echo "error: alien not installed" && exit 1) || exit 1 echo "Installing cmake..." apt-get -y install cmake && echo "cmake installed" || (echo "error: cmake not installed" && exit 1) || exit 1 # removed 'global` because it seems to pose problems, I don't know why echo "Installing development tools (emacs, vim, exuberant-ctags, tofrodos)..." apt-get -y install emacs emacs-goodies-el vim exuberant-ctags tofrodos && echo "development tools (emacs, vim, exuberant-ctags, tofrodos) installed" || (echo "error: development tools (emacs, vim, exuberant-ctags, tofrodos) not installed" && exit 1) || exit 1 echo "Installing rlwrap..." apt-get -y install rlwrap && echo "rlwrap installed" || (echo "error: rlwrap not installed" && exit 1) || exit 1 echo "Installing libsdl-gfx1.2-dev..." apt-get -y install libsdl-gfx1.2-dev && echo "libsdl-gfx1.2-dev installed" || (echo "error: libsdl-gfx1.2-dev not installed" && exit 1) || exit 1 echo "Installing guile-1.8-dev..." apt-get -y install guile-1.8-dev && echo "guile-1.8-dev installed" || (echo "error: guile-1.8-dev not installed" && exit 1) || exit 1 echo "Installing revision control tools (bzr, bzr-rebase, cvs, subversion)..." apt-get -y install bzr bzr-rebase cvs subversion && echo "revision control tools (bzr, bzr-rebase, cvs, subversion) installed" || (echo "error: revision control tools (bzr, bzr-rebase, cvs, subversion) not installed" && exit 1) || exit 1 echo "Installing libicu-dev..." apt-get -y install libicu-dev && echo "libicu-dev installed" || (echo "error: libicu-dev not installed" && exit 1) || exit 1 echo "Installing libbz2-dev..." apt-get -y install libbz2-dev && echo "libbz2-dev installed" || (echo "error: libbz2-dev not installed" && exit 1) || exit 1 echo "Installing python-dev..." apt-get -y install python-dev && echo "python-dev installed" || (echo "error: python-dev not installed" && exit 1) || exit 1 echo "Installing gccxml..." apt-get -y install gccxml && echo "gccxml installed" || (echo "error: gccxml not installed" && exit 1) || exit 1 echo "Installing libboost-dev..." apt-get -y install libboost-dev && echo "libboost-dev installed" || (echo "error: libboost-dev not installed" && exit 1) || exit 1 echo "Installing OpenCog required tools and libraries..." apt-get -y install doxygen libssl-dev liblua5.1-0-dev libgsl0-dev libexpat1-dev libxmlrpc-c3-dev unixodbc-dev dot2tex libxerces-c2-dev libcurl4-gnutls-dev && alien -d cxxtest-3.10.1-1.noarch.rpm && dpkg -i cxxtest_3.10.1-2_all.deb && echo "OpenCog required tools and libraries installed" || (echo "error: OpenCog required tools and libraries not installed" && exit 1) || exit 1 echo "Installing libluabind-dev..." apt-get -y install libluabind-dev && echo "libluabind-dev installed" || (echo "error: libluabind-dev not installed" && exit 1) || exit 1 echo "Installing boost-build..." apt-get -y install boost-build && echo "boost-build installed" || (echo "error: boost-build not installed" && exit 1) || exit 1 echo "Installing various UNIX scripting languages (tcl-dev tcsh)..." apt-get -y install tcl-dev tcsh && echo "various UNIX scripting languages (tcl-dev tcsh) installed" || (echo "error: various UNIX scripting languages (tcl-dev tcsh) not installed" && exit 1) || exit 1 echo "Installing Java libs for Embodiment and Relex..." apt-get -y install classpath-common openjdk-6-jdk ant wordnet-dev wordnet-sense-index libgetopt-java && echo "Java libs for Embodiment and Relex installed" || (echo "error: Java libs for Embodiment and Relex not installed" && exit 1) || exit 1 # Now removed # Installing mysql-server # echo "Installing mysql-server, requires your interaction to enter the password at the end of the installation, the password can be empty" # apt-get -y install mysql-server || echo "error: installing mysql-server has failed, but maybe it is ok" # echo "mysql-server installed" ######################################### # Compiling and Installing source files # ######################################### # Sockect is no longer needed # echo "Compiling and installing Sockets-2.3.6..." # cd $SOURCES_DIRECTORY || (echo "error: could not go the directory $SOURCES_DIRECTORY" && exit 1) || exit 1 # tar xvzf Sockets-2.3.6.tar.gz # cd Sockets-2.3.6 # # patch Makefile so that PREFIX=/usr instead of /usr/local # wget -q http://www.opencog.org/wikihome/images/6/68/Sockets_Makefile.patch || (echo "error: could not download Sockects_Makefile.patch" && exit 1) || exit 1 # patch -p0 Makefile -i Sockets_Makefile.patch || (echo "error: applying patch Sockects_Makefile.patch has failed" && exit 1) || exit 1 # make && make install || (echo "error: compiling and installing Sockets-2.3.7 has failed" && exit 1) || exit 1 # echo "Sockets-2.3.6 compiled and installed" # Now included in ubuntu 9.10 repo # echo "Compiling and installing gmp-4.3.1..." # cd $SOURCES_DIRECTORY || (echo "error: could not go the directory $SOURCES_DIRECTORY" && exit 1) || exit 1 # tar xvjf gmp-4.3.1.tar.bz2 # cd gmp-4.3.1 # ./configure --prefix=/usr || (echo "error: configuring gmp-4.3.1 has failed" && exit 1) || exit 1 # make && make install || (echo "error: compiling and installing gmp-4.3.1 has failed" && exit 1) || exit 1 # echo "gmp-4.3.1 compiled and installed" # Now included in ubuntu 9.10 repo # echo "Compiling and installing guile-1.8.7..." # cd $SOURCES_DIRECTORY || (echo "error: could not go the directory $SOURCES_DIRECTORY" && exit 1) || exit 1 # tar xvzf guile-1.8.7.tar.gz # cd guile-1.8.7 # ./configure --prefix=/usr || (echo "error: configuring guile-1.8.7 has failed" && exit 1) || exit 1 # make && make install || (echo "error: compiling and installing guile-1.8.7 has failed" && exit 1) || exit 1 # echo "guile-1.8.7 compiled and installed" # currently installed from apt-get # echo "Compiling and installing boost-1.35.0..." # cd $SOURCES_DIRECTORY # tar xvzf boost_1_35_0.tar.gz # cd boost_1_35_0 # ./configure --prefix=/usr || (echo "error: configuring boost-1.35.0 has #failed" && exit 1) || exit 1 # bjam && bjam --prefix=/usr install || (echo "error: compiling and installing #boost-1.35.0 has failed" && exit 1) || exit 1 # echo "boost-1.35.0 compiled and installed" # currently installed from apt-get # echo "Compiling and installing luabind-0.8.1..." # cd $SOURCES_DIRECTORY # tar xvzf luabind-0.8.1.tar.gz # cd luabind-0.8.1 # bjam --prefix=/usr install || (echo "error: compiling and installing luabind-0.8.1 has failed" && exit 1) || exit 1 # echo "luabind-0.8.1 compiled and installed" echo "Compiling and installing link-grammar-4.6.4..." cd $SOURCES_DIRECTORY tar xvzf link-grammar-4.6.4.tar.gz cd link-grammar-4.6.4 ./configure --prefix=/usr || (echo "error: configuring link-grammar-4.6.4 has failed" && exit 1) || exit 1 make && make install || (echo "error: compiling and installing link-grammar-4.6.4 has failed" && exit 1) || exit 1 echo "link-grammar-4.6.4 compiled and installed" echo "#############################################" echo "# Libraries and tools for OpenCog installed #" echo "#############################################" exit 0
OpenCog
CogBuntu comes with OpenCog and Embodiment Multiverse Proxy pre-installed.
The following script, install-opencog-proxy.sh, fetches OpenCog and the Multiverse Proxy from their repository, compile and configure them.
#!/bin/sh # install-opencog-proxy.sh ################################ # Installing OpenCog and Proxy # ################################ echo "################################" echo "# Installing OpenCog and Proxy #" echo "################################" OPENCOG_DIRECTORY=/OpenCog echo "Create the OpenCog directory $OPENCOG_DIRECTORY" mkdir $OPENCOG_DIRECTORY || (echo "error: could not create $OPENCOG_DIRECTORY" && exit 1) || exit 1 # Installing OpenCog cd $OPENCOG_DIRECTORY || (echo "error: could not go the directory $OPENCOG_DIRECTORY" && exit 1) || exit 1 echo "Checking out OpenCog..." bzr branch lp:opencog || (echo "error: checking out opencog has failed" && exit 1) || exit 1 echo "OpenCog checked out" echo "Compiling OpenCog" cd opencog mkdir bin cd bin cmake -DCMAKE_BUILD_TYPE=Release .. || (echo "error: running cmake has failed" && exit 1) || exit 1 make && make examples || (echo "error: compiling opencog has failed" && exit 1) || exit 1 make test || echo "error: testing opencog has failed but it may be normal" echo "OpenCog compiled" echo "Installing Embodiment..." cd ../scripts/embodiment ./makeDistribution bin Embodiment || (echo "error: installing Embodiment has failed" && exit 1) || exit 1 echo "Embodiment installed" # Installing Multiverse Proxy cd $OPENCOG_DIRECTORY echo "Checking out Multiverse proxy..." bzr branch lp:~opencog-dev/opencog/embodiment_MV1.5-Proxy || (echo "error: checking out multiverse proxy has failed" && exit 1) || exit 1 echo "Multiverse proxy checked out" echo "Compiling Multiverse proxy..." cd embodiment_MV1.5-Proxy cd server ant || (echo "error: compiling multiverse proxy has failed" && exit 1) || exit 1 echo "Multiverse proxy compiled" echo "Configuring multiverse proxy for DogPark..." cd .. ./useDogParkMap.sh echo "multiverse proxy configured for DogPark" echo "Patching file_properties.xml (modify dictionary_path for Ubuntu)..." wget -q http://www.opencog.org/wikihome/images/8/84/File_properties.xml_patch -O file_properties.xml_patch || (echo "error: loading file_properties.xml_patch has failed" && exit 1) || exit 1 patch server/other/relex/data/wordnet/file_properties.xml -i file_properties.xml_patch || (echo "error: applying file_properties.xml_patch has failed" && exit 1) || exit 1 echo "file_properties.xml patched" echo "###############################" echo "# OpenCog and Proxy installed #" echo "###############################" exit 0
Misc
Non installed but possibly wanted packages for CogBuntu
cedet [smart completion]
autoconf [dev tool]
xfig [lightweight diagram tool]
auctex [latex emacs mode]
libdb4.7-dev [for HyperTable] libdb4.7++-dev [for HyperTable] liblog4cpp5 [for HyperTable] liblog4cpp5-dev [for HyperTable] libbz2-dev [for HyperTable] libevent-dev [for HyperTable] bison [for HyperTable] flex [for HyperTable] libgoogle-perftools-dev [for HyperTable] sparsehash [for HyperTable] cronolog [for HyperTable]
And also RealXtend proxy.
Edit .emacs
add the following
(setq-default indent-tabs-mode nil) ;; use spaces instead of tab (setq-default c-basic-offset 4) ;; set c based language indent to 4 ;; open cxxtest files in C++ mode (setq auto-mode-alist (cons '("\\.cxxtest$" . c++-mode) auto-mode-alist))
Edit .vimrc
add the following
autocmd BufNewFile,BufReadPost * if match(expand("%:p:h"), "/opencog") >= 0 && &filetype == "cpp" | set ts=4 sw=4 tw=80 ff=unix cindent expandtab | endif

