Opened 3 years ago

Closed 3 years ago

#64921 closed defect (fixed)

KeePassXC 2.7.0 compilation error on MacOS 12.3.1

Reported by: Zippyzip Owned by: tenzap
Priority: Normal Milestone:
Component: ports Version: 2.7.2
Keywords: Cc:
Port: KeePassXC

Description

Log snippet:

:info:build [ 27%] Built target keepassxc-proxy
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_security_KeePassXC/KeePassXC/work/keepassxc-2.7.0-src/src/keeshare/ShareExport.cpp:119:31: error: use of undeclared identifier 'Z_DEFLATED'
:info:build                               Z_DEFLATED,
:info:build                               ^
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_security_KeePassXC/KeePassXC/work/keepassxc-2.7.0-src/src/keeshare/ShareExport.cpp:120:31: error: use of undeclared identifier 'Z_BEST_COMPRESSION'
:info:build                               Z_BEST_COMPRESSION,
:info:build                               ^
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_security_KeePassXC/KeePassXC/work/keepassxc-2.7.0-src/src/keeshare/ShareExport.cpp:125:13: error: use of undeclared identifier 'zipWriteInFileInZip'
:info:build             zipWriteInFileInZip(zf, data.data() + pos, len);
:info:build             ^
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_security_KeePassXC/KeePassXC/work/keepassxc-2.7.0-src/src/keeshare/ShareExport.cpp:129:9: error: use of undeclared identifier 'zipCloseFileInZip'
:info:build         zipCloseFileInZip(zf);
:info:build         ^
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_security_KeePassXC/KeePassXC/work/keepassxc-2.7.0-src/src/keeshare/ShareExport.cpp:186:19: error: use of undeclared identifier 'zipOpen64'
:info:build         auto zf = zipOpen64(resolvedPath.toLatin1().data(), 0);
:info:build                   ^
:info:build 5 errors generated.

Change History (4)

comment:1 Changed 3 years ago by detlevd (Detlev Droege)

Same problem on High Sierra and Mojave. The quick fix is to go into the build directory and edit the file src/keeshare/ShareExport.cpp. There, change the line

#include <zip.h>

to

#include <minizip/zip.h>

I'm not sure how to integrate that into the automatic patches though.

comment:2 Changed 3 years ago by Zippyzip

I confirm that does the trick for me.

comment:3 Changed 3 years ago by tenzap

comment:4 Changed 3 years ago by tenzap

Owner: set to tenzap
Resolution: fixed
Status: newclosed

In a68c0a3e76ace3c49dc7de5787572217277f60fb/macports-ports (master):

KeePassXC: fix compilation with minizip

Closes: #64921

Note: See TracTickets for help on using tickets.