Problems building Opencog

156 views
Skip to first unread message

Kefeh

unread,
Jul 26, 2016, 10:29:33 AM7/26/16
to opencog
Hello,
        i have been trying t build Opencog and on running the cmake .. i ran across some warnings and errors.
 
Please see https://drive.google.com/open?id=0B1EsgPC1GsI5ODBGNDhUaXJmbDQ.

Regards,
Kefeh

Linas Vepstas

unread,
Jul 26, 2016, 5:27:05 PM7/26/16
to opencog
presumably, your cmake version is different than ours.  --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+u...@googlegroups.com.
To post to this group, send email to 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/f120344d-8da3-453f-8212-65ca2aa2f902%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Gaurav Gautam

unread,
Jul 28, 2016, 10:48:31 AM7/28/16
to opencog
Hello,

There is some error about missing atom_type dependency at the very end. Did you install atomspace?

Could you paste the errors in the post itself from next time?

Yours sincerely
Gaurav Gautam

Kefeh Collins

unread,
Jul 28, 2016, 11:12:49 AM7/28/16
to ope...@googlegroups.com
Hello,

My cmake version is verson 3.5.1, i don't know if that posses a problem.

Regards,
Kefeh.



--
You received this message because you are subscribed to a topic in the Google Groups "opencog" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/opencog/Xkj7Zxjj8cg/unsubscribe.
To unsubscribe from this group and all its topics, 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.

Kefeh Collins

unread,
Jul 28, 2016, 11:16:36 AM7/28/16
to ope...@googlegroups.com
Hello,

yes i installed atomspace and all its requirements, i will try to reinstall it to see if that helps.

i will try to paste the errors directly on the post next time.


Yours sincerely
Kefeh

Gaurav Gautam

unread,
Jul 28, 2016, 11:33:53 AM7/28/16
to opencog
This may not be the best idea, but can you try running cmake with -Wno-dev option? It appears that it would suppress most of the warnings. I know it feels like sweeping the troubles under the rug, but see if you can get it compiled.

Linas Vepstas

unread,
Jul 28, 2016, 9:10:08 PM7/28/16
to opencog
On Thu, Jul 28, 2016 at 10:12 AM, Kefeh Collins <kefehc...@gmail.com> wrote:
Hello,

My cmake version is verson 3.5.1, i don't know if that posses a problem.



Ahh, OK, that is a newer version of cmake than what is in trusty. 

I think I may have fixed this in 

I think that will fix it for you, but also, I suspect opencog works only in trusty, so you are likely to hit additional bugs.

--linas

Kefeh Collins

unread,
Aug 3, 2016, 2:10:50 AM8/3/16
to ope...@googlegroups.com
Hello,
  
    after i merged the fixes on the cmakefiles, i tried building it again to no avail then i tried rebuilding atomspace and hit a couple of warnings:


warnings from cmake ..:

CMake Warning at tests/persist/sql/odbc/CMakeLists.txt:67 (MESSAGE):
  /usr/bin/psql: psql: FATAL: Peer authentication failed for user
  "opencog_tester"



CMake Warning at tests/persist/sql/odbc/CMakeLists.txt:82 (MESSAGE):
  Postgres database not configured for unit tests! See the README!


CMake Warning at tests/persist/sql/postgres/CMakeLists.txt:67 (MESSAGE):
  /usr/bin/psql: psql: FATAL: Peer authentication failed for user
  "opencog_tester"



CMake Warning at tests/persist/sql/postgres/CMakeLists.txt:82 (MESSAGE):
  Postgres database not configured for unit tests! See the README!

..
..
..

CMake Warning (dev) in CMakeLists.txt:
  No cmake_minimum_required command is present.  A line of code such as

    cmake_minimum_required(VERSION 3.5)

  should be added at the top of the file.  The version specified may be lower
  if you wish to support older CMake versions for this project.  For more
  information run "cmake --help-policy CMP0000".
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Configuring done
CMake Warning (dev) at opencog/atoms/base/CMakeLists.txt:13 (ADD_LIBRARY):
  Policy CMP0003 should be set before this line.  Add code such as

    if(COMMAND cmake_policy)
      cmake_policy(SET CMP0003 NEW)
    endif(COMMAND cmake_policy)

  as early as possible but after the most recent call to
  cmake_minimum_required or cmake_policy(VERSION).  This warning appears
  because target "atombase" links to some libraries for which the linker must
  search:

    pthread, pthread

  and other libraries with known full path:

    /home/kefeh/atomspace/build/opencog/truthvalue/libtruthvalue.so
    /usr/local/lib/libcogutil.so

  CMake is adding directories in the second list to the linker search path in
  case they are needed to find libraries from the first list (for backwards
  compatibility with CMake 2.4).  Set policy CMP0003 to OLD or NEW to enable
  or disable this behavior explicitly.  Run "cmake --help-policy CMP0003" for
  more information.

from make install:

