Wednesday, December 5, 2007

Erlang R12B Released

New version of Erlang out today - release notes here.

For newbies like me, a big reason to upgrade is the much improved error reporting in the Erlang shell. For example, here's how the previous version reports a divide-by-zero exception:

Eshell V5.5.5  (abort with ^G)
1> 1/0.
** exited: {badarith,[{erlang,'/',[1,0]},
{shell,eval_loop,3}]} **

=ERROR REPORT==== 5-Dec-2007::23:32:41 ===
Error in process <0.31.0> with exit value: {badarith,[{erlang,'/',[1,0]},{erl_eval,do_apply,5},{shell,exprs,6},{shell,eval_loop,3}]}
New version:
Eshell V5.6  (abort with ^G)
1> 1/0.
** exception error: bad argument in an arithmetic expression
in operator '/'/2
called as 1 / 0

I ran into one small hitch building the new version on my Mac, namely a "libgd not found" error while running "./configure". I installed version 2.0.36RC1 from here, which did the trick:


Heath Borders said...

I was also trying to compile erlang on my mac with leopard 10.5.1, but I got one more error than yours:

odbc : ODBC library - link check failed

I haven't installed any odbc libraries, and I've done plenty of googling to no avail.

What ODBC do you have installed?

Heath Borders said...

I'm running on an intel core2 duo macbook pro, and according to this list posting:

odbc doesn't work unless the --enable-darwin-64bit option is used. This then breaks libgd, but the --with-gd=/usr/local option seemed to fix it.

Matthew Foemmel said...

I installed XCode a while back, and it looks like it dumped a few odbc libraries in /usr/lib, which the erlang build must have picked up.

I didn't use the "enable-darwin-64bit" flag, however. I assume that means my build is only a 32-bit?

Heath Borders said...

Are you running on an intel mac? If you're on PPC, it might not be 64-but especially if you're running on a G4.

I tried a bunch of things, but was never able to get it to work. You're welcome to check out my blog post regarding my adventure

Lee Barney said...

I used

./configure --enable-darwin-64bit --with-gd=/usr/local

and everything worked great.

MacBook Pro 10.5.4


Ankansha said...

We change our behavior when the pain of staying the same becomes greater than the pain of changing.