smihica / pyminizip

To create a password encrypted zip file in python.
Other
108 stars 38 forks source link

0.2.2 error when installing #20

Open mfrlin opened 6 years ago

mfrlin commented 6 years ago

This is the error when you do pip install pyminizip

In file included from src/zip.c:66:0:
    src/crypt.h:34:23: error: conflicting types for ‘z_crc_t’
     typedef unsigned long z_crc_t;
                           ^
    In file included from /usr/include/zlib.h:34:0,
                     from src/zip.c:36:
    /usr/include/x86_64-linux-gnu/zconf.h:406:17: note: previous declaration of ‘z_crc_t’ was here
        typedef Z_U4 z_crc_t;
                     ^
    src/zip.c:201:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
     local linkedlist_datablock_internal* allocate_new_datablock OF(());
     ^
    src/zip.c:202:38: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
     local linkedlist_datablock_internal* allocate_new_datablock()
                                          ^
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

This is on Debian Jessie. I've also tried to install zlib1g package and it was the same.

multippt commented 6 years ago

Also affects Ubuntu 16 LTS on clean installs. We had to downgrade to 0.2.1.

Vadiml1024 commented 6 years ago

The same happens in Ubuntu 18.04... Downgrading to 0.2.1 does not help there

multippt commented 6 years ago

Installing via git appears to work

pip install git+https://github.com/smihica/pyminizip.git

After checking the package downloaded from pypi it appears there's a number of files missing from zlib123, in particular the header files.

veon82 commented 6 years ago

Sorry, I don't know why but I didn't see this issue yesterday, anyway I submitted the Fix on #21