non-root build

81 views
Skip to first unread message

Dmitry Ponyatov

unread,
Jun 11, 2017, 2:45:01 AM6/11/17
to opencog
I'm working on build scripts for opencog: https://github.com/ponyatov/cog

cogutils & atomspace build ok (it is tiny selfcontaining packages)

but have problem configuring opencog core itself:

I use modern cmake version built from sources (stable Debian has some anility)

rm -rf opencog/build ; mkdir opencog/build ; cd opencog/build ;\
PATH
=/home/ponyatov/cog/cmake/bin:/home/ponyatov/jdk1.8.0_131/bin:/usr/local/bin:/usr/bin:/bin:/usr/games /home/ponyatov/cog/cmake/bin/cmake -DCMAKE_INSTALL_PREFIX:PATH=/home/ponyatov/opencog ..

I use CMAKE_INSTALL_PREFIX for install all opencog system at user home directory


Have lot of error reports on cmake :

failed to create symbolic link '/home/ponyatov/cog/opencog/build/opencog/scm//opencog/pln/rules/propositional/blablabla.scm': No such file or directory

and /home/ponyatov/opencog/share/opencog/scm/opencog.scm contains strange strings looks like hardcoded opencode prefix:

; lib64 is used by various versions of CentOS
(define path "/usr/local/lib/opencog:/usr/local/lib64/opencog")



Dmitry Ponyatov

unread,
Jun 11, 2017, 4:21:14 AM6/11/17
to opencog
make install

-- Up-to-date: /home/ponyatov/opencog/share/opencog/scm/opencog/nlp/processing-utils.scm
-- Up-to-date: /home/ponyatov/opencog/share/opencog/scm/opencog/nlp/sentiment.scm
-- Up-to-date: /home/ponyatov/opencog/lib/python2.7/dist-packages/sentiment/basic_sentiment_analysis.py
CMake Error at opencog/nlp/sentiment/cmake_install.cmake:60 (file):
  file cannot create directory
: /usr/local/etc/opencog/dicts.  Maybe need
  administrative privileges
.
Call Stack (most recent call first):
  opencog
/nlp/cmake_install.cmake:40 (include)
  opencog
/cmake_install.cmake:38 (include)
  cmake_install
.cmake:38 (include)

Makefile:73: recipe for target 'install' failed

Dmitry Ponyatov

unread,
Jun 11, 2017, 4:32:02 AM6/11/17
to opencog
error in opencog/build/opencog/nlp/sentiment/cmake_install.cmake file generation: 

/usr/local/etc must be replaced by ${CMAKE_INSTALL_PREFIX}/etc

what source file should I fix to do it ?

Mark Nuzz

unread,
Jun 11, 2017, 4:39:12 AM6/11/17
to ope...@googlegroups.com
From my understanding, much of the development of OpenCog was done
with the assumption that all development work is to be done with a
specific version of Ubuntu. There are a lot of dependencies, and
install paths and available versions of such can be different between
distros. So this decision from my point of view just takes one major
variable out of the equation.

So my guess is that the work simply just hasn't been done yet to get
the automatic build scripts working on a more general scale in Linux
(like on Debian for example). Or if the work was previously done,
perhaps it broke since then due to nobody else actively developing
with that OS version. I was able to get cogutils to build on Windows
after much grief figuring out how CMake worked. The complexity of the
system and dependency tree is not like most dev work I am used to, so
it didn't make sense at first, but now it does.

So my advice is that if you're looking to fix any build issues, enable
as much debugging information as possible with CMake, and it is just a
matter of finding out what is different between your OS version and
the version of Ubuntu that the team uses.
> --
> 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/1a703943-b079-40e5-9972-c14a968d99bb%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.

Dmitry Ponyatov

unread,
Jun 11, 2017, 5:00:32 AM6/11/17
to opencog
From my understanding, much of the development of OpenCog was done
with the assumption that all development work is to be done with a
specific version of Ubuntu.

Strange decision: opencog seems more or less to be embeddable into robotic-like platforms, so is it better to use some buildroot-like system runs in (semi)virtualized environment on top of any Linux or Windows system ?

Simplest and fastest way is chrooted environment runs from specific non-root user + set of .so libs isolated from host system, but more portable way is to make some _tiny embeddable_ virtual machine image with kernel specially tuned for (para)virtualization (xen/virtualbox/...)

What about Ubuntu on Raspberry Pi like systems ? It is notably wide hardware target niche, able to do low computing power tasks isolated from huge control computer

Ben Goertzel

unread,
Jun 11, 2017, 5:01:57 AM6/11/17
to opencog
yeah we have run OpenCog on Raspberry Pi 3 ...
> --
> 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/dbd1bb49-0ee8-40d8-a293-abbd5febf886%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.



--
Ben Goertzel, PhD
http://goertzel.org

"I am God! I am nothing, I'm play, I am freedom, I am life. I am the
boundary, I am the peak." -- Alexander Scriabin

AmeBel

unread,
Jun 11, 2017, 11:06:45 PM6/11/17
to opencog
There is a script in https://github.com/opencog/ocpkg for debian not maintained though

Nil Geisweiller

unread,
Jun 12, 2017, 1:37:31 AM6/12/17
to ope...@googlegroups.com


On 06/11/2017 09:45 AM, Dmitry Ponyatov wrote:
> Have lot of error reports on cmake :
>
> |
> failed to create symbolic link
> '/home/ponyatov/cog/opencog/build/opencog/scm//opencog/pln/rules/propositional/blablabla.scm':Nosuch
> file ordirectory
> |

I'm also having that. I don't understand the problem but it doesn't seem
to hurt.

Nil

>
> and /home/ponyatov/opencog/share/opencog/scm/opencog.scm contains
> strange strings looks like hardcoded opencode prefix:
>
> |
> ;lib64 isused byvarious versions of CentOS
> (define path "/usr/local/lib/opencog:/usr/local/lib64/opencog")
>
> |
>
>
> --
> 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/62c107ae-5aac-42ad-8a81-64abab7ae33e%40googlegroups.com
> <https://groups.google.com/d/msgid/opencog/62c107ae-5aac-42ad-8a81-64abab7ae33e%40googlegroups.com?utm_medium=email&utm_source=footer>.

Dmitry Ponyatov

unread,
Jun 12, 2017, 10:28:37 AM6/12/17
to opencog
Fixed some problems on opencog build using sed patching:

CWD = $(CURDIR)
PREFIX
= $(CWD)
PREFIXX
= $(subst /,\/,${PREFIX})

cmake src
/opencog
# fix build files
sed
-i 's/\/usr\/local/$${CMAKE_INSTALL_PREFIX}/g' build/opencog/nlp/sentiment/cmake_install.cmake
# build & install
make
&& make install
# postinstall fix
sed
-i 's/\/usr\/local/${PREFIXX}/g' share/opencog/scm/opencog.scm
sed
-i 's/opencog\/atoms\/base/opencog\/base/g' share/opencog/scm/opencog.scm

Still have error:

ponyatov@debian:~/cog$ bin/cogserver
Using default config at /home/ponyatov/cog/etc/cogserver.conf
Backtrace:
In ice-9/boot-9.scm:
 
157: 4 [catch #t #<catch-closure b4ff20> ...]
In unknown file:
 
?: 3 [apply-smob/1 #<catch-closure b4ff20>]
In ice-9/boot-9.scm:
1724: 2 [%start-stack load-stack #<procedure ad9f20 at ice-9/boot-9.scm:1745:2 ()>]
1729: 1 [#<procedure da44b0 ()>]
In unknown file:
 
?: 0 [primitive-load-path "opencog/atoms/base/core_types.scm"]

ERROR
: In procedure primitive-load-path:
ERROR
: In procedure primitive-load-path: Unable to find file "opencog/atoms/base/core_types.scm" in load path


Dmitry Ponyatov

unread,
Jun 12, 2017, 10:56:55 AM6/12/17
to opencog
Looks like opencog build captured contents of src/opencog/scm/opencog/base/core_types.scm

Linas Vepstas

unread,
Jun 17, 2017, 11:17:48 PM6/17/17
to opencog
Mark,

Opencog works great with pretty
 much any kind of linux. I personally run it on
bleeding edge debian unstable. I have
docker containers where its on 16.04 and 16.10
I am also currently running it on a pre-historic
version of RedHat (because I have to, because
its not my machine) and it works great - although
I did have to get a modern compiler installed on it.
Otherwise, no issues.

--linas


> 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/1a703943-b079-40e5-9972-c14a968d99bb%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.
Reply all
Reply to author
Forward
0 new messages