conda-forge / cryptominisat-feedstock

A conda-smithy repository for cryptominisat.
BSD 3-Clause "New" or "Revised" License
0 stars 7 forks source link

WIP: Split packages #11

Open msarahan opened 6 years ago

msarahan commented 6 years ago

Some effort towards the recipe split, as discussed in #9

This is not great yet. The cmake build happens in its entirety for each build, rather than just once for the top level. I started to try to get Windows working, but don't have time to dig into that yet.

conda-forge-linter commented 6 years ago

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

msarahan commented 6 years ago

CC @mbargull I hope this is a decent start. I can't spend much more time on this for a little while - I'm hopeful that maybe you can take over.

msarahan commented 6 years ago

I'm pretty sure you don't want to omit the boost version stuff, @mbargull. You can get away with it, because conda-forge defines both boost and boost-cpp, but that's cruft IMHO.

https://github.com/conda-forge/conda-forge-pinning-feedstock/blob/master/recipe/conda_build_config.yaml#L293

Only one should be necessary.

msarahan commented 6 years ago

PS: on defaults, we have only boost, so removing it makes this recipe less compatible with defaults.

mbargull commented 6 years ago

Thanks Mike! I can't really spend much time either, plus building on Windows isn't really my forte. But @mingwandroid did some thing for Windows builds of this using MSYS2/MinGW-w64 on AnacondaRecipes. Not sure if that's ready to go.

mbargull commented 6 years ago

Doesn't defaults have boost and libboost (instead of boost-cpp) or something?

msarahan commented 6 years ago

packages, yes. Pins, no: https://github.com/AnacondaRecipes/aggregate/blob/master/conda_build_config.yaml#L12

mbargull commented 6 years ago

I see, okay then. Will change back and rerender.

msoos commented 6 years ago

For the "simple" executable we don't need boost, however, for end users I strongly suggest we create the "full-fledged" executable that uses boost. For library use (C++, rust or python), we definitely do not need boost, though :)

conda-forge-linter commented 6 years ago

Hi! This is the friendly automated conda-forge-linting service.

I wanted to let you know that I linted all conda-recipes in your PR (recipe) and found some lint.

Here's what I've got...

For recipe:

msarahan commented 6 years ago

The top-level build number cascades into all the outputs. I don't think you should need to set it for each output - only ones that differ from the top-level.

mbargull commented 6 years ago

So this picks up the Python from base. I assume because in build.sh there is no other Python available and it doesn't update it with the cmake call in install-py.sh.

msarahan commented 5 years ago

Thanks @mbargull. I'll also try to revisit this soon.

conda-forge-linter commented 5 years ago

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

mbargull commented 5 years ago

I didn't touch Windows stuff at all. Still betting on @mingwandroid for this :smile:

msarahan commented 5 years ago

I'll also do what I can, but yes, we may need Ray ultimately.

msarahan commented 5 years ago

Windows fail appears to be due to use of /Zl flag. That appears to be primarily a debugging flag (https://msdn.microsoft.com/en-us/library/958x11bc.aspx?f=255&MSPPError=-2147217396)

I'll try to patch it out. We could also get rid of /GL if it's preferable to keep /Zl. @msoos any strong opinion here?

msoos commented 5 years ago

I just triggered a new build (if I understand correctly), I fixed an issue with the Windows Release build :) Fingers crossed.

msoos commented 5 years ago

Just to chirp in on the GPL thing... it's really mostly me being lazy. I think I could get rid of all the GPL stuff in less time than it takes for you to think and work through all of this, sorry :S I am now kinda understanding how big of an issue it is, so I might just fix it and basically write or use a Gauss-Jordan elimination algorithm and be done with it. M4RI is really not worth the hassle. Just build without it and I will make sure to replace all of it in the near future :) Also, it doesn't help at all in the vast majority of the cases, including almost certainly for all the problems you can encounter during e.g. package dependency calculation.

mbargull commented 5 years ago

M4RI is really not worth the hassle. Just build without it and I will make sure to replace all of it in the near future :)

Sounds great, thanks! We definitely have to generally solve the problems like this, i.e., being able to specify preference for certain build variants and esp. in regards to GPL-/non-GPL builds. But if we can avoid this altogether here, that's nice :+1:

msoos commented 5 years ago

