Ubuntu 20.04 compile ssl_verify_fun fails

I have some code that I have been building on Ubuntu 18.04, but decided to switch to Ubuntu 20.04. I encountered an issue though. First, this is Elixir 1.10.3 that comes in Ubuntu’s repository

$ elixir --version
Erlang/OTP 23 [erts-11.0.2] [source] [64-bit] [smp:32:32] [ds:32:32:10] [async-threads:1]

Elixir 1.10.3 (compiled with Erlang/OTP 22)

I’ve had no issues compiling on Ubuntu 18.04, but this is the error I get on 20.02:

$ mix deps.compile ssl_verify_fun
==> ssl_verify_fun
Compiling 7 files (.erl)
src/ssl_verify_hostname.erl:16: can't find include lib "public_key/include/public_key.hrl"
src/ssl_verify_hostname.erl:28: record 'OTPCertificate' undefined
src/ssl_verify_hostname.erl:30: record 'Extension' undefined
src/ssl_verify_hostname.erl:46: record 'OTPCertificate' undefined
src/ssl_verify_hostname.erl:76: record 'OTPCertificate' undefined
src/ssl_verify_pk.erl:14: can't find include lib "public_key/include/public_key.hrl"
src/ssl_verify_pk.erl:26: record 'OTPCertificate' undefined
src/ssl_verify_pk.erl:28: record 'Extension' undefined
src/ssl_verify_pk.erl:51: record 'OTPCertificate' undefined
src/ssl_verify_fun_cert_helpers.erl:13: can't find include lib "public_key/include/public_key.hrl"
src/ssl_verify_fun_cert_helpers.erl:23: undefined macro 'id-ce-subjectAltName'
src/ssl_verify_fun_cert_helpers.erl:9: function extract_dns_names/1 undefined
src/ssl_verify_fun_cert_helpers.erl:19: spec for undefined function extract_dns_names/1
src/ssl_verify_fun_cert_helpers.erl:19: record 'OTPCertificate' undefined
src/ssl_verify_fun_cert_helpers.erl:32: record 'OTPCertificate' undefined
src/ssl_verify_fun_cert_helpers.erl:34: record 'OTPCertificate' undefined
src/ssl_verify_fun_cert_helpers.erl:35: record 'OTPTBSCertificate' undefined
src/ssl_verify_fun_cert_helpers.erl:38: record 'OTPCertificate' undefined
src/ssl_verify_fun_cert_helpers.erl:38: record 'SubjectPublicKeyInfo' undefined
src/ssl_verify_fun_cert_helpers.erl:40: record 'OTPCertificate' undefined
src/ssl_verify_fun_cert_helpers.erl:41: record 'OTPTBSCertificate' undefined
src/ssl_verify_fun_cert_helpers.erl:42: record 'OTPSubjectPublicKeyInfo' undefined
src/ssl_verify_fun_cert_helpers.erl:48: record 'Extension' undefined
src/ssl_verify_fun_cert_helpers.erl:48: record 'Extension' undefined
src/ssl_verify_fun_cert_helpers.erl:55: record 'Extension' undefined
src/ssl_verify_fun_cert_helpers.erl:55: record 'Extension' undefined
src/ssl_verify_fun_cert_helpers.erl:57: variable 'ExtId' is unbound
src/ssl_verify_fun_cert_helpers.erl:57: record 'Extension' undefined
src/ssl_verify_fun_cert_helpers.erl:75: record 'AttributeTypeAndValue' undefined
src/ssl_verify_fun_cert_helpers.erl:77: variable 'CN' is unbound
src/ssl_verify_fun_cert_helpers.erl:49: Warning: function extensions_list/1 is unused
src/ssl_verify_fun_cert_helpers.erl:56: Warning: function select_extension/2 is unused
src/ssl_verify_fun_cert_helpers.erl:64: Warning: function extract_dns_names_from_alt_names/2 is unused
src/ssl_verify_fingerprint.erl:15: can't find include lib "public_key/include/public_key.hrl"
src/ssl_verify_fingerprint.erl:27: record 'OTPCertificate' undefined
src/ssl_verify_fingerprint.erl:29: record 'Extension' undefined
src/ssl_verify_fingerprint.erl:52: record 'OTPCertificate' undefined
could not compile dependency :ssl_verify_fun, "mix compile" failed. You can recompile this dependency with "mix deps.compile ssl_verify_fun", update it with "mix deps.update ssl_verify_fun" or clean it with "mix deps.clean ssl_verify_fun"

I saw somewhere else somebody mentioned I may not have make, but it is indeed installed. Is there some dependency I’m missing on my OS perhaps?

1 Like

Does this help: https://github.com/edgurgel/httpoison/issues/46 (also referenced by https://github.com/rrrene/elixirstatus-web/issues/27)

Looks like you may need to install erlang-dev

2 Likes

Sweet! That did it. Thank you :slight_smile: