Cpp include support
This pull request aims at making smoother the process of integrating msolve as a library into another code.
I am currently integrating it in a C++ codebase, so I added some #ifdef __cplusplus extern "C" directives.
Hi @epitavy,
Many thanks! Unfortunately, it seems that make check fails on MacOS at the moment. I am not sure what is wrong though.
Hi @jerebertho I am investigating the issue. I guess it comes from the AC_USE_SYSTEM_EXTENSIONS directive in configure.ac that doesn't work as expected under macos.
Actually its probably because of the CI runner. Brew uses the lastest version of flint which is flint 3.2.1. I think the tests failures comes from this.
Do you get the same issue with make check on your own machine? if yes, could you please share test-suite.log? thank you.
I am trying to see any hint from the CI regarding the fact that it may be related to the recent FLINT version, but I cannot find such a hint; we have recently made sure msolve should compile with FLINT v3.2.1, but there might be something we have missed.
@vneiger The only thing that I see is that indeed, it downloads Flint-3.2.1 while for all the previous PRs such as #199, it used Flint-3.1.3-p1.
@vneiger The only thing that I see is that indeed, it downloads Flint-3.2.1 while for all the previous PRs such as #199, it used Flint-3.1.3-p1.
Ok, so I have just re-run CI for #199, it used Flint-3.2.1 this time, and there the tests pass.
Indeed, I rebuilt msolve with flint 3.2.1 and cannot reproduce the failed test on Debian/Linux. I will investigate more
I reproduce the problem on macos. The problem on macos comes that 2 "free" are added in the file src/msolve/iofiles.c.
line_endings_support(73976,0x7ff8469ab680) malloc: *** error for object 0x7f7dc2700000: pointer being realloc'd was not allocated
line_endings_support(73976,0x7ff8469ab680) malloc: *** set a breakpoint in malloc_error_break to debug
When these 2 "free" are removed, all tests passed.
I just removed the free so that the tests pass on macos
it would be good to have a real C++ test. (probably not on this PR...)
@dimpase To have a real C++ test would require a C++ compiler to build the tests !
Can someone merge this PR so that it is available in the next release ?
@dimpase To have a real C++ test would require a C++ compiler to build the tests !
To build C++ tests, yes, not all the tests. But this is not a problem, it's pretty easy with autoconf to test/configure for a C++ compiler.