Yep, just build with -DMIT=ON and I'll make sure that it will not change anything about the compilation, soon :) In the meanwhile, just push in the flag and try not to care about it, it will always make an MIT compile.

mbargull commented 5 years ago

AppVeyor fails with

INFO:conda_build.build:Packaging libcryptominisat-5.6.5-h6a4c333_1
/c/bld/cryptominisat-split_1538310021557/work/build /c/bld/cryptominisat-split_1538310021557/work
C:\projects\cryptominisat-feedstock\recipe/install.sh: line 12: CMAKE_GENERATOR: unbound variable

which is due to https://github.com/conda/conda-build/issues/3174#issuecomment-425545120, I guess? There are too many unknowns for me here (Windows builds, split packages, CMake, ...) so I leave this last bit to Mike or Ray.

msarahan commented 5 years ago

Yep. I'm working on it. Straddling so many OS's is no fun.

msarahan commented 5 years ago

Hitting an error that I don't understand:

CustomBuild:
  Generating build/timestamp
  running build_ext
  building 'pycryptosat' extension
  creating build\temp.win-amd64-3.6
  creating build\temp.win-amd64-3.6\Release
  creating build\temp.win-amd64-3.6\Release\miniconda2
  creating build\temp.win-amd64-3.6\Release\miniconda2\conda-bld
  creating build\temp.win-amd64-3.6\Release\miniconda2\conda-bld\cryptominisat-split_1538406277501
  creating build\temp.win-amd64-3.6\Release\miniconda2\conda-bld\cryptominisat-split_1538406277501\work
  creating build\temp.win-amd64-3.6\Release\miniconda2\conda-bld\cryptominisat-split_1538406277501\work\python
  creating build\temp.win-amd64-3.6\Release\miniconda2\conda-bld\cryptominisat-split_1538406277501\work\python\src
  C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.15.26726\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DLIBRARY
  _VERSION="5.6.5" -IC:\miniconda2\conda-bld\cryptominisat-split_1538406277501\_h_env\include -IC:\miniconda2\conda-bld\cryptominisat-split_1538406277501\_h_env\
  include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.15.26726\include" "-IC:\Program Files (x86)\Microsoft Visual Studi
  o\2017\Professional\VC\Tools\MSVC\14.15.26726\atlmfc\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Auxiliary\VS\include" "-IC
  :\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\ucrt" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Auxiliary\VS\UnitTest\i
  nclude" "-IC:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\um" "-IC:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\shared" "-IC:\Program
   Files (x86)\Windows Kits\10\Include\10.0.17134.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\cppwinrt" "-IC:\Program Files (x86)\Win
  dows Kits\NETFXSDK\4.6.1\Include\um" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\Include\um" /EHsc /TpC:/miniconda2/conda-bld/cryptominisat-split_153
  8406277501/work/python/src/pycryptosat.cpp /Fobuild\temp.win-amd64-3.6\Release\miniconda2/conda-bld/cryptominisat-split_1538406277501/work/python/src/pycryptos
  at.obj None -IC:/miniconda2/conda-bld/cryptominisat-split_1538406277501/work -IC:/miniconda2/conda-bld/cryptominisat-split_1538406277501/work/build/cmsat5-src
cl : Command line warning D9024: unrecognized source file type 'None', object file assumed [C:\miniconda2\conda-bld\cryptominisat-split_1538406277501\work\build\
pycryptosat\python_interface.vcxproj]
cl : Command line warning D9027: source file 'None' ignored [C:\miniconda2\conda-bld\cryptominisat-split_1538406277501\work\build\pycryptosat\python_interface.vc
xproj]
  pycryptosat.cpp
C:/miniconda2/conda-bld/cryptominisat-split_1538406277501/work/python/src/pycryptosat.cpp(59): warning C4068: unknown pragma [C:\miniconda2\conda-bld\cryptominis
at-split_1538406277501\work\build\pycryptosat\python_interface.vcxproj]
C:/miniconda2/conda-bld/cryptominisat-split_1538406277501/work/python/src/pycryptosat.cpp(61): warning C4068: unknown pragma [C:\miniconda2\conda-bld\cryptominis
at-split_1538406277501\work\build\pycryptosat\python_interface.vcxproj]
C:/miniconda2/conda-bld/cryptominisat-split_1538406277501/work/python/src/pycryptosat.cpp(180): error C2039: 'max': is not a member of 'std' [C:\miniconda2\conda
-bld\cryptominisat-split_1538406277501\work\build\pycryptosat\python_interface.vcxproj]
  C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.15.26726\include\string(20): note: see declaration of 'std'