-- Install configuration: "Release"
-- Up-to-date: /usr/local/include/opencog/atoms/NumberNode.h
CMake Error at opencog/atoms/cmake_install.cmake:36 (file):
  file INSTALL cannot set permissions on
  "/usr/local/include/opencog/atoms/NumberNode.h"
Call Stack (most recent call first):
  opencog/cmake_install.cmake:37 (include)
  cmake_install.cmake:38 (include)
 
Makefile:105: recipe for target 'install' failed
make: *** [install] Error 1


Thanks
Kefeh

--
You received this message because you are subscribed to a topic in the Google Groups "opencog" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/opencog/Xkj7Zxjj8cg/unsubscribe.
To unsubscribe from this group and all its topics, 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.

Linas Vepstas

unread,
Aug 3, 2016, 3:52:49 PM8/3/16
to opencog
Check your merge:

that line has been there forever.  So have the cmake policy lines below it.

--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+u...@googlegroups.com.

To post to this group, send email to ope...@googlegroups.com.
Visit this group at https://groups.google.com/group/opencog.

Kefeh Collins

unread,
Aug 4, 2016, 7:19:24 AM8/4/16
to ope...@googlegroups.com
Hello,
   
       thank you, i had a problem with my merge which i have resolved, the cmake warnings are fewer now

cmake .. :

CMake Warning at tests/persist/sql/odbc/CMakeLists.txt:67 (MESSAGE):
  /usr/bin/psql: psql: FATAL: Peer authentication failed for user
  "opencog_tester"



CMake Warning at tests/persist/sql/odbc/CMakeLists.txt:82 (MESSAGE):
  Postgres database not configured for unit tests! See the README!


CMake Warning at tests/persist/sql/postgres/CMakeLists.txt:67 (MESSAGE):
  /usr/bin/psql: psql: FATAL: Peer authentication failed for user
  "opencog_tester"



CMake Warning at tests/persist/sql/postgres/CMakeLists.txt:82 (MESSAGE):
  Postgres database not configured for unit tests! See the README!


make install:

-- Install configuration: "Release"
-- Up-to-date: /usr/local/include/opencog/atoms/NumberNode.h
CMake Error at opencog/atoms/cmake_install.cmake:36 (file):
  file INSTALL cannot set permissions on
  "/usr/local/include/opencog/atoms/NumberNode.h"
Call Stack (most recent call first):
  opencog/cmake_install.cmake:37 (include)
  cmake_install.cmake:38 (include)
 


Makefile:105: recipe for target 'install' failed
make: *** [install] Error 1

--
You received this message because you are subscribed to a topic in the Google Groups "opencog" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/opencog/Xkj7Zxjj8cg/unsubscribe.
To unsubscribe from this group and all its topics, 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.

Linas Vepstas

unread,
Aug 4, 2016, 3:02:01 PM8/4/16
to opencog
install must be performed as root, e.g. by using sudo:  `sudo make install`

--linas

To unsubscribe from this group and all its topics, send an email to opencog+unsubscribe@googlegroups.com.

To post to this group, send email to 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/f120344d-8da3-453f-8212-65ca2aa2f902%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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.
Visit this group at https://groups.google.com/group/opencog.

Kefeh Collins

unread,
Aug 4, 2016, 6:54:54 PM8/4/16
to ope...@googlegroups.com
Hello,
      Thanks a lot, it worked using " sudo make install ", so i have successfully built atomspace.

i have another issues building opencog

make :
/home/kefeh/opencog/opencog/cogserver/server/CogServer.cc: In member function ‘virtual void opencog::CogServer::enableNetworkServer()’:
/home/kefeh/opencog/opencog/cogserver/server/CogServer.cc:173:77: error: no matching function for call to ‘opencog::Config::get_int(const char [12], int)’
     _networkServer = new NetworkServer(config().get_int("SERVER_PORT", 17001));
                                                                             ^
In file included from /home/kefeh/opencog/opencog/cogserver/server/CogServer.cc:38:0:
/usr/local/include/opencog/util/Config.h:83:9: note: candidate: int opencog::Config::get_int(const string&) const
     int get_int(const std::string &parameter_name) const;
         ^
/usr/local/include/opencog/util/Config.h:83:9: note:   candidate expects 1 argument, 2 provided
/home/kefeh/opencog/opencog/cogserver/server/CogServer.cc: In member function ‘virtual void opencog::CogServer::serverLoop()’:
/home/kefeh/opencog/opencog/cogserver/server/CogServer.cc:190:74: error: no matching function for call to ‘opencog::Config::get_int(const char [22], int)’
  time_t cycle_duration = config().get_int("SERVER_CYCLE_DURATION", 100) * 1000;
                                                                       ^
In file included from /home/kefeh/opencog/opencog/cogserver/server/CogServer.cc:38:0:
/usr/local/include/opencog/util/Config.h:83:9: note: candidate: int opencog::Config::get_int(const string&) const
     int get_int(const std::string &parameter_name) const;
         ^
/usr/local/include/opencog/util/Config.h:83:9: note:   candidate expects 1 argument, 2 provided
/home/kefeh/opencog/opencog/cogserver/server/CogServer.cc: In member function ‘virtual void opencog::CogServer::loadSCMModules(std::vector<std::__cxx11::basic_string<char> >)’:
/home/kefeh/opencog/opencog/cogserver/server/CogServer.cc:724:44: error: no matching function for call to ‘opencog::Config::get(const char [12], const char [1])’
     tokenize(config().get("SCM_PRELOAD", ""), std::back_inserter(scm_modules),
                                            ^
In file included from /home/kefeh/opencog/opencog/cogserver/server/CogServer.cc:38:0:
/usr/local/include/opencog/util/Config.h:78:24: note: candidate: const string& opencog::Config::get(const string&) const
     const std::string& get(const std::string &parameter_name) const;
                        ^
/usr/local/include/opencog/util/Config.h:78:24: note:   candidate expects 1 argument, 2 provided
opencog/cogserver/server/CMakeFiles/server.dir/build.make:158: recipe for target 'opencog/cogserver/server/CMakeFiles/server.dir/CogServer.cc.o' failed
make[2]: *** [opencog/cogserver/server/CMakeFiles/server.dir/CogServer.cc.o] Error 1
CMakeFiles/Makefile2:1090: recipe for target 'opencog/cogserver/server/CMakeFiles/server.dir/all' failed
make[1]: *** [opencog/cogserver/server/CMakeFiles/server.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2




thanks
Kefeh


Linas Vepstas

unread,
Aug 4, 2016, 7:13:46 PM8/4/16
to opencog
ah, yes. You will need to pull and buld a new version of cogutils to fix this. This is a very recent change.  Typically, changes like this are not made very often, but it was needed, in this case.  

Don't forget to rebuild the atomspace after doing cogutils

--linas

Kefeh Collins

unread,
Aug 5, 2016, 10:56:12 AM8/5/16
to ope...@googlegroups.com
Hello,
      i just pulled cogutils and on building it i still encounter problems

cmake ..:
CMake Warning (dev) at CMakeLists.txt:273 (ADD_CUSTOM_TARGET):
  Policy CMP0037 is not set: Target names should not be reserved and should
  match a validity pattern.  Run "cmake --help-policy CMP0037" for policy
  details.  Use the cmake_policy command to set the policy and suppress this
  warning.

  The target name "test" is reserved or not valid for certain CMake features,
  such as generator expressions, and may result in undefined behavior.

This warning is for project developers.  Use -Wno-dev to suppress it.

make install:
 -- Install configuration: "Release"
-- Installing: /usr/local/include/opencog/util/ansi.h
CMake Error at opencog/util/cmake_install.cmake:36 (file):
  file INSTALL cannot copy file "/home/kefeh/cogutils/opencog/util/ansi.h" to
  "/usr/local/include/opencog/util/ansi.h".

Call Stack (most recent call first):
  opencog/cmake_install.cmake:37 (include)
  cmake_install.cmake:38 (include)
 


Makefile:105: recipe for target 'install' failed
make: *** [install] Error 1

Regards
Kefeh


Linas Vepstas

unread,
Aug 5, 2016, 1:31:43 PM8/5/16
to opencog
OK fixed. Also `sudo make isntall` here like elsewhere.

Kefeh Collins

unread,
Aug 9, 2016, 5:36:57 PM8/9/16
to ope...@googlegroups.com
Hello,
     thanks that works, cogutil builds well, as well as atomspace but opencog wont build make test gives me these results

make test:
The following tests FAILED:
      1 - AtomSpacePublisherModuleUTest (OTHER_FAULT)
      8 - PythonModuleUTest (Failed)
      9 - PyEvalUTest (OTHER_FAULT)
     12 - ImportanceUpdatingAgentUTest (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

Regards
Kefeh


Linas Vepstas

unread,
Aug 9, 2016, 8:32:21 PM8/9/16
to opencog
Sadly, this is currently the "normal" situation. We've got a problem with python sending its output to the wrong place; this needs to be fixed.  The rest snow-ball from there.

--linas

Kefeh Collins

unread,
Aug 17, 2016, 6:59:36 AM8/17/16
to ope...@googlegroups.com
Hello,
    i am curious to know if without my Opencog built properly can i start contributing or working on a bug? if i can, can someone point(and guide me through) to a beginners bug so i can get started? i am still new to Open Source.

Thanks
Kefeh  

Noah Bliss

unread,
Aug 17, 2016, 11:47:51 PM8/17/16
to opencog
Kefeh,

As you know, the primary code is on github. It's a fantastic platform for making forks (copies of code that you can modify into your own version). If your version fixes a bug that we want to merge back into the main code, you can submit a pull request to try and get it written into the main code "branch." Even if your pull request is denied, your fork is still available to you and anyone else to use. (However, it will not receive updates automatically when the main code gets patched. You have to manually repull from the main branch to your branch to keep your branch current.)

There a much better write-ups on how github works? by that is the super short of it.

Tl:dr: Make a fork. If you fix a bug, submit a pull request, otherwise have fun!

Reply all
Reply to author
Forward
0 new messages