On my system (Windows/Diskuv), cairo2 fails to compile. I have raised the issue which seems to be simple (just use variadic preprocessor arguments in the MSVC way), but if I modify the culprit file, opam install cairo2 gets the package back from the cache and compile the original version.
I have tried to copy the opam directory (cairo2.0.6.2) and launch opam install . thinking opam will install the package from the current directory, but the error message indicate it uses the directory from the opam\playground\.opam-switch\build directory, then I can’t build a customized version.
I have tried it. From a D:\DiskuvProjets\cairo2 directory, I type opam pin add . and get the error:
# C:\Users\frede\AppData\Local\opam\playground\.opam-switch\build\cairo2.0.6.2\_build\default\src\cairo_macros.h(178): error C2010: '.' : inattendu dans la liste de paramètres de macro
which indicates the cairo_macros.h is still compiled from the private opam directory.
It should be using your sources there, if you want to make sure, try opam pin add . --with-version 0.7, you should see the error appear with this new version instead. Also, make sure you have committed your changes before pinning.
My bad… git commit -m 'a commit message' should be written git commit -m "a commit message" with a CMD prompt. Now, all is correct (excepted other issues which don’t deal with the current thread about opam).
I’ve had similar problems before, and one of the maintainers (I think kit-y-kate ?) pointed out that I should always check that there’s no pre-existing pin – and if there is, to remove it. Once I did that, my problems seem to have disappeared. Just thought I’d note it. I also always do --working-dir just to be sure I didn’t forget to do a commit.