C:/miniconda2/conda-bld/cryptominisat-split_1538406277501/work/python/src/pycryptosat.cpp(180): error C3861: 'max': identifier not found [C:\miniconda2\conda-bld
\cryptominisat-split_1538406277501\work\build\pycryptosat\python_interface.vcxproj]
C:/miniconda2/conda-bld/cryptominisat-split_1538406277501/work/python/src/pycryptosat.cpp(224): warning C4018: '>=': signed/unsigned mismatch [C:\miniconda2\cond
a-bld\cryptominisat-split_1538406277501\work\build\pycryptosat\python_interface.vcxproj]
C:/miniconda2/conda-bld/cryptominisat-split_1538406277501/work/python/src/pycryptosat.cpp(681): warning C4018: '>=': signed/unsigned mismatch [C:\miniconda2\cond
a-bld\cryptominisat-split_1538406277501\work\build\pycryptosat\python_interface.vcxproj]
C:/miniconda2/conda-bld/cryptominisat-split_1538406277501/work/python/src/pycryptosat.cpp(1106): error C2143: syntax error: missing ')' before 'constant' [C:\min
iconda2\conda-bld\cryptominisat-split_1538406277501\work\build\pycryptosat\python_interface.vcxproj]
C:/miniconda2/conda-bld/cryptominisat-split_1538406277501/work/python/src/pycryptosat.cpp(1106): error C2664: 'PyObject *PyUnicode_FromString(const char *)': can
not convert argument 1 from 'double' to 'const char *' [C:\miniconda2\conda-bld\cryptominisat-split_1538406277501\work\build\pycryptosat\python_interface.vcxproj
]
C:/miniconda2/conda-bld/cryptominisat-split_1538406277501/work/python/src/pycryptosat.cpp(1106): error C2660: 'PyModule_AddObject': function does not take 2 argu
ments [C:\miniconda2\conda-bld\cryptominisat-split_1538406277501\work\build\pycryptosat\python_interface.vcxproj]
CUSTOMBUILD : error : command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\VC\\Tools\\MSVC\\14.15.26726\\bin\\HostX86\\x64\\cl.exe' fai
led with exit status 2 [C:\miniconda2\conda-bld\cryptominisat-split_1538406277501\work\build\pycryptosat\python_interface.vcxproj]
  c:\miniconda2\conda-bld\cryptominisat-split_1538406277501\_h_env\include\modsupport.h(75): note: see declaration of 'PyModule_AddObject'
C:/miniconda2/conda-bld/cryptominisat-split_1538406277501/work/python/src/pycryptosat.cpp(1106): error C2143: syntax error: missing ';' before 'constant' [C:\min
iconda2\conda-bld\cryptominisat-split_1538406277501\work\build\pycryptosat\python_interface.vcxproj]
C:/miniconda2/conda-bld/cryptominisat-split_1538406277501/work/python/src/pycryptosat.cpp(1106): error C2059: syntax error: ')' [C:\miniconda2\conda-bld\cryptomi
nisat-split_1538406277501\work\build\pycryptosat\python_interface.vcxproj]
Done Building Project "C:\miniconda2\conda-bld\cryptominisat-split_1538406277501\work\build\pycryptosat\python_interface.vcxproj" (default targets) -- FAILED.

Done Building Project "C:\miniconda2\conda-bld\cryptominisat-split_1538406277501\work\build\ALL_BUILD.vcxproj" (default targets) -- FAILED.

Done Building Project "C:\miniconda2\conda-bld\cryptominisat-split_1538406277501\work\build\install.vcxproj" (default targets) -- FAILED.

Build FAILED.

"C:\miniconda2\conda-bld\cryptominisat-split_1538406277501\work\build\install.vcxproj" (default target) (1) ->
"C:\miniconda2\conda-bld\cryptominisat-split_1538406277501\work\build\ALL_BUILD.vcxproj" (default target) (3) ->
"C:\miniconda2\conda-bld\cryptominisat-split_1538406277501\work\build\cmsat5-src\cryptominisat5_simple.vcxproj" (default target) (5) ->
"C:\miniconda2\conda-bld\cryptominisat-split_1538406277501\work\build\cmsat5-src\libcryptominisat5.vcxproj" (default target) (6) ->
(ClCompile target) ->
  c:\miniconda2\conda-bld\cryptominisat-split_1538406277501\work\src\solverconf.h(54): warning C4715: 'CMSat::clean_to_int': not all control paths return a value
 [C:\miniconda2\conda-bld\cryptominisat-split_1538406277501\work\build\cmsat5-src\libcryptominisat5.vcxproj]
  c:\miniconda2\conda-bld\cryptominisat-split_1538406277501\work\src\solverconf.h(92): warning C4715: 'CMSat::getNameOfRestartType': not all control paths return
 a value [C:\miniconda2\conda-bld\cryptominisat-split_1538406277501\work\build\cmsat5-src\libcryptominisat5.vcxproj]
  c:\miniconda2\conda-bld\cryptominisat-split_1538406277501\work\src\solverconf.h(54): warning C4715: 'CMSat::clean_to_int': not all control paths return a value
 [C:\miniconda2\conda-bld\cryptominisat-split_1538406277501\work\build\cmsat5-src\libcryptominisat5.vcxproj]
  c:\miniconda2\conda-bld\cryptominisat-split_1538406277501\work\src\solverconf.h(54): warning C4715: 'CMSat::clean_to_int': not all control paths return a value
 [C:\miniconda2\conda-bld\cryptominisat-split_1538406277501\work\build\cmsat5-src\libcryptominisat5.vcxproj]

"C:\miniconda2\conda-bld\cryptominisat-split_1538406277501\work\build\install.vcxproj" (default target) (1) ->
"C:\miniconda2\conda-bld\cryptominisat-split_1538406277501\work\build\ALL_BUILD.vcxproj" (default target) (3) ->
"C:\miniconda2\conda-bld\cryptominisat-split_1538406277501\work\build\pycryptosat\python_interface.vcxproj" (default target) (7) ->
(CustomBuild target) ->
  cl : Command line warning D9024: unrecognized source file type 'None', object file assumed [C:\miniconda2\conda-bld\cryptominisat-split_1538406277501\work\buil
d\pycryptosat\python_interface.vcxproj]
  cl : Command line warning D9027: source file 'None' ignored [C:\miniconda2\conda-bld\cryptominisat-split_1538406277501\work\build\pycryptosat\python_interface.
vcxproj]
  C:/miniconda2/conda-bld/cryptominisat-split_1538406277501/work/python/src/pycryptosat.cpp(59): warning C4068: unknown pragma [C:\miniconda2\conda-bld\cryptomin
isat-split_1538406277501\work\build\pycryptosat\python_interface.vcxproj]
  C:/miniconda2/conda-bld/cryptominisat-split_1538406277501/work/python/src/pycryptosat.cpp(61): warning C4068: unknown pragma [C:\miniconda2\conda-bld\cryptomin
isat-split_1538406277501\work\build\pycryptosat\python_interface.vcxproj]
  C:/miniconda2/conda-bld/cryptominisat-split_1538406277501/work/python/src/pycryptosat.cpp(224): warning C4018: '>=': signed/unsigned mismatch [C:\miniconda2\co
nda-bld\cryptominisat-split_1538406277501\work\build\pycryptosat\python_interface.vcxproj]
  C:/miniconda2/conda-bld/cryptominisat-split_1538406277501/work/python/src/pycryptosat.cpp(681): warning C4018: '>=': signed/unsigned mismatch [C:\miniconda2\co
nda-bld\cryptominisat-split_1538406277501\work\build\pycryptosat\python_interface.vcxproj]

