Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wojtnar opened this issue Jan 23, 2016 · 11 comments
Open

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

wojtnar opened this issue Jan 23, 2016 · 11 comments

Comments

@wojtnar
Copy link

wojtnar commented Jan 23, 2016

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
Copy link
Member

peschue commented Jan 25, 2016

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
Copy link
Author

wojtnar commented Jan 25, 2016

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
Copy link
Member

peschue commented Jan 26, 2016

Which python packages do you have installed?

You can find out with

$ dpkg -l |grep python

@peschue
Copy link
Member

peschue commented Jan 26, 2016

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
Copy link
Author

wojtnar commented Jan 26, 2016

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
Copy link
Member

peschue commented Jan 26, 2016

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
Copy link
Author

wojtnar commented Jan 26, 2016

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

@peschue
Copy link
Member

peschue commented Jan 26, 2016

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

@wojtnar
Copy link
Author

wojtnar commented Jan 27, 2016

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

@peschue
Copy link
Member

peschue commented Jan 27, 2016

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
Copy link

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/.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants