Require CMake 3.4 and use the OpenSSL imported libs
ClosedPublic

Authored by vonreth on Jan 2 2019, 8:29 AM.

Details

Summary

Fixes
00:09:45.140 [162/278] Linking CXX shared module lib/qca-qt5/crypto/libqca-ossl.dylib
00:09:45.140 FAILED: lib/qca-qt5/crypto/libqca-ossl.dylib
00:09:45.140 : && /usr/bin/clang++ -O2 -g -DNDEBUG -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -bundle -Wl,-headerpad_max_install_names -o lib/qca-qt5/crypto/libqca-ossl.dylib plugins/qca-ossl/CMakeFiles/qca-ossl.dir/qca-ossl.cpp.o lib/qca-qt5.framework/Versions/2.2.0/qca-qt5 /Users/packaging/Craft/BinaryCache/macos-64-clang/lib/libssl.dylib /Users/packaging/Craft/BinaryCache/macos-64-clang/lib/libcrypto.dylib -lcrypto /Users/packaging/Craft/BinaryCache/macos-64-clang/lib/QtCore.framework/QtCore -framework CoreFoundation -framework Security && :
00:09:45.140 ld: library not found for -lcrypto
00:09:45.140 clang: error: linker command failed with exit code 1 (use -v to see invocation)

Diff Detail

Repository
R486 QCA Library
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
vonreth requested review of this revision.Jan 2 2019, 8:29 AM
vonreth created this revision.
vonreth edited the summary of this revision. (Show Details)Jan 2 2019, 10:08 AM

The CMake version bump is fine from my perspective given that Frameworks requires a higher version than what you're bumping it to.

The change to targets is also fine with me - in general targets work much better than older style find_package() followed by include_directories() and add_definitions() so this can go in from my perspective.

Only query I do have is what this was trying to do previously:

string(REGEX REPLACE "\\.[^.]*$" ".pdb" LOCATION "${LOCATION}")
dfaure accepted this revision.Mar 3 2019, 12:05 AM
string(REGEX REPLACE "\\.[^.]*$" ".pdb" LOCATION "${LOCATION}")

means take the value of LOCATION, replace any extension with .pdb and put the result into LOCATION again.
(docu: string(REGEX REPLACE <match-regex> <replace-expr> <out-var> <input>...))

I assume $<TARGET_PDB_FILE:${TARGET}> does the same, except much better, because cmake sets that so it can take care of all sorts of corner cases if needed.

This revision is now accepted and ready to land.Mar 3 2019, 12:05 AM
This revision was automatically updated to reflect the committed changes.
sitter added a subscriber: sitter.Mar 19 2019, 11:16 AM

Looks like that broke something... note the output at the bottom

$ rm -rf * && cmake ..
-- The C compiler identification is GNU 7.3.0
-- The CXX compiler identification is GNU 7.3.0
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/g++
-- Check for working CXX compiler: /usr/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Doxygen: /usr/bin/doxygen (found version "1.8.13") found components:  doxygen dot 
-- Building with Qt5 support
-- Installed package is NOT relocatable
-- Checking for certstore..
-- Found system certstore
-- certstore path: /etc/ssl/certs/ca-certificates.crt
-- Looking for include file sys/filio.h
-- Looking for include file sys/filio.h - not found
-- Performing Test MLOCK_TAKES_VOID
-- Performing Test MLOCK_TAKES_VOID - Success
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") 
-- Checking for one of the modules 'botan>=1.10;botan-1.10;botan-2'
-- Found libgcrypt: -lgcrypt
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of gcry_error_t
-- Check size of gcry_error_t - done
-- Checking for one of the modules 'nss'
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.1.0g") 
-- Looking for EVP_md2
-- Looking for EVP_md2 - not found
CMake Warning at plugins/qca-ossl/CMakeLists.txt:18 (message):
  qca-ossl will be compiled without MD2 digest algorithm support


-- Looking for EVP_aes_128_ctr
-- Looking for EVP_aes_128_ctr - found
-- Looking for EVP_aes_128_gcm
-- Looking for EVP_aes_128_gcm - found
-- Looking for EVP_aes_128_ccm
-- Looking for EVP_aes_128_ccm - found
-- Looking for EVP_sha
-- Looking for EVP_sha - not found
CMake Warning at plugins/qca-ossl/CMakeLists.txt:46 (message):
  qca-ossl will be compiled without SHA-0 digest algorithm support


-- Checking for one of the modules 'libpkcs11-helper-1'

Plugins:
  qca-botan off
  qca-cyrus-sasl off
  qca-gcrypt on
  qca-gnupg on
  qca-logger on
  qca-nss off
  qca-ossl on
  qca-pkcs11 off
  qca-softstore on


!!!!!!!!!!!!!!!!!!!!!ATTENTION!!!!!!!!!!!!!!!!!!!!!!
!! QCA will be installed in Qt prefix             !!
!! If you want to install in /usr/local           !!
!! you MUST explicity define CMAKE_INSTALL_PREFIX !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


QCA prefix is /bin/sh: 1: cannot open TARGET_FILE:Qt5::qmake: No such file
/bin/sh: 1: $: not found
Plugins will be installed to /bin/sh: 1: cannot open TARGET_FILE:Qt5::qmake: No such file
/bin/sh: 1: $: not found
Binary will be installed to /bin/sh: 1: cannot open TARGET_FILE:Qt5::qmake: No such file
/bin/sh: 1: $: not found
Library will be installed to /bin/sh: 1: cannot open TARGET_FILE:Qt5::qmake: No such file
/bin/sh: 1: $: not found
Public headers will be installed to /bin/sh: 1: cannot open TARGET_FILE:Qt5::qmake: No such file
/bin/sh: 1: $: not found/Qca-qt5
Private headers will be installed to /bin/sh: 1: cannot open TARGET_FILE:Qt5::qmake: No such file
/bin/sh: 1: $: not found/Qca-qt5
Feature file will be installed to /bin/sh: 1: cannot open TARGET_FILE:Qt5::qmake: No such file
/bin/sh: 1: $: not found/mkspecs/features
Documentation will be installed to /bin/sh: 1: cannot open TARGET_FILE:Qt5::qmake: No such file
/bin/sh: 1: $: not found/html/qca
Man page will be installed to /bin/sh: 1: cannot open TARGET_FILE:Qt5::qmake: No such file
/bin/sh: 1: $: not found/man
Pkg-config file will be installed to /bin/sh: 1: cannot open TARGET_FILE:Qt5::qmake: No such file
/bin/sh: 1: $: not found/pkgconfig

-- Configuring done
-- Generating done
-- Build files have been written to: /home/me/src/git/qca/build

I reproduce it, but if you clean the builddir again and set a CMAKE_INSTALL_PREFIX, it works, right?

and the !!! warning says " you MUST explicity define CMAKE_INSTALL_PREFIX" so I guess all we can do is make sure we don't end up with more weird stuff after that.

https://phabricator.kde.org/D20030