"C:\miniconda2\conda-bld\cryptominisat-split_1538406277501\work\build\install.vcxproj" (default target) (1) ->
"C:\miniconda2\conda-bld\cryptominisat-split_1538406277501\work\build\ALL_BUILD.vcxproj" (default target) (3) ->
"C:\miniconda2\conda-bld\cryptominisat-split_1538406277501\work\build\pycryptosat\python_interface.vcxproj" (default target) (7) ->
(CustomBuild target) ->
  C:/miniconda2/conda-bld/cryptominisat-split_1538406277501/work/python/src/pycryptosat.cpp(180): error C2039: 'max': is not a member of 'std' [C:\miniconda2\con
da-bld\cryptominisat-split_1538406277501\work\build\pycryptosat\python_interface.vcxproj]
  C:/miniconda2/conda-bld/cryptominisat-split_1538406277501/work/python/src/pycryptosat.cpp(180): error C3861: 'max': identifier not found [C:\miniconda2\conda-b
ld\cryptominisat-split_1538406277501\work\build\pycryptosat\python_interface.vcxproj]
  C:/miniconda2/conda-bld/cryptominisat-split_1538406277501/work/python/src/pycryptosat.cpp(1106): error C2143: syntax error: missing ')' before 'constant' [C:\m
iniconda2\conda-bld\cryptominisat-split_1538406277501\work\build\pycryptosat\python_interface.vcxproj]
  C:/miniconda2/conda-bld/cryptominisat-split_1538406277501/work/python/src/pycryptosat.cpp(1106): error C2664: 'PyObject *PyUnicode_FromString(const char *)': c
annot convert argument 1 from 'double' to 'const char *' [C:\miniconda2\conda-bld\cryptominisat-split_1538406277501\work\build\pycryptosat\python_interface.vcxpr
oj]
  C:/miniconda2/conda-bld/cryptominisat-split_1538406277501/work/python/src/pycryptosat.cpp(1106): error C2660: 'PyModule_AddObject': function does not take 2 ar
guments [C:\miniconda2\conda-bld\cryptominisat-split_1538406277501\work\build\pycryptosat\python_interface.vcxproj]
  CUSTOMBUILD : error : command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\VC\\Tools\\MSVC\\14.15.26726\\bin\\HostX86\\x64\\cl.exe' f
ailed with exit status 2 [C:\miniconda2\conda-bld\cryptominisat-split_1538406277501\work\build\pycryptosat\python_interface.vcxproj]
  C:/miniconda2/conda-bld/cryptominisat-split_1538406277501/work/python/src/pycryptosat.cpp(1106): error C2143: syntax error: missing ';' before 'constant' [C:\m
iniconda2\conda-bld\cryptominisat-split_1538406277501\work\build\pycryptosat\python_interface.vcxproj]
  C:/miniconda2/conda-bld/cryptominisat-split_1538406277501/work/python/src/pycryptosat.cpp(1106): error C2059: syntax error: ')' [C:\miniconda2\conda-bld\crypto
minisat-split_1538406277501\work\build\pycryptosat\python_interface.vcxproj]

    10 Warning(s)
    8 Error(s)

@msoos any ideas here? I don't really want to get into mucking with your cmake stuff, but I can if it's necessary.

mbargull commented 5 years ago

'max': is not a member of 'std' should be fixed by including <algorithm>, I think. (IDK if max/min macros are still a thing on Windows. If yes, we have to kill those too).

That other stuff with

  C:/miniconda2/conda-bld/cryptominisat-split_1538406277501/work/python/src/pycryptosat.cpp(1106): error C2143: syntax error: missing ')' before 'constant' [C:\m
iniconda2\conda-bld\cryptominisat-split_1538406277501\work\build\pycryptosat\python_interface.vcxproj]
  C:/miniconda2/conda-bld/cryptominisat-split_1538406277501/work/python/src/pycryptosat.cpp(1106): error C2664: 'PyObject *PyUnicode_FromString(const char *)': c
annot convert argument 1 from 'double' to 'const char *' [C:\miniconda2\conda-bld\cryptominisat-split_1538406277501\work\build\pycryptosat\python_interface.vcxpr
oj]
  C:/miniconda2/conda-bld/cryptominisat-split_1538406277501/work/python/src/pycryptosat.cpp(1106): error C2660: 'PyModule_AddObject': function does not take 2 ar
guments [C:\miniconda2\conda-bld\cryptominisat-split_1538406277501\work\build\pycryptosat\python_interface.vcxproj]
  CUSTOMBUILD : error : command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\VC\\Tools\\MSVC\\14.15.26726\\bin\\HostX86\\x64\\cl.exe' f
