|
From: Broes De C. <bro...@gm...> - 2017-06-29 11:34:55
|
More recent releases result in a different error message (so gringo indeed seems to be compiled with python support): *clingo version 5.2.0* *Reading from ...iterate.py* *iterate.py:1:1-385:6: error: python support not available* Maybe some environment variables need to be present? I have verified Python is in my path, and I tried both with Python2 and Python3. Best, Broes On 29 June 2017 at 11:43, Benjamin Kaufmann <kau...@cs...> wrote: > Hi Broes, > > our latest releases are on github: > > https://github.com/potassco/clingo/releases > > https://potassco.org/ > > Best regards, > Ben > > > Am 29.06.2017 um 11:17 schrieb Broes De Cat: > >> Hi Roland, >> >> Can you point me to where I can find clingo/gringo binaries that have >> been precompiled with Python support? The ones on sourceforge are built >> without. >> If they are not available, I will try Cygwin. >> >> Thx! >> Broes >> >> On 28 June 2017 at 14:57, Roland Kaminski <kam...@cs... >> <mailto:kam...@cs...>> wrote: >> >> Hi Broes, >> >> Clingo can be compiled under Windows. I tested with Cygwin and >> Visual Studio. >> The latter produces the most efficient binaries; and the community >> edition can >> be downloaded for free. I do not know if the binaries can be used >> commercially, though. There are also precompiled binaries with >> Python support >> available online. >> >> That being said, it is probably also possible to compile clingo with >> msys2. I >> won't have time to look into this the next couple of weeks though. I >> will have >> a look later. >> >> Compiling with Cygwin is another option (if you want to build from git >> sources, only Re2c has to be build manually, the other dependencies >> are >> available via the package manager). >> >> -R >> >> On Wednesday, June 28, 2017 02:11:40 PM Broes De Cat wrote: >> > Hi guys, >> > >> > I have been trying to get clingo compiled with Python support on >> Windows >> > (one of our customers only uses Windows). >> > It seemed to be going rather well, right until the end 😊 >> > >> > A summary of what I did (which might turn into a guide for this >> once the >> > remaining hurdle gets resolved): >> > >> > - Download and install msys2 (http://www.msys2.org/) >> > - Run the msys shell and follow the rest of the webpage in it >> (run >> > *pacman -Syu*, exit shell, run *pacman -Su*). >> > - Afterwards, in the same shell, run *pacman -S git make re2c >> bison >> > mingw-w64-x86_64-cmake mingw-w64-x86_64-toolchain* >> > - Run the msys2 mingw 64-bit shell and execute the following >> commands in >> > it >> > - *cd /home* >> > - >> > *git clone https://github.com/potassco/clingo.git >> <https://github.com/potassco/clingo.git> >> > <https://github.com/potassco/clingo.git >> <https://github.com/potassco/clingo.git>> * >> > - >> > *cd clingo * >> > - >> > *git submodule init * >> > - >> > *git submodule update * >> > - >> > *cd clasp * >> > - >> > *git submodule init * >> > - >> > *git submodule update * >> > - >> > *cd ../ * >> > - >> > *mkdir build * >> > - >> > *cd build * >> > - >> > *cmake .. -G "MSYS Makefiles" -DCLINGO_REQUIRE_PYTHON=ON * >> > - >> > *make -j4 * >> > >> > >> > Compilation succeeds and the generated binaries: >> > - work* inside the shell environment >> > - work* outside the shell environment if you copy the following dlls >> > alongside them: *libgcc_s_seh-1.dll, **libstdc++-6.dll, * >> > *libwinpthread-1.dll *(which can be found under your msys64 >> installation >> > under *mingw64\bin*) >> > >> > * Except for the python support :( >> > >> > If you try clingo with a python script inside the shell >> environment, you >> > get the following errors, which I do not know a solution for. >> > >> > * Could not find platform independent libraries <prefix>* >> > * Could not find platform dependent libraries <exec_prefix>* >> > * Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]* >> > * ImportError: No module named site* >> > >> > It might be an issue with the PATH env variable, but even then, it >> was >> > linking with the python that is preinstalled under msys, so even if >> it >> > worked, it would probably only work within the shell environment. >> > >> > I then tried getting it to compile with a locally installed python. >> The >> > closest I got was with python 2.7 by: >> > >> > overriding *PYTHON_LIBRARIES* to >> *C:/Programmas/Python27/libs/libpython27.a* >> > >> > overriding *PYTHON_INCLUDE_DIRS* to *C:/Programmas/Python27/includ >> e/* >> > >> > adding *python2.7* to *target_link_libraries* of *libpyclingo* >> > >> > However, there is one linking error remaining (*undefined >> reference to >> > `__imp_Py_InitModule4'*) which is where I gave up for now 😊 >> > >> > >> > Any ideas? >> > >> > >> > Thx! >> > >> > Broes >> >> >> >> >> ------------------------------------------------------------ >> ------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> >> >> >> _______________________________________________ >> Potassco-users mailing list >> Pot...@li... >> https://lists.sourceforge.net/lists/listinfo/potassco-users >> >> > |