sinasamavati / leptus

The Erlang REST framework
https://sinasamavati.com/leptus
MIT License
346 stars 50 forks source link

Building on FreeBSD with Cowboy 0.9 #36

Open llaisdy opened 9 years ago

llaisdy commented 9 years ago

Below is what happens with the cowboy part of the make process. If I edit the Makefile to depend on cowboy 1.0.1, the build is successful - but obvs that's no good if leptus doesn't work with cowboy 1.0.

This error only happens on FreeBSD, not on macosx (on FreeBSD I am using GNU make).

I'll look more into this just now and see if I can fix it to work with cowboy 0.9.

$ make

curl -L https://github.com/extend/cowboy/archive/0.9.0.tar.gz -o /usr/home/ivan/local/leptus/deps/cowboy.tar.gz

% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 122 0 122 0 0 238 0 --:--:-- --:--:-- --:--:-- 238 100 123 0 123 0 0 197 0 --:--:-- --:--:-- --:--:-- 197 100 3900k 100 3900k 0 0 524k 0 0:00:07 0:00:07 --:--:-- 648k

mkdir -p /usr/home/ivan/local/leptus/deps/cowboy

tar xzf /usr/home/ivan/local/leptus/deps/cowboy.tar.gz -C /usr/home/ivan/local/leptus/deps/cowboy --strip-components=1

make[1]: Entering directory '/usr/home/ivan/local/leptus/deps/cowboy' --2014-11-24 11:15:57-- https://raw.github.com/extend/erlang.mk/master/packages.v1.tsv Resolving raw.github.com (raw.github.com)... 185.31.17.133 Connecting to raw.github.com (raw.github.com)|185.31.17.133|:443... connected. ERROR: cannot verify raw.github.com's certificate, issued by '/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert High Assurance CA-3': Unable to locally verify the issuer's authority. To connect to raw.github.com insecurely, use --no-check-certificate'. git clone -n --awk 'BEGIN { FS = "\t" }; $1 == "cowlib" { print $2 }' /usr/home/ivan/local/leptus/deps/cowboy/.erlang.mk.packages.v1` /usr/home/ivan/local/leptus/deps/cowlib awk: can't open file /usr/home/ivan/local/leptus/deps/cowboy/.erlang.mk.packages.v1 source line number 1

fatal: repository '/usr/home/ivan/local/leptus/deps/cowlib' does not exist erlang.mk:170: recipe for target '/usr/home/ivan/local/leptus/deps/cowlib' failed make[1]: * [/usr/home/ivan/local/leptus/deps/cowlib] Error 128 make[1]: Leaving directory '/usr/home/ivan/local/leptus/deps/cowboy' Makefile:86: recipe for target '/usr/home/ivan/local/leptus/deps/cowboy/' failed make: * [/usr/home/ivan/local/leptus/deps/cowboy/] Error 2

llaisdy commented 9 years ago

It seems the erlang.mk bundled in cowboy 0.9.0 doesn't use wget --no-check-certificate, but later ones do. Why this affects BSD but not the Mac idk. Will track that down tonight when I get my hands on the Mac.

sinasamavati commented 9 years ago

Thank you for reporting this, Ivan!

I think you're totally right, it's erlang.mk's fault in Cowboy 0.9.0.

I keep this issue open until we migrate to Cowboy 1.0.

Thanks.

essen commented 9 years ago

Hey, I would deeply appreciate if you could update Cowboy to 1.0 as that would fix compile issues with current erlang.mk. Thanks!