Anyone know how to resolve this build error:fatal error: opencog/nlp/types/atom_types.h: No such file or directory

102 views
Skip to first unread message

Reach Me

unread,
Feb 26, 2022, 6:48:41 PM2/26/22
to ope...@googlegroups.com
Didn't know if it was better to ask here for wide reach or open an issue on github.

Following this for the install steps:


Bash history (uses a ubuntu container for a blank test space):

docker run --name opencog -it ubuntu /bin/bash
apt update
mkdir oc
cd oc
export OCDIR=$(pwd)
apt -y install w3m wget curl git build-essential sudo nano
sudo curl -L http://raw.github.com/opencog/ocpkg/master/ocpkg -o /usr/local/bin/octool && sudo chmod +x /usr/local/bin/octool
octool -rdcpav -l default
git clone https://github.com/opencog/cogutil.git
cd cogutil
mkdir build && cd build
cmake .. && make -j$(nproc) && make tests && make install
cd $OCDIR
git clone https://github.com/opencog/atomspace.git
cd atomspace/
mkdir build && cd build
cmake .. && make -j$(nproc) && make tests && make install
cd $OCDIR
git clone https://github.com/opencog/moses.git
cd moses
mkdir build && cd build
cmake .. && make -j$(nproc) && make tests && make install
cd $OCDIR
git clone https://github.com/opencog/opencog.git
cd opencog
mkdir build && cd build
cmake .. && make -j$(nproc) && make tests && make install

Error during make -j$(nproc) of Opencog:

[  6%] Built target SCM_CONFIG
[ 27%] Built target neighbors
[ 31%] Built target cogita
[ 31%] Built target nlp_oc_atom_types
[ 31%] Built target COPY_TO_LOAD_PATH_IN_BUILD_DIR_FROM__oc_opencog_opencog_nlp_sentiment
[ 31%] Built target COPY_TO_LOAD_PATH_IN_BUILD_DIR_FROM__oc_opencog_opencog_nlp_oc-types
[ 41%] Built target nlp-oc-types
[ 48%] Building CXX object opencog/nlp/wsd/CMakeFiles/wsd.dir/NNAdjust.cc.o
[ 51%] Building CXX object opencog/nlp/wsd/CMakeFiles/wsd.dir/MihalceaLabel.cc.o
[ 51%] Building CXX object opencog/nlp/wsd/CMakeFiles/wsd.dir/SenseRank.cc.o
[ 55%] Building CXX object opencog/nlp/wsd/CMakeFiles/wsd.dir/SenseSimilarityLCH.cc.o
[ 62%] Building CXX object opencog/nlp/wsd/CMakeFiles/wsd.dir/EdgeThin.cc.o
[ 62%] Building CXX object opencog/nlp/wsd/CMakeFiles/wsd.dir/EdgeUtils.cc.o
[ 65%] Building CXX object opencog/nlp/wsd/CMakeFiles/wsd.dir/Mihalcea.cc.o
[ 68%] Building CXX object opencog/nlp/wsd/CMakeFiles/wsd.dir/MihalceaEdge.cc.o
[ 72%] Building CXX object opencog/nlp/wsd/CMakeFiles/wsd.dir/ParseRank.cc.o
[ 75%] Building CXX object opencog/nlp/wsd/CMakeFiles/wsd.dir/ReportRank.cc.o
[ 79%] Building CXX object opencog/nlp/wsd/CMakeFiles/wsd.dir/Sweep.cc.o
[ 89%] Built target nlp_oc_types_cython
[ 89%] Built target COPY_TO_LOAD_PATH_IN_BUILD_DIR_FROM__oc_opencog_opencog_nlp_scm
[ 89%] Built target COPY_TO_LOAD_PATH_IN_BUILD_DIR_FROM__oc_opencog_opencog_eva_model
[ 89%] Built target COPY_TO_LOAD_PATH_IN_BUILD_DIR_FROM__oc_opencog_opencog_eva_behavior
In file included from /oc/opencog/opencog/nlp/wsd/EdgeUtils.cc:10:
/oc/opencog/opencog/nlp/wsd/ForeachWord.h:23:10: fatal error: opencog/nlp/types/atom_types.h: No such file or directory
   23 | #include <opencog/nlp/types/atom_types.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [opencog/nlp/wsd/CMakeFiles/wsd.dir/build.make:76: opencog/nlp/wsd/CMakeFiles/wsd.dir/EdgeUtils.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /oc/opencog/opencog/nlp/wsd/NNAdjust.cc:19:
/oc/opencog/opencog/nlp/wsd/ForeachWord.h:23:10: fatal error: opencog/nlp/types/atom_types.h: No such file or directory
   23 | #include <opencog/nlp/types/atom_types.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [opencog/nlp/wsd/CMakeFiles/wsd.dir/build.make:128: opencog/nlp/wsd/CMakeFiles/wsd.dir/NNAdjust.cc.o] Error 1
In file included from /oc/opencog/opencog/nlp/wsd/ReportRank.cc:17:
/oc/opencog/opencog/nlp/wsd/ForeachWord.h:23:10: fatal error: opencog/nlp/types/atom_types.h: No such file or directory
   23 | #include <opencog/nlp/types/atom_types.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [opencog/nlp/wsd/CMakeFiles/wsd.dir/build.make:154: opencog/nlp/wsd/CMakeFiles/wsd.dir/ReportRank.cc.o] Error 1
In file included from /oc/opencog/opencog/nlp/wsd/ParseRank.cc:20:
/oc/opencog/opencog/nlp/wsd/ForeachWord.h:23:10: fatal error: opencog/nlp/types/atom_types.h: No such file or directory
   23 | #include <opencog/nlp/types/atom_types.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
/oc/opencog/opencog/nlp/wsd/MihalceaEdge.cc:24:10: fatal error: opencog/nlp/types/atom_types.h: No such file or directory
   24 | #include <opencog/nlp/types/atom_types.h>
         |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [opencog/nlp/wsd/CMakeFiles/wsd.dir/build.make:141: opencog/nlp/wsd/CMakeFiles/wsd.dir/ParseRank.cc.o] Error 1
make[2]: *** [opencog/nlp/wsd/CMakeFiles/wsd.dir/build.make:102: opencog/nlp/wsd/CMakeFiles/wsd.dir/MihalceaEdge.cc.o] Error 1
/oc/opencog/opencog/nlp/wsd/Mihalcea.cc:14:10: fatal error: opencog/nlp/types/atom_types.h: No such file or directory
   14 | #include <opencog/nlp/types/atom_types.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [opencog/nlp/wsd/CMakeFiles/wsd.dir/build.make:89: opencog/nlp/wsd/CMakeFiles/wsd.dir/Mihalcea.cc.o] Error 1
In file included from /oc/opencog/opencog/nlp/wsd/SenseSimilarityLCH.cc:19:
/oc/opencog/opencog/nlp/wsd/ForeachWord.h:23:10: fatal error: opencog/nlp/types/atom_types.h: No such file or directory
   23 | #include <opencog/nlp/types/atom_types.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [opencog/nlp/wsd/CMakeFiles/wsd.dir/build.make:193: opencog/nlp/wsd/CMakeFiles/wsd.dir/SenseSimilarityLCH.cc.o] Error 1
In file included from /oc/opencog/opencog/nlp/wsd/Sweep.cc:11:
/oc/opencog/opencog/nlp/wsd/ForeachWord.h:23:10: fatal error: opencog/nlp/types/atom_types.h: No such file or directory
   23 | #include <opencog/nlp/types/atom_types.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [opencog/nlp/wsd/CMakeFiles/wsd.dir/build.make:219: opencog/nlp/wsd/CMakeFiles/wsd.dir/Sweep.cc.o] Error 1
In file included from /oc/opencog/opencog/nlp/wsd/SenseRank.cc:19:
/oc/opencog/opencog/nlp/wsd/ForeachWord.h:23:10: fatal error: opencog/nlp/types/atom_types.h: No such file or directory
   23 | #include <opencog/nlp/types/atom_types.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [opencog/nlp/wsd/CMakeFiles/wsd.dir/build.make:180: opencog/nlp/wsd/CMakeFiles/wsd.dir/SenseRank.cc.o] Error 1
In file included from /oc/opencog/opencog/nlp/wsd/MihalceaLabel.cc:21:
/oc/opencog/opencog/nlp/wsd/ForeachWord.h:23:10: fatal error: opencog/nlp/types/atom_types.h: No such file or directory
   23 | #include <opencog/nlp/types/atom_types.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [opencog/nlp/wsd/CMakeFiles/wsd.dir/build.make:115: opencog/nlp/wsd/CMakeFiles/wsd.dir/MihalceaLabel.cc.o] Error 1
In file included from /oc/opencog/opencog/nlp/wsd/EdgeThin.cc:12:
/oc/opencog/opencog/nlp/wsd/ForeachWord.h:23:10: fatal error: opencog/nlp/types/atom_types.h: No such file or directory
   23 | #include <opencog/nlp/types/atom_types.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [opencog/nlp/wsd/CMakeFiles/wsd.dir/build.make:63: opencog/nlp/wsd/CMakeFiles/wsd.dir/EdgeThin.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:816: opencog/nlp/wsd/CMakeFiles/wsd.dir/all] Error 2
