erlangpack / bcrypt

Erlang wrapper for OpenBSD's Blowfish password hashing code
https://hex.pm/packages/bcrypt
Other
16 stars 19 forks source link

Fix linking on SmartOS/Illumos/Solaris. #3

Closed siepkes closed 6 years ago

siepkes commented 6 years ago

In addition to the changes discussed in #2 manually specifying lib stack smashing protector (-lssp) as ld flag is needed to build bcrypt on SmartOS. Seems to be the issue described here:

It kind of does cause problems. If you pass -fstack-protector when compiling libssp gets linked in automatically, but if you are building objects separately and then do the final link with ld libssp does not get linked in, and you get unresolved symbol errors. The solution is to make sure that -lssp is passed when linking with ld. Linux (and BSD, afaik) include SSP support directly in libc so there's no need to futz with the separate libssp library.

Not sure why @Licenser didn't run into this problem when he created #2. I've used both the SmartOS 16.4.1 (LTS) and 17.2.0 (latest) versions and ran in to this problem.

siepkes commented 6 years ago

EDIT: Forget this.

siepkes commented 6 years ago

Ah shoot... commented / closed wrong pull request. Sorry for the noise :-(

Licenser commented 6 years ago

This issue seems to have been recently introduced (or only happens on recent versions of SmartOS) things have been working well but it is now showing up here too.

I can 👍 that this works, @ddeboer can we get a merge and cut of this?

ddeboer commented 6 years ago

Published as 1.0.2.

Licenser commented 6 years ago

<3 thank you!

siepkes commented 6 years ago

Thanks all!