certifi / erlang-certifi

SSL Certificates for Erlang
Other
131 stars 33 forks source link

Compilation issues on Ubuntu 14.04? #4

Closed lbarratt closed 8 years ago

lbarratt commented 8 years ago

Hey, thanks for erlang-certifi

I'm not sure if it's specific to my setup, but I seem to be running into compile issues on Ubuntu 14.04

Compiling with rebar compile seems to fail a random number of times until it eventually succeeds?

# Using a fresh Vagrant box (ubuntu/trusty64) + Erlang 18.2

vagrant-ubuntu-trusty-64:~/test/erlang-certifi$ rebar compile
==> erlang-certifi (compile)
Killed
vagrant@vagrant-ubuntu-trusty-64:~/test/erlang-certifi$ rebar compile
==> erlang-certifi (compile)
Compiled src/certifi.erl
Compiled src/certifi_weak.erl
Compiled src/certifi_cacerts.erl

My use case specifically is with Elixir 1.2.1 + HTTPoison. I see a similar result with mix deps.compile (I am guessing that this also using rebar for certifi?)

I've being trying to figure out what's going on but I have no idea what i'm looking for here!

benoitc commented 8 years ago

How much ram did you allocate to the vm?

ericmj commented 8 years ago

@benoitc Have you looked into reducing the memory requirements? We get reports from time to time about this dependency failing to compile on machines with <1gb memory.

lbarratt commented 8 years ago

@benoitc Thanks for the reply.

The VM had 512mb. Bumping to 1gb to seems to allow enough memory to compile consistently. It seems to occupy > 600mb when compiling, so I guess the kernel is killing the process in this case

lbarratt commented 8 years ago

Just an FYI for anyone else experiencing this issue, this seems to compile okay with rebar3. Memory usage seems to be greatly reduced compared with rebar?

Specifying manager: :rebar3 in Mix will compile with rebar3:

{:certifi, "0.3.0", manager: :rebar3, override: true}

benoitc commented 8 years ago

should be better in 0.4.0 let me know :)

lbarratt commented 8 years ago

Much better, thank you @benoitc!

benoitc commented 8 years ago

it's now available via hex. Enjoy!

benoitc commented 8 years ago

also thanks for the feedback :)