make: *** [Makefile:152: all] Error 2

Reach Me

unread,
Mar 1, 2022, 8:07:32 PM3/1/22
to ope...@googlegroups.com
Hmmm, Not sure if this a step forward or backward...
I looked for the file opencog/nlp/types/atom_types.h in the source tree. the closest one named that was:
/oc/opencog/build/opencog/nlp/oc-types/atom_types.h

So I tried to symlink the folder so the build tools would hopefully get what they need:
ln -s /oc/opencog/build/opencog/nlp/oc-types /oc/opencog/build/opencog/nlp/types

Now I get whole new errors! Lots of link references:
/oc/opencog/opencog/nlp/wsd/ForeachWord.h: In function 'bool opencog::foreach_parse(const opencog::Handle&, bool (T::*)(const opencog::Handle&), T*)':
/oc/opencog/opencog/nlp/wsd/ForeachWord.h:40:40: error: 'PARSE_LINK' was not declared in this scope; did you mean 'FALSE_LINK'?
   40 |  return foreach_reverse_binary_link(h, PARSE_LINK, cb, data);
      |                                        ^~~~~~~~~~
      |                                        FALSE_LINK
/oc/opencog/opencog/nlp/wsd/ForeachWord.h: In function 'bool opencog::foreach_word_instance(const opencog::Handle&, bool (T::*)(const opencog::Handle&), T*)':
/oc/opencog/opencog/nlp/wsd/ForeachWord.h:59:39: error: 'REFERENCE_LINK' was not declared in this scope; did you mean 'REWRITE_LINK'?
   59 |  Handle h = fl.follow_binary_link(ha, REFERENCE_LINK);
      |                                       ^~~~~~~~~~~~~~
      |                                       REWRITE_LINK
/oc/opencog/opencog/nlp/wsd/ForeachWord.h: In function 'opencog::Handle opencog::get_dict_word_of_word_instance(const opencog::Handle&)':
/oc/opencog/opencog/nlp/wsd/ForeachWord.h:225:58: error: 'REFERENCE_LINK' was not declared in this scope; did you mean 'REWRITE_LINK'?
  225 |  Handle dict_word = fl.follow_binary_link(word_instance, REFERENCE_LINK);
      |                                                          ^~~~~~~~~~~~~~
      |                                                          REWRITE_LINK

In file included from /oc/opencog/opencog/nlp/wsd/ParseRank.cc:20:
/oc/opencog/opencog/nlp/wsd/ForeachWord.h: In function 'bool opencog::foreach_parse(const opencog::Handle&, bool (T::*)(const opencog::Handle&), T*)':
/oc/opencog/opencog/nlp/wsd/ForeachWord.h:40:40: error: 'PARSE_LINK' was not declared in this scope; did you mean 'FALSE_LINK'?
   40 |  return foreach_reverse_binary_link(h, PARSE_LINK, cb, data);
      |                                        ^~~~~~~~~~
      |                                        FALSE_LINK
/oc/opencog/opencog/nlp/wsd/ForeachWord.h: In function 'bool opencog::foreach_word_instance(const opencog::Handle&, bool (T::*)(const opencog::Handle&), T*)':
/oc/opencog/opencog/nlp/wsd/ForeachWord.h:59:39: error: 'REFERENCE_LINK' was not declared in this scope; did you mean 'REWRITE_LINK'?
   59 |  Handle h = fl.follow_binary_link(ha, REFERENCE_LINK);
      |                                       ^~~~~~~~~~~~~~
      |                                       REWRITE_LINK
/oc/opencog/opencog/nlp/wsd/ForeachWord.h: In function 'opencog::Handle opencog::get_dict_word_of_word_instance(const opencog::Handle&)':
/oc/opencog/opencog/nlp/wsd/ForeachWord.h:225:58: error: 'REFERENCE_LINK' was not declared in this scope; did you mean 'REWRITE_LINK'?
  225 |  Handle dict_word = fl.follow_binary_link(word_instance, REFERENCE_LINK);
      |                                                          ^~~~~~~~~~~~~~
      |                                                          REWRITE_LINK

In file included from /oc/opencog/opencog/nlp/wsd/SenseRank.cc:19:
/oc/opencog/opencog/nlp/wsd/ForeachWord.h: In function 'bool opencog::foreach_parse(const opencog::Handle&, bool (T::*)(const opencog::Handle&), T*)':
/oc/opencog/opencog/nlp/wsd/ForeachWord.h:40:40: error: 'PARSE_LINK' was not declared in this scope; did you mean 'FALSE_LINK'?
   40 |  return foreach_reverse_binary_link(h, PARSE_LINK, cb, data);
      |                                        ^~~~~~~~~~
      |                                        FALSE_LINK
