lastpass / lastpass-cli

LastPass command line interface tool
GNU General Public License v2.0
2.86k stars 291 forks source link

Build fails on macOS 10.6: `error: CommonCrypto/CommonKeyDerivation.h: No such file or directory` #701

Open barracuda156 opened 3 months ago

barracuda156 commented 3 months ago

There are two issues. A trivial one is usage of unsupported flag:

/opt/local/bin/ccache /usr/bin/gcc-4.2 -D_GNU_SOURCE -I/opt/local/include/libxml2 -I/opt/local/libexec/openssl3/include -I/opt/local/include -pipe -Os -DNDEBUG -I/opt/local/include -std=gnu99 -arch ppc -mmacosx-version-min=10.6 -std=gnu99 -pedantic -Wall -Wextra -Wno-language-extension-token -Wno-deprecated-declarations -MD -MT CMakeFiles/lpass.dir/cipher.c.o -MF CMakeFiles/lpass.dir/cipher.c.o.d -o CMakeFiles/lpass.dir/cipher.c.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_security_lastpass-cli/lastpass-cli/work/lastpass-cli-1.5.0/cipher.c
cc1: error: unrecognized command line option "-Wno-language-extension-token"
cc1: error: unrecognized command line option "-Wno-language-extension-token"
make[2]: *** [CMakeFiles/lpass.dir/clipboard.c.o] Error 1

Once flag removed, build proceeds, but fails here:

[ 79%] Building C object CMakeFiles/lpass.dir/notes.c.o
/opt/local/bin/ccache /usr/bin/gcc-4.2 -D_GNU_SOURCE -I/opt/local/include/libxml2 -I/opt/local/libexec/openssl3/include -I/opt/local/include -pipe -Os -DNDEBUG -I/opt/local/include -std=gnu99 -arch ppc -mmacosx-version-min=10.6 -std=gnu99 -pedantic -Wall -Wextra -Wno-deprecated-declarations -MD -MT CMakeFiles/lpass.dir/notes.c.o -MF CMakeFiles/lpass.dir/notes.c.o.d -o CMakeFiles/lpass.dir/notes.c.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_security_lastpass-cli/lastpass-cli/work/lastpass-cli-1.5.0/notes.c
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_security_lastpass-cli/lastpass-cli/work/lastpass-cli-1.5.0/kdf.c:46:46: error: CommonCrypto/CommonKeyDerivation.h: No such file or directory
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_security_lastpass-cli/lastpass-cli/work/lastpass-cli-1.5.0/kdf.c: In function ‘pbkdf2_hash’:
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_security_lastpass-cli/lastpass-cli/work/lastpass-cli-1.5.0/kdf.c:49: warning: implicit declaration of function ‘CCKeyDerivationPBKDF’
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_security_lastpass-cli/lastpass-cli/work/lastpass-cli-1.5.0/kdf.c:49: error: ‘kCCPBKDF2’ undeclared (first use in this function)
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_security_lastpass-cli/lastpass-cli/work/lastpass-cli-1.5.0/kdf.c:49: error: (Each undeclared identifier is reported only once
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_security_lastpass-cli/lastpass-cli/work/lastpass-cli-1.5.0/kdf.c:49: error: for each function it appears in.)
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_security_lastpass-cli/lastpass-cli/work/lastpass-cli-1.5.0/kdf.c:49: error: ‘kCCPRFHmacAlgSHA256’ undeclared (first use in this function)
make[2]: *** [CMakeFiles/lpass.dir/kdf.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_security_lastpass-cli/lastpass-cli/work/build'
make[1]: *** [CMakeFiles/lpass.dir/all] Error 2
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_security_lastpass-cli/lastpass-cli/work/build'
make: *** [all] Error 2