hexhex / core

DLVHEX solver: core system and plugin API
http://www.kr.tuwien.ac.at/research/systems/dlvhex/
GNU Lesser General Public License v2.1
24 stars 8 forks source link

build failure: configure unable to determine boost major version #23

Open wojtnar opened 8 years ago

wojtnar commented 8 years ago

Hello,

I just wanted to try "Prolog" with C(X) :- subClassOf(D,C), D(X), but:

$ ./configure (...) configure: error: invalid value: boost_major_version=

Ubuntu 15.10, boost 1.58.

peschue commented 8 years ago

Perhaps we need to update to the latest version of

https://github.com/tsuna/boost.m4/blob/master/build-aux/boost.m4

If you put this latest version into m4/boost.m4 (for experimental purposes you can just replace the symlink) and make ./bootstrap.sh and afterwards ./configure does it work?

wojtnar commented 8 years ago

Yes, it worked. The build went well until linking, looks like it can't find python. libtool: link: g++ -W -Wall -O3 -std=gnu++11 -o .libs/dlvhex2 dlvhex.o -pthread -Wl,--export-dynamic -L/home/wojtek/src/core/buildclaspgringo/clasp//build/release/libclasp/lib/ -L/home/wojtek/src/core/buildclaspgringo/clasp//build/release/libprogram_opts/lib/ -L/home/wojtek/src/core/buildclaspgringo/gringo//build/release ./.libs/libdlvhex2-base.so ./.libs/libdlvhex2-mlpsolver.so ./.libs/libdlvhex2-aspsolver.so ./.libs/libdlvhex2-internalplugins.so -lclasp -lprogram_opts -lgringo -lboost_filesystem -lboost_thread -lboost_system /usr/lib/x86_64-linux-gnu/libltdl.so -L/usr/lib/x86_64-linux-gnu /usr/lib/x86_64-linux-gnu/libcurl.so -ldl -pthread ./.libs/libdlvhex2-base.so: undefined reference to PyErr_SetNone' ./.libs/libdlvhex2-base.so: undefined reference toPyDict_SetItem' ........

peschue commented 8 years ago

Which python packages do you have installed?

You can find out with

$ dpkg -l |grep python

peschue commented 8 years ago

Interestingly it seems your ./configure found python or it would not try to generate code for it. Perhaps your python version is higher than what we expect in the current dlvhex source code. Do you plan using the Python extension of dlvhex?

wojtnar commented 8 years ago

Currently I have, so to say, all python packages. I installed them hoping it would resolve the missing links. That includes libpython{2.7|3.4|3.5}-dev.

~$ dpkg -l | grep python | wc -l 161

I would like external atoms to work, I'm not sure if this implies that I strictly need Python.

peschue commented 8 years ago

The easiest way to use external atoms is to use Python. If you do not have Python you need to write plugins in C++.

Do you know which python version your boost-python uses in your distribution?

I get this via $ dpkg -l |grep boost-python and then using the package that is listed, for example $ dpkg -L libboost-python1.54.0 |grep libboost_python it shows the python versions supported by boost-python, in my case

/usr/lib/x86_64-linux-gnu/libboost_python-py34.so.1.54.0
/usr/lib/x86_64-linux-gnu/libboost_python-py27.so.1.54.0

(3.4 and 2.7)

Please remove all versions except one of these supported versions from line 59 in m4/python.m4 in the source code, rerun ./bootstrap.sh and then ./configure and make. If 2.7 is supported, go for it, I mostly work with 2.7. If only 3.4 is supported, add 3.4 to line 59.

If this also does not work, please try to additionally deinstall all libpythonXX-dev that are not supported by boost-python and rerun ./configure and look if it works then.

Unfortunately the boost-python detection in Ubuntu is not working well together with python detection.

wojtnar commented 8 years ago

None of these worked. I executed the offending command by hand with -lpython2.7 appended. This worked, I do have dlvhex2 executable.

peschue commented 8 years ago

I'm glad to hear that you got an executable. Sorry for the trouble and thank you for your patience.

wojtnar commented 8 years ago

No, no. Thank you! If I have questions about the language itself, where would it be best to ask them?

peschue commented 8 years ago

There is a manual covering Python plugins and the language: http://www.kr.tuwien.ac.at/research/reports/rr1505.pdf

You can subscribe to the following list and ask questions there, or also here in github. https://lists.sourceforge.net/mailman/admin/dlvhex-devel

ardabbour commented 5 years ago

Hello, I ran into this issue, (and presumably the issue referenced in #28). Solution is to use the latest boost.m4 package from here: https://github.com/tsuna/boost.m4/.