Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 591916 - dev-lang/clingo: an answer set solver
Summary: dev-lang/clingo: an answer set solver
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Default Assignee for New Packages
URL:
Whiteboard:
Keywords: EBUILD
Depends on:
Blocks:
 
Reported: 2016-08-23 13:57 UTC by skrinakron
Modified: 2016-12-17 13:13 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
clingo-4.5.4.ebuild (clingo-4.5.4.ebuild,3.20 KB, text/plain)
2016-08-23 13:57 UTC, skrinakron
Details
clingo-4.5.4.ebuild (clingo-4.5.4.ebuild,3.29 KB, text/plain)
2016-08-28 12:39 UTC, skrinakron
Details

Note You need to log in before you can comment on or make changes to this bug.
Description skrinakron 2016-08-23 13:57:54 UTC
Created attachment 443908 [details]
clingo-4.5.4.ebuild

Here's an ebuild for the answer set solver clingo. I've tested it by
toggling all the USE flags and PYTHON_TARGETS, and it works for me. I've
only tried it on amd64 and with the stated Python versions, but I expect
e.g. x86 and python3_3 will work as well.

The explicit dependencies on build tools and compilers are due to version
requirements stated in INSTALL, and everything is installed manually
because the build system has no install targets. The Python build
definitions file created by the configure target has to be modified because
it's impossible to pass a Python None value on the SCons command line, and
setting to None is the only way to disable an unwanted feature. Due to this
and building for different Python versions the compile has to be split
between various targets, which all unconditionally run the same
configuration checks. There seems to be no way to prevent this.

Some things I'm still unsure of:
* Whether the multithreading USE flag should be "tbb" or "threads". The
  package implements threads via tbb, so there's no threading without tbb
  and vice versa; tbb wouldn't contrast with e.g. a pthreads
  implementation, and when the user tries to use threading features when
  they're disabled, the error message mentions threading and not tbb.
* How to determine which global Python version to build with -- should I
  just go with what's in eselect if any version will do? The "python" USE
  flag enables both an embedded interpreter used for inline Python code in
  logic programs (*.lp) and a stand-alone module for use in Python scripts
  (*.py). clingo's implementation is compatible with both Python 2.* and
  3.*, and so the module is built for all PYTHON_TARGETS, but currently the
  embedded interpreter is built against the system Python set in eselect.
  However, all the bundled examples with embedded Python code seem to be in
  Python 2, which means that if the user had a 3.* series Python set, some
  examples won't work even though all the right features were enabled in
  USE and PYTHON_TARGETS. There seems to be no way to make python_setup
  always pick 2.* where available and not fail otherwise, at least when
  eselect is set to 3.*. Should the ebuild even try to nudge the version in
  this way or is it okay to use whatever is in eselect?
* Whether src_test is just for test suites in the build system. I've been
  doing some small sanity tests by invoking interpreters and loading
  modules. Should I put something like this in src_test to make it easier
  to see if the build succeeded?
Comment 1 skrinakron 2016-08-28 12:39:48 UTC
Created attachment 444322 [details]
clingo-4.5.4.ebuild

Improved formatting and added a global python_setup so that you at least
don't get an embedded interpreter built with a system Python that's not
included in PYTHON_TARGETS. I suppose this takes care of the Python issues
for now.
Comment 2 Amy Liffey gentoo-dev 2016-12-17 13:13:26 UTC
Hello,
would you be willing to maintain this package through Proxy Maintainers project?

https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers