Problems with opencog build - very low priority beginner question

236 views
Skip to first unread message

Alex

unread,
Jan 1, 2017, 11:15:12 AM1/1/17
to opencog
Hi!

I am trying to build opencog. I am aware of http://wiki.opencog.org/w/Octool and instructions http://wiki.opencog.org/w/Building_OpenCog but I am coming from Windows Java & Delphi development and therefore I have problems with build process on Ubuntu.

Regarding Octool - when I issued 'sudo ocpkg - rsdpcalv' then I received error message 'command not found'. Then I issued 'bash -x ocpkg - rsdpcalv' and somehting happend - something was downloaded and there were no red error messages except for one 'E: Unable to locate package libjson-spirit-dev'. I did this for all 3 octool commands -rsdpcalv, -rdcv, -rdv but don't know I arrived at any meaningful reasult. It is said in documentation that octool just prepares the environment and dependencies but apparently other command should be used for building the cogserver itself.

So - I went to http://wiki.opencog.org/w/Building_OpenCo and there I read that maybe 'bash -x ocpkg -b' is the right command to complete the build process? There the cmake is mentioned but I don't manage to find make file - in which directory it is?

I completed 'bash -x ocpkg -b', something happened but when I tried to run opencog command then the answer was that opencog was not found.

How can I check the result of build process - in which directories the final executables are going? How to run octool wihout bash prefix - in normal mode?

The project is very, very interesting, but the start is very hard. I OpenCog had be available as Windows or Java programs then every novice could be able to run server, to create AtomSpaces, to start experiments, to use without programming knowledge. But OK, I can continues in this mode as well, but just some advice would be very helpful.

Alex

Ryan Hornbeck

unread,
Jan 2, 2017, 12:14:30 AM1/2/17
to opencog
If you want to try this way, I created a bash script that works on Ubuntu 16.04.  You'd have to get a VM or Ubuntu box up, but it should work from a fresh install.  Just another option...  https://github.com/ryanhornbeck/opencog_bash

Ben Goertzel

unread,
Jan 2, 2017, 2:12:59 AM1/2/17
to opencog
HI,

> The project is very, very interesting, but the start is very hard. I OpenCog
> had be available as Windows or Java programs then every novice could be able
> to run server, to create AtomSpaces, to start experiments, to use without
> programming knowledge. But OK, I can continues in this mode as well, but
> just some advice would be very helpful.
>
> Alex
>

Porting OpenCog to Windows or Java is not likely to happen; but we do
have plans to make some OpenCog instances available via the cloud for
folks to experiment with, thus obviating the need for any Linux
knowledge...

Having said that, have you tried the Docker containers?

https://github.com/opencog/docker/blob/master/opencog/README.md


ben

Apil Tamang

unread,
Jan 3, 2017, 7:34:05 AM1/3/17
to opencog

Hi Alex,
I'm relatively new to opencog myself, but I managed to use the docker containers to boot opencog recently. If you're new to docker container-ing, I know from my own trials that it can seem daunting at first. However, I'd encourage you to try it. I've been trying out the examples on opencog/atomspace and opencog/opencog for a while now via my docker instances.

Also, I know for a fact that the 'octool' will fail for Ubuntu 16.04. I came across the same problem as you did. Now, you CAN indeed install libson-spirit separetely for 16.04 to make the installation succeed. However, you probably should follow Ryan's lead on this one. The 'octool' should work fine for Ubuntu 14.04. 

Let me know if you need more help and if you're intent on using the docker (they most certainly boot a lot faster than a VM) images. I may put up a blog actually on this soon in the future.

Alex

unread,
Jan 25, 2017, 4:30:53 PM1/25/17
to opencog
I decided to proceed with Ryan's script https://github.com/ryanhornbeck/opencog_bash/blob/master/opencog_bash.sh (thanks for it!) which I separated into individual commands and ran one by one. Some test failed, of course, but I managed to arrive at the running server. It was not hard after all.

Alex


Alex

unread,
Jul 7, 2017, 6:09:16 PM7/7/17
to opencog
I wanted to suggest opencog_bash.sh script for Joseph Horner for step by step building and installing OpenCog software on Linux (link mentioned in above posts), unfortunately, the relevant Github repositories are gone. So sad and depserately. It was very good script, I felt like controlling process. If someone case copy of this script it would be nice to get it. Chances are that I will need to rebuild OpenCog in future and this was very handy script.

