opencog / opencog

A framework for integrated Artificial Intelligence & Artificial General Intelligence (AGI)

Home Page:http://wiki.opencog.org/w/Development

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SuRealUTest compilation error

ngeiswei opened this issue · comments

I'm getting the following error with the last opencog

[ 70%] Linking CXX executable SuRealUTest
/usr/bin/ld: ../../../opencog/nlp/lg-dict/liblg-dict-entry.so: undefined reference to `boolean_dictionary_lookup'
collect2: error: ld returned 1 exit status

In case it is related, my version of link grammar is (according to cmake)

-- Link Grammar (5.5.1 >= 5.4.0) found.

boolean_dictionary_lookup is an old function so the problem likely doesn't come from a link grammar version.

It's an old function, but apparently, it was never specified in the shared-library export list. Now, normally, this list only affects MacOS users; the glibc shared library system seemed to ignore it. .. at least for me. Maybe something changed. I'm adding it to the export list now.

Oh, thaat's interesting .... nm /usr/local/lib/liblink-grammar.so shows that, indeed, only the exported symbols are in the shared lib. whereas nm /usr/local/lib/liblink-grammar.a shows everything. I have no clue why your system is behaving differently than mine. A different loader version, maybe? What does ldd --version show?

Mine shows

ldd (Debian GLIBC 2.24-11+deb9u4) 2.24

The correct solution seems to be to publish an LH version 5.6.2 ASAP and export this and a few other missing symbols.

My loader is

ldd (Ubuntu GLIBC 2.29-0ubuntu2) 2.29

My OS is Ubuntu Studio 19.04.

I will publish link-grammar version 5.6.2 later today, which should fix this. If you want to try this at home, you can edit ./link-grammar/link-grammar.def and add boolean_dictionary_lookup anywhere.

It works, thanks!

BTW, CMake still only requires 5.4.0 while I suppose it should require 5.6.2, correct?

Yes, at least 5.6.2 ... version 5.7.0 is also 3x or 4x faster on long sentences, but isn't needed for bug fixes.

I'll bump it now.