Kitura / BlueCryptor

Swift cross-platform crypto library using CommonCrypto/libcrypto
Apache License 2.0
190 stars 47 forks source link

Fresh checkout won't build #42

Closed triztian closed 6 years ago

triztian commented 6 years ago

I just did a checkout of the project:

commit 7865ad2f864633eb945dc77c43213fb34688bb3e
Author: Bill Abt <babt@me.com>
Date:   Mon Jun 25 11:59:50 2018 -0400

OS

developer@ubuntu:~/Repositories/github.com/IBM-swift/BlueCryptor$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.4 LTS
Release:    16.04
Codename:   xenial

Toolchain

developer@ubuntu:~/Repositories/github.com/IBM-swift/BlueCryptor$ swift --version
Swift version 4.1.2 (swift-4.1.2-RELEASE)
Target: x86_64-unknown-linux-gnu

Details

After running

swift build

I get:

Compile Swift Module 'Cryptor' (10 sources)
<module-includes>:1:10: note: in file included from <module-includes>:1:
#include "shim.h"
         ^
/home/developer/Repositories/github.com/IBM-swift/BlueCryptor/.build/checkouts/OpenSSL.git--6385253650136148626/shim.h:20:10: error: 'openssl/conf.h' file not found
#include <openssl/conf.h>
         ^
/home/developer/Repositories/github.com/IBM-swift/BlueCryptor/Sources/Cryptor/Digest.swift:23:9: error: could not build C module 'OpenSSL'
        import OpenSSL
               ^
error: terminated(1): /opt/swift-4.1.2/usr/bin/swift-build-tool -f /home/developer/Repositories/github.com/IBM-swift/BlueCryptor/.build/debug.yaml main output:
triztian commented 6 years ago

I think I may have fixed the issue, after running:

sudo apt install libssl-dev

I was able to re-run swift build and it compiled successfully,

Perhaps updating the installation instructions in the readme for Linux would be a good idea

billabt commented 6 years ago

Fixed in version 1.0.7.