Alex

unread,
Jul 7, 2017, 7:03:46 PM7/7/17
to opencog
Fortunately I have local copy of this script. I like to execute these commands one by one and provide immediate reaction is something goes wrong.

The Script:

#!/bin/bash

# Assuming Ubuntu 16.04 LTS

# https://github.com/opencog/cogutils

# OpenCog Utils (cogutils), Atomspace and OpenCog Server

# v0.1- R. Hornbeck

echo "Updating Ubuntu packages..."

sudo apt-get -y update && apt-get upgrade

echo "Installing OpenCog depencencies..."

sudo apt-get -y install libboost-all-dev cmake cxxtest binutils-dev libiberty-dev doxygen git guile-2.0-dev cython postgresql postgresql-client unixodbc-dev libzmq3-dev libprotobuf-dev libsdl-gfx1.2-dev libsdl1.2-dev libzmq3-dev libtbb-dev libgeos-*

echo "Cloning and building CogUtils..."

cd /opt/ && git clone https://github.com/opencog/cogutils.git

cd cogutils && mkdir build && cd build && cmake .. && make && make test

echo "CogUtils build test successful..."

sudo make install

echo "OpenCog build and install successful."

echo "Cloning and building Atomspace..."

cd /opt/ && git clone https://github.com/opencog/atomspace.git

cd atomspace && mkdir build && cd build && cmake .. && make && make test

echo "Atomspace build test successful..."

sudo make install

echo "Atomspace build and install successful."

echo "Cloning and building MOSES..."

cd /opt/ && git clone https://github.com/opencog/moses.git

cd moses && mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release .. && make && make test

echo "MOSES build test successful..."

sudo make install

echo "MOSES build and install successful."

echo "Cloning and building OpenCog..."

cd /opt/ && git clone https://github.com/opencog/opencog.git

cd opencog && mkdir build && cd build && cmake .. && make && make test

echo "OpenCog built test successful..."

sudo make install

echo "OpenCog successfully built."

Joseph Horner

unread,
Jul 7, 2017, 11:56:56 PM7/7/17
to opencog
Thank you very much for the script. I'll give this a try on my Ubuntu install and let you know if I run into any problems.

Andi

unread,
Jul 8, 2017, 6:10:33 PM7/8/17
to opencog
the link does not work

Joseph Horner

unread,
Jul 9, 2017, 10:10:39 AM7/9/17
to opencog
This worked great for me. I got everything built and was able to start the cogserver .. thank you

Joseph Horner

unread,
Jul 11, 2017, 11:12:01 AM7/11/17
to opencog
Actually I failed to mention I did receive a few errors during the "Cloning and building Atomspace" and "Cloning and building OpenCog" -- looks like some unit tests
 were failing which also showed as errors when I restarted my machine this morning.   Not sure how detrimental this is but wanted to share for completeness.  

echo *********************************************************************************
echo ******************  "Cloning and building Atomspace..."   ***********************
echo *********************************************************************************

The following tests FAILED:
         98 - BackwardChainerUTest (Failed)
Errors while running CTest
CMakeFiles/test.dir/build.make:57: recipe for target 'CMakeFiles/test' failed
make[3]: *** [CMakeFiles/test] Error 8
CMakeFiles/Makefile2:99: recipe for target 'CMakeFiles/test.dir/all' failed
make[2]: *** [CMakeFiles/test.dir/all] Error 2
CMakeFiles/Makefile2:106: recipe for target 'CMakeFiles/test.dir/rule' failed
make[1]: *** [CMakeFiles/test.dir/rule] Error 2
Makefile:197: recipe for target 'test' failed
make: *** [test] Error 2


echo **********************************************************************************
echo *****************  "Cloning and building OpenCog..." *****************************
echo **********************************************************************************


Total Test time (real) =  26.03 sec

