The short answer: RedHat and others have broken openssl-devel packages.


On Mon, Dec 16, 2013 at 11:55 PM, mayamatakeshi <mayamatakeshi@gmail.com> wrote:
All,
thanks for the directions.
Actually, it is not a problem with yaws.
Checking how HAVE_CRYPTO_HASH is resolved, i got that erlang itself is failing to load crypto lib:

# erl
Erlang R16B03 (erts-5.10.4) [source] [64-bit] [async-threads:10] [hipe] [kernel-poll:false]

Eshell V5.10.4  (abort with ^G)
1> m(crypto).
** exception error: undefined function crypto:module_info/0
     in function  c:m/1 (c.erl, line 503)
2>
=ERROR REPORT==== 17-Dec-2013::07:25:59 ===
Unable to load crypto library. Failed with error:
"load_failed, Failed to load NIF library: '/usr/local/lib/erlang/lib/crypto-3.2/priv/lib/crypto.so: undefined symbol: EC_GROUP_new_curve_GF2m'"
OpenSSL might not be installed on this system.

=ERROR REPORT==== 17-Dec-2013::07:25:59 ===
The on_load function for module crypto returned {error,
                                                 {load_failed,
                                                  "Failed to load NIF library: '/usr/local/lib/erlang/lib/crypto-3.2/priv/lib/crypto.so: undefined symbol: EC_GROUP_new_curve_GF2m'"}}


However, I have openssl-devel installed:

# yum install openssl-devel
Loaded plugins: security
Setting up Install Process
Package openssl-devel-1.0.1e-16.el6_5.x86_64 already installed and latest version
Nothing to do


So it seems EC_GROUP_new_curve_GF2m is not present in openssl libs anymore and crypto is not available.

Checking further,
erlang/crypto installation was fine with CentOS 6.4 some time ago.
Then recently CentOS  6.5 arrived and it updated openssl-devel from:
openssl-devel.x86_64                  1.0.0-27.el6_4.2
to:
openssl-devel.x86_64                  1.0.1e-16.el6_5

And it seem EC_GROUP_new_curve_GF2m is not present on the new version.
So, if you upgrade CentOS 6.x to latest 6.5 (or if you just upgrade openssl-devel to v. 1.0.1e-16.el6_5), then crypto will not load anymore because EC_GROUP_new_curve_GF2m is missing.

So this has nothing to do with yaws. I will report this to erlang devs.

Regards,
Takeshi




On Tue, Dec 17, 2013 at 12:01 AM, Patrick Moy <ptmoy2@gmail.com> wrote:
I ran into this same problem with yaws 1.97 and Ubuntu, and had to change a file in yaws to get rid of the problem.  But this should have been fixed in yaws 1.98.  I successfully compiled yaws 1.98 a few days ago using yaws-1.98.tar.gz file downloaded from here: http://yaws.hyber.org/download/.  Is this the tar ball you're using?




On Mon, Dec 16, 2013 at 4:20 AM, Christopher Faulet <christopher.faulet@capflam.org> wrote:
On 16/12/2013 01:59, mayamatakeshi wrote:
> I am using:
> Erlang R16B03 (erts-5.10.4) [source] [64-bit] [async-threads:10] [hipe]
> [kernel-poll:false]
>
> I tried with CentOS 6.4 and 6.5 and in both I get this:
>
> "/usr/local/bin/erlc" -Werror  -pa ../../yaws -I ../include -o ../ebin
> yaws_websockets.erl
> compile: warnings being treated as errors
> yaws_websockets.erl:1258: crypto:sha/1 is deprecated and will be removed
> in in a future release; use crypto:hash/2
> make[1]: *** [../ebin/yaws_websockets.beam] Error 1
> make[1]: Leaving directory `/usr/local/src/yaws-1.98/src'
> make: *** [all] Error 1
>

Hi,

Maybe you need to re-run the configure script. And to be sure, you also
could regenerate this script by running following command:

 autoreconf -fi

If crypto:hash/2 is found, HAVE_CRYPTO_HASH variable must be set to true
in include.mk.

Let me know if your problem persist.
--
Christopher



------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list



------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list



------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list




--
Olivier