ailed with exit status 2 [C:\miniconda2\conda-bld\cryptominisat-split_1538406277501\work\build\pycryptosat\python_interface.vcxproj]
  C:/miniconda2/conda-bld/cryptominisat-split_1538406277501/work/python/src/pycryptosat.cpp(1106): error C2143: syntax error: missing ';' before 'constant' [C:\m
iniconda2\conda-bld\cryptominisat-split_1538406277501\work\build\pycryptosat\python_interface.vcxproj]
  C:/miniconda2/conda-bld/cryptominisat-split_1538406277501/work/python/src/pycryptosat.cpp(1106): error C2059: syntax error: ')' [C:\miniconda2\conda-bld\crypto
minisat-split_1538406277501\work\build\pycryptosat\python_interface.vcxproj]

probably means that the LIBRARY_VERSION macro isn't properly handled. Let's see if https://github.com/conda-forge/cryptominisat-feedstock/pull/12/commits/bd76ff632e3554e3f014c822759d954252de4ca1 gives us some information here.

msarahan commented 5 years ago

I was more confused to encounter errors at all. I was assuming that a Windows version already compiled. If there's C/C++ debugging to be done here, I can help with that. I just thought it was my build stuff that was messing things up.

msoos commented 5 years ago

Hey,

I just fixed the std::max issue here: 8d4e3426ec8353c73ab62a9ceb8266bc80b69ed8

As for the __LIBRARY_VERSION__ issue, I have in setup.py.in:

__LIBRARY_VERSION__ = "${CMS_FULL_VERSION}"
modules = dict(
  [...]
  define_macros = [('LIBRARY_VERSION', '"' + __LIBRARY_VERSION__ + '"')],
  [...]
)
[...]
setup(
  [..]
  ext_modules =  [Extension(**modules)],
  [...]
)

which gets compiled to setup.py by cmake, replacing ${CMS_FULL_VERSION} with the value that's in the main CMakeLists.txt. This allows me to have only one place where I must set the version (in CMakeLists.txt) and everything else follows. What should I do?

msoos commented 5 years ago

Sorry for the incorrect tests on Windows for the Python build. I have been using Appveyor and it is crappy: the python installed there was compiled with the old MSVC 9.0 which means it doesn't understand std::atomic. The MSVC that's installed on the thing does understand it, however, so I can compile the library+executables.

The missing std::atomic in MSVC 9.0 means that Appveyor cannot compile the python interface, thanks to the compiler mismatch. I don't quite understand why one would have a compiler on a system that's different than what the installed python was compiled with :S Basically, I think it's a bug in Appveyor.

Maybe I should be using Circle CI... Sorry!

msoos commented 5 years ago

Sorry, CircleCI is probably not the solution. I have no idea, maybe AppVeyor fixed their stuff... I'll check. I could try not using atomic in the python interface, actually... let me try doing that too :)

isuruf commented 5 years ago

Sorry for the incorrect tests on Windows for the Python build. I have been using Appveyor and it is crappy: the python installed there was compiled with the old MSVC 9.0 which means it doesn't understand std::atomic. The MSVC that's installed on the thing does understand it, however, so I can compile the library+executables.

You wouldn't find any python 2.7 compiled with a newer MSVC. python 2.7 was compiled with Visual Studio 2008 (MSVC 9.0) and all python extensions are compiled with VS2008 as well due to ABI issues. @mingwandroid knows better than me about ABI issues.

However python 3.5 and above are compiled with Visual Studio 2015, so you should be able to use that on appveyor.

mbargull commented 5 years ago

Regarding the LIBRARY_VERSION macro my first hunch was right, in that the Windows' quote handling or something killed off the quotes. Now we get:

  CUSTOMBUILD : warning : I don't know what to do with 'runtime_library_dirs': ['C:/bld/cryptominisat-split_1538498523128/_h_env/lib', '../lib'] [C:\bld\cryptominisat-split_1538498523128\work\build\pycryptosat\python_interface.vcxproj]
"C:\bld\cryptominisat-split_1538498523128\work\build\install.vcxproj" (default target) (1) ->
"C:\bld\cryptominisat-split_1538498523128\work\build\ALL_BUILD.vcxproj" (default target) (3) ->
"C:\bld\cryptominisat-split_1538498523128\work\build\pycryptosat\python_interface.vcxproj" (default target) (7) ->
(CustomBuild target) -> 
  CUSTOMBUILD : error : don't know how to set runtime library search path for MSVC [C:\bld\cryptominisat-split_1538498523128\work\build\pycryptosat\python_interface.vcxproj]