The following tests FAILED:
          2 - AtomSpacePublisherModuleUTest (OTHER_FAULT)
          4 - ShellUTest (Failed)
          6 - AnaphoraTest (Failed)
          7 - SuRealUTest (Failed)
          8 - MicroplanningUTest (Failed)
          9 - ChatlangUTest (Failed)
         10 - MOSESPLNSynergyUTest (Failed)
         11 - PLNRulesUTest (Failed)
         22 - PatternMinerUTest (SEGFAULT)
Errors while running CTest
CMakeFiles/test.dir/build.make:57: recipe for target 'CMakeFiles/test' failed
make[3]: *** [CMakeFiles/test] Error 8
CMakeFiles/Makefile2:99: recipe for target 'CMakeFiles/test.dir/all' failed
make[2]: *** [CMakeFiles/test.dir/all] Error 2
CMakeFiles/Makefile2:106: recipe for target 'CMakeFiles/test.dir/rule' failed
make[1]: *** [CMakeFiles/test.dir/rule] Error 2
Makefile:197: recipe for target 'test' failed
make: *** [test] Error 2

Alex

unread,
Jul 11, 2017, 3:56:08 PM7/11/17
to opencog
I had failed tests too, but I neglected them and I proceed with cogserver, guile and first Rule Engine runs. I hope that sooner or later I will be able to proceed with Ming Agent - i.e. use OpenCog as autonomous intellectual agent. Because only agen architectures - BDI - have goals and hierarchy of goals and tasks and only in such manner I can start goal-oriented automatic reasoning. There is inference control (PLN book has chapter about this), but inference control is almost non-existent theme in current literature. Such endeavours are gathered under notion of BDI agent and goal-oriented reasoning and activities of agents.

Nil Geisweiller

unread,
Jul 11, 2017, 5:11:03 PM7/11/17
to ope...@googlegroups.com


On 07/11/2017 06:12 PM, Joseph Horner wrote:
> Actually I failed to mention I did receive a few errors during the
> "Cloning and building Atomspace" and "Cloning and building OpenCog" --
> looks like some unit tests
> were failing which also showed as errors when I restarted my machine
> this morning. Not sure how detrimental this is but wanted to share for
> completeness.
>
> echo
> *********************************************************************************
> echo ****************** "Cloning and building Atomspace..."
> ***********************
> echo
> *********************************************************************************
>
> The following tests FAILED:
> 98 - BackwardChainerUTest (Failed)
> Errors while running CTest

Works on my system (antiX/Debian Jessie). What is your system (OS and gcc)?

Nil
> --
> You received this message because you are subscribed to the Google
> Groups "opencog" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to opencog+u...@googlegroups.com
> <mailto:opencog+u...@googlegroups.com>.
> To post to this group, send email to ope...@googlegroups.com
> <mailto:ope...@googlegroups.com>.
> Visit this group at https://groups.google.com/group/opencog.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/opencog/5c74a74a-8b86-43df-a657-c77f85e29153%40googlegroups.com
> <https://groups.google.com/d/msgid/opencog/5c74a74a-8b86-43df-a657-c77f85e29153%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.

Linas Vepstas

unread,
Jul 11, 2017, 9:32:35 PM7/11/17
to opencog
BackwardChainer sometimes intermittenlty fails, maybe 1 out of 10 times. Rn it again, I bet it will pass.

These pass for me:
          4 - ShellUTest (Failed)
          6 - AnaphoraTest (Failed)
          7 - SuRealUTest (Failed)
          8 - MicroplanningUTest (Failed)

Someone should look into them, and see why they fail.  The other failures are "normal".

The README in the tests/cython directory expains how to run the cython tests by hand (i.e. anaphora)  My guess is the fail is some incompelete python config

--linas

--
You received this message because you are subscribed to the Google Groups "opencog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opencog+unsubscribe@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.

Joseph Horner

unread,
Jul 12, 2017, 10:07:47 AM7/12/17
to opencog, linasv...@gmail.com
Ok I'll give it another run and see if I can get it to succeed.  

As I learn more about the different systems and components hopefully I can begin to look into the source a little.
thx for the feedback. 

To unsubscribe from this group and stop receiving emails from it, send an email to opencog+u...@googlegroups.com.

To post to this group, send email to ope...@googlegroups.com.
Visit this group at https://groups.google.com/group/opencog.
Reply all
Reply to author
Forward
0 new messages