/oc/opencog/opencog/nlp/wsd/ForeachWord.h: In function 'bool opencog::foreach_word_instance(const opencog::Handle&, bool (T::*)(const opencog::Handle&), T*)':
/oc/opencog/opencog/nlp/wsd/ForeachWord.h:59:39: error: 'REFERENCE_LINK' was not declared in this scope; did you mean 'REWRITE_LINK'?
   59 |  Handle h = fl.follow_binary_link(ha, REFERENCE_LINK);
      |                                       ^~~~~~~~~~~~~~
      |                                       REWRITE_LINK
/oc/opencog/opencog/nlp/wsd/ForeachWord.h: In function 'opencog::Handle opencog::get_dict_word_of_word_instance(const opencog::Handle&)':
/oc/opencog/opencog/nlp/wsd/ForeachWord.h:225:58: error: 'REFERENCE_LINK' was not declared in this scope; did you mean 'REWRITE_LINK'?
  225 |  Handle dict_word = fl.follow_binary_link(word_instance, REFERENCE_LINK);
      |                                                          ^~~~~~~~~~~~~~
      |                                                          REWRITE_LINK
/oc/opencog/opencog/nlp/wsd/ForeachWord.h: In function 'bool opencog::foreach_word_instance(const opencog::Handle&, bool (T::*)(const opencog::Handle&), T*)':
/oc/opencog/opencog/nlp/wsd/ForeachWord.h:59:39: error: 'REFERENCE_LINK' was not declared in this scope; did you mean 'REWRITE_LINK'?
   59 |  Handle h = fl.follow_binary_link(ha, REFERENCE_LINK);


Any thoughts or suggestions?

Mark Wigzell

unread,
Mar 2, 2022, 12:45:09 AM3/2/22
to opencog
Hi, so in the docker I build, I have a similar kind of build, when building opencog/docker/noetic/ros-opencog/Dockerfile
In that build, it currently fails elsewhere and I'm debugging it. However, in my build, the atomtypes.h is generated to /opencog/atomspace/build/opencog/atoms/atom_types/atom_types.h
so it seems you are getting the build sequence wrong, perhaps missing a repo? Currently my build is failing but these two steps work:
RUN (mkdir /opencog/cogutil/build; cd /opencog/cogutil/build; \
    cmake ..; make -j6; make install)
RUN (mkdir /opencog/atomspace/build; cd /opencog/atomspace/build; \
    cmake ..; make -j12; make install)

Mark Wigzell

unread,
Mar 2, 2022, 1:52:47 AM3/2/22
to opencog
See my version of the Dockerfile here, it is completely going through now: https://github.com/mwigzell/docker/blob/master/noetic/ros-opencog/Dockerfile

Reach Me

unread,
Mar 6, 2022, 2:28:14 AM3/6/22
to ope...@googlegroups.com
Thanks so much for sharing Mark! I took a look at your dockerfile, it looks like the build instructions page left out the lg-atomese steps. lg-atomese provides the needed file: nlp/types/atom_types.h

Thanks for your help!

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/opencog/822825ee-3feb-48a3-b92a-69beb515bbc8n%40googlegroups.com.

Linas Vepstas

unread,
Mar 6, 2022, 3:02:00 PM3/6/22
to opencog
On Sat, Feb 26, 2022 at 5:48 PM Reach Me <reac...@gmail.com> wrote:
Didn't know if it was better to ask here for wide reach or open an issue on github.

Following this for the install steps:

Looks like you already got the correct answer, which was to install lg_atomese.  I don't see how to alter the wiki page to say that, so I am guessing this is an octool bug.  And to fix that, either a github bug report or a github patch is needed.

That said, building the main opencog repo is somewhat pointless; all that remains there is a mish-mash of bit-rotting natural language pipeline code. All the interesting and active projects have been moved to their own distinct git repos.  So, unless you're interested in reviving the old chatbot pipeline code, there's not much interesting, there.

I'll alter the wiki page to say this.

--linas
 

--
Patrick: Are they laughing at us?
Sponge Bob: No, Patrick, they are laughing next to us.
 

Mark Wigzell

unread,
Mar 6, 2022, 5:30:14 PM3/6/22
to opencog
Yes, atomese postdates those instructions
Also the docker file needed updating for flex install, for link-grammar. (And uses older more stable link-grammar
Cheers.

Reply all
Reply to author
Forward
0 new messages