Looks like distutils.core.Extention(..., runtime_library_dirs=...) doesn't work well with MSVC. I have no idea here.

mbargull commented 5 years ago

Running cryptominisat_simple fails with exit code -1073741515. Acc. to https://msdn.microsoft.com/en-us/library/cc704588.aspx:

Return value/code Description
0xC0000135
STATUS_DLL_NOT_FOUND
{Unable To Locate Component} This application has failed to start because %hs was not found. Reinstalling the application might fix this problem.

Options for us:

  1. Fix it.
  2. Remove cryptominisat5_simple from the libcryptominisat package on Windows and skip building package cryptominisat on Windows.
mbargull commented 5 years ago

NB: I won't look further into

  1. Fix it.

myself but am also fine with

  1. Remove cryptominisat5_simple from the libcryptominisat package on Windows and skip building package cryptominisat on Windows.

which can be pulled into this branch via https://github.com/mbargull/cryptominisat-feedstock/commit/2abc372c464040032c2137db339e95fe8fc26d4e (which passed AppVeyor tests: https://ci.appveyor.com/project/mbargull/cryptominisat-feedstock/build/1.0.25).

msoos commented 5 years ago

Hi! The patches to CMakeLists.txt and setup.py.in I'm happy to pull into mainline CMS. How should we do this? Do you want to do that or should I manually do it? Sorry, I don't know the best practices here.

Note that getting that --root=\$ENV{DESTDIR}/ --prefix=${CMAKE_INSTALL_PREFIX} right and the runtime_library_dirs was highly non-trivial and your changes may break either Linux, MacOS or Windows builds. I will take a peek, but

runtime_library_dirs=([] if platform.system() == 'Windows' else ['${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}']),

may be a better option. Please let me know how can I try to integrate them and then we'll see. Thanks!

conda-forge-linter commented 5 years ago

Hi! This is the friendly automated conda-forge-linting service.

I was trying to look for recipes to lint for you, but it appears we have a merge conflict. Please try to merge or rebase with the base branch to resolve this conflict.

Please ping the 'conda-forge/core' team (using the @ notation in a comment) if you believe this is a bug.

conda-forge-linter commented 5 years ago

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

msarahan commented 5 years ago

@conda-forge-admin, please rerender

msoos commented 5 years ago

If I understand this correctly, it cannot find libboost=1.68.0. I am so confused here, I don't even know where to push things to fix this. My understanding is that I cannot push here because it's a pull request by you?

msarahan commented 5 years ago

Don't worry about it. I think it's because I've used a defaults-only name of a package (libboost instead of boost-cpp) to satisfy the overlinking check in conda-build. In defaults, conda-build sees that libboost has the desired shared libs, but boost-cpp does not, because it is just a metapackage. There is no libboost 1.68 because conda-forge doesn't build that package name, and defaults hasn't updated boost to 1.68 yet. There's a few ways around this:

  1. change recipe to use boost-cpp instead of libboost and ignore the overlinking check in conda-build somehow
  2. update defaults to provide a libboost 1.68 package
  3. update conda-forge's boost recipe to produce libboost using the defaults recipe.

2 and 3 are probably both good approaches, and ones that we'll look into. In the meantime, great news! We did succeed in using this recipe in defaults, and we've made packages available on defaults. We'll be recommending that people try cryptominisat in our blog post for the conda 4.6 release, and showing that it can save people quite a bit of time. Thanks @msoos for your work on CMS!

msoos commented 5 years ago

Thank you for the detailed explanation. And it sounds amazing that you'll recommend CMS! Thank you so much :) Looking forward to feedback from users, hopefully I can improve it based on user feedback -- I usually can. Thanks again,

Mate

msoos commented 5 years ago

@conda-forge-admin please rerender

conda-forge-linter commented 5 years ago

Hi! This is the friendly automated conda-forge-linting service.

I was trying to look for recipes to lint for you, but it appears we have a merge conflict. Please try to merge or rebase with the base branch to resolve this conflict.

Please ping the 'conda-forge/core' team (using the @ notation in a comment) if you believe this is a bug.