Closed plaes closed 9 years ago
None of our supported systems contains bundled minizip. Our resources are limited but feel free to send pull request for workaround.
'Bundled Minizip' means the files that come with the tarball.
If system minizip is found, it shouldn't use the minizip files in tarball, but currently it does.
Seems like fedora has also packaged minizip and they found workaround https://copr.fedoraproject.org/coprs/mihkel/esteid-epel
Maybe you can alter the include order in CMakeFile.txt right now compiler has c++ -I/var/tmp/portage/dev-libs/libdigidocpp-3.11.0_p1296/work/libdigidocpp-3.11.0.1296/src -I/usr/include/minizip
and move ${MINIZIP_INCLUDE_DIR} first in list https://github.com/open-eid/libdigidocpp/blob/master/src/CMakeLists.txt#L167
Nice catch, indeed the local source directory is first in the include path and minizip includes are following:
#include <minizip/zip.h>
#include <minizip/unzip.h>
This causes bundled minizip headers to be always included.
Now, bundled minizip/zip.h
itself includes "ioapi.h" which seems to get included via -I/usr/include/minizip
. And incompatibility between system and bundled headers causes build error.
There's also related (fun) issue with minizip packaging - as minizip.pc sets include path to -I/usr/include/minizip
, the includes should instead be:
#include <zip.h>
#include <unzip.h>
But there's also /usr/include/zip.h
that belongs to libzip.
Currently the bundled minizip get included even when the system minizip is found:
-I/usr/include/minizip
is passed in, but bundled minizip is somehow used anyway.When bundled minizip is deleted (via
rm -r src/minizip
) build succeeds.