bcrypt issue -- missing library?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

bcrypt issue -- missing library?

Lloyd R. Prentice-2

Hello,

 

I've been using https://github.com/ferd/erlpass successfully in my code for several years.

 

But I recently had to recompile my system. When I then tried to run the sign-in function, which had never before given me problems, I got this error message:

 

(wgd@127.0.0.1)2> show_page: "sign-in"

=INFO REPORT==== 28-Mar-2018::14:04:16 ===
{error,postback_request,
{url,"localhost:8020/wg_members/sign-in"},
{exit,
{noproc,
{gen_server,call,
[bcrypt_nif_worker,
{hashpw,<<"lloyd">>,
"$2a$12$Hnn1TK6HyTds7Xmf326k1.OIh/OEwi9uWqHNjHVwEQw0NKVw6X5LO"},

 

I then checked to see if crypto was started and it was:

 

(wgd@127.0.0.1)2> application:start(crypto).
{error,{already_started,crypto}}

 

But application:start(bcrypt) turned up this error message:

 

(wgd@127.0.0.1)4> application:start(bcrypt).

=WARNING REPORT==== 28-Mar-2018::14:12:39 ===
The on_load function for module bcrypt_nif returned {error,
{bad_lib,
"Library version (2.11) not compatible (with 2.8)."}}
{error,
{{shutdown,
{failed_to_start_child,bcrypt_nif_worker,
{undef,
[{bcrypt_nif,create_ctx,[],[]},
{bcrypt_nif_worker,init,1,
[{file,"src/bcrypt_nif_worker.erl"},{line,31}]}

 

So now I'm stuck.

 

I'm running Erlang/OTP R19

 

Can anyone tell me how to get bcrypt or functional equivalent working again?

 

All the best,

 

LRP

 

 

 

 

 

*********************************************
My books:

THE GOSPEL OF ASHES
http://thegospelofashes.com

Strength is not enough. Do they have the courage
and the cunning? Can they survive long enough to
save the lives of millions?

FREEIN' PANCHO
http://freeinpancho.com

A community of misfits help a troubled boy find his way

AYA TAKEO
http://ayatakeo.com

Star-crossed love, war and power in an alternative
universe

Available through Amazon or by request from your
favorite bookstore


**********************************************


_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: bcrypt issue -- missing library?

Roger Lipscombe-2
On 28 March 2018 at 19:38,  <[hidden email]> wrote:
> (wgd@127.0.0.1)4> application:start(bcrypt).
>
> =WARNING REPORT==== 28-Mar-2018::14:12:39 ===
> The on_load function for module bcrypt_nif returned {error,
> {bad_lib,
> "Library version (2.11) not compatible (with 2.8)."}}

You've compiled the NIF against a later version of Erlang/OTP than the
one you're attempting to use it with. The version list in erl_nif.h
says that 2.11 is OTP-19, and 2.8 is OTP-18.0.
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: bcrypt issue -- missing library?

Roger Lipscombe-2
On 28 March 2018 at 20:21, Roger Lipscombe <[hidden email]> wrote:
> You've compiled the NIF against a later version of Erlang/OTP than the
> one you're attempting to use it with. The version list in erl_nif.h
> says that 2.11 is OTP-19, and 2.8 is OTP-18.0.

See https://github.com/erlang/otp/blob/master/erts/emulator/beam/erl_nif.h#L33
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: bcrypt issue -- missing library?

Lloyd R. Prentice-2
In reply to this post by Roger Lipscombe-2

Hi Roger,

 

I've never intentionally compiled the NIF. The only thing I've compiled is my application developed in Erlang Nitrogen.

 

Some months ago I did provision a new workstation with Erlang R19. Perhaps that's when the discrepancy crept in.

 

It seems that the problem is above my pay grade--- either in Nitrogen or Erlang.

 

It's very frustrating trying to build something to serve a worthy cause but to have tools change under my feet  without warning. I had a similar problem with the string library.

 

I'm a tool user, not a tool builder.

 

I have utmost respect for Erlang tool builders. They make possible what I'm trying to do. I know much less than they do; have much less experience. So I depend upon them. But problems like this cost me precious time and confidence.

 

Is this an issue of my own ignorance? Or an Erlang issue? Or an issue for software in general?

 

If my ignorance--- I'm sorry. I do try to fill in the gaps.

 

As it stands, I still don't know what to do to move forward.

 

All the best,

 

LRP

 

 

 

 

 

 

 

 

-----Original Message-----
From: "Roger Lipscombe" <[hidden email]>
Sent: Wednesday, March 28, 2018 3:21pm
To: "Lloyd Prentice" <[hidden email]>
Cc: "Erlang" <[hidden email]>
Subject: Re: [erlang-questions] bcrypt issue -- missing library?

On 28 March 2018 at 19:38, <[hidden email]> wrote:
> (wgd@127.0.0.1)4> application:start(bcrypt).
>
> =WARNING REPORT==== 28-Mar-2018::14:12:39 ===
> The on_load function for module bcrypt_nif returned {error,
> {bad_lib,
> "Library version (2.11) not compatible (with 2.8)."}}

You've compiled the NIF against a later version of Erlang/OTP than the
one you're attempting to use it with. The version list in erl_nif.h
says that 2.11 is OTP-19, and 2.8 is OTP-18.0.


_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: bcrypt issue -- missing library?

Bob Ippolito
You should be able to fix this by deleting your build artifacts and recompiling with the same version of Erlang that you plan to run them with. The build tool you're using can probably do this for you (for rebar3 or rebar it'd be the clean command, if it's Makefile based you can probably make clean). The tools haven't changed, but they are clearly not robust to this kind of accident.

On Wed, Mar 28, 2018 at 1:34 PM, <[hidden email]> wrote:

Hi Roger,

 

I've never intentionally compiled the NIF. The only thing I've compiled is my application developed in Erlang Nitrogen.

 

Some months ago I did provision a new workstation with Erlang R19. Perhaps that's when the discrepancy crept in.

 

It seems that the problem is above my pay grade--- either in Nitrogen or Erlang.

 

It's very frustrating trying to build something to serve a worthy cause but to have tools change under my feet  without warning. I had a similar problem with the string library.

 

I'm a tool user, not a tool builder.

 

I have utmost respect for Erlang tool builders. They make possible what I'm trying to do. I know much less than they do; have much less experience. So I depend upon them. But problems like this cost me precious time and confidence.

 

Is this an issue of my own ignorance? Or an Erlang issue? Or an issue for software in general?

 

If my ignorance--- I'm sorry. I do try to fill in the gaps.

 

As it stands, I still don't know what to do to move forward.

 

All the best,

 

LRP

 

 

 

 

 

 

 

 

-----Original Message-----
From: "Roger Lipscombe" <[hidden email]>
Sent: Wednesday, March 28, 2018 3:21pm
To: "Lloyd Prentice" <[hidden email]>
Cc: "Erlang" <[hidden email]>
Subject: Re: [erlang-questions] bcrypt issue -- missing library?

On 28 March 2018 at 19:38, <[hidden email]> wrote:
> ([hidden email])4> application:start(bcrypt).
>
> =WARNING REPORT==== 28-Mar-2018::14:12:39 ===
> The on_load function for module bcrypt_nif returned {error,
> {bad_lib,
> "Library version (2.11) not compatible (with 2.8)."}}

You've compiled the NIF against a later version of Erlang/OTP than the
one you're attempting to use it with. The version list in erl_nif.h
says that 2.11 is OTP-19, and 2.8 is OTP-18.0.


_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions



_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: bcrypt issue -- missing library? -- solved

Lloyd R. Prentice-2
In reply to this post by Lloyd R. Prentice-2

First, apologies for my rant. I think there is a deep issue here, but much beyond my competencies to understand or solve.

 

Jesse Gumm has kindly helped me move forward.

 

1. Delete bcrypt from the Nitrogen stack

2. Recompile my application so rebar can pull in a current version of bcrypt.

 

This, in retrospect, is a simple technique borne, I suspect, out of experiential wisdom.

 

I wish I had understood this general technique early in my Erlang learning curve. I don't have a blog, but it would be great to have a list or tree of troubleshooting debugging techniques like this available to Erlang noobies.

 

Again, apologies.

 

All the best,

 

LRP

 

 

-----Original Message-----
From: [hidden email]
Sent: Wednesday, March 28, 2018 4:34pm
To: "Roger Lipscombe" <[hidden email]>
Cc: "Erlang" <[hidden email]>
Subject: Re: [erlang-questions] bcrypt issue -- missing library?

Hi Roger,

 

I've never intentionally compiled the NIF. The only thing I've compiled is my application developed in Erlang Nitrogen.

 

Some months ago I did provision a new workstation with Erlang R19. Perhaps that's when the discrepancy crept in.

 

It seems that the problem is above my pay grade--- either in Nitrogen or Erlang.

 

It's very frustrating trying to build something to serve a worthy cause but to have tools change under my feet  without warning. I had a similar problem with the string library.

 

I'm a tool user, not a tool builder.

 

I have utmost respect for Erlang tool builders. They make possible what I'm trying to do. I know much less than they do; have much less experience. So I depend upon them. But problems like this cost me precious time and confidence.

 

Is this an issue of my own ignorance? Or an Erlang issue? Or an issue for software in general?

 

If my ignorance--- I'm sorry. I do try to fill in the gaps.

 

As it stands, I still don't know what to do to move forward.

 

All the best,

 

LRP

 

 

 

 

 

 

 

 

-----Original Message-----
From: "Roger Lipscombe" <[hidden email]>
Sent: Wednesday, March 28, 2018 3:21pm
To: "Lloyd Prentice" <[hidden email]>
Cc: "Erlang" <[hidden email]>
Subject: Re: [erlang-questions] bcrypt issue -- missing library?

On 28 March 2018 at 19:38, <[hidden email]> wrote:
> (wgd@127.0.0.1)4> application:start(bcrypt).
>
> =WARNING REPORT==== 28-Mar-2018::14:12:39 ===
> The on_load function for module bcrypt_nif returned {error,
> {bad_lib,
> "Library version (2.11) not compatible (with 2.8)."}}

You've compiled the NIF against a later version of Erlang/OTP than the
one you're attempting to use it with. The version list in erl_nif.h
says that 2.11 is OTP-19, and 2.8 is OTP-18.0.


_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: bcrypt issue -- missing library?

Lloyd R. Prentice-2
In reply to this post by Bob Ippolito

Thank you, Bob, for your patience and tolerance.

 

Jesse Gumm led me to the same solution.I wish I'd understood it much earlier in my adventures with Erlang.

 

All the best,

 

Lloyd

 

 

 

 

 

 

-----Original Message-----
From: "Bob Ippolito" <[hidden email]>
Sent: Wednesday, March 28, 2018 4:59pm
To: "Lloyd Prentice" <[hidden email]>
Cc: "Roger Lipscombe" <[hidden email]>, "Erlang" <[hidden email]>
Subject: Re: [erlang-questions] bcrypt issue -- missing library?

You should be able to fix this by deleting your build artifacts and recompiling with the same version of Erlang that you plan to run them with. The build tool you're using can probably do this for you (for rebar3 or rebar it'd be the clean command, if it's Makefile based you can probably make clean). The tools haven't changed, but they are clearly not robust to this kind of accident.

On Wed, Mar 28, 2018 at 1:34 PM, <[hidden email]> wrote:

Hi Roger,

 

I've never intentionally compiled the NIF. The only thing I've compiled is my application developed in Erlang Nitrogen.

 

Some months ago I did provision a new workstation with Erlang R19. Perhaps that's when the discrepancy crept in.

 

It seems that the problem is above my pay grade--- either in Nitrogen or Erlang.

 

It's very frustrating trying to build something to serve a worthy cause but to have tools change under my feet  without warning. I had a similar problem with the string library.

 

I'm a tool user, not a tool builder.

 

I have utmost respect for Erlang tool builders. They make possible what I'm trying to do. I know much less than they do; have much less experience. So I depend upon them. But problems like this cost me precious time and confidence.

 

Is this an issue of my own ignorance? Or an Erlang issue? Or an issue for software in general?

 

If my ignorance--- I'm sorry. I do try to fill in the gaps.

 

As it stands, I still don't know what to do to move forward.

 

All the best,

 

LRP

 

 

 

 

 

 

 

 

-----Original Message-----
From: "Roger Lipscombe" <[hidden email]>
Sent: Wednesday, March 28, 2018 3:21pm
To: "Lloyd Prentice" <[hidden email]>
Cc: "Erlang" <[hidden email]>
Subject: Re: [erlang-questions] bcrypt issue -- missing library?

On 28 March 2018 at 19:38, <[hidden email]> wrote:
> ([hidden email])4> application:start(bcrypt).
>
> =WARNING REPORT==== 28-Mar-2018::14:12:39 ===
> The on_load function for module bcrypt_nif returned {error,
> {bad_lib,
> "Library version (2.11) not compatible (with 2.8)."}}

You've compiled the NIF against a later version of Erlang/OTP than the
one you're attempting to use it with. The version list in erl_nif.h
says that 2.11 is OTP-19, and 2.8 is OTP-18.0.


_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions


_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions